BlockDeathChest: Finish up by adding a texture
parent
aa2ae4f20b
commit
df0f3d2243
|
@ -9,6 +9,7 @@ import lostcave.deathchests.util.Config;
|
||||||
import lostcave.deathchests.util.Debug;
|
import lostcave.deathchests.util.Debug;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
@ -17,6 +18,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.ChatComponentText;
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.Explosion;
|
import net.minecraft.world.Explosion;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@ -28,6 +30,8 @@ public class BlockDeathChest extends BlockContainer {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private IIcon[] icons = new IIcon[6];
|
||||||
|
|
||||||
private BlockDeathChest() {
|
private BlockDeathChest() {
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
this.setBlockName("death_chest");
|
this.setBlockName("death_chest");
|
||||||
|
@ -36,6 +40,22 @@ public class BlockDeathChest extends BlockContainer {
|
||||||
// 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);
|
this.setBlockBounds(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||||
|
this.setBlockTextureName("deathchests:deathchest_top");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerBlockIcons(IIconRegister register) {
|
||||||
|
icons[0] = register.registerIcon("deathchests:deathchest_top");
|
||||||
|
icons[1] = register.registerIcon("deathchests:deathchest_top");
|
||||||
|
icons[2] = register.registerIcon("deathchests:deathchest_side");
|
||||||
|
icons[3] = register.registerIcon("deathchests:deathchest_side");
|
||||||
|
icons[4] = register.registerIcon("deathchests:deathchest_side");
|
||||||
|
icons[5] = register.registerIcon("deathchests:deathchest_side");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IIcon getIcon(int side, int meta) {
|
||||||
|
return icons[side];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -150,15 +170,6 @@ public class BlockDeathChest extends BlockContainer {
|
||||||
|
|
||||||
compound.setTag("stored_items", stacks);
|
compound.setTag("stored_items", stacks);
|
||||||
}
|
}
|
||||||
//TODO: some way of getting the items
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Custom texture
|
|
||||||
//TODO: drop chest contents
|
|
||||||
//TODO: Remove chest when empty
|
|
||||||
//TODO: make unable to break by explosion (configurable?)
|
|
||||||
|
|
||||||
//TODO: Make it so items can only be taken out of the chest?
|
|
||||||
// Custom GUI? Maybe remove GUI altogether and have it drop the items when broken?
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 757 B |
Binary file not shown.
After Width: | Height: | Size: 753 B |
Loading…
Reference in New Issue