From 8bd54fac08b3ade04b63583ce9d8cc2173fa851f Mon Sep 17 00:00:00 2001 From: Aikar 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/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java index 110c9ef520..3074aa50e8 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -289,6 +289,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver { } public void saveChunk(World world, IChunkAccess ichunkaccess, boolean unloaded) throws IOException, ExceptionWorldConflict { + if (ichunkaccess.i().d() == ChunkStatus.Type.PROTOCHUNK) { return; } // Paper - don't save proto chunks // Spigot end world.checkSession(); diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java index 22af9c1885..95eb1a84ac 100644 --- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java +++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java @@ -24,7 +24,7 @@ public class ChunkTaskScheduler extends Scheduler