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

The "/execute on attacker" command does not target an entity previously targeted by the "/data" command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 25w02a, 25w03a
    • None
    • Confirmed
    • Commands
    • Important
    • Platform

      /execute on attacker will not work if the entity has been previously targeted by the /data command that tick. This problem does not exist in version 1.21.4.

      To reproduce:

      1. /tick freeze
      2. /summon iron_golem
      3. Punch the iron golem
      4. /execute as @n[type=minecraft:iron_golem] on attacker run say yes

        You say "yes"

      5. /data get entity @n[type=minecraft:iron_golem]
      6. /execute as @n[type=minecraft:iron_golem] on attacker run say yes

        Nothing is output

       The above situation can also lead to errors in datapacks and command blocks.

            Unassigned Unassigned
            Plants_Stars Plants_Stars
            Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              CHK: