mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Prevent crash with invalid material toolparts. #1124
This commit is contained in:
1 parent
5905653f80
commit
71b0f65d63
1 file changed
+1
-1
@@ -155,7 +155,7 @@ public class DynamicToolPart extends CraftingItem implements IToolPart
|
||||
if(matId > icons.length)
|
||||
return super.getColorFromItemStack(stack, renderpass);
|
||||
|
||||
if(icons[matId] == null)
|
||||
if(matId >= 0 && icons[matId] == null)
|
||||
return TConstructRegistry.getMaterial(matId).primaryColor();
|
||||
|
||||
return super.getColorFromItemStack(stack, renderpass);
|
||||
|
||||
Reference in new issue
Block a user