3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 11:30:06 +01:00

Fix logic issue with no save proto chunks patch

Should be returning true as a no-op "yes it was saved" rather than false
as a "there was an issue saving"
Dieser Commit ist enthalten in:
Zach Brown 2019-05-16 16:53:17 -05:00
Ursprung 2f4fe0962b
Commit 24a5bfb9cb
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76

Datei anzeigen

@ -1,4 +1,4 @@
From e4d1232c82e9f706a4e6f3ca918109cedfeb3121 Mon Sep 17 00:00:00 2001
From c4f30faf555c8e76cf429c5229bbe21876327b87 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
@ -8,14 +8,14 @@ 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 c7bc4cc363..2244d65ee6 100644
index c7bc4cc36..1cf516192 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -588,6 +588,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
public boolean saveChunk(IChunkAccess ichunkaccess, boolean save) {
+ if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.PROTOCHUNK) { return false; } // Paper - don't save proto chunks
+ if (ichunkaccess.getChunkStatus().getType() == ChunkStatus.Type.PROTOCHUNK) { return true; } // Paper - don't save proto chunks
// CraftBukkit end
this.n.a(ichunkaccess.getPos());
if (!save) { // CraftBukkit