Update mappings for Iron Chests, and rename some parameters.

This commit is contained in:
alexbegt 2016-11-18 22:33:35 -05:00
parent ea5f84785d
commit 5720fa2065
10 changed files with 102 additions and 98 deletions

View File

@ -33,7 +33,7 @@ repositories {
}
dependencies {
deobfCompile "mezz.jei:jei_1.11:4.0.1.191"
deobfCompile "mezz.jei:jei_1.11:4.0.1.193"
}
// This is our group. I'm cpw.mods
@ -43,8 +43,8 @@ archivesBaseName = "ironchest"
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
minecraft {
version = "1.11-13.19.0.2148"
mappings = "snapshot_20161111"
version = "1.11-13.19.0.2153"
mappings = "snapshot_20161118"
runDir = "run"
}

View File

@ -150,22 +150,22 @@ public class BlockIronChest extends Block
}
@Override
public void onBlockAdded(World world, BlockPos pos, IBlockState blockState)
public void onBlockAdded(World world, BlockPos pos, IBlockState state)
{
super.onBlockAdded(world, pos, blockState);
world.notifyBlockUpdate(pos, blockState, blockState, 3);
super.onBlockAdded(world, pos, state);
world.notifyBlockUpdate(pos, state, state, 3);
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState blockState, EntityLivingBase entityliving, ItemStack itemStack)
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
{
TileEntity te = world.getTileEntity(pos);
TileEntity te = worldIn.getTileEntity(pos);
if (te != null && te instanceof TileEntityIronChest)
{
TileEntityIronChest teic = (TileEntityIronChest) te;
teic.wasPlaced(entityliving, itemStack);
teic.setFacing(entityliving.getHorizontalFacing().getOpposite());
world.notifyBlockUpdate(pos, blockState, blockState, 3);
teic.wasPlaced(placer, stack);
teic.setFacing(placer.getHorizontalFacing().getOpposite());
worldIn.notifyBlockUpdate(pos, state, state, 3);
}
}

View File

