Skip to content

Commit

Permalink
Do not add materials that don't have actual parts to the NEI ToolMate…
Browse files Browse the repository at this point in the history
…rial stuff.

Only happens in special cases, like the String material from IguanaTweaks, that has no craftable toolparts.
Should finally fix SlimeKnights/IguanaTweaksTConstruct#17
  • Loading branch information
bonii-xx committed Oct 7, 2014
1 parent 2c2b9ba commit ed630aa
Showing 1 changed file with 9 additions and 3 deletions.
Expand Up @@ -176,7 +176,9 @@ public void loadCraftingRecipes (String outputId, Object... results)
}
}
}
this.arecipes.add(new CachedToolMaterialsRecipe(toolParts, matID));

if(toolParts.size() > 0)
this.arecipes.add(new CachedToolMaterialsRecipe(toolParts, matID));
}
}
else
Expand All @@ -193,13 +195,17 @@ public void loadUsageRecipes (ItemStack ingred)
int materialID = ((IToolPart) ingred.getItem()).getMaterialID(ingred);
if (materialID >= 0)
{
this.arecipes.add(new CachedToolMaterialsRecipe(getSingleList(ingred), materialID));
List toolParts = getSingleList(ingred);
if(toolParts.size() > 0)
this.arecipes.add(new CachedToolMaterialsRecipe(toolParts, materialID));
}
}
else if (PatternBuilder.instance.getPartID(ingred) < Short.MAX_VALUE)
{
int materialID = PatternBuilder.instance.getPartID(ingred);
this.arecipes.add(new CachedToolMaterialsRecipe(getSingleList(ingred), materialID));
List toolParts = getSingleList(ingred);
if(toolParts.size() > 0)
this.arecipes.add(new CachedToolMaterialsRecipe(toolParts, materialID));
}
else
{
Expand Down

0 comments on commit ed630aa

Please sign in to comment.