BlockDeathChest: Switch base class from BlockEnderChest to BlockContainer

master
BodgeMaster 2022-12-20 17:47:33 +01:00
parent b1c80d7bde
commit 140e376ca8
1 changed files with 17 additions and 28 deletions

View File

@ -2,21 +2,16 @@ package lostcave.deathchests.block;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockEnderChest;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.inventory.InventoryEnderChest;
import net.minecraft.item.Item;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityEnderChest;
import net.minecraft.world.Explosion;
import net.minecraft.world.World;
public class BlockDeathChest extends BlockEnderChest {
public class BlockDeathChest extends BlockContainer {
private static final BlockDeathChest instance = new BlockDeathChest();
@ -25,12 +20,23 @@ public class BlockDeathChest extends BlockEnderChest {
}
private BlockDeathChest() {
super();
super(Material.rock);
this.setBlockName("death_chest");
this.disableStats();
this.setBlockUnbreakable();
// same value as bedrock
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
@ -81,29 +87,12 @@ public class BlockDeathChest extends BlockEnderChest {
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 {
//TODO
}
//TODO: Custom texture? (optional)
//TODO: Custom texture
//TODO: add chest inventory
//TODO: drop chest contents
//TODO: Remove chest when empty