@ -39,42 +39,46 @@ public class ContainerIronChest extends Container
@Override
public boolean canInteractWith(EntityPlayer player)
{
return this.chest.isUseableByPlayer(player);
return this.chest.isUsableByPlayer(player);
}
@Override
public ItemStack transferStackInSlot(EntityPlayer p, int i)
public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
{
ItemStack itemstack = ItemStack.field_190927_a;
Slot slot = this.inventorySlots.get(i);
ItemStack itemstack = ItemStack.EMPTY;
Slot slot = this.inventorySlots.get(index);
if (slot != null && slot.getHasStack())
{
ItemStack itemstack1 = slot.getStack();
itemstack = itemstack1.copy();
if (i < this.type.size)
if (index < this.type.size)
{
if (!this.mergeItemStack(itemstack1, this.type.size, this.inventorySlots.size(), true))
{
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
}
else if (!this.type.acceptsStack(itemstack1))
{
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
else if (!this.mergeItemStack(itemstack1, 0, this.type.size, false))
{
return ItemStack.field_190927_a;
return ItemStack.EMPTY;
}
if (itemstack1.func_190916_E() == 0)
if (itemstack1.isEmpty())
{
slot.putStack(ItemStack.field_190927_a);
slot.putStack(ItemStack.EMPTY);
}
else
{
slot.onSlotChanged();
}
}
return itemstack;
}

View File

@ -202,7 +202,7 @@ public enum IronChestType implements IStringSerializable
{
if (this == DIRTCHEST9000)
{
return itemstack == ItemStack.field_190927_a || itemstack.getItem() == DIRT_ITEM;
return itemstack == ItemStack.EMPTY || itemstack.getItem() == DIRT_ITEM;
}
return true;

View File

@ -66,14 +66,14 @@ public class ItemChestChanger extends Item
TileEntity te = world.getTileEntity(pos);
TileEntityIronChest newchest = new TileEntityIronChest();
NonNullList<ItemStack> chestContents = NonNullList.<ItemStack> func_191197_a(27, ItemStack.field_190927_a);
NonNullList<ItemStack> chestContents = NonNullList.<ItemStack> withSize(27, ItemStack.EMPTY);
EnumFacing chestFacing = EnumFacing.DOWN;
if (te != null)
{
if (te instanceof TileEntityIronChest)
{
chestContents = ((TileEntityIronChest) te).func_190576_q();
chestContents = ((TileEntityIronChest) te).getItems();
chestFacing = ((TileEntityIronChest) te).getFacing();
newchest = this.type.target.makeEntity();
if (newchest == null)
@ -95,7 +95,7 @@ public class ItemChestChanger extends Item
{
return EnumActionResult.PASS;
}
chestContents = NonNullList.<ItemStack> func_191197_a(chest.getSizeInventory(), ItemStack.field_190927_a);
chestContents = NonNullList.<ItemStack> withSize(chest.getSizeInventory(), ItemStack.EMPTY);
for (int i = 0; i < chestContents.size(); i++)
{
chestContents.set(i, chest.getStackInSlot(i));
@ -131,7 +131,7 @@ public class ItemChestChanger extends Item
ItemStack stack = player.getHeldItem(hand);
stack.func_190920_e(player.capabilities.isCreativeMode ? stack.func_190916_E() : stack.func_190916_E() - 1);
stack.setCount(player.capabilities.isCreativeMode ? stack.getCount() : stack.getCount() - 1);
return EnumActionResult.SUCCESS;
}

View File

@ -42,9 +42,9 @@ public class TileEntityDirtChest extends TileEntityIronChest
@Override
public void removeAdornments()
{
if (this.func_190576_q().get(0) != ItemStack.field_190927_a && this.func_190576_q().get(0).isItemEqual(dirtChest9000GuideBook))
if (this.getItems().get(0) != ItemStack.EMPTY && this.getItems().get(0).isItemEqual(dirtChest9000GuideBook))
{
this.func_190576_q().set(0, ItemStack.field_190927_a);
this.getItems().set(0, ItemStack.EMPTY);
}
}
}

View File

@ -68,14 +68,14 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
{
super();
this.chestType = type;
this.chestContents = NonNullList.<ItemStack> func_191197_a(type.size, ItemStack.field_190927_a);
this.topStacks = NonNullList.<ItemStack> func_191197_a(8, ItemStack.field_190927_a);
this.chestContents = NonNullList.<ItemStack> withSize(type.size, ItemStack.EMPTY);
this.topStacks = NonNullList.<ItemStack> withSize(8, ItemStack.EMPTY);
this.facing = EnumFacing.NORTH;
}
public void setContents(NonNullList<ItemStack> contents)
{
this.chestContents = NonNullList.<ItemStack> func_191197_a(this.getType().size, ItemStack.field_190927_a);
this.chestContents = NonNullList.<ItemStack> withSize(this.getType().size, ItemStack.EMPTY);
for (int i = 0; i < contents.size(); i++)
{
@ -108,9 +108,9 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
{
IronChestType type = IronChestType.IRON;
if (this.hasWorldObj())
if (this.hasWorld())
{
IBlockState state = this.worldObj.getBlockState(this.pos);
IBlockState state = this.world.getBlockState(this.pos);
if (state.getBlock() == IronChest.ironChestBlock)
{
@ -128,7 +128,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
this.inventoryTouched = true;
return this.func_190576_q().get(index);
return this.getItems().get(index);
}
@Override
@ -141,12 +141,12 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
protected void sortTopStacks()
{
if (!this.getType().isTransparent() || (this.worldObj != null && this.worldObj.isRemote))
if (!this.getType().isTransparent() || (this.world != null && this.world.isRemote))
{
return;
}
NonNullList<ItemStack> tempCopy = NonNullList.<ItemStack> func_191197_a(this.getSizeInventory(), ItemStack.field_190927_a);
NonNullList<ItemStack> tempCopy = NonNullList.<ItemStack> withSize(this.getSizeInventory(), ItemStack.EMPTY);
boolean hasStuff = false;
@ -154,13 +154,13 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
mainLoop: for (int i = 0; i < this.getSizeInventory(); i++)
{
if (this.chestContents.get(i) != ItemStack.field_190927_a)
if (this.chestContents.get(i) != ItemStack.EMPTY)
{
for (int j = 0; j < compressedIdx; j++)
{
if (tempCopy.get(j).isItemEqual(this.chestContents.get(i)))
{
tempCopy.get(j).func_190920_e(tempCopy.get(j).func_190916_E() + this.chestContents.get(i).func_190916_E());
tempCopy.get(j).setCount(tempCopy.get(j).getCount() + this.chestContents.get(i).getCount());
continue mainLoop;
}
}
@ -175,13 +175,13 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
for (int i = 0; i < this.topStacks.size(); i++)
{
this.topStacks.set(i, ItemStack.field_190927_a);
this.topStacks.set(i, ItemStack.EMPTY);
}
if (this.worldObj != null)
if (this.world != null)
{
IBlockState iblockstate = this.worldObj.getBlockState(this.pos);
this.worldObj.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3);
IBlockState iblockstate = this.world.getBlockState(this.pos);
this.world.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3);
}
return;
@ -203,7 +203,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
}
else
{
return stack2.func_190916_E() - stack1.func_190916_E();
return stack2.getCount() - stack1.getCount();
}
}
});
@ -213,7 +213,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
for (int i = 0; i < tempCopy.size(); i++)
{
ItemStack element = tempCopy.get(i);
if (element != ItemStack.field_190927_a && element.func_190916_E() > 0)
if (element != ItemStack.EMPTY && element.getCount() > 0)
{
this.topStacks.set(p++, element);
@ -226,14 +226,14 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
for (int i = p; i < this.topStacks.size(); i++)
{
this.topStacks.set(i, ItemStack.field_190927_a);
this.topStacks.set(i, ItemStack.EMPTY);
}
if (this.worldObj != null)
if (this.world != null)
{
IBlockState iblockstate = this.worldObj.getBlockState(this.pos);
IBlockState iblockstate = this.world.getBlockState(this.pos);
this.worldObj.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3);
this.world.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3);
}
}
@ -249,6 +249,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
return this.customName != null && this.customName.length() > 0;
}
@Override
public void setCustomName(String name)
{
this.customName = name;
@ -259,7 +260,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
{
super.readFromNBT(compound);
this.chestContents = NonNullList.<ItemStack> func_191197_a(this.getSizeInventory(), ItemStack.field_190927_a);
this.chestContents = NonNullList.<ItemStack> withSize(this.getSizeInventory(), ItemStack.EMPTY);
if (compound.hasKey("CustomName", Constants.NBT.TAG_STRING))
{
@ -268,7 +269,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
if (!this.checkLootAndRead(compound))
{
ItemStackHelper.func_191283_b(compound, this.chestContents);
ItemStackHelper.loadAllItems(compound, this.chestContents);
}
this.facing = EnumFacing.VALUES[compound.getByte("facing")];
@ -283,7 +284,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
if (!this.checkLootAndWrite(compound))
{
ItemStackHelper.func_191282_a(compound, this.chestContents);
ItemStackHelper.saveAllItems(compound, this.chestContents);
}
compound.setByte("facing", (byte) this.facing.ordinal());
@ -303,14 +304,14 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
}
@Override
public boolean isUseableByPlayer(EntityPlayer player)
public boolean isUsableByPlayer(EntityPlayer player)
{
if (this.worldObj == null)
if (this.world == null)
{
return true;
}
if (this.worldObj.getTileEntity(this.pos) != this)
if (this.world.getTileEntity(this.pos) != this)
{
return false;
}
@ -323,7 +324,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
{
// Resynchronizes clients with the server state
//@formatter:off
if (this.worldObj != null && !this.worldObj.isRemote && this.numPlayersUsing != 0 && (this.ticksSinceSync + this.pos.getX() + this.pos.getY() + this.pos.getZ()) % 200 == 0)
if (this.world != null && !this.world.isRemote && this.numPlayersUsing != 0 && (this.ticksSinceSync + this.pos.getX() + this.pos.getY() + this.pos.getZ()) % 200 == 0)
//@formatter:on
{
this.numPlayersUsing = 0;
@ -331,7 +332,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
float f = 5.0F;
//@formatter:off
for (EntityPlayer player : this.worldObj.getEntitiesWithinAABB(EntityPlayer.class,
for (EntityPlayer player : this.world.getEntitiesWithinAABB(EntityPlayer.class,
new AxisAlignedBB(this.pos.getX() - f, this.pos.getY() - f, this.pos.getZ() - f, this.pos.getX() + 1 + f, this.pos.getY() + 1 + f, this.pos.getZ() + 1 + f)))
//@formatter:on
{
@ -342,12 +343,12 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
}
}
if (this.worldObj != null && !this.worldObj.isRemote && this.ticksSinceSync < 0)
if (this.world != null && !this.world.isRemote && this.ticksSinceSync < 0)
{
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 3, ((this.numPlayersUsing << 3) & 0xF8) | (this.facing.ordinal() & 0x7));
this.world.addBlockEvent(this.pos, IronChest.ironChestBlock, 3, ((this.numPlayersUsing << 3) & 0xF8) | (this.facing.ordinal() & 0x7));
}
if (!this.worldObj.isRemote && this.inventoryTouched)
if (!this.world.isRemote && this.inventoryTouched)
{
this.inventoryTouched = false;
@ -367,7 +368,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
double z = this.pos.getZ() + 0.5D;
//@formatter:off
this.worldObj.playSound(null, x, y, z, SoundEvents.BLOCK_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
this.world.playSound(null, x, y, z, SoundEvents.BLOCK_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.rand.nextFloat() * 0.1F + 0.9F);
//@formatter:on
}
@ -398,7 +399,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
double z = this.pos.getZ() + 0.5D;
//@formatter:off
this.worldObj.playSound(null, x, y, z, SoundEvents.BLOCK_CHEST_CLOSE, SoundCategory.BLOCKS, 0.5F, this.worldObj.rand.nextFloat() * 0.1F + 0.9F);
this.world.playSound(null, x, y, z, SoundEvents.BLOCK_CHEST_CLOSE, SoundCategory.BLOCKS, 0.5F, this.world.rand.nextFloat() * 0.1F + 0.9F);
//@formatter:on
}
@ -434,7 +435,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
{
if (!player.isSpectator())
{
if (this.worldObj == null)
if (this.world == null)
{
return;
}
@ -446,9 +447,9 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
++this.numPlayersUsing;
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 1, this.numPlayersUsing);
this.worldObj.notifyNeighborsOfStateChange(this.pos, IronChest.ironChestBlock, false);
this.worldObj.notifyNeighborsOfStateChange(this.pos.down(), IronChest.ironChestBlock, false);
this.world.addBlockEvent(this.pos, IronChest.ironChestBlock, 1, this.numPlayersUsing);
this.world.notifyNeighborsOfStateChange(this.pos, IronChest.ironChestBlock, false);
this.world.notifyNeighborsOfStateChange(this.pos.down(), IronChest.ironChestBlock, false);
}
}
@ -457,16 +458,16 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
{
if (!player.isSpectator())
{
if (this.worldObj == null)
if (this.world == null)
{
return;
}
--this.numPlayersUsing;
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 1, this.numPlayersUsing);
this.worldObj.notifyNeighborsOfStateChange(this.pos, IronChest.ironChestBlock, false);
this.worldObj.notifyNeighborsOfStateChange(this.pos.down(), IronChest.ironChestBlock, false);
this.world.addBlockEvent(this.pos, IronChest.ironChestBlock, 1, this.numPlayersUsing);
this.world.notifyNeighborsOfStateChange(this.pos, IronChest.ironChestBlock, false);
this.world.notifyNeighborsOfStateChange(this.pos.down(), IronChest.ironChestBlock, false);
}
}
@ -490,7 +491,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
for (int slot = 0; slot < stacks.size(); slot++)
{
if (stacks.get(slot) != ItemStack.field_190927_a)
if (stacks.get(slot) != ItemStack.EMPTY)
{
NBTTagCompound item = new NBTTagCompound();
@ -545,7 +546,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
}
else
{
this.topStacks.set(i, ItemStack.field_190927_a);
this.topStacks.set(i, ItemStack.EMPTY);
}
pos++;
@ -558,7 +559,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
{
if (this.getType().isTransparent())
{
NonNullList<ItemStack> sortList = NonNullList.<ItemStack> func_191197_a(this.topStacks.size(), ItemStack.field_190927_a);
NonNullList<ItemStack> sortList = NonNullList.<ItemStack> withSize(this.topStacks.size(), ItemStack.EMPTY);
int pos = 0;
@ -571,7 +572,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
}
else
{
sortList.set(pos++, ItemStack.field_190927_a);
sortList.set(pos++, ItemStack.EMPTY);
}
}
@ -591,7 +592,7 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
{
this.setFacing(this.facing.rotateY());
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 2, this.facing.ordinal());
this.world.addBlockEvent(this.pos, IronChest.ironChestBlock, 2, this.facing.ordinal());
}
public void wasPlaced(EntityLivingBase entityliving, ItemStack stack)
@ -629,17 +630,17 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
}
@Override
protected NonNullList<ItemStack> func_190576_q()
protected NonNullList<ItemStack> getItems()
{
return this.chestContents;
}
@Override
public boolean func_191420_l()
public boolean isEmpty()
{
for (ItemStack itemstack : this.chestContents)
{
if (!itemstack.func_190926_b())
if (!itemstack.isEmpty())
{
return false;
}

View File

@ -15,8 +15,8 @@ public class ValidatingSlot extends Slot
}
@Override
public boolean isItemValid(ItemStack par1ItemStack)
public boolean isItemValid(ItemStack stack)
{
return this.type.acceptsStack(par1ItemStack);
return this.type.acceptsStack(stack);
}
}

View File

@ -88,7 +88,7 @@ public class GUIChest extends GuiContainer
}
@Override
protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
{
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
// new "bind tex"

View File

@ -51,26 +51,26 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
}
@Override
public void renderTileEntityAt(TileEntityIronChest tile, double x, double y, double z, float partialTick, int breakStage)
public void renderTileEntityAt(TileEntityIronChest te, double x, double y, double z, float partialTicks, int destroyStage)
{
if (tile == null || tile.isInvalid())
if (te == null || te.isInvalid())
{
return;
}
EnumFacing facing = EnumFacing.SOUTH;
IronChestType type = tile.getType();
IronChestType type = te.getType();
if (tile.hasWorldObj() && tile.getWorld().getBlockState(tile.getPos()).getBlock() == IronChest.ironChestBlock)
if (te.hasWorld() && te.getWorld().getBlockState(te.getPos()).getBlock() == IronChest.ironChestBlock)
{
facing = tile.getFacing();
IBlockState state = tile.getWorld().getBlockState(tile.getPos());
facing = te.getFacing();
IBlockState state = te.getWorld().getBlockState(te.getPos());
type = state.getValue(BlockIronChest.VARIANT_PROP);
}
if (breakStage >= 0)
if (destroyStage >= 0)
{
this.bindTexture(DESTROY_STAGES[breakStage]);
this.bindTexture(DESTROY_STAGES[destroyStage]);
GlStateManager.matrixMode(5890);
GlStateManager.pushMatrix();
GlStateManager.scale(4F, 4F, 1F);
@ -121,7 +121,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
}
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
float lidangle = tile.prevLidAngle + (tile.lidAngle - tile.prevLidAngle) * partialTick;
float lidangle = te.prevLidAngle + (te.lidAngle - te.prevLidAngle) * partialTicks;
lidangle = 1F - lidangle;
lidangle = 1F - lidangle * lidangle * lidangle;
@ -133,7 +133,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
this.model.chestLid.rotateAngleX = -lidangle * halfPI;
// Render the chest itself
this.model.renderAll();
if (breakStage >= 0)
if (destroyStage >= 0)
{
GlStateManager.matrixMode(5890);
GlStateManager.popMatrix();
@ -146,8 +146,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
GlStateManager.popMatrix();
GlStateManager.color(1F, 1F, 1F, 1F);
if (type.isTransparent()
&& tile.getDistanceSq(this.rendererDispatcher.entityX, this.rendererDispatcher.entityY, this.rendererDispatcher.entityZ) < 128d)
if (type.isTransparent() && te.getDistanceSq(this.rendererDispatcher.entityX, this.rendererDispatcher.entityY, this.rendererDispatcher.entityZ) < 128d)
{
this.random.setSeed(254L);
float shiftX;
@ -155,9 +154,9 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
float shiftZ;
int shift = 0;
float blockScale = 0.70F;
float timeD = (float) (360D * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) - partialTick;
float timeD = (float) (360D * (System.currentTimeMillis() & 0x3FFFL) / 0x3FFFL) - partialTicks;
if (tile.getTopItemStacks().get(1) == ItemStack.field_190927_a)
if (te.getTopItemStacks().get(1) == ItemStack.EMPTY)
{
shift = 8;
blockScale = 0.85F;
@ -169,7 +168,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
customitem.setWorld(this.getWorld());
customitem.hoverStart = 0F;
NonNullList<ItemStack> stacks = tile.getTopItemStacks();
NonNullList<ItemStack> stacks = te.getTopItemStacks();
for (int i = 0; i < stacks.size(); i++)
{
ItemStack item = stacks.get(i);
@ -177,7 +176,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
{
break;
}
if (item == ItemStack.field_190927_a)
if (item == ItemStack.EMPTY)
{
shift++;
continue;
@ -198,7 +197,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
@Override
public int getModelCount(ItemStack stack)
{
return SignedBytes.saturatedCast(Math.min(stack.func_190916_E() / 32, 15) + 1);
return SignedBytes.saturatedCast(Math.min(stack.getCount() / 32, 15) + 1);
}
@Override
@ -215,7 +214,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
};
}
this.itemRenderer.doRender(customitem, 0D, 0D, 0D, 0F, partialTick);
this.itemRenderer.doRender(customitem, 0D, 0D, 0D, 0F, partialTicks);
GlStateManager.popMatrix();
}