diff --git a/patches/server/0012-Adventure.patch b/patches/server/0012-Adventure.patch index a53cbdd93..8bc41b471 100644 --- a/patches/server/0012-Adventure.patch +++ b/patches/server/0012-Adventure.patch @@ -1860,10 +1860,10 @@ index 98efa73682ceee3590c225fbd4dc57b8ab0aec17..dea0b0d3164737b72d84679f2128fc82 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6bb2e87c4aa09e565c1c197548517d87f63f7fb1..277b946bec2cfd8cfb4054504133f6ab9059ba8c 100644 +index b66b88475178f5a20a689f1af9a06f7f8e50ff9b..8df699de4ddde3089324f347a82d913f2208f5be 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -131,6 +131,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -133,6 +133,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { private int waterAmbientSpawn = -1; private int waterUndergroundCreatureSpawn = -1; private int ambientSpawn = -1; @@ -1871,7 +1871,7 @@ index 6bb2e87c4aa09e565c1c197548517d87f63f7fb1..277b946bec2cfd8cfb4054504133f6ab private static final Random rand = new Random(); -@@ -1781,4 +1782,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1784,4 +1785,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.spigot; } // Spigot end diff --git a/patches/server/0040-Per-Player-View-Distance-API-placeholders.patch b/patches/server/0040-Per-Player-View-Distance-API-placeholders.patch index e348d47ef..fb96a44df 100644 --- a/patches/server/0040-Per-Player-View-Distance-API-placeholders.patch +++ b/patches/server/0040-Per-Player-View-Distance-API-placeholders.patch @@ -20,10 +20,10 @@ index 352bfe795aea26307de9c998d67a43af3e4845f0..4689d52cd314a607d17be3657099157e private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32; private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 277b946bec2cfd8cfb4054504133f6ab9059ba8c..a465ef627169e62132287cded07efb5b05e1ed36 100644 +index 8df699de4ddde3089324f347a82d913f2208f5be..4a91e8ee26ec34f605828afa75eea8dd30a1f1ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1750,6 +1750,31 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1753,6 +1753,31 @@ public class CraftWorld extends CraftRegionAccessor implements World { public int getSimulationDistance() { return world.spigotConfig.simulationDistance; } diff --git a/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch b/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch index 63b0f4600..2c38a8d2a 100644 --- a/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/patches/server/0126-Provide-E-TE-Chunk-count-stat-methods.patch @@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size() which creates copy of the collections. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index ca2e81b9eace4124b83588c604a88a0e5595c6e6..8fbf239cdc5bc2f1ec7b91eaee85d032e65f250f 100644 +index f51f41b19982736f3e095089eba17d0fab915e97..ea1e85fa125f2dd1a251e1589fff32d7083e2c13 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -111,7 +111,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -20,10 +20,10 @@ index ca2e81b9eace4124b83588c604a88a0e5595c6e6..8fbf239cdc5bc2f1ec7b91eaee85d032 private boolean tickingBlockEntities; public final Thread thread; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a465ef627169e62132287cded07efb5b05e1ed36..8579696f971824688500c8837f9451d23f84dae2 100644 +index 4a91e8ee26ec34f605828afa75eea8dd30a1f1ef..306b949dc7b9a57d97373a309ee33820c523b86e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -133,6 +133,57 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -135,6 +135,57 @@ public class CraftWorld extends CraftRegionAccessor implements World { private int ambientSpawn = -1; private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers diff --git a/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch index 6d5c0980f..fd73925fc 100644 --- a/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/0196-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 94a64e0e7a0ea147ae008f91a0787c8840566f4f..a734416fd80f0b367300c179e90fb51e206ca36c 100644 +index 41b4cc7577b937e22512df00e3d4a3445fa7d004..c6111e041fa85a13fdc96595bff62775e4f54ddb 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1361,12 +1361,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -34,10 +34,10 @@ index 94a64e0e7a0ea147ae008f91a0787c8840566f4f..a734416fd80f0b367300c179e90fb51e if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8579696f971824688500c8837f9451d23f84dae2..90fe854921dfea883c6420c765d13518a42080d2 100644 +index 306b949dc7b9a57d97373a309ee33820c523b86e..5d634f2bdab4f80cb2ccb3e60b9f3c96cfc7e875 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1748,11 +1748,17 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1751,11 +1751,17 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/patches/server/0213-Expand-Explosions-API.patch b/patches/server/0213-Expand-Explosions-API.patch index 0670e1418..7e8ee1f96 100644 --- a/patches/server/0213-Expand-Explosions-API.patch +++ b/patches/server/0213-Expand-Explosions-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 90fe854921dfea883c6420c765d13518a42080d2..478a1864079c72c670480a0dbb0a78eae2165dca 100644 +index 5d634f2bdab4f80cb2ccb3e60b9f3c96cfc7e875..da66ab027f89f9d92efe58f14a35d758e4e30687 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -688,6 +688,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -691,6 +691,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.BlockInteraction.BREAK : Explosion.BlockInteraction.NONE).wasCanceled; } diff --git a/patches/server/0217-Implement-World.getEntity-UUID-API.patch b/patches/server/0217-Implement-World.getEntity-UUID-API.patch index a5b36a176..8bb373848 100644 --- a/patches/server/0217-Implement-World.getEntity-UUID-API.patch +++ b/patches/server/0217-Implement-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 478a1864079c72c670480a0dbb0a78eae2165dca..d72bfc263798797ca83e529c26bd2a1733c65eb4 100644 +index da66ab027f89f9d92efe58f14a35d758e4e30687..0a2b445bffeb95854eb0e9fe009031d41ad1b2bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1022,6 +1022,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1025,6 +1025,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { return list; } diff --git a/patches/server/0256-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/0256-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 226777f75..016f5cf70 100644 --- a/patches/server/0256-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/patches/server/0256-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d72bfc263798797ca83e529c26bd2a1733c65eb4..d1ffbacdabc500bfbe3f65eed6206e499775f97a 100644 +index 0a2b445bffeb95854eb0e9fe009031d41ad1b2bb..dafdfce21f6629d6f99bcf4e47e82e2fbf332f09 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -369,7 +369,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -372,7 +372,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/server/0257-Asynchronous-chunk-IO-and-loading.patch b/patches/server/0257-Asynchronous-chunk-IO-and-loading.patch index 73dee35e5..57dcff5c4 100644 --- a/patches/server/0257-Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/0257-Asynchronous-chunk-IO-and-loading.patch @@ -3169,7 +3169,7 @@ index d3051e8bdec40cc00326c6ab4ab08e56065c1f56..9168bc15f8fbc8719e6c83428b824105 CompoundTag nbttagcompound3 = new CompoundTag(); Iterator iterator1 = chunk.getHeightmaps().iterator(); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java -index e2beb58065e049745c063d0edc49e295b14f9084..2eba8c2d1e978f677eaedac2e09cd1124f1d03db 100644 +index 2d1c8d5cf8ea6739d5e9df91cc16cde72917feff..d7fab2fb61dc3de14e382bac6127db956605e7ad 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java @@ -25,27 +25,38 @@ import net.minecraft.world.level.storage.DimensionDataStorage; @@ -3231,7 +3231,7 @@ index e2beb58065e049745c063d0edc49e295b14f9084..2eba8c2d1e978f677eaedac2e09cd112 } } -@@ -114,26 +127,39 @@ public class ChunkStorage implements AutoCloseable { +@@ -129,26 +142,39 @@ public class ChunkStorage implements AutoCloseable { @Nullable public CompoundTag read(ChunkPos chunkPos) throws IOException { @@ -3536,10 +3536,10 @@ index 415ec2cb81e956526e7f4965b899c9aa04f62f2e..ff6cadec530dedf9efc5d6226e48a096 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d1ffbacdabc500bfbe3f65eed6206e499775f97a..7f4024dbc1a0c50af9344689561de54eb35e1c98 100644 +index dafdfce21f6629d6f99bcf4e47e82e2fbf332f09..ab00e3a834c77e080a1ca4acf077c948a8287124 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1811,6 +1811,34 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1814,6 +1814,34 @@ public class CraftWorld extends CraftRegionAccessor implements World { public DragonBattle getEnderDragonBattle() { return (this.getHandle().dragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().dragonFight()); } diff --git a/patches/server/0274-Add-sun-related-API.patch b/patches/server/0274-Add-sun-related-API.patch index c9213fc75..e0c35765e 100644 --- a/patches/server/0274-Add-sun-related-API.patch +++ b/patches/server/0274-Add-sun-related-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7f4024dbc1a0c50af9344689561de54eb35e1c98..8615d4abbf18ab105ca7edffa10e8122ef76add3 100644 +index ab00e3a834c77e080a1ca4acf077c948a8287124..bbdeeb6bafde95cfffbafbe9fefb303d5593c498 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -664,6 +664,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -667,6 +667,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/server/0322-Add-Heightmap-API.patch b/patches/server/0322-Add-Heightmap-API.patch index a5aa74dec..318cfbf8e 100644 --- a/patches/server/0322-Add-Heightmap-API.patch +++ b/patches/server/0322-Add-Heightmap-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Heightmap API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8615d4abbf18ab105ca7edffa10e8122ef76add3..b521b6f2db867037ee986e32f7e2cbcd3038d8a3 100644 +index bbdeeb6bafde95cfffbafbe9fefb303d5593c498..6f9e0560101662012a332c560ce51c00500ce20b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -204,6 +204,29 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -206,6 +206,29 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING); } diff --git a/patches/server/0327-improve-CraftWorld-isChunkLoaded.patch b/patches/server/0327-improve-CraftWorld-isChunkLoaded.patch index 6883d3f0f..806a9b78e 100644 --- a/patches/server/0327-improve-CraftWorld-isChunkLoaded.patch +++ b/patches/server/0327-improve-CraftWorld-isChunkLoaded.patch @@ -9,10 +9,10 @@ waiting for the execution queue to get to our request; We can just query the chunk status and get a response now, vs having to wait diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b521b6f2db867037ee986e32f7e2cbcd3038d8a3..f68fa8f971c39e3d150860542341a2564730b089 100644 +index 6f9e0560101662012a332c560ce51c00500ce20b..29509d3ae956fd4da2bf12c6a352ab115fc75f5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -275,13 +275,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -277,13 +277,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean isChunkLoaded(int x, int z) { diff --git a/patches/server/0329-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/0329-Configurable-Keep-Spawn-Loaded-range-per-world.patch index c8728f26b..7bd2a5d83 100644 --- a/patches/server/0329-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/patches/server/0329-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -221,10 +221,10 @@ index 4185e6bcf9b2bb65b2a0fa5fcbeb5684615169a7..dbc29442f2b2ad3ea451910f4944e901 this.maxCount = i * i; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f68fa8f971c39e3d150860542341a2564730b089..bb95fec09594f7e2d38619ae4055ec9964635622 100644 +index 29509d3ae956fd4da2bf12c6a352ab115fc75f5c..255616aa45b06487c67aa6011dbe29e18d82bc68 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1337,15 +1337,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1340,15 +1340,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setKeepSpawnInMemory(boolean keepLoaded) { diff --git a/patches/server/0334-Fix-World-isChunkGenerated-calls.patch b/patches/server/0334-Fix-World-isChunkGenerated-calls.patch index 4ecf69b61..ac4c97a1e 100644 --- a/patches/server/0334-Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/0334-Fix-World-isChunkGenerated-calls.patch @@ -196,7 +196,7 @@ index 2cbc17288b1dc52edb2bdad29976d0f551b1e176..2ee32657a49937418b352a138aca21fb } catch (Throwable throwable) { if (dataoutputstream != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index bb95fec09594f7e2d38619ae4055ec9964635622..c4d5d78064cbef9386c00dc962e0a7889ed73d9d 100644 +index 255616aa45b06487c67aa6011dbe29e18d82bc68..706d5718997181279f7ec715526b4d8f2b6162a2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -19,6 +19,7 @@ import java.util.Objects; @@ -207,7 +207,7 @@ index bb95fec09594f7e2d38619ae4055ec9964635622..c4d5d78064cbef9386c00dc962e0a788 import java.util.function.Predicate; import java.util.stream.Collectors; import net.minecraft.core.BlockPos; -@@ -280,8 +281,22 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -282,8 +283,22 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean isChunkGenerated(int x, int z) { @@ -231,7 +231,7 @@ index bb95fec09594f7e2d38619ae4055ec9964635622..c4d5d78064cbef9386c00dc962e0a788 } catch (IOException ex) { throw new RuntimeException(ex); } -@@ -392,20 +407,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -395,20 +410,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/server/0351-Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/0351-Guard-against-serializing-mismatching-chunk-coordina.patch index b625771c7..e36f8ff33 100644 --- a/patches/server/0351-Guard-against-serializing-mismatching-chunk-coordina.patch +++ b/patches/server/0351-Guard-against-serializing-mismatching-chunk-coordina.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate Should help if something dumb happens diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 384ee6fbc65baff381d875665fd2462dbc99683e..980c784b8e5365b62cbeef7f32af9f4383cc01e6 100644 +index b44d621fc8a5194622775b7903de083cca999022..9a6f4c0bcfe8ce331ba7f6c92e527addcf65c911 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -75,6 +75,18 @@ public class ChunkSerializer { @@ -38,10 +38,10 @@ index 384ee6fbc65baff381d875665fd2462dbc99683e..980c784b8e5365b62cbeef7f32af9f43 if (!Objects.equals(chunkPos, chunkcoordintpair1)) { ChunkSerializer.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", chunkPos, chunkPos, chunkcoordintpair1); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java -index 2eba8c2d1e978f677eaedac2e09cd1124f1d03db..a750b40be3ba5ba258ca2540ab0398deac5a6c5e 100644 +index d7fab2fb61dc3de14e382bac6127db956605e7ad..b1b1fa19cfd533d5625a462af399c5fd055629b0 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java -@@ -132,6 +132,13 @@ public class ChunkStorage implements AutoCloseable { +@@ -147,6 +147,13 @@ public class ChunkStorage implements AutoCloseable { // Paper start - async chunk io public void write(ChunkPos chunkPos, CompoundTag nbt) throws IOException { diff --git a/patches/server/0455-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0455-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index 7ed957bd8..5c14cdfe5 100644 --- a/patches/server/0455-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/0455-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -44,10 +44,10 @@ index 835ff36cfd8c15bf11b3b6a70eb02f6c5b693b8a..b1dfd1b13652807882e057ae4fb55f9a this.printSaveWarning = false; console.autosavePeriod = this.configuration.getInt("ticks-per.autosave"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c4d5d78064cbef9386c00dc962e0a7889ed73d9d..3bc98586792960f50ca25929f1d91fc60a8577ce 100644 +index 706d5718997181279f7ec715526b4d8f2b6162a2..c11bdc266434aa9d90e5ab25e185dc1a1ba57d9b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -264,8 +264,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -266,8 +266,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Chunk getChunkAt(int x, int z) { @@ -70,7 +70,7 @@ index c4d5d78064cbef9386c00dc962e0a7889ed73d9d..3bc98586792960f50ca25929f1d91fc6 @Override public Chunk getChunkAt(Block block) { -@@ -332,7 +345,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -334,7 +347,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean unloadChunkRequest(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot if (this.isChunkLoaded(x, z)) { @@ -79,7 +79,7 @@ index c4d5d78064cbef9386c00dc962e0a7889ed73d9d..3bc98586792960f50ca25929f1d91fc6 } return true; -@@ -409,9 +422,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -412,9 +425,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot // Paper start - Optimize this method ChunkPos chunkPos = new ChunkPos(x, z); @@ -93,7 +93,7 @@ index c4d5d78064cbef9386c00dc962e0a7889ed73d9d..3bc98586792960f50ca25929f1d91fc6 if (immediate == null) { immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z); } -@@ -419,7 +435,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -422,7 +438,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!(immediate instanceof ImposterProtoChunk) && !(immediate instanceof net.minecraft.world.level.chunk.LevelChunk)) { return false; // not full status } @@ -102,7 +102,7 @@ index c4d5d78064cbef9386c00dc962e0a7889ed73d9d..3bc98586792960f50ca25929f1d91fc6 world.getChunk(x, z); // make sure we're at ticket level 32 or lower return true; } -@@ -445,7 +461,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -448,7 +464,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // we do this so we do not re-read the chunk data on disk } @@ -111,7 +111,7 @@ index c4d5d78064cbef9386c00dc962e0a7889ed73d9d..3bc98586792960f50ca25929f1d91fc6 world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true); return true; // Paper end -@@ -1914,6 +1930,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1917,6 +1933,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.world.getChunkSource().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> { net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) either.left().orElse(null); diff --git a/patches/server/0470-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/patches/server/0470-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch index 91bf85df1..8f0b8f761 100644 --- a/patches/server/0470-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch +++ b/patches/server/0470-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch @@ -1193,10 +1193,10 @@ index 6a881c2abdbc23366a1b0ac69e363b196b99197b..ddf362fc14fcf83b22536b76cfc6ac13 org.bukkit.event.world.ChunkUnloadEvent unloadEvent = new org.bukkit.event.world.ChunkUnloadEvent(this.bukkitChunk, this.isUnsaved()); server.getPluginManager().callEvent(unloadEvent); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3bc98586792960f50ca25929f1d91fc60a8577ce..ea4e897e04de9474abec5f6d0819bff4471b51ee 100644 +index c11bdc266434aa9d90e5ab25e185dc1a1ba57d9b..eea11a2bf87d409f484f07f207c57c864079e43d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1928,6 +1928,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1931,6 +1931,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { return future; } diff --git a/patches/server/0480-Add-missing-strikeLighting-call-to-World-spigot-stri.patch b/patches/server/0480-Add-missing-strikeLighting-call-to-World-spigot-stri.patch index 88219897a..49f5faddc 100644 --- a/patches/server/0480-Add-missing-strikeLighting-call-to-World-spigot-stri.patch +++ b/patches/server/0480-Add-missing-strikeLighting-call-to-World-spigot-stri.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing strikeLighting call to diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ea4e897e04de9474abec5f6d0819bff4471b51ee..3ed68022c06a6b0d9b1d98fcdf64c2c4ba42480e 100644 +index eea11a2bf87d409f484f07f207c57c864079e43d..b08bca3111a70edd329aac26b6f2763925081b60 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2000,6 +2000,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2003,6 +2003,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { lightning.moveTo( loc.getX(), loc.getY(), loc.getZ() ); lightning.visualOnly = true; lightning.isSilent = isSilent; diff --git a/patches/server/0488-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0488-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 62329967f..ebac545e6 100644 --- a/patches/server/0488-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0488-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -17,10 +17,10 @@ index d55d2627b7e0c847250c551989d438280bef9ab8..5c98b61c08464cc78be34d1567eff700 // if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add this.removeTicketsForSpawn(this.paperConfig.keepLoadedRange, prevSpawn); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3ed68022c06a6b0d9b1d98fcdf64c2c4ba42480e..85b688ee046c160f689495d97e2c48bef4ad6cdb 100644 +index b08bca3111a70edd329aac26b6f2763925081b60..81756e78acb1b9ea2a7e9b75ffe55a936cc79dce 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -245,11 +245,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -247,11 +247,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean setSpawnLocation(int x, int y, int z, float angle) { try { Location previousLocation = this.getSpawnLocation(); diff --git a/patches/server/0489-Add-moon-phase-API.patch b/patches/server/0489-Add-moon-phase-API.patch index 1d31d3db9..453da7fc7 100644 --- a/patches/server/0489-Add-moon-phase-API.patch +++ b/patches/server/0489-Add-moon-phase-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add moon phase API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 85b688ee046c160f689495d97e2c48bef4ad6cdb..b2efce98e8d6f5297646e4f270bc2d5cc7e182f0 100644 +index 81756e78acb1b9ea2a7e9b75ffe55a936cc79dce..f850aefb042660e6df423a19907a096a3a7c1d77 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -183,6 +183,11 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -185,6 +185,11 @@ public class CraftWorld extends CraftRegionAccessor implements World { public int getPlayerCount() { return world.players().size(); } diff --git a/patches/server/0534-Expose-world-spawn-angle.patch b/patches/server/0534-Expose-world-spawn-angle.patch index 0995290ba..a8d03cfac 100644 --- a/patches/server/0534-Expose-world-spawn-angle.patch +++ b/patches/server/0534-Expose-world-spawn-angle.patch @@ -18,10 +18,10 @@ index d414a3abae7dea5b813e41758eccf98cd35bddc2..e7834772e38e61df405be406fe320a64 Player respawnPlayer = entityplayer1.getBukkitEntity(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b2efce98e8d6f5297646e4f270bc2d5cc7e182f0..4e6d24ce3e14ad56b2e926d6b4aea36f882f5bf3 100644 +index f850aefb042660e6df423a19907a096a3a7c1d77..4224f6c5d219285c10c1dae18375ee553052510b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -236,7 +236,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -238,7 +238,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Location getSpawnLocation() { BlockPos spawn = this.world.getSharedSpawnPos(); diff --git a/patches/server/0566-Added-WorldGameRuleChangeEvent.patch b/patches/server/0566-Added-WorldGameRuleChangeEvent.patch index 025ce4d5e..aef4b0d49 100644 --- a/patches/server/0566-Added-WorldGameRuleChangeEvent.patch +++ b/patches/server/0566-Added-WorldGameRuleChangeEvent.patch @@ -64,10 +64,10 @@ index 888d812118c15c212284687ae5842a94f5715d52..e7ca5d6fb8922e7e8065864f736b0605 public int get() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4e6d24ce3e14ad56b2e926d6b4aea36f882f5bf3..77bbac3a5d98083589a54d03964d14be2d15df95 100644 +index 4224f6c5d219285c10c1dae18375ee553052510b..dc182b4ff748661b04e15578ac9e0e1a8062f2c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1733,8 +1733,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1736,8 +1736,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!this.isGameRule(rule)) return false; @@ -82,7 +82,7 @@ index 4e6d24ce3e14ad56b2e926d6b4aea36f882f5bf3..77bbac3a5d98083589a54d03964d14be handle.onChanged(this.getHandle().getServer()); return true; } -@@ -1769,8 +1774,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1772,8 +1777,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!this.isGameRule(rule.getName())) return false; diff --git a/patches/server/0614-Implement-Keyed-on-World.patch b/patches/server/0614-Implement-Keyed-on-World.patch index 3fdd14820..b6bdabe26 100644 --- a/patches/server/0614-Implement-Keyed-on-World.patch +++ b/patches/server/0614-Implement-Keyed-on-World.patch @@ -34,10 +34,10 @@ index 5c8dc52d012117ebf9721fb26d3c0e9d84a751f4..9d77ecf330d93b3c2925d097b753c887 // Check if a World already exists with the UID. if (this.getWorld(world.getUID()) != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 77bbac3a5d98083589a54d03964d14be2d15df95..6f09c88f04fd182f0e321f47b7b8c2e9332d2877 100644 +index dc182b4ff748661b04e15578ac9e0e1a8062f2c8..96d3f8a312ebe786fe21198d12d9f3294a86d865 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1956,6 +1956,11 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1959,6 +1959,11 @@ public class CraftWorld extends CraftRegionAccessor implements World { return java.util.concurrent.CompletableFuture.completedFuture(chunk == null ? null : chunk.getBukkitChunk()); }, net.minecraft.server.MinecraftServer.getServer()); } diff --git a/patches/server/0638-More-World-API.patch b/patches/server/0638-More-World-API.patch index d7ad6f7b3..d104b92d9 100644 --- a/patches/server/0638-More-World-API.patch +++ b/patches/server/0638-More-World-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More World API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6f09c88f04fd182f0e321f47b7b8c2e9332d2877..9a4f4cca21f9715628de5fd43030e50c5cf28cac 100644 +index 96d3f8a312ebe786fe21198d12d9f3294a86d865..5e26484e0b4a72556e77d8b2035d4cc569826b42 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1902,6 +1902,65 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1905,6 +1905,65 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (nearest == null) ? null : new Location(this, nearest.getX(), nearest.getY(), nearest.getZ()); } diff --git a/patches/server/0664-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0664-Add-cause-to-Weather-ThunderChangeEvents.patch index 7691c8daa..2e9855972 100644 --- a/patches/server/0664-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0664-Add-cause-to-Weather-ThunderChangeEvents.patch @@ -95,10 +95,10 @@ index d88003a29d382d8952964257601f93c5fe95fa8b..30cd6dc004ef1d1518c9a10304ea2a20 if (weather.isCancelled()) { return; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 9a4f4cca21f9715628de5fd43030e50c5cf28cac..a7fc7da224edcbbf21dcc8cecc879cf0a41daf36 100644 +index 5e26484e0b4a72556e77d8b2035d4cc569826b42..00aab4a9b4485fbecb98f2fb56370d3919b3a5f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1170,7 +1170,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1173,7 +1173,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setStorm(boolean hasStorm) { @@ -107,7 +107,7 @@ index 9a4f4cca21f9715628de5fd43030e50c5cf28cac..a7fc7da224edcbbf21dcc8cecc879cf0 this.setWeatherDuration(0); // Reset weather duration (legacy behaviour) this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands) } -@@ -1192,7 +1192,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1195,7 +1195,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setThundering(boolean thundering) { diff --git a/patches/server/0678-Line-Of-Sight-Changes.patch b/patches/server/0678-Line-Of-Sight-Changes.patch index 9d6b6160b..bc3b2bdec 100644 --- a/patches/server/0678-Line-Of-Sight-Changes.patch +++ b/patches/server/0678-Line-Of-Sight-Changes.patch @@ -19,10 +19,10 @@ index 7fb05333ffb052373af613f52bafd0684c39c1af..4c0c2bc9fae878304eab1c18b5ef0cae } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a7fc7da224edcbbf21dcc8cecc879cf0a41daf36..8947ecf8136b457265fee897f6d1a3da1ff5ac17 100644 +index 00aab4a9b4485fbecb98f2fb56370d3919b3a5f9..2e938d257de3df9ce571a6b850fc1a5ca5790cf7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -188,6 +188,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -190,6 +190,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { public io.papermc.paper.world.MoonPhase getMoonPhase() { return io.papermc.paper.world.MoonPhase.getPhase(getFullTime() / 24000L); } diff --git a/patches/server/0679-add-per-world-spawn-limits.patch b/patches/server/0679-add-per-world-spawn-limits.patch index 770432027..bf0a0dd34 100644 --- a/patches/server/0679-add-per-world-spawn-limits.patch +++ b/patches/server/0679-add-per-world-spawn-limits.patch @@ -52,10 +52,10 @@ index 83674565d280f5aa2504cdaee027386f3f377291..24f784209109f599fab11ba8c905f16c private void lightQueueSize() { lightQueueSize = getInt("light-queue-size", lightQueueSize); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8947ecf8136b457265fee897f6d1a3da1ff5ac17..28516df29bfb3d51980e2ace74fa72bfc2151056 100644 +index 2e938d257de3df9ce571a6b850fc1a5ca5790cf7..b4a1346eb90864c1eeb46b22a61f3adcd352aa19 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -210,6 +210,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -212,6 +212,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { this.biomeProvider = biomeProvider; this.environment = env; diff --git a/patches/server/0723-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0723-Add-methods-to-find-targets-for-lightning-strikes.patch index 0e0ca4e6d..1d1295829 100644 --- a/patches/server/0723-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0723-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -29,10 +29,10 @@ index 7dd99f16caac736ffb6b53b09695eede9cb7fbca..2b3c54737a203401c6f03bba9c9d969e blockposition1 = blockposition1.above(2); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 28516df29bfb3d51980e2ace74fa72bfc2151056..25ab3a26a46b592f0953047ecafed4733f037cd1 100644 +index b4a1346eb90864c1eeb46b22a61f3adcd352aa19..f7d94cb32a178247bbc5f59e5bc31e79f9fcdc4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -690,6 +690,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -693,6 +693,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (LightningStrike) lightning.getBukkitEntity(); } diff --git a/patches/server/0751-Do-not-copy-visible-chunks.patch b/patches/server/0751-Do-not-copy-visible-chunks.patch index 3042f4211..e598ff791 100644 --- a/patches/server/0751-Do-not-copy-visible-chunks.patch +++ b/patches/server/0751-Do-not-copy-visible-chunks.patch @@ -175,10 +175,10 @@ index ba7cd04b33fcaea7e7cea43b5929df56e130bf3f..72c769d627779224091660c44ccd2ba4 while (objectbidirectionaliterator.hasNext()) { Entry entry = (Entry) objectbidirectionaliterator.next(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 25ab3a26a46b592f0953047ecafed4733f037cd1..9c3a728b42fb18bb39377cf34e59add2c4cce73c 100644 +index f7d94cb32a178247bbc5f59e5bc31e79f9fcdc4d..ac41bc23d2f7e16bbacdc9b33fcf6c0d706fa023 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -149,7 +149,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -151,7 +151,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getTileEntityCount() { // We don't use the full world tile entity list, so we must iterate chunks @@ -187,7 +187,7 @@ index 25ab3a26a46b592f0953047ecafed4733f037cd1..9c3a728b42fb18bb39377cf34e59add2 int size = 0; for (ChunkHolder playerchunk : chunks.values()) { net.minecraft.world.level.chunk.LevelChunk chunk = playerchunk.getTickingChunk(); -@@ -170,7 +170,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -172,7 +172,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { public int getChunkCount() { int ret = 0; @@ -196,7 +196,7 @@ index 25ab3a26a46b592f0953047ecafed4733f037cd1..9c3a728b42fb18bb39377cf34e59add2 if (chunkHolder.getTickingChunk() != null) { ++ret; } -@@ -344,7 +344,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -346,7 +346,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Chunk[] getLoadedChunks() { @@ -216,3 +216,12 @@ index 25ab3a26a46b592f0953047ecafed4733f037cd1..9c3a728b42fb18bb39377cf34e59add2 return chunks.values().stream().map(ChunkHolder::getFullChunk).filter(Objects::nonNull).map(net.minecraft.world.level.chunk.LevelChunk::getBukkitChunk).toArray(Chunk[]::new); } +@@ -422,7 +433,7 @@ 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/0776-Rewrite-dataconverter-system.patch b/patches/server/0776-Rewrite-dataconverter-system.patch index 67d571ba9..999b3737c 100644 --- a/patches/server/0776-Rewrite-dataconverter-system.patch +++ b/patches/server/0776-Rewrite-dataconverter-system.patch @@ -21613,7 +21613,7 @@ index 0000000000000000000000000000000000000000..967ad1186cbc81a76a4958ea99d4eff3 + } +} diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java -index e490116a75c5a07e501339ca5e299fb425af84f4..2df7f532e445cb5d5813d6f80bf5b208ec2b7681 100644 +index d44154ba43e06934d7889f2f20d1a27765504574..f8167882a0f11c6fff86e494800864ecf59bb8b5 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java @@ -78,7 +78,7 @@ public class ChunkStorage implements AutoCloseable { @@ -21634,8 +21634,8 @@ index e490116a75c5a07e501339ca5e299fb425af84f4..2df7f532e445cb5d5813d6f80bf5b208 if (nbttagcompound.getCompound("Level").getBoolean("hasLegacyStructureData")) { synchronized (this.persistentDataLock) { // Paper - Async chunk loading if (this.legacyStructureHandler == null) { -@@ -103,7 +103,7 @@ public class ChunkStorage implements AutoCloseable { - } +@@ -112,7 +112,7 @@ 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