Skip to content

Commit

Permalink
Extra-Check to prevent modify builder from giving out tools with nega…
Browse files Browse the repository at this point in the history
…tive modifiers in case something went wrong.
  • Loading branch information
bonii-xx committed Feb 12, 2015
1 parent 4ec6472 commit 8199401
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/tconstruct/library/crafting/ModifyBuilder.java
Expand Up @@ -25,6 +25,10 @@ public ItemStack modifyItem (ItemStack input, ItemStack[] modifiers)
built = true;
mod.addMatchingEffect(copy); //Order matters here
mod.modify(modifiers, copy);

// we do not allow negative modifiers >:(
if(copy.getTagCompound().getCompoundTag(item.getBaseTagName()).getInteger("Modifiers") < 0)
return null;
}
}
if (built)
Expand Down

0 comments on commit 8199401

Please sign in to comment.