From 8aed88b8db8d866b1908b5709412c0d284f0ccc8 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 27 Nov 2021 19:24:49 -0800 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) Upstream has released updates that appear 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: c9b35cdb PR-684: Make PotionEffectType implement Keyed CraftBukkit Changes: c86a3f7a PR-959: Fix World#refreshChunk af8a8b70 PR-962: Make PotionEffectType implement Keyed Spigot Changes: 7514aa37 SPIGOT-6806: Add setting to disable new chunks generation under existing chunks --- patches/server/Do-not-copy-visible-chunks.patch | 9 +++++++++ patches/server/Rewrite-dataconverter-system.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/patches/server/Do-not-copy-visible-chunks.patch b/patches/server/Do-not-copy-visible-chunks.patch index e9dee5f7b..0946f4cda 100644 --- a/patches/server/Do-not-copy-visible-chunks.patch +++ b/patches/server/Do-not-copy-visible-chunks.patch @@ -216,3 +216,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return chunks.values().stream().map(ChunkHolder::getFullChunk).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.LevelChunk::getBukkitChunk).toArray(Chunk[]::new); } +@@ -0,0 +0,0 @@ public class CraftWorld extends CraftRegionAccessor implements World { + + @Override + public boolean refreshChunk(int x, int z) { +- ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.visibleChunkMap.get(ChunkPos.asLong(x, z)); ++ ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.updatingChunks.getVisibleMap().get(ChunkPos.asLong(x, z)); + if (playerChunk == null) return false; + + playerChunk.getTickingChunkFuture().thenAccept(either -> { diff --git a/patches/server/Rewrite-dataconverter-system.patch b/patches/server/Rewrite-dataconverter-system.patch index e786133d2..33688d55b 100644 --- a/patches/server/Rewrite-dataconverter-system.patch +++ b/patches/server/Rewrite-dataconverter-system.patch @@ -21635,7 +21635,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 synchronized (this.persistentDataLock) { // Paper - Async chunk loading if (this.legacyStructureHandler == null) { @@ -0,0 +0,0 @@ public class ChunkStorage implements AutoCloseable { - } + // Spigot end ChunkStorage.injectDatafixingContext(nbttagcompound, resourcekey, optional); - nbttagcompound = NbtUtils.update(this.fixerUpper, DataFixTypes.CHUNK, nbttagcompound, Math.max(1493, i)); diff --git a/work/Bukkit b/work/Bukkit index 716b4fce8..c9b35cdb6 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 716b4fce8443809ed39119dbffdd21c04fcea04a +Subproject commit c9b35cdb66761dfbda6f0b860bdb3c2edfda8679 diff --git a/work/CraftBukkit b/work/CraftBukkit index 806bb02c1..c86a3f7a5 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 806bb02c177d08d9e2687897487f8e9b767a9ecf +Subproject commit c86a3f7a5877acb5406147923ac48d91c2f6e7d4 diff --git a/work/Spigot b/work/Spigot index b7a4222ea..7514aa374 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit b7a4222eac8fe8634946023cbba965187f568d07 +Subproject commit 7514aa374a331a548a45673de71e557a96125eda