BlockDeathChest: start implementation of TileEntity

master
BodgeMaster 2022-12-20 17:48:18 +01:00
parent 140e376ca8
commit 397d66ce54
1 changed files with 20 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.Explosion; import net.minecraft.world.Explosion;
@ -89,7 +90,25 @@ public class BlockDeathChest extends BlockContainer {
public static class TileDeathChest extends TileEntity { public static class TileDeathChest extends TileEntity {
//TODO
private ItemStack[] containedItems;
@Override
public void readFromNBT(NBTTagCompound compound) {
super.readFromNBT(compound);
//TODO: read contained items
}
@Override
public void writeToNBT(NBTTagCompound compound) {
super.writeToNBT(compound);
//TODO: write contained items
}
//TODO: some way of adding items
//TODO: some way of getting the items
} }
//TODO: Custom texture //TODO: Custom texture