The bug
It is impossible to combine the "Silk Touch" enchantment on an anvil with any item with the "Looting" or "Luck of the Sea" enchantment or vice versa.
Code analysis
20w08a, Mojang names
net.minecraft.world.item.enchantment.LootBonusEnchantment.checkCompatibility(Enchantment)
(which is used for "Fortune", "Looting" and "Luck of the Sea") prevents combining it with "Silk Touch".
Note that it would probably possible to remove that method override because compatibility is checked reflexively (see Enchantment.isCompatibleWith
) and UntouchingEnchantment
(used for "Silk Touch") already verifies that it cannot be combined with "Fortune".
Comments 10
This apparently also affects Silk Touch with Luck of the Sea.
It only affects enchanted books in practice, but normally you can have enchantments meant for different items on the same book without any issue.
This bug is especially apparent in the Java Combat Tests, seeing as axes are weapons that can have both silk touch and looting. Hoping to see this fixed soon!
Silk Touch can not work on something with Looting because Looting is used to multiply the ore drops while Silk Touch picks up the ore itself
In survival, this now can also impact axes enchanted in Combat Test 4 or Combat Test 5 instead of just enchanted books. The axes now have the ability to have looting and have had the ability to have silk touch but now can't be added.
How is this Works As Intended if these enchantments are for completely different tools?