mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 04:31:58 +01:00
b62dfa0bf9
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 Bukkit Changes: 39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers CraftBukkit Changes:1cf8b5dc
SPIGOT-4400: Populators running on existing chunks116cb9a1
SPIGOT-4399: Add attribute modifier equality test5ee1c18a
SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
45 lines
2.1 KiB
Diff
45 lines
2.1 KiB
Diff
From ef04639136c63dc275c50894c2ba0de88c3f0bc6 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 ec328126cf..3d8f0b5786 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
|
@@ -300,6 +300,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 22af9c1885..95eb1a84ac 100644
|
|
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
|
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
|
@@ -24,7 +24,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
|
protected boolean a(Scheduler.a scheduler_a) {
|
|
ProtoChunk protochunk = (ProtoChunk) scheduler_a.a();
|
|
|
|
- return !protochunk.ab_() && !protochunk.h();
|
|
+ return !protochunk.ab_() /*&& !protochunk.h()*/; // Paper
|
|
}
|
|
};
|
|
|
|
@@ -88,6 +88,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.19.0
|
|
|