2018-07-23 10:39:55 +02:00
|
|
|
From 2d53aa2c84c4fed063659a26e9bcb90d546a5ae8 Mon Sep 17 00:00:00 2001
|
2018-07-23 03:25:48 +02:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Sun, 22 Jul 2018 21:21:41 -0400
|
|
|
|
Subject: [PATCH] Don't save Proto Chunks
|
|
|
|
|
|
|
|
These chunks are unfinished, and waste cpu time saving these unfinished chunks.
|
|
|
|
the loadChunk method refuses to acknoledge they exists, and will restart
|
|
|
|
a new chunk generation process to begin with, so saving them serves no benefit.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
2018-07-23 10:39:55 +02:00
|
|
|
index fd8430a68f..b425704b1a 100644
|
2018-07-23 03:25:48 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
|
|
|
@@ -250,7 +250,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
|
|
|
public boolean a(boolean flag) {
|
|
|
|
int i = 0;
|
|
|
|
|
|
|
|
- this.f.a();
|
|
|
|
+ //this.f.a(); // Paper - don't save proto chunks
|
|
|
|
ArrayList arraylist = Lists.newArrayList(this.chunks.values());
|
|
|
|
Iterator iterator = arraylist.iterator();
|
|
|
|
|
|
|
|
@@ -369,7 +369,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
|
|
|
}
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
- this.f.a();
|
|
|
|
+ //this.f.a(); // Paper - don't save proto chunks
|
|
|
|
this.chunkLoader.b();
|
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
2018-07-23 10:39:55 +02:00
|
|
|
index ea8684747d..a97e024ec4 100644
|
2018-07-23 03:25:48 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
|
|
|
@@ -282,6 +282,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
|
|
|
}
|
|
|
|
|
|
|
|
public synchronized void saveChunk(World world, IChunkAccess ichunkaccess, boolean unloaded) throws IOException, ExceptionWorldConflict {
|
2018-07-23 04:33:43 +02:00
|
|
|
+ if (ichunkaccess.i().d() == ChunkStatus.Type.PROTOCHUNK) { return; } // Paper - don't save proto chunks
|
2018-07-23 03:25:48 +02:00
|
|
|
// Spigot end
|
|
|
|
world.checkSession();
|
|
|
|
|
|
|
|
--
|
|
|
|
2.18.0
|
|
|
|
|