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

Some value effects of enchantment ignore the "slots" field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 24w19b, 1.21 Pre-Release 1, 1.21 Pre-Release 2, 1.21 Release Candidate 1, 1.21, 24w35a, 24w36a, 1.21.4
    • Community Consensus
    • Enchantments
    • Normal
    • Platform

      Regardless of values in the slots field, when launching a melee attack, value effects of minecraft:damage are always active if the enchanted item is in mainhand, and are always inactive if the item is in other slots.
      The same thing happens to value effects of minecraft:armor_effectiveness.

      Steps to reproduce

      1. Install the attached datapack mc272006.zip
      2. Enchant a sword with the command: /enchant @s test:increase_damage_in_offhand
      3. Hit some mob with the sword in mainhand
      4. Hit some mob with the sword in offhand

      Expected behavior
      Mobs are one-hit killed when the sword is in offhand.

      Observed behavior
      Mobs are one-hit killed when the item is in mainhand.
      The enchanted_hit particles are also produced when hitting mobs with the item in mainhand.

            Unassigned Unassigned
            d291623 Yui
            Votes:
            11 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              CHK: