SPIGOT-6729: Add Chunk.isEntitiesLoaded()

This commit is contained in:
Brokkonaut 2021-09-06 18:51:39 +10:00 committed by md_5
parent 6719d1f1e7
commit 757d42aef6
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -111,6 +111,11 @@ public class CraftChunk implements Chunk {
return new CraftBlock(worldServer, new BlockPosition((this.x << 4) | x, y, (this.z << 4) | z));
}
@Override
public boolean isEntitiesLoaded() {
return getCraftWorld().getHandle().entityManager.a(ChunkCoordIntPair.pair(x, z)); // PAIL rename isEntitiesLoaded
}
@Override
public Entity[] getEntities() {
if (!isLoaded()) {