ForgePatch/forge/patches/minecraft_server/net/minecraft/src/Enchantment.java.patch
2012-03-25 22:02:13 -07:00

17 lines
638 B
Diff

--- ../src_base/minecraft_server/net/minecraft/src/Enchantment.java 0000-00-00 00:00:00.000000000 -0000
+++ ../src_work/minecraft_server/net/minecraft/src/Enchantment.java 0000-00-00 00:00:00.000000000 -0000
@@ -174,4 +174,14 @@
this.name = par1Str;
return this;
}
+
+ /**
+ * Called to determine if this enchantment can be applied to a ItemStack
+ * @param item The ItemStack that the enchantment might be put on
+ * @return True if the item is valid, false otherwise
+ */
+ public boolean canEnchantItem(ItemStack item)
+ {
+ return type.canEnchantItem(item.getItem());
+ }
}