Fix inconsistent isChunkLoaded calls
When we update the chunk state to border, it should be the case that isChunkLoaded returns true and that getChunkIfLoadedImmediately returns a non-null value. Now add the chunk to the loaded map before making any callbacks after updating to border state.
This commit is contained in:
parent
e1d4b26a62
commit
f7da209586
4 changed files with 37 additions and 23 deletions
|
@ -131,7 +131,7 @@ index 992b1eb2e4151863ba7900c3f7eaa8e56c0de7fa..c6ba7427b53398ddc8f0c942a810fad6
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index a4594b6b28eab545694491bc547f05a971a6ffad..20c9eada6f051ecdd5e45e625d7e6289d406a2f8 100644
|
||||
index 5127da6855ca58c8703d3aa85abcbcef345b37e6..6aea5dd821b213772f9dbf9f6d134fc28c7dfd05 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1,6 +1,7 @@
|
||||
|
@ -163,7 +163,7 @@ index a4594b6b28eab545694491bc547f05a971a6ffad..20c9eada6f051ecdd5e45e625d7e6289
|
|||
// CraftBukkit end
|
||||
}
|
||||
}
|
||||
@@ -1169,6 +1176,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -1172,6 +1179,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue