MinecraftForge/MinecraftForge — pull request #1434 by DemoXinMC (2014-10-01 05:47:16+00:00)
Title: Improved Control of Enchantment.canApplyTogether() in Mod Enchantments

Enchantment.canApplyTogether() is now called on both involved Enchantments in all instances, allowing non-vanilla enchantments to prevent mixing with vanilla ones without gimmicky inheritance.

In order to determine whether certain enchantments can be mixed on items, Enchantment.canApplyTogether(Enchantment) returns a boolean to indicate whether the the two Enchantments are allowed to co-exist. Vanilla behavior is that this is call is only made on one of the Enchantments, effectively disabling the second Enchantment's ability to control being placed on an item with the first. This PR addresses this issue by requiring a pair of Enchantments to each pass the other's check.