Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Fail safely on if tool part replacement is not possible due to tool-b…
Browse files Browse the repository at this point in the history
…uilding-interaction #124
  • Loading branch information
bonii-xx committed Apr 3, 2015
1 parent 5318698 commit c7d1eaf
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -82,6 +82,10 @@ public static void exchangeToolPart(ToolCore tool, NBTTagCompound tags, PartType
extraStack = partStack;

ItemStack newTool = ToolBuilder.instance.buildTool(headStack, handleStack, accessoryStack, extraStack, "Modified Tool");
if(newTool == null) {
Log.debug("External source prevents creation of tool with replaced parts.");
return;
}
NBTTagCompound newTags = newTool.getTagCompound().getCompoundTag("InfiTool");

int partMaterialId = getToolPartMaterial(newTags, type);
Expand Down

0 comments on commit c7d1eaf

Please sign in to comment.