From 84bacd6bbb90a519dec4bd0d0d8f53101488cc7a Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Thu, 31 Oct 2013 20:18:02 -0400 Subject: [PATCH] NPE fixes --- src/tconstruct/client/RenderItemCopy.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);