-
Bug
-
Resolution: Fixed
-
21w20a, 1.17 Pre-release 1, 1.17 Pre-release 2, 1.17 Pre-release 3, 1.17 Pre-release 4, 1.17 Release Candidate 2, 1.17, 1.17.1, 21w37a, 21w43a, 1.18 Pre-release 2, 1.18, 22w19a, 1.19.2, 22w44a, 1.19.3, 23w05a
-
None
-
Confirmed
-
Commands
-
Normal
The bug
The Owner tag of projectiles (arrows, snowballs, eggs, tridents, ender pearls, etc.) determines which mob/player the target mob becomes angry at when it is hit by a projectile. The Owner tag is also used by ender pearls to determine which mob/player to teleport when an ender pearl lands. Datapacks sometimes change the Owner tag of projectiles. In 1.16.5, this works properly. However, now, changing the Owner tag of projectiles does not have any effect until the world is reloaded.
To reproduce
Ender Pearl Teleportation
- Spawn a mooshroom.
- Throw an ender pearl straight up.
- Before the ender pearl lands, run the below command:
/data modify entity @e[type=minecraft:ender_pearl,limit=1,sort=nearest] Owner set from entity @e[type=minecraft:mooshroom,limit=1,sort=nearest] UUID
- Wait for the ender pearl to land. Notice that you are teleported instead of the mooshroom.
- Repeat steps 1-4, but this time, exit and reload the world in between steps 3 and 4. This time, when the ender pearl lands, the mooshroom is teleported instead of you.
- Optional: Repeat steps 1-4 in 1.16.5. The mooshroom is teleported even though you didn't reload the world.
Neutral Mob Aggravation
- Spawn a polar bear.
- Spawn a mooshroom.
- Put the below command into a repeating command block:
/execute at @e[type=minecraft:polar_bear] run data modify entity @e[type=minecraft:snowball,distance=..20,limit=1,sort=nearest] Owner set from entity @e[type=minecraft:mooshroom,limit=1,sort=nearest] UUID
- Switch to survival mode.
- Throw a snowball at the polar bear.
- The polar bear attacks and kills you instead of the mooshroom.
- Throw a snowball at the polar bear again, but this time, exit and reload the world before the snowball hits the polar bear. The polar bear attacks and kills the mooshroom.
- Optional: Repeat steps 1-6 in 1.16.5. The polar bear attacks the mooshroom even though you didn't reload the world.