Mojira Archive
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