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:
Spottedleaf 2022-10-18 08:11:23 -07:00
parent e1d4b26a62
commit f7da209586
4 changed files with 37 additions and 23 deletions

View file

@ -44,10 +44,10 @@ index be08224c8107aab3e9a3645a20977dd14bfff782..c518704386f14cd033307dd976455c35
}
}
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 8b65e8361918b5e6fe936fec99ee63ff9eef66f0..a4594b6b28eab545694491bc547f05a971a6ffad 100644
index 6a84e7524a246e234116a37349f30e01411e6787..5127da6855ca58c8703d3aa85abcbcef345b37e6 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1166,11 +1166,11 @@ public class LevelChunk extends ChunkAccess {
@@ -1169,11 +1169,11 @@ public class LevelChunk extends ChunkAccess {
gameprofilerfiller.pop();
} catch (Throwable throwable) {