diff --git a/src/tconstruct/client/RenderItemCopy.java b/src/tconstruct/client/RenderItemCopy.java index a62e24fc..a0c8b58d 100644 --- a/src/tconstruct/client/RenderItemCopy.java +++ b/src/tconstruct/client/RenderItemCopy.java @@ -349,14 +349,14 @@ public class RenderItemCopy extends Render { int k = par3ItemStack.itemID; int l = par3ItemStack.getItemDamage(); - Object object = par3ItemStack.getItem() == null ? null : par3ItemStack.getIconIndex() ; + Object object = par3ItemStack.getItem() == null ? null : par3ItemStack.getIconIndex(); float f; int i1; float f1; float f2; - + Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null); - if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType())) + if (block != null && par3ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType())) { par2TextureManager.bindTexture(TextureMap.locationBlocksTexture); GL11.glPushMatrix(); @@ -382,7 +382,7 @@ public class RenderItemCopy extends Render this.itemRenderBlocks.useInventoryTint = true; GL11.glPopMatrix(); } - else if (Item.itemsList[k].requiresMultipleRenderPasses()) + else if (Item.itemsList[k] != null && Item.itemsList[k].requiresMultipleRenderPasses()) { GL11.glDisable(GL11.GL_LIGHTING);