This commit is contained in:
Christian 2013-01-22 17:39:39 -05:00
parent 47f648693f
commit d17baa0c47
3 changed files with 25 additions and 26 deletions

View File

@ -84,29 +84,29 @@ public class BlockIronChest extends BlockContainer {
return IronChestType.makeEntity(metadata); return IronChestType.makeEntity(metadata);
} }
public int getBlockTexture(IBlockAccess worldAccess, int i, int j, int k, int l) // public Icon getBlockTexture(IBlockAccess worldAccess, int i, int j, int k, int l)
{ // {
int meta = worldAccess.getBlockMetadata(i, j, k); // int meta = worldAccess.getBlockMetadata(i, j, k);
IronChestType type = IronChestType.values()[meta]; // IronChestType type = IronChestType.values()[meta];
TileEntity te = worldAccess.getBlockTileEntity(i, j, k); // TileEntity te = worldAccess.getBlockTileEntity(i, j, k);
TileEntityIronChest icte = null; // TileEntityIronChest icte = null;
if (te != null && te instanceof TileEntityIronChest) // if (te != null && te instanceof TileEntityIronChest)
{ // {
icte = (TileEntityIronChest) te; // icte = (TileEntityIronChest) te;
} // }
if (l == 0 || l == 1) // if (l == 0 || l == 1)
{ // Top and Bottom // { // Top and Bottom
return type.getTextureRow() * 16 + 1; // return type.getTextureRow() * 16 + 1;
} // }
else if (icte != null && l == icte.getFacing()) // else if (icte != null && l == icte.getFacing())
{ // Front // { // Front
return type.getTextureRow() * 16 + 2; // return type.getTextureRow() * 16 + 2;
} // }
else // else
{ // Back and Sides // { // Back and Sides
return type.getTextureRow() * 16; // return type.getTextureRow() * 16;
} // }
} // }
// @Override // @Override
// public Icon getBlockTextureFromSideAndMetadata(int i, int j) // public Icon getBlockTextureFromSideAndMetadata(int i, int j)

View File

@ -28,7 +28,6 @@ public class ItemChestChanger extends Item {
super(id); super(id);
setMaxStackSize(1); setMaxStackSize(1);
this.type = type; this.type = type;
setIconIndex(type.ordinal());
setItemName(type.itemName); setItemName(type.itemName);
setCreativeTab(CreativeTabs.tabMisc); setCreativeTab(CreativeTabs.tabMisc);
} }

View File

@ -73,11 +73,11 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
renderBlocks = new RenderBlocks(); renderBlocks = new RenderBlocks();
itemRenderer = new RenderItem() { itemRenderer = new RenderItem() {
@Override @Override
public byte getMiniBlockCountForItemStack(ItemStack stack) { public byte getMiniBlockCount(ItemStack stack) {
return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 15) + 1); return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 15) + 1);
} }
@Override @Override
public byte getMiniItemCountForItemStack(ItemStack stack) { public byte getMiniItemCount(ItemStack stack) {
return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 7) + 1); return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 7) + 1);
} }
@Override @Override