BlockDeathChest: Switch base class from BlockEnderChest to BlockContainer
parent
b1c80d7bde
commit
140e376ca8
|
@ -2,21 +2,16 @@ package lostcave.deathchests.block;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import net.minecraft.block.BlockContainer;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockEnderChest;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.inventory.InventoryEnderChest;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityEnderChest;
|
|
||||||
import net.minecraft.world.Explosion;
|
import net.minecraft.world.Explosion;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockDeathChest extends BlockEnderChest {
|
public class BlockDeathChest extends BlockContainer {
|
||||||
|
|
||||||
private static final BlockDeathChest instance = new BlockDeathChest();
|
private static final BlockDeathChest instance = new BlockDeathChest();
|
||||||
|
|
||||||
|
@ -25,12 +20,23 @@ public class BlockDeathChest extends BlockEnderChest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlockDeathChest() {
|
private BlockDeathChest() {
|
||||||
super();
|
super(Material.rock);
|
||||||
this.setBlockName("death_chest");
|
this.setBlockName("death_chest");
|
||||||
this.disableStats();
|
this.disableStats();
|
||||||
this.setBlockUnbreakable();
|
this.setBlockUnbreakable();
|
||||||
// same value as bedrock
|
// same value as bedrock
|
||||||
this.setResistance(6000000.0F);
|
this.setResistance(6000000.0F);
|
||||||
|
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderAsNormalBlock() {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -81,29 +87,12 @@ public class BlockDeathChest extends BlockEnderChest {
|
||||||
return new TileDeathChest();
|
return new TileDeathChest();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* A randomly called display update to be able to add particles or other items
|
|
||||||
* for display
|
|
||||||
* <br />
|
|
||||||
* <br/>
|
|
||||||
* This is here to disable the particles that would otherwise be emitted
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void randomDisplayTick(World p_149734_1_, int p_149734_2_, int p_149734_3_, int p_149734_4_, Random p_149734_5_) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
|
||||||
this.blockIcon = p_149651_1_.registerIcon("cobblestone");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class TileDeathChest extends TileEntity {
|
public static class TileDeathChest extends TileEntity {
|
||||||
//TODO
|
//TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Custom texture? (optional)
|
//TODO: Custom texture
|
||||||
//TODO: add chest inventory
|
//TODO: add chest inventory
|
||||||
//TODO: drop chest contents
|
//TODO: drop chest contents
|
||||||
//TODO: Remove chest when empty
|
//TODO: Remove chest when empty
|
||||||
|
|
Loading…
Reference in New Issue