mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
ea855e2b46
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 Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this Also, restore a patch that was dropped in the last upstream Bukkit Changes: 279eeab3 Fix command description not being set 96e2bb18 Remove debug print from SyntheticEventTest CraftBukkit Changes:d3ed1516
Fix dangerously threaded beacons217a293d
Don't relocate joptsimple to allow --help to work.1be05a21
Prepare for imminent Java 12 releasea49270b2
Mappings Update5259d80c
SPIGOT-4669: Fix PlayerTeleportEvent coordinates for relative teleports Spigot Changes: e6eb36f2 Rebuild patches
45 lines
2.1 KiB
Diff
45 lines
2.1 KiB
Diff
From 8144fe1c7fb428423df1a46a86e78c814e71ee8a 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/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
|
index 0fc4d9f52..2c4a4fc6b 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
|
@@ -304,6 +304,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 70a95c263..56958a5ce 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
|
@@ -21,7 +21,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
|
protected boolean a(Scheduler<ChunkCoordIntPair, ChunkStatus, ProtoChunk>.a scheduler_a) {
|
|
ProtoChunk protochunk = (ProtoChunk) scheduler_a.a();
|
|
|
|
- return !protochunk.ab_() && !protochunk.h();
|
|
+ return !protochunk.ab_() /*&& !protochunk.h()*/; // Paper
|
|
}
|
|
};
|
|
|
|
@@ -85,6 +85,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
|
}
|
|
|
|
public void a(BooleanSupplier booleansupplier) {
|
|
+ if (true) return; // Paper - we don't save proto chunks, and don't want to block thread
|
|
IChunkLoader ichunkloader = this.e;
|
|
|
|
synchronized (this.e) {
|
|
--
|
|
2.21.0
|
|
|