mojira.dev
MC-108307

Cannot select dying entities

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

  1. Create a new world

  2. Use the following command

    /summon villager ~ ~ ~ {Tags:["testVillager"],Health:0f,DeathTime:-32768s}
  1. 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

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.

Issue has been fixed for 1.13.1, see 

[media]

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

Can confirm in 21w03a.

Can confirm in 21w05a.

marcono1234

(Unassigned)

Confirmed

Commands

DeathTime, dying, entity, selector

Minecraft 1.10.2, Minecraft 16w39c, Minecraft 16w42a, Minecraft 1.11, Minecraft 1.12, ..., 1.16.4 Release Candidate 1, 1.16.4, 20w46a, 21w03a, 21w05b

Retrieved