Extra-Check to prevent modify builder from giving out tools with negative modifiers in case something went wrong.

This commit is contained in:
Bernhard Bonigl committed 2015-02-12 10:57:20 +01:00
1 parent 4ec647243f
commit 8199401be9
1 file changed
+4
@@ -25,6 +25,10 @@ public class ModifyBuilder
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)