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

Commit

Permalink
Fix a derp that caused part replacement to fail hard on non-tconstruc…
Browse files Browse the repository at this point in the history
…t tools. Also fixes a crash with future tcon versions.
  • Loading branch information
bonii-xx committed Aug 14, 2014
1 parent 84b0c6f commit 0034121
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -51,19 +51,19 @@ public static void exchangeToolPart(ToolCore tool, NBTTagCompound tags, PartType
int oldMaterialId = -1;

if(type == HEAD && headStack != null) {
headStack.setItemDamage(partMaterialId);
headStack = partStack;
oldMaterialId = getToolPartMaterial(tags, HEAD);
}
if(type == HANDLE && handleStack != null) {
handleStack.setItemDamage(partMaterialId);
handleStack = partStack;
oldMaterialId = getToolPartMaterial(tags, HANDLE);
}
if(type == ACCESSORY && accessoryStack != null) {
accessoryStack.setItemDamage(partMaterialId);
accessoryStack = partStack;
oldMaterialId = getToolPartMaterial(tags, ACCESSORY);
}
if(type == EXTRA && extraStack != null) {
extraStack.setItemDamage(partMaterialId);
extraStack = partStack;
oldMaterialId = getToolPartMaterial(tags, EXTRA);
}

Expand Down

0 comments on commit 0034121

Please sign in to comment.