The bug
You cannot select dying entities. This is a great problem when you modify the value of the DeathTime
tag of an entity.
Expected behavior
You should be able to select dying mobs with the entity selector @e
and position arguments (?) because the entity is still in the world and prevents for example block placement.
How to reproduce
Create a new world
Use the following command
/summon villager ~ ~ ~ {Tags:["testVillager"],Health:0f,DeathTime:-32768s}
Try using the following command
/execute as @e[type=minecraft:villager,tag=testVillager] run say Test
→ ❌ It will result in an empty message. This is a problem because the villager is still there, which can be seen when reopening the world
Linked issues
is duplicated by 1
relates to 1
Attachments
Comments 7
Might be wai,
@unknown added a comment - 05/Feb/14 10:53 PM
The @a selector (but only without a radius/area defined via r/rx/ry/rz) will include dead players in the next snapshot. All other selectors work as intended.
leaving open for dev to decide about this.
@@unknown Cannot confirm. Can replicate it in 1.13.1 using the commands provided in the report.
EDIT: Oh, I see the issue. /say will output no matter what, even if the message is empty. Your message in the image is empty, meaning it did not select the villager while in its dying state.
@unknown Oh, sorry my bad! It's indeed still in 1.13.1.
I used /execute if entity @e[type=minecraft:villager,tag=testVillager] to test it rn it and failed.
Relates to:
MC-46223
MC-84873