-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
This server is running CraftBukkit version 3133-Spigot-66f9d3c-3fa79d3 (MC: 1.17) (Implementing API version 1.17-R0.1-SNAPSHOT)
-
Yes
When loading chunks, the entities in those chunks are not loaded anymore!
I'm using World#loadChunk or Chunk#load to load unloaded/inactive chunks.
It returns 'true'... so chunk is loaded.
But i can't get the entities from that chunk using Chunk#getEntities or World#getEntitiesByClasses etc.
Checking again a few ticks later some of the entities can be found.
TestCode:
Location testLoc=new Location(world,800,90,-1500); Chunk testChunk=world.getChunkAt(testLoc); testChunk.load(); Entity[] enderman=testChunk.getEntities(); logger.warning("Found Entities before spawn #:"+enderman.length); world.spawnEntity(testLoc, EntityType.ENDERMAN); testChunk.unload(); testChunk.load(); enderman=testChunk.getEntities(); logger.warning("Found Entities after spawn #:"+enderman.length);
Calling this multiple times results in the following output:
[15:31:14] [Server thread/WARN]: [plugin] Found Entities before spawn #:0 [15:31:14] [Server thread/WARN]: [plugin] Found Entities after spawn #:0 [15:31:14] [Server thread/WARN]: [plugin] Found Entities before spawn #:0 [15:31:14] [Server thread/WARN]: [plugin] Found Entities after spawn #:2 [15:31:14] [Server thread/WARN]: [plugin] Found Entities before spawn #:2 [15:31:14] [Server thread/WARN]: [plugin] Found Entities after spawn #:3
With servers running 1.16 or older, the result is like this:
[15:39:33] [Server thread/WARN]: [plugin] Found Entities before spawn #:0 [15:39:33] [Server thread/WARN]: [plugin] Found Entities after spawn #:1 [15:39:33] [Server thread/WARN]: [plugin] Found Entities before spawn #:1 [15:39:33] [Server thread/WARN]: [plugin] Found Entities after spawn #:2 [15:39:33] [Server thread/WARN]: [plugin] Found Entities before spawn #:2 [15:39:33] [Server thread/WARN]: [plugin] Found Entities after spawn #:3
- is duplicated by
-
SPIGOT-6572 Chunk.getEntities() is missing some mobs
- Resolved