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

View File

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

View File

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