diff --git a/moonrise_update_1_21_2.txt b/moonrise_update_1_21_2.txt index d6a3d5df42..c7942be4eb 100644 --- a/moonrise_update_1_21_2.txt +++ b/moonrise_update_1_21_2.txt @@ -3,16 +3,8 @@ https://github.com/Tuinity/Moonrise/compare/6a2c6d27df11d417c1fefa749109d8e87599 need to compare the diffs -add notes to moonrise patch: - - implemented fast palette patch - - implemented better bitstorage magic patch - - implemented blockstate property patch (replaced old paper one) - - implemented fluid patch - - todo: - double check that the misc changes commit on dev/1.21.2 moonrise is applied -- implement platformhooks - in ChunkEntitySlices, implement modifySavedEntities() by copying from old - implement PlayerChunkUnloadEvent in PlatformHooks#onChunkUnWatch - make sure chunk pos is passed in PlatformHooks#postLoadProtoChunk @@ -32,5 +24,4 @@ todo: - implement starlight.ChunkSerializerMixin diff from reference - implement starlight.SerializableChunkData$SectionData diff from reference - implement starlight.SerializableChunkDataMixin diff from reference -- unfuck the chtunk system config diff - chunk system: move get entity lookup reroute into the folia scheduler api patch diff --git a/patches/server/0823-fixup-MC-Utils.patch b/patches/server/0823-fixup-MC-Utils.patch index fffa760d9f..65dd1f277b 100644 --- a/patches/server/0823-fixup-MC-Utils.patch +++ b/patches/server/0823-fixup-MC-Utils.patch @@ -91,9 +91,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + public int configPlayerMaxConcurrentGens(); + -+ public long configAutoSaveInterval(); ++ public long configAutoSaveInterval(final ServerLevel world); + -+ public int configMaxAutoSavePerTick(); ++ public int configMaxAutoSavePerTick(final ServerLevel world); + + public boolean configFixMC159283(); + @@ -1153,42 +1153,42 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + @Override + public boolean configAutoConfigSendDistance() { -+ ++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingAdvanced.autoConfigSendDistance; + } + + @Override + public double configPlayerMaxLoadRate() { -+ ++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingBasic.playerMaxChunkLoadRate; + } + + @Override + public double configPlayerMaxGenRate() { -+ ++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingBasic.playerMaxChunkGenerateRate; + } + + @Override + public double configPlayerMaxSendRate() { -+ ++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingBasic.playerMaxChunkSendRate; + } + + @Override + public int configPlayerMaxConcurrentLoads() { -+ ++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingAdvanced.playerMaxConcurrentChunkLoads; + } + + @Override + public int configPlayerMaxConcurrentGens() { -+ ++ return io.papermc.paper.configuration.GlobalConfiguration.get().chunkLoadingAdvanced.playerMaxConcurrentChunkGenerates; + } + + @Override -+ public long configAutoSaveInterval() { -+ ++ public long configAutoSaveInterval(final ServerLevel world) { ++ return world.paperConfig().chunks.autoSaveInterval.value(); + } + + @Override -+ public int configMaxAutoSavePerTick() { -+ ++ public int configMaxAutoSavePerTick(final ServerLevel world) { ++ return world.paperConfig().chunks.maxAutoSaveChunksPerTick; + } + + @Override diff --git a/patches/server/Moonrise-optimisation-patches.patch b/patches/server/Moonrise-optimisation-patches.patch index 9fd36b7165..d8d62bf0c8 100644 --- a/patches/server/Moonrise-optimisation-patches.patch +++ b/patches/server/Moonrise-optimisation-patches.patch @@ -7019,8 +7019,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public void autoSave() { + final List reschedule = new ArrayList<>(); + final long currentTick = this.currentTick; -+ final long maxSaveTime = currentTick - Math.max(1L, PlatformHooks.get().configAutoSaveInterval()); -+ final int maxToSave = PlatformHooks.get().configMaxAutoSavePerTick(); ++ final long maxSaveTime = currentTick - Math.max(1L, PlatformHooks.get().configAutoSaveInterval(this.world)); ++ final int maxToSave = PlatformHooks.get().configMaxAutoSavePerTick(this.world); + for (int autoSaved = 0; autoSaved < maxToSave && !this.autoSaveQueue.isEmpty();) { + final NewChunkHolder holder = this.autoSaveQueue.first(); +