ForgePatch/forge/patches/minecraft_server/net/minecraft/src/Enchantment.java.patch

18 lines
638 B
Diff
Raw Normal View History

--- ../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
@@ -175,4 +175,14 @@
this.name = par1Str;
return this;
}
+
2012-01-15 19:16:08 +00:00
+ /**
+ * 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
+ */
2012-01-15 19:16:08 +00:00
+ public boolean canEnchantItem(ItemStack item)
+ {
+ return type.canEnchantItem(item.getItem());
+ }
}