2019-05-27 08:14:14 +02:00
|
|
|
From 8bbb87374ea587a7f8569a0fc0cf6f1c976f72c6 Mon Sep 17 00:00:00 2001
|
2019-04-30 03:20:24 +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/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
2019-05-26 03:56:30 +02:00
|
|
|
index 047d6df9c1..21c4b56427 100644
|
2019-04-30 03:20:24 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
2019-05-26 03:56:30 +02:00
|
|
|
@@ -570,6 +570,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
2019-04-30 03:20:24 +02:00
|
|
|
}
|
|
|
|
|
2019-05-26 03:56:30 +02:00
|
|
|
public boolean saveChunk(IChunkAccess ichunkaccess) {
|
2019-05-16 23:53:17 +02:00
|
|
|
+ if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.PROTOCHUNK) { return true; } // Paper - don't save proto chunks
|
2019-04-30 03:20:24 +02:00
|
|
|
this.n.a(ichunkaccess.getPos());
|
2019-05-26 03:56:30 +02:00
|
|
|
if (!ichunkaccess.isNeedsSaving()) {
|
|
|
|
return false;
|
2019-04-30 03:20:24 +02:00
|
|
|
--
|
|
|
|
2.21.0
|
|
|
|
|