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

        1. increase_damage_in_offhand.json
          0.5 kB
          Yui

            Unassigned Unassigned
            d291623 Yui
            Votes:
            9 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              CHK: