Prevent part replacing and updating with special items like bane of pigs etc.

This commit is contained in:
Bernhard Bonigl committed 2015-01-02 13:12:44 +01:00
1 parent 121f5c985e
commit 3e338b8afd
2 files changed
+7

No files matched your search

@@ -39,6 +39,10 @@ public class ModPartReplacement extends ItemModifier {
ToolCore tool = (ToolCore) itemStack.getItem();
NBTTagCompound tags = itemStack.getTagCompound().getCompoundTag("InfiTool");
// special tools can not be replaced
if(tags.getBoolean("Special"))
return false;
if(tags.getInteger("Damage") > 0)
return false;