Implement config hooks in PaperHooks

This commit is contained in:
Spottedleaf
2024-10-24 08:36:07 -07:00
parent 4b1beb1404
commit 065aecac6c
3 changed files with 14 additions and 23 deletions

View File

@@ -7019,8 +7019,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public void autoSave() {
+ final List<NewChunkHolder> 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();
+