Skip to content

Commit

Permalink
Default to white if a tool has a material that doesn't exist anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Feb 7, 2015
1 parent 3cd211e commit 58031bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/tconstruct/library/tools/ToolCore.java
Expand Up @@ -685,7 +685,10 @@ protected int getCorrectColor(ItemStack stack, int renderPass, NBTTagCompound ta

protected int getDefaultColor(int renderPass, int materialID)
{
return TConstructRegistry.getMaterial(materialID).primaryColor();
if(TConstructRegistry.getMaterial(materialID) != null)
return TConstructRegistry.getMaterial(materialID).primaryColor();

return 0xffffffff;
}

@Override
Expand Down

0 comments on commit 58031bb

Please sign in to comment.