Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-116643

Silk Touch cannot be combined with Looting or Luck of the Sea

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 24w18a
    • Minecraft 1.11.2, Minecraft 17w16b, 1.15.2, 20w08a, 20w15a, 20w51a, 1.17.1
    • None
    • Confirmed
    • Items

      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".

            slicedlime [Mojang] slicedlime
            JSdoubleL James Willson
            Votes:
            14 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: