SPIGOT-4752: Fixed inconsistency between isChunkLoaded and chunk load/unload events

By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
CraftBukkit/Spigot
2019-05-16 01:11:20 +02:00
parent 0e59838abf
commit e2b8949bf3
8 changed files with 209 additions and 143 deletions

View File

@@ -93,6 +93,9 @@ public class CraftChunk implements Chunk {
@Override
public Entity[] getEntities() {
if (!isLoaded()) {
getWorld().getChunkAt(x, z); // Transient load for this tick
}
int count = 0, index = 0;
net.minecraft.server.Chunk chunk = getHandle();
@@ -118,6 +121,9 @@ public class CraftChunk implements Chunk {
@Override
public BlockState[] getTileEntities() {
if (!isLoaded()) {
getWorld().getChunkAt(x, z); // Transient load for this tick
}
int index = 0;
net.minecraft.server.Chunk chunk = getHandle();