geforkt von Mirrors/Paper
0708fa363b
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:eb2e6578
SPIGOT-5116: Fix concurrent modification exception inside ChunkMapDistance989f9b3d
SPIGOT-4849: Fix server crash when accessing chunks during chunk load/unload/populate eventsf554183c
SPIGOT-5171: Don't fire PlayerTeleportEvent if not actually moving2349feb8
SPIGOT-5163: Cancelling PlayerBucketFillEvent visually removes the targeted block Spigot Changes: 9a643a6a Remove DataWatcher Locking
29 Zeilen
1.4 KiB
Diff
29 Zeilen
1.4 KiB
Diff
From 8a07db03b2e5b40c290abe1193fe7766ad0b8a44 Mon Sep 17 00:00:00 2001
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
Date: Sat, 22 Jun 2019 04:20:47 -0700
|
|
Subject: [PATCH] Use ChunkStatus cache when saving protochunks
|
|
|
|
The cache should contain the chunk status when saving. If not it
|
|
will load it.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
index 4cf58e5ea..d68c89817 100644
|
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
@@ -748,8 +748,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
NBTTagCompound nbttagcompound;
|
|
|
|
if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) {
|
|
- nbttagcompound = this.readChunkData(chunkcoordintpair);
|
|
- if (nbttagcompound != null && ChunkRegionLoader.a(nbttagcompound) == ChunkStatus.Type.LEVELCHUNK) {
|
|
+ // Paper start - Optimize save by using status cache
|
|
+ ChunkStatus statusOnDisk = this.getChunkStatusOnDisk(chunkcoordintpair);
|
|
+ if (statusOnDisk != null && statusOnDisk.getType() == ChunkStatus.Type.LEVELCHUNK) {
|
|
+ // Paper end
|
|
return false;
|
|
}
|
|
|
|
--
|
|
2.22.0
|
|
|