From 8b2e99a3151d9a6f41f4e2f93f2cd52290c91684 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 4 Mar 2022 09:33:13 +0100 Subject: [PATCH] Updated Upstream (CraftBukkit) 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 CraftBukkit Changes: 4ed5af5e SPIGOT-6956: Reduce differences caused by setKeepSpawnInMemory(false) 21fe78aa SPIGOT-6957: Bad default value for WorldCreator#generatorSettings ce373be6 PR-1022: Fix get HighestBlockAt in chunk snapshot --- ...ble-Keep-Spawn-Loaded-range-per-world.patch | 18 +++++++----------- work/CraftBukkit | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/patches/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch index 5fa7f791e2..06d1204097 100644 --- a/patches/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/patches/server/Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -30,11 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) { -- if (!worldserver.getWorld().getKeepSpawnInMemory()) { -- return; -- } + ServerChunkCache chunkproviderserver = worldserver.getChunkSource(); // Paper - // WorldServer worldserver = this.overworld(); this.forceTicks = true; // CraftBukkit end @@ -49,13 +45,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 chunkproviderserver.getLightEngine().setTaskPerBatch(500); this.nextTickTime = Util.getMillis(); -- chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(blockposition), 11, Unit.INSTANCE); +- // CraftBukkit start +- if (worldserver.getWorld().getKeepSpawnInMemory()) { +- chunkproviderserver.addRegionTicket(TicketType.START, new ChunkPos(blockposition), 11, Unit.INSTANCE); - -- while (chunkproviderserver.getTickingGenerated() != 441) { -- // CraftBukkit start -- // this.nextTickTime = SystemUtils.getMillis() + 10L; -- this.executeModerately(); -- // CraftBukkit end +- while (chunkproviderserver.getTickingGenerated() != 441) { +- // this.nextTickTime = SystemUtils.getMillis() + 10L; +- this.executeModerately(); +- } - } + // Paper start - configurable spawn reason + int radiusBlocks = worldserver.paperConfig.keepLoadedRange; @@ -67,7 +64,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + worldserver.addTicketsForSpawn(radiusBlocks, blockposition); + // Paper end - // CraftBukkit start // this.nextTickTime = SystemUtils.getMillis() + 10L; this.executeModerately(); // Iterator iterator = this.levels.values().iterator(); diff --git a/work/CraftBukkit b/work/CraftBukkit index 86292d3e08..4ed5af5e63 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 86292d3e084729f53ce77af17b7b20d91754b7a5 +Subproject commit 4ed5af5e63dea4884c9466901b4bfb0996455f7e