Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add missing chunk api calls #11104

Merged
merged 1 commit into from
Jul 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions patches/server/0988-Moonrise-optimisation-patches.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@
Expand Down Expand Up @@ -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 {

}

Expand All @@ -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) {
Expand Down
Loading