3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/Spigot-Server-Patches/0261-Don-t-save-Proto-Chunks.patch
Shane Freeder d627cfa110
Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
17da3420 Fix reading custom persistent entity data
83783357 SPIGOT-4980: Shields will not be put on cooldown when hit with an axe
8d0f3722 SPIGOT-4752: Fixed inconsistency between isChunkLoaded and chunk load/unload events
3f9f31c3 SPIGOT-4982: Armor disappearing while breaking the armor stand
2019-05-26 02:56:30 +01:00

25 Zeilen
1.1 KiB
Diff

From c47e8542bbaffdfc8674841dd389cce19be740b5 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 047d6df9c1..21c4b56427 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -570,6 +570,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
public boolean saveChunk(IChunkAccess ichunkaccess) {
+ if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.PROTOCHUNK) { return true; } // Paper - don't save proto chunks
this.n.a(ichunkaccess.getPos());
if (!ichunkaccess.isNeedsSaving()) {
return false;
--
2.21.0