You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
getEntities does not return all loaded entities #14330
world.getEntities() should return all loaded entities.
Observed/Actual behavior
world.getEntities() does not return certain armor stands placed in creative mode. Following is the data from the entities .mca file of such an armor stand.
Steps/models to reproduce
The easiest may is to use Spark's entities screen to see how many entities are loaded. Place several dozen of the above armor stands, then use Spark to see how many armor stands Paper is reporting. You could also write a plugin to call getEntities() and log what Paper returns.
15:43:07 [INFO] Checking version, please wait...
15:43:08 [INFO] This server is running Paper version 26.3-141-main@54024d3 (2026-10-01T15:55:33Z) (Implementing API version 26.3.build.141-beta)
You are running the latest version
Previous version: 26.3-140-977da0d (MC: 26.3)
Other
There are no errors in the log file. I also see this problem with Paper 26.2
I mentioned this on discord, but I don't believe World#getEntities (or any other entity list getter for that matter) should return effectively non-existent entities. Mostly because it would break already existing plugins not filtering for invalid entities if one were to change this now, but also because the only reason those entities exist to begin with is due to a bug with the non-ticking armor stands feature. I made a PR for that specific case.
In short, this should never happen and if it does it is because of a bug, not because getEntities should be counting invalid entities.
Activity
Hexay commentedon Oct 1, 2026
Zero-health stands are skipped by getEntities. If you give the entity it's health back it will return.
JavierFlores09 commentedon Oct 2, 2026
I mentioned this on discord, but I don't believe World#getEntities (or any other entity list getter for that matter) should return effectively non-existent entities. Mostly because it would break already existing plugins not filtering for invalid entities if one were to change this now, but also because the only reason those entities exist to begin with is due to a bug with the non-ticking armor stands feature. I made a PR for that specific case.
In short, this should never happen and if it does it is because of a bug, not because getEntities should be counting invalid entities.