Re-add missing chunk event calls (#11104)

This commit is contained in:
granny 2024-07-18 04:34:34 -07:00 committed by GitHub
parent dd11ef8441
commit 3c8a7fe1a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,7 +13,7 @@ Currently includes:
See https://github.com/Tuinity/Moonrise
diff --git a/src/main/java/ca/spottedleaf/moonrise/common/util/ChunkSystem.java b/src/main/java/ca/spottedleaf/moonrise/common/util/ChunkSystem.java
index da323a1105347d5cf4b946df10ded78a953236f2..79ea42ff287beadb997d5d805a3d5faa6f80216a 100644
index da323a1105347d5cf4b946df10ded78a953236f2..0abba00741b39b69a7f167e5d2670f2565c9a752 100644
--- a/src/main/java/ca/spottedleaf/moonrise/common/util/ChunkSystem.java
+++ b/src/main/java/ca/spottedleaf/moonrise/common/util/ChunkSystem.java
@@ -1,6 +1,10 @@
@ -239,7 +239,7 @@ index da323a1105347d5cf4b946df10ded78a953236f2..79ea42ff287beadb997d5d805a3d5faa
}
public static boolean hasAnyChunkHolders(final ServerLevel level) {
@@ -232,52 +79,83 @@ public final class ChunkSystem {
@@ -232,52 +79,85 @@ public final class ChunkSystem {
}
@ -253,12 +253,14 @@ index da323a1105347d5cf4b946df10ded78a953236f2..79ea42ff287beadb997d5d805a3d5faa
+ ((ChunkSystemServerLevel)((ServerLevel)chunk.getLevel())).moonrise$getLoadedChunks().add(
+ ((ChunkSystemLevelChunk)chunk).moonrise$getChunkAndHolder()
+ );
+ chunk.loadCallback();
}
public static void onChunkNotBorder(final LevelChunk chunk, final ChunkHolder holder) {
+ ((ChunkSystemServerLevel)((ServerLevel)chunk.getLevel())).moonrise$getLoadedChunks().remove(
+ ((ChunkSystemLevelChunk)chunk).moonrise$getChunkAndHolder()
+ );
+ chunk.unloadCallback();
+ }
+ public static void onChunkPostNotBorder(final LevelChunk chunk, final ChunkHolder holder) {