Mojira Archive
MC-279556

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

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

Fixed

Plants_Stars

[Mojang] etanaratsastaja

2025-01-16, 06:02 AM

2025-01-27, 10:32 AM

2025-01-27, 10:32 AM

7

5

Confirmed

Important

Platform

Commands

25w02a, 25w03a, 25w04a

25w05a