3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0263-Don-t-save-Proto-Chunks.patch
Spottedleaf b5b481da62 Fix more runtime stuff
Remove chunk neighbour system until we can figure out the chunk system
2019-05-06 17:05:41 -07:00

25 Zeilen
1.1 KiB
Diff

From ebdfbf4828b4b305b2aa5880d5239eb37a134dae Mon Sep 17 00:00:00 2001
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
index eee03e39b1..239bac9839 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -554,6 +554,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
public void saveChunk(IChunkAccess ichunkaccess, boolean save) {
+ if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.PROTOCHUNK) { return; } // Paper - don't save proto chunks
// CraftBukkit end
this.n.a(ichunkaccess.getPos());
if (save) { // CraftBukkit
--
2.21.0