diff --git a/patches/unapplied/server/0332-Optimize-Hoppers.patch b/patches/removed/1.19.4/0332-Optimize-Hoppers.patch similarity index 100% rename from patches/unapplied/server/0332-Optimize-Hoppers.patch rename to patches/removed/1.19.4/0332-Optimize-Hoppers.patch diff --git a/patches/unapplied/server/0448-Optimize-the-advancement-data-player-iteration-to-be.patch b/patches/removed/1.19.4/0448-Optimize-the-advancement-data-player-iteration-to-be.patch similarity index 100% rename from patches/unapplied/server/0448-Optimize-the-advancement-data-player-iteration-to-be.patch rename to patches/removed/1.19.4/0448-Optimize-the-advancement-data-player-iteration-to-be.patch diff --git a/patches/unapplied/server/0308-Server-Tick-Events.patch b/patches/server/0308-Server-Tick-Events.patch similarity index 81% rename from patches/unapplied/server/0308-Server-Tick-Events.patch rename to patches/server/0308-Server-Tick-Events.patch index f2e4cc5413..47b21b5a2a 100644 --- a/patches/unapplied/server/0308-Server-Tick-Events.patch +++ b/patches/server/0308-Server-Tick-Events.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events Fires event at start and end of a server tick diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 038e98c708f9fac8ab6109d02b0297a1d008710c..0f824428003776128f5d92c735df06cd30a8666b 100644 +index ca2a2b1f54f06f9035be8b379fad580128811fc2..9d2186655ae03022ddeaf078028570ef9118fb06 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1309,6 +1309,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> readChunk(ChunkPos chunkPos) { @@ -28,7 +28,7 @@ index 7b8a5efc73a7a0bfb51af7299341b0e2e988d4c1..ae97f0c4b39d838ab321743a048de53c } // CraftBukkit start -@@ -682,6 +686,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -685,6 +689,63 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // CraftBukkit end } @@ -156,7 +156,7 @@ index 8f729134d8f024678f3f5927059791e28ccb5b90..b294ef87fb93e7f4651dc04128124f29 } 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 bb502b4203537dd41dcc3d6829283b1c4082c7aa..dd12b13bc8e8f0a7791f6204c25461758d6d0d07 100644 +index ba6d74692039c39660ed5e1d960cb090553a82f0..19f711f82386aaa731699f60ddb95ac208bf3a19 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -298,9 +298,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0320-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0320-Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 100% rename from patches/unapplied/server/0320-Show-blockstate-location-if-we-failed-to-read-it.patch rename to patches/server/0320-Show-blockstate-location-if-we-failed-to-read-it.patch diff --git a/patches/unapplied/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 94% rename from patches/unapplied/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch index 7cd63eeb62..bb52376096 100644 --- a/patches/unapplied/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch +++ b/patches/server/0321-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch @@ -17,7 +17,7 @@ This should fully solve all of the issues around it so that only natural influences natural spawns. diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index c3d6b904f1310c93a3d5c1e5e3fab2f3476f5a48..29dac07176eb99517c9cddbe012636908c3603fe 100644 +index 029835914c3c88811684e90b29bfed83191b3b3f..05c014c5f0805d50cfd251b043c79ce3355eef16 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -88,6 +88,13 @@ public final class NaturalSpawner { diff --git a/patches/unapplied/server/0322-Configurable-projectile-relative-velocity.patch b/patches/server/0322-Configurable-projectile-relative-velocity.patch similarity index 92% rename from patches/unapplied/server/0322-Configurable-projectile-relative-velocity.patch rename to patches/server/0322-Configurable-projectile-relative-velocity.patch index d5fef8c131..ca5ee9c66e 100644 --- a/patches/unapplied/server/0322-Configurable-projectile-relative-velocity.patch +++ b/patches/server/0322-Configurable-projectile-relative-velocity.patch @@ -25,10 +25,10 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this server-internal fix makes this change future-proof. diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index a904507707475e95b6389ccc437bd234b97c10cc..b226800c15f5adbc40c89b36536db23f08e2857d 100644 +index a85175190c1ebb14b496a0bfe2f7136e06d0072c..ae0e422ee7e1dcf01b4c7b64b23afdbbbe19819e 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -162,7 +162,7 @@ public abstract class Projectile extends Entity { +@@ -164,7 +164,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { this.shoot((double) f5, (double) f6, (double) f7, speed, divergence); Vec3 vec3d = shooter.getDeltaMovement(); diff --git a/patches/unapplied/server/0323-offset-item-frame-ticking.patch b/patches/server/0323-offset-item-frame-ticking.patch similarity index 84% rename from patches/unapplied/server/0323-offset-item-frame-ticking.patch rename to patches/server/0323-offset-item-frame-ticking.patch index d20777b4c1..b9d4075476 100644 --- a/patches/unapplied/server/0323-offset-item-frame-ticking.patch +++ b/patches/server/0323-offset-item-frame-ticking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] offset item frame ticking diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -index 1a48108d98f89c4f2485424e6ddfadf152faddf9..334a47b5e0d205c57dfcbb17168cbd3f21d15606 100644 +index 46946473713f08ef0304a49b017a8970f1957e88..f7d031e9a5aa533d78a49ed6147dd47dd0f27f01 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java +++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -@@ -38,7 +38,7 @@ public abstract class HangingEntity extends Entity { +@@ -39,7 +39,7 @@ public abstract class HangingEntity extends Entity { protected static final Predicate HANGING_ENTITY = (entity) -> { return entity instanceof HangingEntity; }; diff --git a/patches/unapplied/server/0324-Fix-MC-158900.patch b/patches/server/0324-Fix-MC-158900.patch similarity index 87% rename from patches/unapplied/server/0324-Fix-MC-158900.patch rename to patches/server/0324-Fix-MC-158900.patch index ef97727ed4..51d22e3ee6 100644 --- a/patches/unapplied/server/0324-Fix-MC-158900.patch +++ b/patches/server/0324-Fix-MC-158900.patch @@ -7,12 +7,12 @@ The problem was we were checking isExpired() on the entry, but if it was expired at that point, then it would be null. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index ce35bd1bf1e532ec1bf260d72299b0f6c2699e9a..b537dfce0492acd170e37406b3ed1ad215d7df7d 100644 +index d677a05741e1df4bba2598182256758d4da09a4b..1644ff0709d721ba8c19e4b4c7ef07fc8e8f5918 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -620,8 +620,10 @@ public abstract class PlayerList { +@@ -627,8 +627,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); - PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.getRawAddress()).getAddress()); + PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress()); - if (this.getBans().isBanned(gameprofile) && !this.getBans().get(gameprofile).hasExpired()) { - UserBanListEntry gameprofilebanentry = (UserBanListEntry) this.bans.get(gameprofile); diff --git a/patches/unapplied/server/0325-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0325-Prevent-consuming-the-wrong-itemstack.patch similarity index 84% rename from patches/unapplied/server/0325-Prevent-consuming-the-wrong-itemstack.patch rename to patches/server/0325-Prevent-consuming-the-wrong-itemstack.patch index 27571f55a3..b1da08344d 100644 --- a/patches/unapplied/server/0325-Prevent-consuming-the-wrong-itemstack.patch +++ b/patches/server/0325-Prevent-consuming-the-wrong-itemstack.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 3989a06970c896fedcd912eeaaca8945e3067858..66e8231d2a717ceed7c39b87809a3fd40d644963 100644 +index 69fbbd2745008e2d9caf6a30dd0779339e1c685b..5eaedecd2e53bcdc30defbf56d6a70a0c49f03ec 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3649,9 +3649,14 @@ public abstract class LivingEntity extends Entity { +@@ -3609,9 +3609,14 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void startUsingItem(InteractionHand hand) { @@ -24,7 +24,7 @@ index 3989a06970c896fedcd912eeaaca8945e3067858..66e8231d2a717ceed7c39b87809a3fd4 this.useItem = itemstack; this.useItemRemaining = itemstack.getUseDuration(); if (!this.level.isClientSide) { -@@ -3731,6 +3736,7 @@ public abstract class LivingEntity extends Entity { +@@ -3691,6 +3696,7 @@ public abstract class LivingEntity extends Entity implements Attackable { this.releaseUsingItem(); } else { if (!this.useItem.isEmpty() && this.isUsingItem()) { @@ -32,7 +32,7 @@ index 3989a06970c896fedcd912eeaaca8945e3067858..66e8231d2a717ceed7c39b87809a3fd4 this.triggerItemUseEffects(this.useItem, 16); // CraftBukkit start - fire PlayerItemConsumeEvent ItemStack itemstack; -@@ -3766,8 +3772,8 @@ public abstract class LivingEntity extends Entity { +@@ -3726,8 +3732,8 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.stopUsingItem(); diff --git a/patches/unapplied/server/0326-Dont-send-unnecessary-sign-update.patch b/patches/server/0326-Dont-send-unnecessary-sign-update.patch similarity index 87% rename from patches/unapplied/server/0326-Dont-send-unnecessary-sign-update.patch rename to patches/server/0326-Dont-send-unnecessary-sign-update.patch index 9d63a246b8..e19c8f9106 100644 --- a/patches/unapplied/server/0326-Dont-send-unnecessary-sign-update.patch +++ b/patches/server/0326-Dont-send-unnecessary-sign-update.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Dont send unnecessary sign update diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c8dd695a4fe41785acd34dc6dd02810202a55d5c..bae36fdcab69b27be03d4df6cb24912c6884340c 100644 +index cb776250920c68d8b8cc0baac804b83b1ec9376a..34a969d8902f23d5ec3f8cc481b60c0fd74f8245 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3220,6 +3220,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3229,6 +3229,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) { ServerGamePacketListenerImpl.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString()); diff --git a/patches/unapplied/server/0327-Add-option-to-disable-pillager-patrols.patch b/patches/server/0327-Add-option-to-disable-pillager-patrols.patch similarity index 100% rename from patches/unapplied/server/0327-Add-option-to-disable-pillager-patrols.patch rename to patches/server/0327-Add-option-to-disable-pillager-patrols.patch diff --git a/patches/unapplied/server/0328-Flat-bedrock-generator-settings.patch b/patches/server/0328-Flat-bedrock-generator-settings.patch similarity index 99% rename from patches/unapplied/server/0328-Flat-bedrock-generator-settings.patch rename to patches/server/0328-Flat-bedrock-generator-settings.patch index f5ea879f80..8b5133e435 100644 --- a/patches/unapplied/server/0328-Flat-bedrock-generator-settings.patch +++ b/patches/server/0328-Flat-bedrock-generator-settings.patch @@ -126,7 +126,7 @@ index ac2b7b5161eaaca3620268ae865d6f2a80227fde..a1192d1f6b99669f843e8d9a8928ff0e }); // Paper end diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java -index cdc87f14e5d6336856c74d5089e50ae5ebad9923..6b84633bf6956406d2e2c5dd32fa358f41ccc890 100644 +index 4f3387d1b128bc98614cfabfb5306781bdcd93be..0d8fd4eaf912eb4d40bb9f600dd2a8d5c21ab572 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java @@ -207,7 +207,7 @@ public final class NoiseBasedChunkGenerator extends ChunkGenerator { diff --git a/patches/unapplied/server/0329-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/0329-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from patches/unapplied/server/0329-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to patches/server/0329-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/patches/unapplied/server/0330-MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/0330-MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from patches/unapplied/server/0330-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to patches/server/0330-MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/patches/unapplied/server/0331-Duplicate-UUID-Resolve-Option.patch b/patches/server/0331-Duplicate-UUID-Resolve-Option.patch similarity index 96% rename from patches/unapplied/server/0331-Duplicate-UUID-Resolve-Option.patch rename to patches/server/0331-Duplicate-UUID-Resolve-Option.patch index 93315feb85..219c1a4609 100644 --- a/patches/unapplied/server/0331-Duplicate-UUID-Resolve-Option.patch +++ b/patches/server/0331-Duplicate-UUID-Resolve-Option.patch @@ -56,10 +56,10 @@ index 0dc94dec1317b3f86d38074c6cbe41ab828cab1d..0e45a340ae534caf676b7f9d0adcbcee public static void onChunkHolderCreate(final ServerLevel level, final ChunkHolder holder) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index ae97f0c4b39d838ab321743a048de53cbc83de5d..4b05139db6628808128337dbf817712e339c17d0 100644 +index 299c7c60edf491cc44e609517474d8247fb6c724..430be10a2b0487dc26f21793592ca08d01a39e53 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -534,6 +534,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -537,6 +537,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.discard(); needsRemoval = true; } @@ -67,7 +67,7 @@ index ae97f0c4b39d838ab321743a048de53cbc83de5d..4b05139db6628808128337dbf817712e return !needsRemoval; })); // CraftBukkit end -@@ -545,6 +546,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -548,6 +549,49 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider throw new UnsupportedOperationException(); // Paper - rewrite chunk system } diff --git a/patches/unapplied/server/0333-PlayerDeathEvent-shouldDropExperience.patch b/patches/server/0332-PlayerDeathEvent-shouldDropExperience.patch similarity index 85% rename from patches/unapplied/server/0333-PlayerDeathEvent-shouldDropExperience.patch rename to patches/server/0332-PlayerDeathEvent-shouldDropExperience.patch index ff037a1d2b..0049360bb1 100644 --- a/patches/unapplied/server/0333-PlayerDeathEvent-shouldDropExperience.patch +++ b/patches/server/0332-PlayerDeathEvent-shouldDropExperience.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e5b04fc62588a8b128fa32e5cd270f3103a6c95e..70b92f95a3b1964a6253e64854d7d7d65ed5311f 100644 +index fe7be6e6b2471abaf7e810daf4baa6eb8e12dba5..db3d5fd301f38ae3bf13ff6d7530d6e70acb8296 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -918,7 +918,7 @@ public class ServerPlayer extends Player { +@@ -923,7 +923,7 @@ public class ServerPlayer extends Player { this.tellNeutralMobsThatIDied(); } // SPIGOT-5478 must be called manually now diff --git a/patches/unapplied/server/0334-Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/0333-Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 91% rename from patches/unapplied/server/0334-Prevent-bees-loading-chunks-checking-hive-position.patch rename to patches/server/0333-Prevent-bees-loading-chunks-checking-hive-position.patch index 7ade870a16..b8b3046483 100644 --- a/patches/unapplied/server/0334-Prevent-bees-loading-chunks-checking-hive-position.patch +++ b/patches/server/0333-Prevent-bees-loading-chunks-checking-hive-position.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index f1e43449eca998e83eca1b53f479918b7b4faf25..aea3872c89493f68d31186877a1ea981a0c0df6d 100644 +index f7bd3e5b30b19e56d16fbc86f40dc851da99c63b..78fe610d69db727411bf685127c39d009090ee14 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java @@ -498,6 +498,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { diff --git a/patches/unapplied/server/0335-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/0334-Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from patches/unapplied/server/0335-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to patches/server/0334-Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/patches/unapplied/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/0335-Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 94% rename from patches/unapplied/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch rename to patches/server/0335-Guard-against-serializing-mismatching-chunk-coordina.patch index 490513878a..05f3621ca5 100644 --- a/patches/unapplied/server/0336-Guard-against-serializing-mismatching-chunk-coordina.patch +++ b/patches/server/0335-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 b8cf01fbfc3293bf78b1094a90da3594fa2067b4..b8f5ad1130b125f71a1feb1083120fb700b9bea1 100644 +index f9dd2d9312297a727344d43150c5cab74128cbca..b1c5e5ecf2488d1a6f0a5261d4ba8958de9659ae 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 @@ -94,6 +94,18 @@ public class ChunkSerializer { @@ -38,7 +38,7 @@ index b8cf01fbfc3293bf78b1094a90da3594fa2067b4..b8f5ad1130b125f71a1feb1083120fb7 if (!Objects.equals(chunkPos, chunkcoordintpair1)) { ChunkSerializer.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", new Object[]{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 c3305cb49741523724ff7b3c9254a0df2cf3d6c6..e276b2ceddbb269ef9a8625f26cc1847ded3862a 100644 +index 35115f79825035ff28bdffa26ad4127fec8d05c1..10603eebf36caca7870e9cf087e99d529550ad3e 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 @@ -178,6 +178,13 @@ public class ChunkStorage implements AutoCloseable { diff --git a/patches/unapplied/server/0337-Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/0336-Optimise-EntityGetter-getPlayerByUUID.patch similarity index 83% rename from patches/unapplied/server/0337-Optimise-EntityGetter-getPlayerByUUID.patch rename to patches/server/0336-Optimise-EntityGetter-getPlayerByUUID.patch index 80e187d970..cada89959c 100644 --- a/patches/unapplied/server/0337-Optimise-EntityGetter-getPlayerByUUID.patch +++ b/patches/server/0336-Optimise-EntityGetter-getPlayerByUUID.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID Use the PlayerList map instead of iterating over all players diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b287df21d9671963257f04e9ee75a1468bbc12e0..f85cbcd0ba398bdd2622a2e1aaba7de24d53038a 100644 +index 2a2e795923ecaa300c7fc26fd71444711bd43535..dcdf59d18c0336f766bd320b2d536c115df3435d 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -426,6 +426,15 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -424,6 +424,15 @@ public class ServerLevel extends Level implements WorldGenLevel { } // Paper end - rewrite chunk system @@ -24,4 +24,4 @@ index b287df21d9671963257f04e9ee75a1468bbc12e0..f85cbcd0ba398bdd2622a2e1aaba7de2 + // Add env and gen to constructor, IWorldDataServer -> WorldDataServer public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { - // Holder holder = worlddimension.type(); // CraftBukkit - decompile error + // IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error diff --git a/patches/unapplied/server/0338-Fix-items-not-falling-correctly.patch b/patches/server/0337-Fix-items-not-falling-correctly.patch similarity index 92% rename from patches/unapplied/server/0338-Fix-items-not-falling-correctly.patch rename to patches/server/0337-Fix-items-not-falling-correctly.patch index 09bbb31668..02603be6a5 100644 --- a/patches/unapplied/server/0338-Fix-items-not-falling-correctly.patch +++ b/patches/server/0337-Fix-items-not-falling-correctly.patch @@ -15,10 +15,10 @@ This patch resolves the conflict by offsetting checking Spigot's entity activation range check from an item's move method. diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 02bd99934066b35a3f4fd59370cdabf0640ee218..477c9358a09067ace4d0fe3f519148feb4c7a335 100644 +index 007625b1a121f1e7241f7cbfba0b1f168e8be5df..6836288bd380651007f3aa76e608767f612f6644 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -140,7 +140,7 @@ public class ItemEntity extends Entity { +@@ -149,7 +149,7 @@ public class ItemEntity extends Entity implements TraceableEntity { } } diff --git a/patches/unapplied/server/0339-Lag-compensate-eating.patch b/patches/server/0338-Lag-compensate-eating.patch similarity index 84% rename from patches/unapplied/server/0339-Lag-compensate-eating.patch rename to patches/server/0338-Lag-compensate-eating.patch index 4a3bd47707..bf9a765b49 100644 --- a/patches/unapplied/server/0339-Lag-compensate-eating.patch +++ b/patches/server/0338-Lag-compensate-eating.patch @@ -7,10 +7,10 @@ When the server is lagging, players will wait longer when eating. Change to also use a time check instead if it passes. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b4a94a0e0 100644 +index 5eaedecd2e53bcdc30defbf56d6a70a0c49f03ec..38a5d219713f7d3bb3d5ea73e4e6756a03128d01 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3592,6 +3592,11 @@ public abstract class LivingEntity extends Entity { +@@ -3552,6 +3552,11 @@ public abstract class LivingEntity extends Entity implements Attackable { return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND; } @@ -22,7 +22,7 @@ index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b private void updatingUsingItem() { if (this.isUsingItem()) { if (ItemStack.isSame(this.getItemInHand(this.getUsedItemHand()), this.useItem)) { -@@ -3609,8 +3614,12 @@ public abstract class LivingEntity extends Entity { +@@ -3569,8 +3574,12 @@ public abstract class LivingEntity extends Entity implements Attackable { if (this.shouldTriggerItemUseEffects()) { this.triggerItemUseEffects(stack, 5); } @@ -37,7 +37,7 @@ index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b this.completeUsingItem(); } -@@ -3658,7 +3667,10 @@ public abstract class LivingEntity extends Entity { +@@ -3618,7 +3627,10 @@ public abstract class LivingEntity extends Entity implements Attackable { if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag this.useItem = itemstack; @@ -49,7 +49,7 @@ index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b if (!this.level.isClientSide) { this.setLivingEntityFlag(1, true); this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND); -@@ -3683,7 +3695,10 @@ public abstract class LivingEntity extends Entity { +@@ -3643,7 +3655,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } } else if (!this.isUsingItem() && !this.useItem.isEmpty()) { this.useItem = ItemStack.EMPTY; @@ -61,7 +61,7 @@ index 66e8231d2a717ceed7c39b87809a3fd40d644963..4089ab947e144642bd6407bf6bef2e3b } } -@@ -3817,7 +3832,10 @@ public abstract class LivingEntity extends Entity { +@@ -3777,7 +3792,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.useItem = ItemStack.EMPTY; diff --git a/patches/unapplied/server/0340-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0339-Optimize-call-to-getFluid-for-explosions.patch similarity index 84% rename from patches/unapplied/server/0340-Optimize-call-to-getFluid-for-explosions.patch rename to patches/server/0339-Optimize-call-to-getFluid-for-explosions.patch index 92782825a1..b77f7af0be 100644 --- a/patches/unapplied/server/0340-Optimize-call-to-getFluid-for-explosions.patch +++ b/patches/server/0339-Optimize-call-to-getFluid-for-explosions.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Optimize call to getFluid for explosions diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index a9f45dbc2997c4deeba932d04a52e21f4dbfea95..1582f8aad002c14ed45a5748e99f259896e8c9e9 100644 +index e09e6be4f7c8b6c3761b38e181e4c0288a5c1871..83b2b56dbb6d74b58c43bf375ae7d1df9805037b 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -168,7 +168,7 @@ public class Explosion { for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) { - BlockPos blockposition = new BlockPos(d4, d5, d6); + BlockPos blockposition = BlockPos.containing(d4, d5, d6); BlockState iblockdata = this.level.getBlockState(blockposition); - FluidState fluid = this.level.getFluidState(blockposition); + FluidState fluid = iblockdata.getFluidState(); // Paper diff --git a/patches/unapplied/server/0341-Fix-last-firework-in-stack-not-having-effects-when-d.patch b/patches/server/0340-Fix-last-firework-in-stack-not-having-effects-when-d.patch similarity index 90% rename from patches/unapplied/server/0341-Fix-last-firework-in-stack-not-having-effects-when-d.patch rename to patches/server/0340-Fix-last-firework-in-stack-not-having-effects-when-d.patch index 116f0f4358..2c0691f196 100644 --- a/patches/unapplied/server/0341-Fix-last-firework-in-stack-not-having-effects-when-d.patch +++ b/patches/server/0340-Fix-last-firework-in-stack-not-having-effects-when-d.patch @@ -9,10 +9,10 @@ dispensed. The resulting item would have size == 0 and therefore be convertered to air, hence why the effects disappeared. diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 1a36fa2afcd53a0021135abbe0d0df4af557eed8..7132f1c304824feb80733f01b9554092e425f0bb 100644 +index 2773dfea3346793127b06d7e6d0b1344b03845d0..429b9729188fe340b62a3305e6436fabbb1a7caf 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -511,7 +511,7 @@ public interface DispenseItemBehavior { +@@ -515,7 +515,7 @@ public interface DispenseItemBehavior { } itemstack1 = CraftItemStack.asNMSCopy(event.getItem()); diff --git a/patches/unapplied/server/0342-Entity-Activation-Range-2.0.patch b/patches/server/0341-Entity-Activation-Range-2.0.patch similarity index 95% rename from patches/unapplied/server/0342-Entity-Activation-Range-2.0.patch rename to patches/server/0341-Entity-Activation-Range-2.0.patch index bab375beee..4a950ae190 100644 --- a/patches/unapplied/server/0342-Entity-Activation-Range-2.0.patch +++ b/patches/server/0341-Entity-Activation-Range-2.0.patch @@ -18,7 +18,7 @@ public net.minecraft.world.entity.Entity isInsidePortal public net.minecraft.world.entity.LivingEntity jumping diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99f3b1dbe3 100644 +index dcdf59d18c0336f766bd320b2d536c115df3435d..5ad746ae673ef09f5581cf9fbbf1c9afa0ff0cd9 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2,7 +2,6 @@ package net.minecraft.server.level; @@ -29,7 +29,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99 import com.google.common.collect.Lists; import com.mojang.datafixers.DataFixer; import com.mojang.datafixers.util.Pair; -@@ -1047,17 +1046,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1046,17 +1045,17 @@ public class ServerLevel extends Level implements WorldGenLevel { ++TimingHistory.entityTicks; // Paper - timings // Spigot start co.aikar.timings.Timing timer; // Paper @@ -51,7 +51,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99 try { // Paper end - timings entity.setOldPosAndRot(); -@@ -1068,9 +1067,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1067,9 +1066,13 @@ public class ServerLevel extends Level implements WorldGenLevel { return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString(); }); gameprofilerfiller.incrementCounter("tickNonPassenger"); @@ -65,7 +65,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99 Iterator iterator = entity.getPassengers().iterator(); while (iterator.hasNext()) { -@@ -1078,13 +1081,18 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1077,13 +1080,18 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(entity, entity1); } @@ -85,7 +85,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99 passenger.setOldPosAndRot(); ++passenger.tickCount; ProfilerFiller gameprofilerfiller = this.getProfiler(); -@@ -1093,8 +1101,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1092,8 +1100,17 @@ public class ServerLevel extends Level implements WorldGenLevel { return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString(); }); gameprofilerfiller.incrementCounter("tickPassenger"); @@ -103,7 +103,7 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99 gameprofilerfiller.pop(); Iterator iterator = passenger.getPassengers().iterator(); -@@ -1104,6 +1121,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1103,6 +1120,7 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(passenger, entity2); } @@ -112,10 +112,10 @@ index f85cbcd0ba398bdd2622a2e1aaba7de24d53038a..3b528a6adaa431ebdf11ce2ce8ea3c99 } else { passenger.stopRiding(); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e..d8cb7a53940c244b3ad36d32cdbbee1b3746e543 100644 +index 80806cd557a481ffbfa9b26e84d1ab1bcba0543f..a0dbb02019d31b890a450d0ffe2197fc095f8362 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -384,6 +384,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -385,6 +385,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public void inactiveTick() { } // Spigot end // Paper start @@ -124,7 +124,7 @@ index 74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e..d8cb7a53940c244b3ad36d32cdbbee1b protected int numCollisions = 0; // Paper public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one @javax.annotation.Nullable -@@ -909,6 +911,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -910,6 +912,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } else { this.wasOnFire = this.isOnFire(); if (movementType == MoverType.PISTON) { @@ -133,7 +133,7 @@ index 74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e..d8cb7a53940c244b3ad36d32cdbbee1b movement = this.limitPistonMovement(movement); if (movement.equals(Vec3.ZERO)) { return; -@@ -921,6 +925,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -922,6 +926,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.stuckSpeedMultiplier = Vec3.ZERO; this.setDeltaMovement(Vec3.ZERO); } @@ -148,10 +148,10 @@ index 74e83b3d2e7e7c89ccba4b6aaf612f41800efe4e..d8cb7a53940c244b3ad36d32cdbbee1b movement = this.maybeBackOffFromEdge(movement, movementType); Vec3 vec3d1 = this.collide(movement); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index f61a4409ebb5ed89e5a5cfe0488498a52faa2346..7caae84b23ba0803458b4497a116e0b8cee26a89 100644 +index 60d833bf8b7dcee046da9712a2dc809b05a31b42..56cfdf15cf2fd0b88d4d68d0b537da4bf323474f 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -210,6 +210,19 @@ public abstract class Mob extends LivingEntity { +@@ -215,6 +215,19 @@ public abstract class Mob extends LivingEntity implements Targeting { return this.lookControl; } @@ -169,8 +169,8 @@ index f61a4409ebb5ed89e5a5cfe0488498a52faa2346..7caae84b23ba0803458b4497a116e0b8 + // Paper end + public MoveControl getMoveControl() { - if (this.isPassenger() && this.getVehicle() instanceof Mob) { - Mob entityinsentient = (Mob) this.getVehicle(); + Entity entity = this.getControlledVehicle(); + diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java index 6ae3f5cd42dfd424fc3741957995f47ad5ec8941..bffec7fdf49994f702ea4c378237dac0983d0a19 100644 --- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java @@ -252,7 +252,7 @@ index 6efba52c2e5d7811ee329ed22c1c76f75d7ddbe1..26bf383caea68834c654b25653ced901 } } diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index bc778aadb2604756b783d4d024e3154576ab3236..214c7947705eda61454b70cbc4bf37bc54dd26e8 100644 +index caab72b733eabfe6a78c2a75e252817def49cbd0..ece23ee7812ca62ff8e763ffc29cda2711d2f2e1 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java @@ -225,17 +225,29 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -307,10 +307,10 @@ index bc778aadb2604756b783d4d024e3154576ab3236..214c7947705eda61454b70cbc4bf37bc super.customServerAiStep(); } diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java -index 3f8990d15bd6815db0ccb924e621dfcc3220e0e0..70f1916185b79bbb9f033f4ef8119d7b17a13ef8 100644 +index 9b36bf3dbad7c31a20446208f3f410246f85eff6..1b8f22805af87dc08e0dea9fd93a5f93c0b05107 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java -@@ -57,6 +57,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper +@@ -52,6 +52,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper if (bl != this.isEnabled()) { this.setEnabled(bl); } @@ -318,21 +318,20 @@ index 3f8990d15bd6815db0ccb924e621dfcc3220e0e0..70f1916185b79bbb9f033f4ef8119d7b } -@@ -107,11 +108,13 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper +@@ -89,10 +90,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper public boolean suckInItems() { if (HopperBlockEntity.suckInItems(this.level, this)) { + this.immunize(); // Paper return true; } else { - List list = this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(0.25D, 0.0D, 0.25D), EntitySelector.ENTITY_STILL_ALIVE); - if (!list.isEmpty()) { - HopperBlockEntity.addItem(this, list.get(0)); -+ this.immunize(); // Paper + for(ItemEntity itemEntity : this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(0.25D, 0.0D, 0.25D), EntitySelector.ENTITY_STILL_ALIVE)) { + if (HopperBlockEntity.addItem(this, itemEntity)) { ++ this.immunize(); // Paper + return true; + } } - - return false; -@@ -149,4 +152,11 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper +@@ -122,4 +125,11 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory) { return new HopperMenu(syncId, playerInventory, this); } @@ -345,10 +344,10 @@ index 3f8990d15bd6815db0ccb924e621dfcc3220e0e0..70f1916185b79bbb9f033f4ef8119d7b + } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 07fa9e1b1b165bd98135b66ffd8eef5c9b5389fc..16a5103e106f87fb5d33c4e4435b494cae583395 100644 +index 24d167436dab54ad18875c3633b1246a21d63518..48aef158ace14d3ca1f05ba2c6e5681e3ef9be59 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -157,6 +157,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -161,6 +161,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public Map capturedTileEntities = new HashMap<>(); public List captureDrops; public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>(); diff --git a/patches/unapplied/server/0343-Increase-Light-Queue-Size.patch b/patches/server/0342-Increase-Light-Queue-Size.patch similarity index 89% rename from patches/unapplied/server/0343-Increase-Light-Queue-Size.patch rename to patches/server/0342-Increase-Light-Queue-Size.patch index 00d8f5f9af..38d03ed9a0 100644 --- a/patches/unapplied/server/0343-Increase-Light-Queue-Size.patch +++ b/patches/server/0342-Increase-Light-Queue-Size.patch @@ -14,10 +14,10 @@ light engine on shutdown... The queue size only puts a cap on max loss, doesn't solve that problem. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c277ccc012bd5011e31d746b08ace1ae5238c937..023119624c0534bedb248099d0e12c76622a363a 100644 +index fe8c0ba8864afd582c5e1c9d310cff99ef4dbff6..cb76b912ebb5ac4e53588c82cf35ac98bdf7d1e2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -788,7 +788,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop refreshPackets = new java.util.HashMap<>(); // Paper - Anti-Xray - Bypass - for (Iterator iterator = this.getPlayers(chunkcoordintpair, false).iterator(); iterator.hasNext(); entityplayer.trackChunk(chunkcoordintpair, (Packet) mutableobject.getValue())) { - entityplayer = (ServerPlayer) iterator.next(); -- if (mutableobject.getValue() == null) { -- mutableobject.setValue(new ClientboundLevelChunkWithLightPacket(chunk1, this.lightEngine, (BitSet) null, (BitSet) null, true)); -- } -+ Boolean shouldModify = chunk1.getLevel().chunkPacketBlockController.shouldModify(entityplayer, chunk1); -+ mutableobject.setValue(refreshPackets.computeIfAbsent(shouldModify, s -> new ClientboundLevelChunkWithLightPacket(chunk1, this.lightEngine, (BitSet) null, (BitSet) null, true, (Boolean) s))); // Paper - Anti-Xray - Bypass - } - +@@ -1145,12 +1145,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + }); } - private void playerLoadedChunk(ServerPlayer player, MutableObject cachedDataPacket, LevelChunk chunk) { @@ -1126,15 +1114,15 @@ index 4b05139db6628808128337dbf817712e339c17d0..710017f52ad1a0d338bb0a49e44a26cf List list = Lists.newArrayList(); List list1 = Lists.newArrayList(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3b528a6adaa431ebdf11ce2ce8ea3c99f3b1dbe3..76c388347ebbff2d50a975b40dbe93cc2760f6bb 100644 +index 5ad746ae673ef09f5581cf9fbbf1c9afa0ff0cd9..5ae321dc30d48f838c49322b5beef89bcbc952bc 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -438,7 +438,7 @@ public class ServerLevel extends Level implements WorldGenLevel { - public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { // Holder holder = worlddimension.type(); // CraftBukkit - decompile error + // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error -- super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig))); // Paper -+ super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor +- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig))); // Paper ++ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor this.pvpMode = minecraftserver.isPvpAllowed(); this.convertable = convertable_conversionsession; this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile()); @@ -1161,10 +1149,10 @@ index 514c045883060e4a22f748176091d3b236c2a7fd..aee5144bdc5bd9f7b07ce3b72331bcfd public void destroyAndAck(BlockPos pos, int sequence, String reason) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 16a5103e106f87fb5d33c4e4435b494cae583395..c53fa2902c6572c65f42a07be987a7da096a8aee 100644 +index 48aef158ace14d3ca1f05ba2c6e5681e3ef9be59..637092303bbce94fd37f193367264d51b855847d 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -176,6 +176,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } // Paper end @@ -1172,16 +1160,16 @@ index 16a5103e106f87fb5d33c4e4435b494cae583395..c53fa2902c6572c65f42a07be987a7da public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPos lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -190,7 +191,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -194,7 +195,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public abstract ResourceKey getTypeKey(); -- protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator) { // Paper -+ protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor +- protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator) { // Paper ++ protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper this.generator = gen; -@@ -274,6 +275,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -280,6 +281,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); @@ -1189,7 +1177,7 @@ index 16a5103e106f87fb5d33c4e4435b494cae583395..c53fa2902c6572c65f42a07be987a7da } // Paper start -@@ -455,6 +457,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -461,6 +463,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit end BlockState iblockdata1 = chunk.setBlockState(pos, state, (flags & 64) != 0, (flags & 1024) == 0); // CraftBukkit custom NO_PLACE flag @@ -1225,7 +1213,7 @@ index 508c2fff8d8e0c6f37b6c4e3b72ba772c2ab2ee5..e254b2d04e4fc1dc76c26f61ea38aeb2 } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index b4c76e53eef8dc0efec98848352a243931ffc1f3..7b28537fda4187036b15ecc04f68ac1c9bf5f67f 100644 +index b55080c38b1ac4581b73f0d55ac8a432824a13a4..f5bdb76e554c9fc492dbf2a67166845ada0ac103 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -93,7 +93,7 @@ public class LevelChunk extends ChunkAccess { @@ -1238,7 +1226,7 @@ index b4c76e53eef8dc0efec98848352a243931ffc1f3..7b28537fda4187036b15ecc04f68ac1c this.setBlockNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world)); this.setSkyNibbles(ca.spottedleaf.starlight.common.light.StarLightEngine.getFilledEmptyLight(world)); diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index ae37e97e52557b48f129cc02eeea395378a48444..785fbcf9bafcdec1c5be213de3d8512690023415 100644 +index becc4c101e40d9b11e5e89a69e25dc0160bfaa32..8823751cde27bf195177282e99e9a69888441e35 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java @@ -36,10 +36,13 @@ public class LevelChunkSection { @@ -1258,7 +1246,7 @@ index ae37e97e52557b48f129cc02eeea395378a48444..785fbcf9bafcdec1c5be213de3d85126 } public static int getBottomBlockY(int chunkPos) { -@@ -177,10 +180,13 @@ public class LevelChunkSection { +@@ -184,10 +187,13 @@ public class LevelChunkSection { this.biomes = datapaletteblock; } @@ -1276,7 +1264,7 @@ index ae37e97e52557b48f129cc02eeea395378a48444..785fbcf9bafcdec1c5be213de3d85126 public int getSerializedSize() { diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 4843bd864deba357e0a4b2fd844324218af9774f..02b7e3261f689b9d30b87661db23425f741b0fec 100644 +index cd82985b0aa821dccc0484f328407381d58ec81f..34804dc42c7a18108126c14c1b5f3d5a9a46f83d 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java @@ -29,6 +29,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer @@ -1441,7 +1429,7 @@ index 4843bd864deba357e0a4b2fd844324218af9774f..02b7e3261f689b9d30b87661db23425f List list = serialized.paletteEntries(); int i = paletteProvider.size(); int j = paletteProvider.calculateBitsForSerialization(idList, list.size()); -@@ -220,7 +292,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer +@@ -224,7 +296,7 @@ public class PalettedContainer implements PaletteResize, PalettedContainer } } @@ -1450,7 +1438,7 @@ index 4843bd864deba357e0a4b2fd844324218af9774f..02b7e3261f689b9d30b87661db23425f } @Override -@@ -280,12 +352,12 @@ public class PalettedContainer implements PaletteResize, PalettedContainer +@@ -284,12 +356,12 @@ public class PalettedContainer implements PaletteResize, PalettedContainer } public PalettedContainer copy() { @@ -1465,7 +1453,7 @@ index 4843bd864deba357e0a4b2fd844324218af9774f..02b7e3261f689b9d30b87661db23425f } @Override -@@ -329,9 +401,20 @@ public class PalettedContainer implements PaletteResize, PalettedContainer +@@ -333,9 +405,20 @@ public class PalettedContainer implements PaletteResize, PalettedContainer return 1 + this.palette.getSerializedSize() + FriendlyByteBuf.getVarIntSize(this.storage.getSize()) + this.storage.getRaw().length * 8; } @@ -1504,7 +1492,7 @@ index 9a2bf744abd8916d492e901be889223591bac3fd..a27fce0f1af9776a713bf1b5277869ed int getSerializedSize(); 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 b8f5ad1130b125f71a1feb1083120fb700b9bea1..f6d1eac46c619831e146c62a9c08d3305c63c7bc 100644 +index b1c5e5ecf2488d1a6f0a5261d4ba8958de9659ae..4138ba8bdf6f359327dfc86d3402b787ae58c818 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 @@ -71,7 +71,7 @@ import org.slf4j.Logger; @@ -1571,10 +1559,10 @@ index 832c6d92daaa96210a9c7edbd357ca824a60a4a5..0fadc763fb482cf9f3b51ed44427029b public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index fda2ab16bf4721ffae53ac2eccf95b96e6f47bbf..76860d584effba34b09becfb2a68bd755f0f675d 100644 +index 2c38caaff8c4535eca8a29fafc4e662fb7e6d87f..bdd45da02c9bd78758e4b315a19a25cf552a83da 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2245,7 +2245,7 @@ public final class CraftServer implements Server { +@@ -2243,7 +2243,7 @@ public final class CraftServer implements Server { public ChunkGenerator.ChunkData createChunkData(World world) { Validate.notNull(world, "World cannot be null"); ServerLevel handle = ((CraftWorld) world).getHandle(); @@ -1584,7 +1572,7 @@ index fda2ab16bf4721ffae53ac2eccf95b96e6f47bbf..76860d584effba34b09becfb2a68bd75 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index dd12b13bc8e8f0a7791f6204c25461758d6d0d07..2d21aeceea5a91930fb80ae838d04e5accc63391 100644 +index 19f711f82386aaa731699f60ddb95ac208bf3a19..c46e875709d83a1684c5e37c6a11bb3e9acd20e5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -409,11 +409,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0345-Implement-alternative-item-despawn-rate.patch b/patches/server/0344-Implement-alternative-item-despawn-rate.patch similarity index 83% rename from patches/unapplied/server/0345-Implement-alternative-item-despawn-rate.patch rename to patches/server/0344-Implement-alternative-item-despawn-rate.patch index ba008ba445..14c9aa34f1 100644 --- a/patches/unapplied/server/0345-Implement-alternative-item-despawn-rate.patch +++ b/patches/server/0344-Implement-alternative-item-despawn-rate.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Implement alternative item-despawn-rate Co-authored-by: Noah van der Aa diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd21272483f7be 100644 +index 6836288bd380651007f3aa76e608767f612f6644..028fd9c7cb927cde84ee2d078681d122d7d928aa 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -52,6 +52,7 @@ public class ItemEntity extends Entity { +@@ -53,6 +53,7 @@ public class ItemEntity extends Entity implements TraceableEntity { public final float bobOffs; private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit public boolean canMobPickup = true; // Paper @@ -17,7 +17,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127 public ItemEntity(EntityType type, Level world) { super(type, world); -@@ -180,7 +181,7 @@ public class ItemEntity extends Entity { +@@ -189,7 +190,7 @@ public class ItemEntity extends Entity implements TraceableEntity { } } @@ -26,7 +26,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127 // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -204,7 +205,7 @@ public class ItemEntity extends Entity { +@@ -213,7 +214,7 @@ public class ItemEntity extends Entity implements TraceableEntity { this.lastTick = MinecraftServer.currentTick; // CraftBukkit end @@ -35,7 +35,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127 // CraftBukkit start - fire ItemDespawnEvent if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { this.age = 0; -@@ -255,7 +256,7 @@ public class ItemEntity extends Entity { +@@ -264,7 +265,7 @@ public class ItemEntity extends Entity implements TraceableEntity { private boolean isMergable() { ItemStack itemstack = this.getItem(); @@ -44,7 +44,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127 } private void tryToMerge(ItemEntity other) { -@@ -499,6 +500,7 @@ public class ItemEntity extends Entity { +@@ -505,6 +506,7 @@ public class ItemEntity extends Entity implements TraceableEntity { com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit this.getEntityData().set(ItemEntity.DATA_ITEM, stack); this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty @@ -52,7 +52,7 @@ index 477c9358a09067ace4d0fe3f519148feb4c7a335..1dc7f3963069313de6b969c44bdd2127 } @Override -@@ -562,7 +564,7 @@ public class ItemEntity extends Entity { +@@ -558,7 +560,7 @@ public class ItemEntity extends Entity implements TraceableEntity { public void makeFakeItem() { this.setNeverPickUp(); diff --git a/patches/unapplied/server/0346-Tracking-Range-Improvements.patch b/patches/server/0345-Tracking-Range-Improvements.patch similarity index 95% rename from patches/unapplied/server/0346-Tracking-Range-Improvements.patch rename to patches/server/0345-Tracking-Range-Improvements.patch index e5d7b78254..0f18f97b1f 100644 --- a/patches/unapplied/server/0346-Tracking-Range-Improvements.patch +++ b/patches/server/0345-Tracking-Range-Improvements.patch @@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code Also ignores Enderdragon, defaulting it to Mojang's setting diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 710017f52ad1a0d338bb0a49e44a26cfc09f8b94..381bc42e760c2b652b2b45237587cebd4ae31c47 100644 +index bba77d5001638307fe640b2e656df0a2b3cb4c43..40177f2e0206f89b83bbc0b6c80d74785d9d8414 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1320,6 +1320,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1333,6 +1333,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider while (iterator.hasNext()) { Entity entity = (Entity) iterator.next(); int j = entity.getType().clientTrackingRange() * 16; diff --git a/patches/unapplied/server/0347-Fix-items-vanishing-through-end-portal.patch b/patches/server/0346-Fix-items-vanishing-through-end-portal.patch similarity index 89% rename from patches/unapplied/server/0347-Fix-items-vanishing-through-end-portal.patch rename to patches/server/0346-Fix-items-vanishing-through-end-portal.patch index 9292560e59..71587f713e 100644 --- a/patches/unapplied/server/0347-Fix-items-vanishing-through-end-portal.patch +++ b/patches/server/0346-Fix-items-vanishing-through-end-portal.patch @@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the heightmap resolves the issue without having to load all spawn chunks. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index d8cb7a53940c244b3ad36d32cdbbee1b3746e543..6b11da94839a677c6bf63fd2d8d4994754e3ad05 100644 +index a0dbb02019d31b890a450d0ffe2197fc095f8362..8f8f8ec38737b50ad23bb2408f9f8262d7b3a507 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3210,6 +3210,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3229,6 +3229,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (flag1) { blockposition1 = ServerLevel.END_SPAWN_POINT; } else { diff --git a/patches/unapplied/server/0348-implement-optional-per-player-mob-spawns.patch b/patches/server/0347-implement-optional-per-player-mob-spawns.patch similarity index 97% rename from patches/unapplied/server/0348-implement-optional-per-player-mob-spawns.patch rename to patches/server/0347-implement-optional-per-player-mob-spawns.patch index 88bdcb42e8..2e34480a95 100644 --- a/patches/unapplied/server/0348-implement-optional-per-player-mob-spawns.patch +++ b/patches/server/0347-implement-optional-per-player-mob-spawns.patch @@ -252,10 +252,10 @@ index 0000000000000000000000000000000000000000..11de56afaf059b00fa5bec293516bcdc + } +} diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999be3f726b3 100644 +index 40177f2e0206f89b83bbc0b6c80d74785d9d8414..1c39d12a6e72954a24ad51d8d6346341dc1c5d22 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -149,6 +149,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -152,6 +152,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private final Long2LongMap chunkSaveCooldowns; private final Queue unloadQueue; int viewDistance; @@ -263,7 +263,7 @@ index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999b // Paper - rewrite chunk system -@@ -161,11 +162,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -164,11 +165,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkX = MCUtil.getChunkCoordinate(player.getX()); int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Note: players need to be explicitly added to distance maps before they can be updated @@ -285,7 +285,7 @@ index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999b } void updateMaps(ServerPlayer player) { -@@ -173,6 +184,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -176,6 +187,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Note: players need to be explicitly added to distance maps before they can be updated this.playerChunkManager.updatePlayer(player); // Paper - replace chunk loader @@ -297,7 +297,7 @@ index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999b } // Paper end // Paper start -@@ -258,6 +274,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -261,6 +277,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.dataRegionManager = new io.papermc.paper.chunk.SingleThreadChunkRegionManager(this.level, 2, (1.0 / 3.0), 1, 6, "Data", DataRegionData::new, DataRegionSectionData::new); this.regionManagers.add(this.dataRegionManager); // Paper end @@ -305,7 +305,7 @@ index 381bc42e760c2b652b2b45237587cebd4ae31c47..fcdd8a8570d07e8bd3339275c7b6999b } protected ChunkGenerator generator() { -@@ -283,6 +300,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -286,6 +303,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }); } @@ -362,10 +362,10 @@ index c021733342c09adb04ce3f675209543f84ac4bda..d137aa95f670aab516e9e08272f33b21 this.lastSpawnState = spawnercreature_d; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 70b92f95a3b1964a6253e64854d7d7d65ed5311f..796ae37215856a511b72e7d1355f672a8c5a4566 100644 +index db3d5fd301f38ae3bf13ff6d7530d6e70acb8296..a8f51ab23b46287f6066c421271f4c0fcfe04c3a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -240,6 +240,11 @@ public class ServerPlayer extends Player { +@@ -245,6 +245,11 @@ public class ServerPlayer extends Player { public boolean queueHealthUpdatePacket = false; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; // Paper end @@ -377,7 +377,7 @@ index 70b92f95a3b1964a6253e64854d7d7d65ed5311f..796ae37215856a511b72e7d1355f672a // CraftBukkit start public String displayName; -@@ -331,6 +336,7 @@ public class ServerPlayer extends Player { +@@ -336,6 +341,7 @@ public class ServerPlayer extends Player { this.adventure$displayName = net.kyori.adventure.text.Component.text(this.getScoreboardName()); // Paper this.bukkitPickUpLoot = true; this.maxHealthCache = this.getMaxHealth(); @@ -386,7 +386,7 @@ index 70b92f95a3b1964a6253e64854d7d7d65ed5311f..796ae37215856a511b72e7d1355f672a // Yes, this doesn't match Vanilla, but it's the best we can do for now. diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index 29dac07176eb99517c9cddbe012636908c3603fe..bf3fb416d36a19958033cdbf5cc313556fa0201b 100644 +index 05c014c5f0805d50cfd251b043c79ce3355eef16..a1770e5ae4b3014c3538b52d4912c60864e186a8 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -70,6 +70,12 @@ public final class NaturalSpawner { @@ -403,7 +403,7 @@ index 29dac07176eb99517c9cddbe012636908c3603fe..bf3fb416d36a19958033cdbf5cc31355 Object2IntOpenHashMap object2intopenhashmap = new Object2IntOpenHashMap(); Iterator iterator = entities.iterator(); @@ -104,11 +110,16 @@ public final class NaturalSpawner { - spawnercreatureprobabilities.addCharge(entity.blockPosition(), biomesettingsmobs_b.getCharge()); + spawnercreatureprobabilities.addCharge(entity.blockPosition(), biomesettingsmobs_b.charge()); } - if (entity instanceof Mob) { diff --git a/patches/unapplied/server/0349-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/0348-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 94% rename from patches/unapplied/server/0349-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to patches/server/0348-Bees-get-gravity-in-void.-Fixes-MC-167279.patch index 9bff6d5b05..6b9992e92f 100644 --- a/patches/unapplied/server/0349-Bees-get-gravity-in-void.-Fixes-MC-167279.patch +++ b/patches/server/0348-Bees-get-gravity-in-void.-Fixes-MC-167279.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279 diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index aea3872c89493f68d31186877a1ea981a0c0df6d..f3ce802bdb2eb7a5d570716bb9fd314d011c2617 100644 +index 78fe610d69db727411bf685127c39d009090ee14..5049d72f080bb82ca0e1fc5e2348b3605a0204f1 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java @@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { diff --git a/patches/unapplied/server/0350-Improve-Block-breakNaturally-API.patch b/patches/server/0349-Improve-Block-breakNaturally-API.patch similarity index 95% rename from patches/unapplied/server/0350-Improve-Block-breakNaturally-API.patch rename to patches/server/0349-Improve-Block-breakNaturally-API.patch index 1c815426c2..d5ad3ad816 100644 --- a/patches/unapplied/server/0350-Improve-Block-breakNaturally-API.patch +++ b/patches/server/0349-Improve-Block-breakNaturally-API.patch @@ -18,19 +18,19 @@ public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraf Co-authored-by: William Blake Galbreath diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java -index 0afadbc8515d448b0ef817f4f0f53b1bb0abde43..64206d94a5bf210116d208f9678618b905a61428 100644 +index 943b5ee11fb066afcfb3717befe4dab35db5b600..5ecf02ce83b7496c977adfeb203b8eadb05f9da5 100644 --- a/src/main/java/net/minecraft/world/level/block/IceBlock.java +++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java @@ -25,6 +25,11 @@ public class IceBlock extends HalfTransparentBlock { @Override - public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) { - super.playerDestroy(world, player, pos, state, blockEntity, stack); + public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) { + super.playerDestroy(world, player, pos, state, blockEntity, tool); + // Paper start -+ this.afterDestroy(world, pos, stack); ++ this.afterDestroy(world, pos, tool); + } -+ public void afterDestroy(Level world, BlockPos pos, ItemStack stack) { ++ public void afterDestroy(Level world, BlockPos pos, ItemStack tool) { + // Paper end - if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, stack) == 0) { + if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) == 0) { if (world.dimensionType().ultraWarm()) { world.removeBlock(pos, false); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/patches/unapplied/server/0351-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0350-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 100% rename from patches/unapplied/server/0351-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to patches/server/0350-Optimise-getChunkAt-calls-for-loaded-chunks.patch diff --git a/patches/unapplied/server/0352-Add-debug-for-sync-chunk-loads.patch b/patches/server/0351-Add-debug-for-sync-chunk-loads.patch similarity index 98% rename from patches/unapplied/server/0352-Add-debug-for-sync-chunk-loads.patch rename to patches/server/0351-Add-debug-for-sync-chunk-loads.patch index 9d9c319a68..f2327e0706 100644 --- a/patches/unapplied/server/0352-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0351-Add-debug-for-sync-chunk-loads.patch @@ -320,10 +320,10 @@ index f838a921a08981bac0d0c0a68e334ba06d11cb18..665e088cb0b73f6a0c62f29c56da462b chunkproviderserver_b.managedBlock(completablefuture::isDone); io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 76c388347ebbff2d50a975b40dbe93cc2760f6bb..52a514b657485246827bf9c153303b8b5229bf5b 100644 +index 5ae321dc30d48f838c49322b5beef89bcbc952bc..67e59ac94c584a742bf5e6e2094459234603ef06 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -424,6 +424,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -422,6 +422,12 @@ public class ServerLevel extends Level implements WorldGenLevel { return this.entityLookup; } // Paper end - rewrite chunk system diff --git a/patches/unapplied/server/0353-Remove-garbage-Java-version-check.patch b/patches/server/0352-Remove-garbage-Java-version-check.patch similarity index 87% rename from patches/unapplied/server/0353-Remove-garbage-Java-version-check.patch rename to patches/server/0352-Remove-garbage-Java-version-check.patch index 67418476be..c7ac5b3f54 100644 --- a/patches/unapplied/server/0353-Remove-garbage-Java-version-check.patch +++ b/patches/server/0352-Remove-garbage-Java-version-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove garbage Java version check diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index c9c0c17651b05094f96840b4fc0fd60825eef146..08e74f41516a545a2371a7418d995ab288831834 100644 +index 7968b883847877f7ddc11f7a25efbbb71605d2bf..8b03be6babe3052ab351061c0c206c84e26ef705 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -196,10 +196,6 @@ public class Main { +@@ -205,10 +205,6 @@ public class Main { System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'."); return; } diff --git a/patches/unapplied/server/0354-Add-ThrownEggHatchEvent.patch b/patches/server/0353-Add-ThrownEggHatchEvent.patch similarity index 90% rename from patches/unapplied/server/0354-Add-ThrownEggHatchEvent.patch rename to patches/server/0353-Add-ThrownEggHatchEvent.patch index 2391d75540..b9c9d2b031 100644 --- a/patches/unapplied/server/0354-Add-ThrownEggHatchEvent.patch +++ b/patches/server/0353-Add-ThrownEggHatchEvent.patch @@ -7,10 +7,10 @@ Adds a new event similar to PlayerEggThrowEvent, but without the Player requirem (dispensers can throw eggs to hatch them, too). diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java -index 9ec976ab52c1ebe717317f99f1ccf3062bb66278..bdddec9510d84c8940b6116ede389bcac3680ab1 100644 +index c400bcb9da854e3c953c269d6f74c1a4f07b82a7..326eb972078e5dd700372c9ba09ea7f8415b144e 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java -@@ -77,6 +77,14 @@ public class ThrownEgg extends ThrowableItemProjectile { +@@ -76,6 +76,14 @@ public class ThrownEgg extends ThrowableItemProjectile { hatchingType = event.getHatchingType(); } diff --git a/patches/unapplied/server/0355-Entity-Jump-API.patch b/patches/server/0354-Entity-Jump-API.patch similarity index 89% rename from patches/unapplied/server/0355-Entity-Jump-API.patch rename to patches/server/0354-Entity-Jump-API.patch index 66829e5c60..c31f7f47ff 100644 --- a/patches/unapplied/server/0355-Entity-Jump-API.patch +++ b/patches/server/0354-Entity-Jump-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Jump API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4089ab947e144642bd6407bf6bef2e3b4a94a0e0..fd1637608b89e1f5af884410cd804c4bfc158c41 100644 +index 38a5d219713f7d3bb3d5ea73e4e6756a03128d01..e6e4856db7d983460fdf898583915ff2e4a43d14 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3264,8 +3264,10 @@ public abstract class LivingEntity extends Entity { +@@ -3224,8 +3224,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } else if (this.isInLava() && (!this.onGround || d7 > d8)) { this.jumpInLiquid(FluidTags.LAVA); } else if ((this.onGround || flag && d7 <= d8) && this.noJumpDelay == 0) { @@ -34,10 +34,10 @@ index e98849c103e7409f70e73a30c6713c644155b284..2db5d8a937c841718e7b568c215109c3 } diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -index 01dfe3e29ea55b9e839a4db027fdd6a1dbb5ca23..6a0b4f86e5157494a917cf5efecb730081bae628 100644 +index 24dc43c7806e99be6dc37af48ec056a5edd19947..74bc42623f16042c2a72993f842614a013bfb4d0 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java +++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -@@ -177,7 +177,9 @@ public class Ravager extends Raider { +@@ -176,7 +176,9 @@ public class Ravager extends Raider { } if (!flag && this.onGround) { @@ -48,7 +48,7 @@ index 01dfe3e29ea55b9e839a4db027fdd6a1dbb5ca23..6a0b4f86e5157494a917cf5efecb7300 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 0541d68f6fc758ce5915fe906f7a44814c33b2d6..c7cc9408f961aa804af9548d8c8fee46631421cf 100644 +index b19185c16f8fecbefef697017e8dcfd249306fe3..c5784574f584a5588020b16776f01faf6902cbe8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -887,5 +887,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0356-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0355-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 86% rename from patches/unapplied/server/0356-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/0355-Add-option-to-nerf-pigmen-from-nether-portals.patch index 07fa9a6d9e..cda82d805d 100644 --- a/patches/unapplied/server/0356-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/0355-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d49c7a3c1 100644 +index 8f8f8ec38737b50ad23bb2408f9f8262d7b3a507..6fa842ae2f419a42d830b417f4d624451e6c4325 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -386,6 +386,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -387,6 +387,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // Paper start public long activatedImmunityTick = Integer.MIN_VALUE; // Paper public boolean isTemporarilyActive = false; // Paper @@ -16,7 +16,7 @@ index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d protected int numCollisions = 0; // Paper public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one @javax.annotation.Nullable -@@ -2068,6 +2069,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2080,6 +2081,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); } @@ -26,7 +26,7 @@ index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d // Paper end return nbt; } catch (Throwable throwable) { -@@ -2209,6 +2213,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2222,6 +2226,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -35,7 +35,7 @@ index 6b11da94839a677c6bf63fd2d8d4994754e3ad05..6b19894c4353cf96d853d00128614b6d String spawnReasonName = nbt.getString("Paper.SpawnReason"); try { diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -index eb444932203620f6681002a1346ccf45866e6a4e..a423aff5fde3f42c8b8aecb74fe0022c4d2dbe81 100644 +index 47c99d86be833b7c6f9f76c76897fb89d6fca712..69f34c566bf825259253abbefd7d7ba2e847231b 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java @@ -63,6 +63,8 @@ public class NetherPortalBlock extends Block { diff --git a/patches/unapplied/server/0357-Make-the-GUI-graph-fancier.patch b/patches/server/0356-Make-the-GUI-graph-fancier.patch similarity index 100% rename from patches/unapplied/server/0357-Make-the-GUI-graph-fancier.patch rename to patches/server/0356-Make-the-GUI-graph-fancier.patch diff --git a/patches/unapplied/server/0358-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0357-add-hand-to-BlockMultiPlaceEvent.patch similarity index 89% rename from patches/unapplied/server/0358-add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/0357-add-hand-to-BlockMultiPlaceEvent.patch index 82d0a1f49e..2aea3b5aab 100644 --- a/patches/unapplied/server/0358-add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/server/0357-add-hand-to-BlockMultiPlaceEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 6e533fdcd0671892a0e9dbfc99662feb433a5cf8..24f1be1dcf2156fe17fec1c66529514b50925e2b 100644 +index bdd4572489cd12ea19560fe82006e3fe4db29b50..cdfd63b5d1a9c6fc9a957730adf2406decef633b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -349,13 +349,18 @@ public class CraftEventFactory { +@@ -348,13 +348,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/patches/unapplied/server/0359-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0358-Validate-tripwire-hook-placement-before-update.patch similarity index 100% rename from patches/unapplied/server/0359-Validate-tripwire-hook-placement-before-update.patch rename to patches/server/0358-Validate-tripwire-hook-placement-before-update.patch diff --git a/patches/unapplied/server/0360-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0359-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 91% rename from patches/unapplied/server/0360-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/0359-Add-option-to-allow-iron-golems-to-spawn-in-air.patch index f058d157d0..f220859fea 100644 --- a/patches/unapplied/server/0360-Add-option-to-allow-iron-golems-to-spawn-in-air.patch +++ b/patches/server/0359-Add-option-to-allow-iron-golems-to-spawn-in-air.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java -index d2864615588aadf81ac9763ba402ede0c1eebb23..e73acfa2f5a4066fa1beee1758082a2fe97a43b3 100644 +index f150afd99922bc5d2f2183ad39fd1918ce3de367..4fbbd74cda7e4f2c623db46c2c94d9697ca5df05 100644 --- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java +++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java @@ -334,7 +334,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob { diff --git a/patches/unapplied/server/0361-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0360-Configurable-chance-of-villager-zombie-infection.patch similarity index 100% rename from patches/unapplied/server/0361-Configurable-chance-of-villager-zombie-infection.patch rename to patches/server/0360-Configurable-chance-of-villager-zombie-infection.patch diff --git a/patches/unapplied/server/0362-Optimise-Chunk-getFluid.patch b/patches/server/0361-Optimise-Chunk-getFluid.patch similarity index 93% rename from patches/unapplied/server/0362-Optimise-Chunk-getFluid.patch rename to patches/server/0361-Optimise-Chunk-getFluid.patch index 9fcd81829c..74e6ef2a60 100644 --- a/patches/unapplied/server/0362-Optimise-Chunk-getFluid.patch +++ b/patches/server/0361-Optimise-Chunk-getFluid.patch @@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it easier to inline due to code size diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 7b28537fda4187036b15ecc04f68ac1c9bf5f67f..1c618cfb63561f4557f8ec71254b6397eb9cc485 100644 +index f5bdb76e554c9fc492dbf2a67166845ada0ac103..39defceb694875322b3433a3ad4bb16256413ea8 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -427,18 +427,20 @@ public class LevelChunk extends ChunkAccess { @@ -47,7 +47,7 @@ index 7b28537fda4187036b15ecc04f68ac1c9bf5f67f..1c618cfb63561f4557f8ec71254b6397 // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index 785fbcf9bafcdec1c5be213de3d8512690023415..066874d27495dcaa3dea254b7328257e46920357 100644 +index 8823751cde27bf195177282e99e9a69888441e35..8c8445af8a2fe684fdbb468f8d8605d44a803758 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java @@ -54,7 +54,7 @@ public class LevelChunkSection { diff --git a/patches/unapplied/server/0363-Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/0362-Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 100% rename from patches/unapplied/server/0363-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/0362-Set-spigots-verbose-world-setting-to-false-by-def.patch diff --git a/patches/unapplied/server/0364-Add-tick-times-API-and-mspt-command.patch b/patches/server/0363-Add-tick-times-API-and-mspt-command.patch similarity index 91% rename from patches/unapplied/server/0364-Add-tick-times-API-and-mspt-command.patch rename to patches/server/0363-Add-tick-times-API-and-mspt-command.patch index c3af9557ef..cc8a117bd2 100644 --- a/patches/unapplied/server/0364-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0363-Add-tick-times-API-and-mspt-command.patch @@ -125,10 +125,10 @@ index d44d0074446c1c54e87dc8078dff7fef1d92f343..bbb8b1933ef33a3b91f69545f69dd3cf public static void registerCommands(final MinecraftServer server) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 023119624c0534bedb248099d0e12c76622a363a..8dcbeeae50afe23aa7e2a083239f0a315424574f 100644 +index cb76b912ebb5ac4e53588c82cf35ac98bdf7d1e2..728a9d2c11bce06cf3edb25cb500db0423d9b84d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -249,6 +249,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitytypes = entity.getType(); int i = entitytypes.clientTrackingRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 52a514b657485246827bf9c153303b8b5229bf5b..62f1f568bba5fbcb68e49640adb79c9384619bc6 100644 +index 67e59ac94c584a742bf5e6e2094459234603ef06..4bf38f9006be9e838c54783dafd40cf84553d627 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2325,7 +2325,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2324,7 +2324,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTrackingStart(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot @@ -37,7 +37,7 @@ index 52a514b657485246827bf9c153303b8b5229bf5b..62f1f568bba5fbcb68e49640adb79c93 if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -2359,6 +2359,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2358,6 +2358,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.valid = true; // CraftBukkit diff --git a/patches/unapplied/server/0371-Don-t-tick-dead-players.patch b/patches/server/0370-Don-t-tick-dead-players.patch similarity index 85% rename from patches/unapplied/server/0371-Don-t-tick-dead-players.patch rename to patches/server/0370-Don-t-tick-dead-players.patch index 2b651ac45d..69827b019b 100644 --- a/patches/unapplied/server/0371-Don-t-tick-dead-players.patch +++ b/patches/server/0370-Don-t-tick-dead-players.patch @@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else. This is safe because Spectators are skipped in unloaded chunks too in vanilla. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 23bac54d7cc2938c8a3f1a8dbb97fea18047a809..cbf11122d5cc43b057d72cc989e7b73615f9fb54 100644 +index 2d1c3d222cfced339fb098b09c3c84e0c0805255..206a66b6e403c8b7e60ff5b31eb478303d34b272 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -675,7 +675,7 @@ public class ServerPlayer extends Player { +@@ -680,7 +680,7 @@ public class ServerPlayer extends Player { public void doTick() { try { diff --git a/patches/unapplied/server/0372-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0371-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 84% rename from patches/unapplied/server/0372-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to patches/server/0371-Dead-Player-s-shouldn-t-be-able-to-move.patch index de159bd74a..23780440ba 100644 --- a/patches/unapplied/server/0372-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/patches/server/0371-Dead-Player-s-shouldn-t-be-able-to-move.patch @@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing due to 1.15's new queue but processed while dead. diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 6f3d06b929e9b5c22b3090683d5eb90bc3c98421..deb67acf5a60ea8a3cec866cd75ac036257ef0b5 100644 +index 65adadd9e35f2ec6c10acd24ebf61e3cfba173e4..a7dc305297d1a17291ffff40fe6c3bd7b8cc6bdb 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1154,7 +1154,7 @@ public abstract class Player extends LivingEntity { +@@ -1153,7 +1153,7 @@ public abstract class Player extends LivingEntity { @Override protected boolean isImmobile() { diff --git a/patches/unapplied/server/0373-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0372-Optimize-Collision-to-not-load-chunks.patch similarity index 96% rename from patches/unapplied/server/0373-Optimize-Collision-to-not-load-chunks.patch rename to patches/server/0372-Optimize-Collision-to-not-load-chunks.patch index fba1c0ccd4..fbb2ef3596 100644 --- a/patches/unapplied/server/0373-Optimize-Collision-to-not-load-chunks.patch +++ b/patches/server/0372-Optimize-Collision-to-not-load-chunks.patch @@ -14,10 +14,10 @@ movement will load only the chunk the player enters anyways and avoids loading massive amounts of surrounding chunks due to large AABB lookups. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b537dfce0492acd170e37406b3ed1ad215d7df7d..8318548883bbaea273ea03d1385ee169e9560867 100644 +index 1644ff0709d721ba8c19e4b4c7ef07fc8e8f5918..2e61c92787625fc9c116cd6d8dc9097c2f7d709f 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -805,6 +805,7 @@ public abstract class PlayerList { +@@ -812,6 +812,7 @@ public abstract class PlayerList { entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); // CraftBukkit end @@ -26,7 +26,7 @@ index b537dfce0492acd170e37406b3ed1ad215d7df7d..8318548883bbaea273ea03d1385ee169 entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ()); } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6b19894c4353cf96d853d00128614b6d49c7a3c1..1e4699372b22c3fe3eed6859c3f15f9b70a537c0 100644 +index 6fa842ae2f419a42d830b417f4d624451e6c4325..8cfa823940b0fada04022034023f5372f1ca8b9f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -236,6 +236,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/unapplied/server/0374-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0373-Don-t-move-existing-players-to-world-spawn.patch similarity index 84% rename from patches/unapplied/server/0374-Don-t-move-existing-players-to-world-spawn.patch rename to patches/server/0373-Don-t-move-existing-players-to-world-spawn.patch index 69a246e3fd..017fe5beeb 100644 --- a/patches/unapplied/server/0374-Don-t-move-existing-players-to-world-spawn.patch +++ b/patches/server/0373-Don-t-move-existing-players-to-world-spawn.patch @@ -13,19 +13,19 @@ By skipping this, we avoid potential for a large spike on server start. public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index cbf11122d5cc43b057d72cc989e7b73615f9fb54..94a50cd836ea5400a0e65a388074c5a7cfbb27cc 100644 +index 206a66b6e403c8b7e60ff5b31eb478303d34b272..8754a37b405e96d2f5d02ef6b9864afac136212a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -328,7 +328,7 @@ public class ServerPlayer extends Player { +@@ -333,7 +333,7 @@ public class ServerPlayer extends Player { this.stats = server.getPlayerList().getPlayerStats(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this); - this.maxUpStep = 1.0F; + this.setMaxUpStep(1.0F); - this.fudgeSpawnLocation(world); + //this.fudgeSpawnLocation(world); // Paper - don't move to spawn on login, only first join this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -562,7 +562,7 @@ public class ServerPlayer extends Player { +@@ -567,7 +567,7 @@ public class ServerPlayer extends Player { position = Vec3.atCenterOf(((ServerLevel) world).getSharedSpawnPos()); } this.level = world; @@ -35,10 +35,10 @@ index cbf11122d5cc43b057d72cc989e7b73615f9fb54..94a50cd836ea5400a0e65a388074c5a7 this.gameMode.setLevel((ServerLevel) world); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8318548883bbaea273ea03d1385ee169e9560867..508900514a98ad35d33854a1c67a1b38c5ac76b1 100644 +index 2e61c92787625fc9c116cd6d8dc9097c2f7d709f..187b3dc881f226963af5b61a2c4b957ecf537cf5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -222,6 +222,8 @@ public abstract class PlayerList { +@@ -223,6 +223,8 @@ public abstract class PlayerList { worldserver1 = worldserver; } diff --git a/patches/unapplied/server/0375-Optimize-GoalSelector-Goal.Flag-Set-operations.patch b/patches/server/0374-Optimize-GoalSelector-Goal.Flag-Set-operations.patch similarity index 100% rename from patches/unapplied/server/0375-Optimize-GoalSelector-Goal.Flag-Set-operations.patch rename to patches/server/0374-Optimize-GoalSelector-Goal.Flag-Set-operations.patch diff --git a/patches/unapplied/server/0376-Improved-Watchdog-Support.patch b/patches/server/0375-Improved-Watchdog-Support.patch similarity index 94% rename from patches/unapplied/server/0376-Improved-Watchdog-Support.patch rename to patches/server/0375-Improved-Watchdog-Support.patch index fdfb4c4f6b..0d3d810562 100644 --- a/patches/unapplied/server/0376-Improved-Watchdog-Support.patch +++ b/patches/server/0375-Improved-Watchdog-Support.patch @@ -71,10 +71,10 @@ index 336795dff742b7c6957fbd3476aff31d25a5e659..30a58229aa6dac5039511d0c0df5f291 cause = cause.getCause(); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09ed4b6baf 100644 +index 728a9d2c11bce06cf3edb25cb500db0423d9b84d..155a9a5def5ff599ecf862782fa19fcc595e6789 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -295,7 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public Commands vanillaCommandDispatcher; @@ -83,7 +83,7 @@ index 8dcbeeae50afe23aa7e2a083239f0a315424574f..d406df9626d29ee257b8eedcbea2af09 // CraftBukkit end // Spigot start public static final int TPS = 20; -@@ -306,6 +306,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system -@@ -885,6 +888,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop implements App, L> { diff --git a/patches/unapplied/server/0379-Reduce-memory-footprint-of-NBTTagCompound.patch b/patches/server/0378-Reduce-memory-footprint-of-NBTTagCompound.patch similarity index 89% rename from patches/unapplied/server/0379-Reduce-memory-footprint-of-NBTTagCompound.patch rename to patches/server/0378-Reduce-memory-footprint-of-NBTTagCompound.patch index 62c067d92a..9fb5402d3a 100644 --- a/patches/unapplied/server/0379-Reduce-memory-footprint-of-NBTTagCompound.patch +++ b/patches/server/0378-Reduce-memory-footprint-of-NBTTagCompound.patch @@ -8,10 +8,10 @@ is important because we clone chunk data after reading it for safety. So, reduce the impact of the clone on GC. diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java -index ca7d1d33cfd448673365b615b8609083dcb11da4..07593ecae8fb00412c5342681263e3333d3809c0 100644 +index 64765dab6fed87ffdf4af197d8d5f28a04544db0..1d13bc15c56faa69699fb3ad39210233d6b6934d 100644 --- a/src/main/java/net/minecraft/nbt/CompoundTag.java +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java -@@ -34,7 +34,7 @@ public class CompoundTag implements Tag { +@@ -36,7 +36,7 @@ public class CompoundTag implements Tag { if (i > 512) { throw new RuntimeException("Tried to read NBT tag with too high complexity, depth > 512"); } else { @@ -20,7 +20,7 @@ index ca7d1d33cfd448673365b615b8609083dcb11da4..07593ecae8fb00412c5342681263e333 byte b; while((b = CompoundTag.readNamedTagType(dataInput, nbtAccounter)) != 0) { -@@ -128,7 +128,7 @@ public class CompoundTag implements Tag { +@@ -130,7 +130,7 @@ public class CompoundTag implements Tag { } public CompoundTag() { @@ -29,7 +29,7 @@ index ca7d1d33cfd448673365b615b8609083dcb11da4..07593ecae8fb00412c5342681263e333 } @Override -@@ -447,8 +447,16 @@ public class CompoundTag implements Tag { +@@ -449,8 +449,16 @@ public class CompoundTag implements Tag { @Override public CompoundTag copy() { diff --git a/patches/unapplied/server/0380-Prevent-opening-inventories-when-frozen.patch b/patches/server/0379-Prevent-opening-inventories-when-frozen.patch similarity index 94% rename from patches/unapplied/server/0380-Prevent-opening-inventories-when-frozen.patch rename to patches/server/0379-Prevent-opening-inventories-when-frozen.patch index 1eee231cca..92223ca780 100644 --- a/patches/unapplied/server/0380-Prevent-opening-inventories-when-frozen.patch +++ b/patches/server/0379-Prevent-opening-inventories-when-frozen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 94a50cd836ea5400a0e65a388074c5a7cfbb27cc..6fd27b00bac756654c29955f1e5fe921687ab3f3 100644 +index 8754a37b405e96d2f5d02ef6b9864afac136212a..40100da5295aaa9113b0decc44ff7ca385cfd440 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -644,7 +644,7 @@ public class ServerPlayer extends Player { +@@ -649,7 +649,7 @@ public class ServerPlayer extends Player { containerUpdateDelay = level.paperConfig().tickRates.containerUpdate; } // Paper end @@ -17,7 +17,7 @@ index 94a50cd836ea5400a0e65a388074c5a7cfbb27cc..6fd27b00bac756654c29955f1e5fe921 this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper this.containerMenu = this.inventoryMenu; } -@@ -1522,7 +1522,7 @@ public class ServerPlayer extends Player { +@@ -1498,7 +1498,7 @@ public class ServerPlayer extends Player { } else { // CraftBukkit start this.containerMenu = container; diff --git a/patches/unapplied/server/0381-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0380-Don-t-run-entity-collision-code-if-not-needed.patch similarity index 91% rename from patches/unapplied/server/0381-Don-t-run-entity-collision-code-if-not-needed.patch rename to patches/server/0380-Don-t-run-entity-collision-code-if-not-needed.patch index 83c68e09f6..a24881a562 100644 --- a/patches/unapplied/server/0381-Don-t-run-entity-collision-code-if-not-needed.patch +++ b/patches/server/0380-Don-t-run-entity-collision-code-if-not-needed.patch @@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide. Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index fd1637608b89e1f5af884410cd804c4bfc158c41..b27959da01866910da7c1197c6675da87bb181c4 100644 +index e6e4856db7d983460fdf898583915ff2e4a43d14..25e1dc97e3260e7f58b15a1759b8f9531c6a6f20 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3364,10 +3364,24 @@ public abstract class LivingEntity extends Entity { +@@ -3328,10 +3328,24 @@ public abstract class LivingEntity extends Entity implements Attackable { if (this.level.isClientSide()) { this.level.getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush); } else { diff --git a/patches/unapplied/server/0382-Implement-Player-Client-Options-API.patch b/patches/server/0381-Implement-Player-Client-Options-API.patch similarity index 96% rename from patches/unapplied/server/0382-Implement-Player-Client-Options-API.patch rename to patches/server/0381-Implement-Player-Client-Options-API.patch index 4ecfed8b2b..2d3242f707 100644 --- a/patches/unapplied/server/0382-Implement-Player-Client-Options-API.patch +++ b/patches/server/0381-Implement-Player-Client-Options-API.patch @@ -87,11 +87,11 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 6fd27b00bac756654c29955f1e5fe921687ab3f3..596611c852d1b2b98fdae26d6bd75c3bce9d1984 100644 +index 40100da5295aaa9113b0decc44ff7ca385cfd440..b5cca159c392e329b4283aafdffa80d9aabdda10 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1885,9 +1885,24 @@ public class ServerPlayer extends Player { - return s; +@@ -1891,9 +1891,24 @@ public class ServerPlayer extends Player { + } } + // Paper start - Client option API @@ -116,10 +116,10 @@ index 6fd27b00bac756654c29955f1e5fe921687ab3f3..596611c852d1b2b98fdae26d6bd75c3b if (getMainArm() != packet.mainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d21faa3e7a97c28e380323b503d32de5e5705d11..7dfa2ce4028b7ab3b1ebe063f497b8adda397079 100644 +index bb9940422a87e5d97a7c2d3ed368644074e9348c..3ea01452f4b18ac1c6a13a79f8e5c486e4c6f85b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -617,6 +617,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -618,6 +618,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message); } } diff --git a/patches/unapplied/server/0383-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/0382-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from patches/unapplied/server/0383-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to patches/server/0382-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/patches/unapplied/server/0384-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/0383-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 88% rename from patches/unapplied/server/0384-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to patches/server/0383-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index da97c8d19c..c4ca9879eb 100644 --- a/patches/unapplied/server/0384-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/patches/server/0383-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -31,10 +31,10 @@ delays anymore. public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index b2e95249ee5aa37d5e41679a7cb94e01c1b41494..11a4ba46869e3073375d85820426f0662bd2caf7 100644 +index 9c5925bc6a0fb277970d46c34dd812cc765a537a..f2bdb647f137a1334789dc56e517844b74d70bd9 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1036,6 +1036,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1039,6 +1039,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + ": " + entity + (this.entityMap.containsKey(entity.getId()) ? " ALREADY CONTAINED (This would have crashed your server)" : ""), new Throwable()); return; } @@ -43,10 +43,10 @@ index b2e95249ee5aa37d5e41679a7cb94e01c1b41494..11a4ba46869e3073375d85820426f066 if (!(entity instanceof EnderDragonPart)) { EntityType entitytypes = entity.getType(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 596611c852d1b2b98fdae26d6bd75c3bce9d1984..d7cce55b968e01641c46b7eae396393b6ff572e5 100644 +index b5cca159c392e329b4283aafdffa80d9aabdda10..308df2980f45d25902afd5e696449f6397b186b0 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -259,6 +259,7 @@ public class ServerPlayer extends Player { +@@ -264,6 +264,7 @@ public class ServerPlayer extends Player { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -55,10 +55,10 @@ index 596611c852d1b2b98fdae26d6bd75c3bce9d1984..d7cce55b968e01641c46b7eae396393b public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9e6c2d570 100644 +index a4b3e2caf550f578ac06c5d17077fe08aaa07a57..d483f69d376b486dfca8b4b58d43855c319e60b5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -291,6 +291,12 @@ public abstract class PlayerList { +@@ -297,6 +297,12 @@ public abstract class PlayerList { this.playersByUUID.put(player.getUUID(), player); // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below @@ -71,7 +71,7 @@ index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9 // CraftBukkit start CraftPlayer bukkitPlayer = player.getBukkitEntity(); -@@ -329,6 +335,8 @@ public abstract class PlayerList { +@@ -335,6 +341,8 @@ public abstract class PlayerList { player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1))); } player.sentListPacket = true; @@ -80,7 +80,7 @@ index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9 // CraftBukkit end player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -353,6 +361,11 @@ public abstract class PlayerList { +@@ -360,6 +368,11 @@ public abstract class PlayerList { playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect)); } @@ -92,7 +92,7 @@ index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9 if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) { CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); // CraftBukkit start -@@ -401,6 +414,10 @@ public abstract class PlayerList { +@@ -408,6 +421,10 @@ public abstract class PlayerList { } } @@ -103,7 +103,7 @@ index 0e15a5292cf32ad613952ba15c2f202c40d1d2b2..a98e581002ff7496a5bc31330a1e7ca9 player.initInventoryMenu(); // CraftBukkit - Moved from above, added world // Paper start - Add to collideRule team if needed -@@ -410,6 +427,7 @@ public abstract class PlayerList { +@@ -417,6 +434,7 @@ public abstract class PlayerList { scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); } // Paper end diff --git a/patches/unapplied/server/0385-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/0384-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 89% rename from patches/unapplied/server/0385-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to patches/server/0384-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index 9c32d43751..a00181f54c 100644 --- a/patches/unapplied/server/0385-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/patches/server/0384-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -7,10 +7,10 @@ The code following this has better support for null worlds to move them back to the world spawn. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1e4699372b22c3fe3eed6859c3f15f9b70a537c0..7e8d434944596b4d82675448ddff4046a1b0b4b4 100644 +index 8cfa823940b0fada04022034023f5372f1ca8b9f..d3f9954bda58b459e2f64b5d949807ab60905d48 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2186,9 +2186,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2199,9 +2199,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { bworld = server.getWorld(worldName); } diff --git a/patches/unapplied/server/0386-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0385-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 90% rename from patches/unapplied/server/0386-Add-PlayerAttackEntityCooldownResetEvent.patch rename to patches/server/0385-Add-PlayerAttackEntityCooldownResetEvent.patch index b5b05a14d6..519666c8f9 100644 --- a/patches/unapplied/server/0386-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/patches/server/0385-Add-PlayerAttackEntityCooldownResetEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b27959da01866910da7c1197c6675da87bb181c4..03cdd8aa2f2e8a5a5637ea5cbfbdde55135240eb 100644 +index 25e1dc97e3260e7f58b15a1759b8f9531c6a6f20..6541caa4a574271fa940d1dceef434655ffd8aa9 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2128,7 +2128,16 @@ public abstract class LivingEntity extends Entity { +@@ -2126,7 +2126,16 @@ public abstract class LivingEntity extends Entity implements Attackable { EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption); if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) { diff --git a/patches/unapplied/server/0387-Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/0386-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 86% rename from patches/unapplied/server/0387-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to patches/server/0386-Don-t-fire-BlockFade-on-worldgen-threads.patch index 4f55d73e39..6c84d8b64c 100644 --- a/patches/unapplied/server/0387-Don-t-fire-BlockFade-on-worldgen-threads.patch +++ b/patches/server/0386-Don-t-fire-BlockFade-on-worldgen-threads.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Don't fire BlockFade on worldgen threads Caused a deadlock diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 7e48326b6dc847a84e0aff2d393cadf9bace7979..68be050e5187d372a65290c01c69f3582053f7a1 100644 +index 33ece83c6d41c65042356c44eee2c76934c07d0b..9576f581bb61e6c71de427c52dcc3e56dc3ed81e 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java -@@ -100,6 +100,7 @@ public class FireBlock extends BaseFireBlock { +@@ -101,6 +101,7 @@ public class FireBlock extends BaseFireBlock { @Override public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) { // CraftBukkit start @@ -17,7 +17,7 @@ index 7e48326b6dc847a84e0aff2d393cadf9bace7979..68be050e5187d372a65290c01c69f358 if (!this.canSurvive(state, world, pos)) { // Suppress during worldgen if (!(world instanceof Level)) { -@@ -115,7 +116,7 @@ public class FireBlock extends BaseFireBlock { +@@ -116,7 +117,7 @@ public class FireBlock extends BaseFireBlock { return blockState.getHandle(); } } diff --git a/patches/unapplied/server/0388-Add-phantom-creative-and-insomniac-controls.patch b/patches/server/0387-Add-phantom-creative-and-insomniac-controls.patch similarity index 92% rename from patches/unapplied/server/0388-Add-phantom-creative-and-insomniac-controls.patch rename to patches/server/0387-Add-phantom-creative-and-insomniac-controls.patch index 1f27738587..9a20c11a4f 100644 --- a/patches/unapplied/server/0388-Add-phantom-creative-and-insomniac-controls.patch +++ b/patches/server/0387-Add-phantom-creative-and-insomniac-controls.patch @@ -17,10 +17,10 @@ index 6fd874a83a248e6a7d427d18d11fc608544662c5..302676ef78ed5b3b7fc1b04851447ca7 private EntitySelector() {} // Paper start diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java -index 0e96e9d7e4d636f4222f60cec556663f506c3906..5432b3eff8ac09e45c7e118ddc1bc5303005412b 100644 +index a3663ea031f3a243f670bf1c98272a49daed71b0..0ada1ba6774e3d0514afb946fd0f104004cc020d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java -@@ -558,6 +558,7 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -563,6 +563,7 @@ public class Phantom extends FlyingMob implements Enemy { Player entityhuman = (Player) iterator.next(); if (Phantom.this.canAttack(entityhuman, TargetingConditions.DEFAULT)) { @@ -29,7 +29,7 @@ index 0e96e9d7e4d636f4222f60cec556663f506c3906..5432b3eff8ac09e45c7e118ddc1bc530 return true; } diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -index 900a66fc7eb817509df904b71ccc3bd3976f3b35..24fa62da17ad6c84d45c6fb726305a87df85d2aa 100644 +index df7f23bb039a61ed26e117df934aad9ec5df3f58..66ac41d8fce4176feecf9a7e89e15244f47d261d 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java @@ -51,7 +51,7 @@ public class PhantomSpawner implements CustomSpawner { diff --git a/patches/unapplied/server/0389-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/patches/server/0388-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 88% rename from patches/unapplied/server/0389-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to patches/server/0388-Fix-numerous-item-duplication-issues-and-teleport-is.patch index 82feacb91c..ddd87fafe1 100644 --- a/patches/unapplied/server/0389-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/patches/server/0388-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8594d8b9d 100644 +index d3f9954bda58b459e2f64b5d949807ab60905d48..c69cc5dadac4bd81f08258f0420b7acd506cb04a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2316,11 +2316,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2329,11 +2329,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } else { // CraftBukkit start - Capture drops for death event if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) { @@ -34,7 +34,7 @@ index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8 entityitem.setDefaultPickUpDelay(); // CraftBukkit start -@@ -3095,6 +3096,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3114,6 +3115,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @Nullable public Entity teleportTo(ServerLevel worldserver, PositionImpl location) { // CraftBukkit end @@ -47,7 +47,7 @@ index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8 if (this.level instanceof ServerLevel && !this.isRemoved()) { this.level.getProfiler().push("changeDimension"); // CraftBukkit start -@@ -3121,6 +3128,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3140,6 +3147,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // CraftBukkit end this.level.getProfiler().popPush("reloading"); @@ -59,7 +59,7 @@ index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8 Entity entity = this.getType().create(worldserver); if (entity != null) { -@@ -3134,10 +3146,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3153,10 +3165,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { // CraftBukkit start - Forward the CraftEntity to the new entity this.getBukkitEntity().setHandle(entity); entity.bukkitEntity = this.getBukkitEntity(); @@ -70,20 +70,20 @@ index 7e8d434944596b4d82675448ddff4046a1b0b4b4..462159a70eb92f463b25ef840656a8f8 // CraftBukkit end } -@@ -3258,7 +3266,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3277,7 +3285,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean canChangeDimensions() { -- return true; -+ return isAlive() && valid; // Paper +- return !this.isPassenger() && !this.isVehicle(); ++ return !this.isPassenger() && !this.isVehicle() && isAlive() && valid; // Paper } public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 03cdd8aa2f2e8a5a5637ea5cbfbdde55135240eb..8cea2de440c1f45e376067c1adda3ea67dce2fe5 100644 +index 6541caa4a574271fa940d1dceef434655ffd8aa9..b0a57ff0780c3f37110a9c3640f29cb08daa52d5 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1647,9 +1647,9 @@ public abstract class LivingEntity extends Entity { +@@ -1636,9 +1636,9 @@ public abstract class LivingEntity extends Entity implements Attackable { // Paper start org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource); if (deathEvent == null || !deathEvent.isCancelled()) { @@ -96,7 +96,7 @@ index 03cdd8aa2f2e8a5a5637ea5cbfbdde55135240eb..8cea2de440c1f45e376067c1adda3ea6 // Paper start - clear equipment if event is not cancelled if (this instanceof Mob) { for (EquipmentSlot slot : this.clearedEquipmentSlots) { -@@ -1747,8 +1747,13 @@ public abstract class LivingEntity extends Entity { +@@ -1736,8 +1736,13 @@ public abstract class LivingEntity extends Entity implements Attackable { this.dropCustomDeathLoot(source, i, flag); this.clearEquipmentSlots = prev; // Paper } @@ -113,10 +113,10 @@ index 03cdd8aa2f2e8a5a5637ea5cbfbdde55135240eb..8cea2de440c1f45e376067c1adda3ea6 this.drops = new ArrayList<>(); // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 4edd48ce10caf31ac0136af35f19836b555675e5..d7bb93cd6467fe5d1cb1a9b95fa0bc3b31ba9cd2 100644 +index dbb4bfb3d1f1ce2e435ca531be36ea448c0e3212..3be5ea477cb3dd3ce75f3feced8daf7cce7075cd 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -609,7 +609,7 @@ public class ArmorStand extends LivingEntity { +@@ -627,7 +627,7 @@ public class ArmorStand extends LivingEntity { for (i = 0; i < this.handItems.size(); ++i) { itemstack = (ItemStack) this.handItems.get(i); if (!itemstack.isEmpty()) { @@ -125,7 +125,7 @@ index 4edd48ce10caf31ac0136af35f19836b555675e5..d7bb93cd6467fe5d1cb1a9b95fa0bc3b this.handItems.set(i, ItemStack.EMPTY); } } -@@ -617,7 +617,7 @@ public class ArmorStand extends LivingEntity { +@@ -635,7 +635,7 @@ public class ArmorStand extends LivingEntity { for (i = 0; i < this.armorItems.size(); ++i) { itemstack = (ItemStack) this.armorItems.get(i); if (!itemstack.isEmpty()) { @@ -135,10 +135,10 @@ index 4edd48ce10caf31ac0136af35f19836b555675e5..d7bb93cd6467fe5d1cb1a9b95fa0bc3b } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 24f1be1dcf2156fe17fec1c66529514b50925e2b..cd6e0904dbdac5d7e1630e59d6ffa2ba0a5b3b2f 100644 +index cdfd63b5d1a9c6fc9a957730adf2406decef633b..440806cc3d7852f9cf3648a747c48236afff7e80 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -810,6 +810,11 @@ public class CraftEventFactory { +@@ -809,6 +809,11 @@ public class CraftEventFactory { } public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops) { @@ -150,7 +150,7 @@ index 24f1be1dcf2156fe17fec1c66529514b50925e2b..cd6e0904dbdac5d7e1630e59d6ffa2ba CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); populateFields(victim, event); // Paper - make cancellable -@@ -823,11 +828,13 @@ public class CraftEventFactory { +@@ -822,11 +827,13 @@ public class CraftEventFactory { playDeathSound(victim, event); // Paper end victim.expToDrop = event.getDroppedExp(); diff --git a/patches/unapplied/server/0390-Villager-Restocks-API.patch b/patches/server/0389-Villager-Restocks-API.patch similarity index 100% rename from patches/unapplied/server/0390-Villager-Restocks-API.patch rename to patches/server/0389-Villager-Restocks-API.patch diff --git a/patches/unapplied/server/0391-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0390-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 91% rename from patches/unapplied/server/0391-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/0390-Validate-PickItem-Packet-and-kick-for-invalid.patch index bf7d3cb9e7..695f489be5 100644 --- a/patches/unapplied/server/0391-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/patches/server/0390-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index bae36fdcab69b27be03d4df6cb24912c6884340c..7aea69bac0bc533380cebad8ef6b20a3a1442d69 100644 +index 34a969d8902f23d5ec3f8cc481b60c0fd74f8245..8d45c4fb59b7c570418506955b4f00876921b7c2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -955,7 +955,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -957,7 +957,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePickItem(ServerboundPickItemPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); diff --git a/patches/unapplied/server/0392-Expose-game-version.patch b/patches/server/0391-Expose-game-version.patch similarity index 82% rename from patches/unapplied/server/0392-Expose-game-version.patch rename to patches/server/0391-Expose-game-version.patch index 93ef5210b0..8a3b67204f 100644 --- a/patches/unapplied/server/0392-Expose-game-version.patch +++ b/patches/server/0391-Expose-game-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 687bf0c2a77ca304bd05ac431965f01b6cabf454..8f57e42cbd691e1d13c651c46a2502b8445f1b71 100644 +index 341b441f54b65302ecfbf050ae740e2b25492a6d..bb467c24daedeaef5509cd62ffed959eedcc0caa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -574,6 +574,13 @@ public final class CraftServer implements Server { +@@ -569,6 +569,13 @@ public final class CraftServer implements Server { return this.bukkitVersion; } diff --git a/patches/unapplied/server/0393-Optimize-Voxel-Shape-Merging.patch b/patches/server/0392-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from patches/unapplied/server/0393-Optimize-Voxel-Shape-Merging.patch rename to patches/server/0392-Optimize-Voxel-Shape-Merging.patch diff --git a/patches/unapplied/server/0394-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/0393-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 91% rename from patches/unapplied/server/0394-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/0393-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index 6e0cb176e9..2ac9053313 100644 --- a/patches/unapplied/server/0394-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/patches/server/0393-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,10 +17,10 @@ keeping long lived large direct buffers in cache. Set system properly at server startup if not set already to help protect from this. diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index cce6886bb3973eed8f0c7ca7b1189547324fd4e2..0aef4fc4a89e627bc80504d7402f1ca2cdc95a74 100644 +index 7f85bc8e8a666a32e392fa57418bf0d479e758d0..e7b088a6ffed52d2dc9d6528d827997d68fcc84c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -28,6 +28,7 @@ public class Main { +@@ -26,6 +26,7 @@ public class Main { } // Paper end // Todo: Installation script diff --git a/patches/unapplied/server/0395-misc-debugging-dumps.patch b/patches/server/0394-misc-debugging-dumps.patch similarity index 88% rename from patches/unapplied/server/0395-misc-debugging-dumps.patch rename to patches/server/0394-misc-debugging-dumps.patch index b4b58aaecc..814d95601a 100644 --- a/patches/unapplied/server/0395-misc-debugging-dumps.patch +++ b/patches/server/0394-misc-debugging-dumps.patch @@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d406df9626d29ee257b8eedcbea2af09ed4b6baf..366959f9841eb0ef3669b3b3b069d7670f0ba7e6 100644 +index 155a9a5def5ff599ecf862782fa19fcc595e6789..8251db0d176ce55426cea6e0e355151c59eb7cc7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -889,6 +889,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop set, boolean flag) { + public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set) { // Paper + // Paper start + if (player.isRemoved()) { + LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName()); diff --git a/patches/unapplied/server/0397-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0396-Deobfuscate-stacktraces-in-log-messages-crash-report.patch similarity index 96% rename from patches/unapplied/server/0397-Deobfuscate-stacktraces-in-log-messages-crash-report.patch rename to patches/server/0396-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 85baa9a0ee..28e1c28a6c 100644 --- a/patches/unapplied/server/0397-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0396-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and diff --git a/build.gradle.kts b/build.gradle.kts -index 243e40cb0e14f62e284fc272aeb0b6a1bc54ea9f..daf75df1e515511fd28ed555c2c0c8ea70ec47dd 100644 +index b6b077262132be3b30f81a2a6c9288afbd11c358..18949b866cd8da3825b730a7d0545bd8af21afa2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,6 +19,7 @@ dependencies { @@ -22,8 +22,8 @@ index 243e40cb0e14f62e284fc272aeb0b6a1bc54ea9f..daf75df1e515511fd28ed555c2c0c8ea implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files implementation("commons-lang:commons-lang:2.6") + implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation - runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") - runtimeOnly("mysql:mysql-connector-java:8.0.29") + runtimeOnly("org.xerial:sqlite-jdbc:3.41.0.0") + runtimeOnly("com.mysql:mysql-connector-j:8.0.32") runtimeOnly("com.lmax:disruptor:3.4.4") // Paper @@ -105,6 +107,18 @@ tasks.check { } @@ -462,7 +462,7 @@ index 30a58229aa6dac5039511d0c0df5f2912ea7de9f..abe37c7c3c6f5ab73afd738ec78f06d7 this.exception = cause; this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit diff --git a/src/main/java/net/minecraft/CrashReportCategory.java b/src/main/java/net/minecraft/CrashReportCategory.java -index 65231daec99d36d9ad3c1ca8561b6dbc49efde10..6df4d02020a14d17d9c5b1971bb5640b35411c45 100644 +index 52eb3176437113f9a0ff85d10ce5c2415e1b5570..b54ddd0ba0b001fbcb1838a838ca4890df936f1b 100644 --- a/src/main/java/net/minecraft/CrashReportCategory.java +++ b/src/main/java/net/minecraft/CrashReportCategory.java @@ -104,6 +104,7 @@ public class CrashReportCategory { @@ -474,10 +474,10 @@ index 65231daec99d36d9ad3c1ca8561b6dbc49efde10..6df4d02020a14d17d9c5b1971bb5640b } } diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 00c4c8eb0fe70931a6fab24416ddcfa6f256d0cd..d032f8d011b94f396c9d5606f42a8c331db62740 100644 +index 184f36a137ed5e5cd20797e131801bc29449cf5c..d3b5039adaa91fa254a582f030b33276c68fca0d 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -62,13 +62,13 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -64,13 +64,13 @@ public class Connection extends SimpleChannelInboundHandler> { }); public static final AttributeKey ATTRIBUTE_PROTOCOL = AttributeKey.valueOf("protocol"); public static final LazyLoadedValue NETWORK_WORKER_GROUP = new LazyLoadedValue<>(() -> { @@ -494,7 +494,7 @@ index 00c4c8eb0fe70931a6fab24416ddcfa6f256d0cd..d032f8d011b94f396c9d5606f42a8c33 }); private final PacketFlow receiving; private final Queue queue = Queues.newConcurrentLinkedQueue(); -@@ -193,7 +193,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -196,7 +196,7 @@ public class Connection extends SimpleChannelInboundHandler> { } } @@ -516,10 +516,10 @@ index 549ea8e0fe702615eefcbfd1cd6a30e05b7b3fd5..771677c0e1cd7bfe089b9a5bb9095650 paperConfigurations.initializeWorldDefaultsConfiguration(); org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 62f1f568bba5fbcb68e49640adb79c9384619bc6..44ca46e7dff19ae99ff6cf0d82269c5f7ad7274a 100644 +index 4bf38f9006be9e838c54783dafd40cf84553d627..51e8070864ffc4a35377021a7ded9813a40c1a11 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -220,7 +220,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -218,7 +218,9 @@ public class ServerLevel extends Level implements WorldGenLevel { public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper public static Throwable getAddToWorldStackTrace(Entity entity) { @@ -530,7 +530,7 @@ index 62f1f568bba5fbcb68e49640adb79c9384619bc6..44ca46e7dff19ae99ff6cf0d82269c5f } @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI -@@ -1327,7 +1329,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1326,7 +1328,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity.isRemoved()) { // Paper start if (DEBUG_ENTITIES) { @@ -540,10 +540,10 @@ index 62f1f568bba5fbcb68e49640adb79c9384619bc6..44ca46e7dff19ae99ff6cf0d82269c5f } // Paper end diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -index a24ef433d0c9d06b86fd612978cfd6d877036791..1b38326c9a709536dc4cccf9af93aede98a1a782 100644 +index fbf375534e2b8bd6ef052c4625764f4f8feb2ed6..bb9e65eee7e0ca0f715cd5791c47579a57b1b577 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -@@ -54,10 +54,10 @@ public class ServerConnectionListener { +@@ -51,10 +51,10 @@ public class ServerConnectionListener { private static final Logger LOGGER = LogUtils.getLogger(); public static final LazyLoadedValue SERVER_EVENT_GROUP = new LazyLoadedValue<>(() -> { @@ -557,7 +557,7 @@ index a24ef433d0c9d06b86fd612978cfd6d877036791..1b38326c9a709536dc4cccf9af93aede final MinecraftServer server; public volatile boolean running; diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 3e6ec2cef2b5b058f240dd471d5c7a22d362e067..b09069196fbcba32bdd6ea67718ea4c3086fb318 100644 +index 238a7bc87ab49da1f0fa3c733dd512fdffbd8ffc..9858f907e58fa606510f87efbdf8793c35ec711c 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -185,7 +185,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -592,7 +592,7 @@ index 6599f874d9f97e9ef4862039ecad7277bbc5fd91..7edd4b88eb0476f0630630bc4681e859 } } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index 6e95a98727322106d2c418de80f5f0aad2ea1953..a3c1bba1c1f795d203207776bab41b4b8f4e69d7 100644 +index 86f19b7ed15c2029c5483f21b44895d8982a90b8..05b8b37a4b1089b859b399323ecda8f23e9f6e67 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -640,7 +640,7 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/unapplied/server/0398-Implement-Mob-Goal-API.patch b/patches/server/0397-Implement-Mob-Goal-API.patch similarity index 99% rename from patches/unapplied/server/0398-Implement-Mob-Goal-API.patch rename to patches/server/0397-Implement-Mob-Goal-API.patch index d81f141782..010dfed63d 100644 --- a/patches/unapplied/server/0398-Implement-Mob-Goal-API.patch +++ b/patches/server/0397-Implement-Mob-Goal-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/build.gradle.kts b/build.gradle.kts -index daf75df1e515511fd28ed555c2c0c8ea70ec47dd..dbaff3f2505f09e87bea314bb179a408eebd2e7c 100644 +index 18949b866cd8da3825b730a7d0545bd8af21afa2..d98add7d741e47d9ff095a817e0f895b7235a488 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -36,6 +36,7 @@ dependencies { @@ -791,10 +791,10 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31 LOOK, JUMP, diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 541b4d7187f5ac21a15581e47b8f18238db37039..fd30a811366d3a334be92c9eaa9630f4c1e37540 100644 +index ff5bfbc200d75ac10e9b8d8d30a963a406db3275..17cfd84e67682a95f19930964f9a5c9c44ada3b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2701,5 +2701,11 @@ public final class CraftServer implements Server { +@@ -2699,5 +2699,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/patches/unapplied/server/0399-Add-villager-reputation-API.patch b/patches/server/0398-Add-villager-reputation-API.patch similarity index 100% rename from patches/unapplied/server/0399-Add-villager-reputation-API.patch rename to patches/server/0398-Add-villager-reputation-API.patch diff --git a/patches/unapplied/server/0400-Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/0399-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 94% rename from patches/unapplied/server/0400-Option-for-maximum-exp-value-when-merging-orbs.patch rename to patches/server/0399-Option-for-maximum-exp-value-when-merging-orbs.patch index bebb912713..4a49521674 100644 --- a/patches/unapplied/server/0400-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/patches/server/0399-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index cd6e0904dbdac5d7e1630e59d6ffa2ba0a5b3b2f..4db162f13a0a9b4afacbdb30326e6d18529d5382 100644 +index 440806cc3d7852f9cf3648a747c48236afff7e80..e40053ef61b49e3c9269595f714a6c93e872fd6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -631,16 +631,30 @@ public class CraftEventFactory { +@@ -630,16 +630,30 @@ public class CraftEventFactory { net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity; double radius = world.spigotConfig.expMerge; if (radius > 0) { diff --git a/patches/unapplied/server/0401-ExperienceOrbMergeEvent.patch b/patches/server/0400-ExperienceOrbMergeEvent.patch similarity index 91% rename from patches/unapplied/server/0401-ExperienceOrbMergeEvent.patch rename to patches/server/0400-ExperienceOrbMergeEvent.patch index 46ab102e0f..2da263e110 100644 --- a/patches/unapplied/server/0401-ExperienceOrbMergeEvent.patch +++ b/patches/server/0400-ExperienceOrbMergeEvent.patch @@ -9,10 +9,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 4db162f13a0a9b4afacbdb30326e6d18529d5382..4a260923efd062ccd72bf9c0c93255c9af73ab47 100644 +index e40053ef61b49e3c9269595f714a6c93e872fd6c..eb8b13becd2d72c4cac12a11e27aa467d1901b7e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -641,7 +641,7 @@ public class CraftEventFactory { +@@ -640,7 +640,7 @@ public class CraftEventFactory { if (e instanceof net.minecraft.world.entity.ExperienceOrb) { net.minecraft.world.entity.ExperienceOrb loopItem = (net.minecraft.world.entity.ExperienceOrb) e; // Paper start diff --git a/patches/unapplied/server/0402-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0401-Fix-PotionEffect-ignores-icon-flag.patch similarity index 92% rename from patches/unapplied/server/0402-Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/0401-Fix-PotionEffect-ignores-icon-flag.patch index 85a337e651..cd3de7681e 100644 --- a/patches/unapplied/server/0402-Fix-PotionEffect-ignores-icon-flag.patch +++ b/patches/server/0401-Fix-PotionEffect-ignores-icon-flag.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index c7cc9408f961aa804af9548d8c8fee46631421cf..b543619e50196f82e55dd7e648e5f8c580658dbe 100644 +index c5784574f584a5588020b16776f01faf6902cbe8..658d4dbb45d17e7064f69b10af8fbfa473a8dffe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -431,7 +431,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0403-Optimize-brigadier-child-sorting-performance.patch b/patches/server/0402-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from patches/unapplied/server/0403-Optimize-brigadier-child-sorting-performance.patch rename to patches/server/0402-Optimize-brigadier-child-sorting-performance.patch diff --git a/patches/unapplied/server/0404-Potential-bed-API.patch b/patches/server/0403-Potential-bed-API.patch similarity index 100% rename from patches/unapplied/server/0404-Potential-bed-API.patch rename to patches/server/0403-Potential-bed-API.patch diff --git a/patches/unapplied/server/0405-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0404-Wait-for-Async-Tasks-during-shutdown.patch similarity index 89% rename from patches/unapplied/server/0405-Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/0404-Wait-for-Async-Tasks-during-shutdown.patch index 746e3406eb..7432880af6 100644 --- a/patches/unapplied/server/0405-Wait-for-Async-Tasks-during-shutdown.patch +++ b/patches/server/0404-Wait-for-Async-Tasks-during-shutdown.patch @@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns if any are still running after that delay just as reload does. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 366959f9841eb0ef3669b3b3b069d7670f0ba7e6..93c1a1bf602af1e73202590e78dac8336a5d3296 100644 +index 8251db0d176ce55426cea6e0e355151c59eb7cc7..6da8e9530c0112b1d9119c6ff722a277e5826241 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -929,6 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0.0F; f -= 0.22500001F) { - BlockPos blockposition = new BlockPos(d4, d5, d6); + BlockPos blockposition = BlockPos.containing(d4, d5, d6); BlockState iblockdata = this.level.getBlockState(blockposition); + if (!iblockdata.isDestroyable()) continue; // Paper FluidState fluid = iblockdata.getFluidState(); // Paper if (!this.level.isInWorldBounds(blockposition)) { -@@ -350,7 +351,7 @@ public class Explosion { +@@ -359,7 +360,7 @@ public class Explosion { BlockState iblockdata = this.level.getBlockState(blockposition); Block block = iblockdata.getBlock(); @@ -34,10 +34,10 @@ index 1582f8aad002c14ed45a5748e99f259896e8c9e9..4eb2b90596d2a538c1ea380f11fcd23f this.level.getProfiler().push("explosion_blocks"); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index d9842447d7ae840bf9541bbe7c99b032c83d0039..6ee6ecf5ae3d450a2da4db453f5b02dd71073ad0 100644 +index 31edf8f2c683f56e53040e735d015ca6d6966d01..0ef98a3a3f8685c801f74431fcfab88541b6a170 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -429,6 +429,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -435,6 +435,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { @@ -49,7 +49,7 @@ index d9842447d7ae840bf9541bbe7c99b032c83d0039..6ee6ecf5ae3d450a2da4db453f5b02dd if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 11b0b1a217648496ccf08f09bb3aa53904ffa9cb..a9171ca47e836428e1b5c8366898a94702242e13 100644 +index f475926cfa6fc98f9f8f4fe8be6fd200cce39c7e..536a4e9f2bec3f44ca00edaf518c5d6c475d3c8b 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -90,6 +90,19 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -115,10 +115,10 @@ index 76720517cd2d82065eb8430cf854b536295341db..29755807fdb6c30e31c0ec2bbf33bed9 world.playSound((Player) null, pos, SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.15F + 0.6F); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index c53b80cba9ea658d20e527a9bfcd6b5d7d9f51fc..6a549229037c8b8c2093feb563780ef8565d709f 100644 +index 7cc6dcb128f2792fc32bb8f50e4c94d600255207..b245b3912a4e2f4e83872c29c5a9602743b5eccb 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -234,7 +234,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -235,7 +235,7 @@ public abstract class BlockBehaviour implements FeatureElement { /** @deprecated */ @Deprecated public boolean canBeReplaced(BlockState state, BlockPlaceContext context) { @@ -127,7 +127,7 @@ index c53b80cba9ea658d20e527a9bfcd6b5d7d9f51fc..6a549229037c8b8c2093feb563780ef8 } /** @deprecated */ -@@ -775,6 +775,12 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -800,6 +800,12 @@ public abstract class BlockBehaviour implements FeatureElement { return ((Block) this.owner).builtInRegistryHolder(); } @@ -140,7 +140,7 @@ index c53b80cba9ea658d20e527a9bfcd6b5d7d9f51fc..6a549229037c8b8c2093feb563780ef8 public Material getMaterial() { return this.material; } -@@ -872,7 +878,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -897,7 +903,7 @@ public abstract class BlockBehaviour implements FeatureElement { } public PushReaction getPistonPushReaction() { diff --git a/patches/unapplied/server/0408-Reduce-MutableInt-allocations-from-light-engine.patch b/patches/server/0407-Reduce-MutableInt-allocations-from-light-engine.patch similarity index 100% rename from patches/unapplied/server/0408-Reduce-MutableInt-allocations-from-light-engine.patch rename to patches/server/0407-Reduce-MutableInt-allocations-from-light-engine.patch diff --git a/patches/unapplied/server/0409-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0408-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 92% rename from patches/unapplied/server/0409-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/0408-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index e0cf385668..714b084af6 100644 --- a/patches/unapplied/server/0409-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/patches/server/0408-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -18,10 +18,10 @@ index 05ac41e136da43284fb24a6b698ebd36318278fb..5ca3ad7b3d7606accd0a58b3c708fadb @VisibleForTesting static long encode(double value) { diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 11a4ba46869e3073375d85820426f0662bd2caf7..69ac6b4fbdf4cebbaa36234e17e2d51c732de8af 100644 +index f2bdb647f137a1334789dc56e517844b74d70bd9..1c638f65d33e5890a7a32bf7e89d484ae2afc093 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1337,9 +1337,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1350,9 +1350,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public void updatePlayer(ServerPlayer player) { org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot if (player != this.entity) { @@ -38,10 +38,10 @@ index 11a4ba46869e3073375d85820426f0662bd2caf7..69ac6b4fbdf4cebbaa36234e17e2d51c boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player); diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 841bb7741ae6b0e9cb98120ee1649b93ef4c3dab..4ebe6bdc01b2d80fc84ba31aae9eb9ac26339436 100644 +index b3bc4af0b0be7223318e945c6eee4fe042523934..d4696783f5adaee5f4350dfe5da8d6b85cf07f7e 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -152,7 +152,13 @@ public class ServerEntity { +@@ -165,7 +165,13 @@ public class ServerEntity { i = Mth.floor(this.entity.getYRot() * 256.0F / 360.0F); j = Mth.floor(this.entity.getXRot() * 256.0F / 360.0F); Vec3 vec3d = this.entity.trackingPosition(); diff --git a/patches/unapplied/server/0410-Ensure-safe-gateway-teleport.patch b/patches/server/0409-Ensure-safe-gateway-teleport.patch similarity index 93% rename from patches/unapplied/server/0410-Ensure-safe-gateway-teleport.patch rename to patches/server/0409-Ensure-safe-gateway-teleport.patch index b9d9013d68..a77ce1d8bb 100644 --- a/patches/unapplied/server/0410-Ensure-safe-gateway-teleport.patch +++ b/patches/server/0409-Ensure-safe-gateway-teleport.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ensure safe gateway teleport diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 1c0c1be2b08fc8a28ff36896da01d668308570f4..f80545f80948db27d1fbde77d0505c916eb504ed 100644 +index c7de74b7fcfb5f4d8adbe7e703087a03d9d9056d..c73024cc62490c336ffe26313580e88d25ca7078 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java @@ -106,7 +106,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { diff --git a/patches/unapplied/server/0411-Add-option-for-console-having-all-permissions.patch b/patches/server/0410-Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/unapplied/server/0411-Add-option-for-console-having-all-permissions.patch rename to patches/server/0410-Add-option-for-console-having-all-permissions.patch diff --git a/patches/unapplied/server/0412-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch b/patches/server/0411-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch similarity index 97% rename from patches/unapplied/server/0412-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch rename to patches/server/0411-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch index 9fa3d02fb6..832016ceb0 100644 --- a/patches/unapplied/server/0412-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch +++ b/patches/server/0411-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize anyPlayerCloseEnoughForSpawning to use distance maps Use a distance map to find the players in range quickly diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 2ba3bb4e5670ece798a8882801a856d82851c00a..a61f55ed1fbe5aac5289014cb95cb6950b4c77fa 100644 +index 214e0657035f82e5266de06e31975d6b45405019..51c112656f26f142bd6c126253520e812a338783 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java @@ -83,16 +83,29 @@ public class ChunkHolder { @@ -42,10 +42,10 @@ index 2ba3bb4e5670ece798a8882801a856d82851c00a..a61f55ed1fbe5aac5289014cb95cb695 this.newChunkHolder = newChunkHolder; // Paper - rewrite chunk system this.chunkToSaveHistory = null; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 69ac6b4fbdf4cebbaa36234e17e2d51c732de8af..e87ade8697a33b9ea23dce59838a9ccd02ab09f6 100644 +index 1c638f65d33e5890a7a32bf7e89d484ae2afc093..4b7c39595302a738e6d4a1749473ef9c81f84fea 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -156,12 +156,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -159,12 +159,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper start - distance maps private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>(); public final io.papermc.paper.chunk.PlayerChunkLoader playerChunkManager = new io.papermc.paper.chunk.PlayerChunkLoader(this, this.pooledLinkedPlayerHashSets); // Paper - replace chunk loader @@ -70,7 +70,7 @@ index 69ac6b4fbdf4cebbaa36234e17e2d51c732de8af..e87ade8697a33b9ea23dce59838a9ccd // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); -@@ -172,6 +184,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -175,6 +187,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider void removePlayerFromDistanceMaps(ServerPlayer player) { this.playerChunkManager.removePlayer(player); // Paper - replace chunk loader @@ -81,7 +81,7 @@ index 69ac6b4fbdf4cebbaa36234e17e2d51c732de8af..e87ade8697a33b9ea23dce59838a9ccd // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.remove(player); -@@ -184,6 +200,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -187,6 +203,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider int chunkZ = MCUtil.getChunkCoordinate(player.getZ()); // Note: players need to be explicitly added to distance maps before they can be updated this.playerChunkManager.updatePlayer(player); // Paper - replace chunk loader @@ -89,7 +89,7 @@ index 69ac6b4fbdf4cebbaa36234e17e2d51c732de8af..e87ade8697a33b9ea23dce59838a9ccd // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); -@@ -275,6 +292,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -278,6 +295,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.add(this.dataRegionManager); // Paper end this.playerMobDistanceMap = this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets) : null; // Paper @@ -128,7 +128,7 @@ index 69ac6b4fbdf4cebbaa36234e17e2d51c732de8af..e87ade8697a33b9ea23dce59838a9ccd } protected ChunkGenerator generator() { -@@ -834,43 +883,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -837,43 +886,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return this.anyPlayerCloseEnoughForSpawning(pos, false); } @@ -333,10 +333,10 @@ index 665e088cb0b73f6a0c62f29c56da462bab7c927e..298e4468f7b5346733257f7117f76c66 } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d7cce55b968e01641c46b7eae396393b6ff572e5..e944729f35768ee7fbb85520fae532c0ab4be548 100644 +index 308df2980f45d25902afd5e696449f6397b186b0..33dd4513fd2a95994460a9d844bcf40b5a4a1fc1 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -264,6 +264,7 @@ public class ServerPlayer extends Player { +@@ -269,6 +269,7 @@ public class ServerPlayer extends Player { public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent // CraftBukkit end public boolean isRealPlayer; // Paper diff --git a/patches/unapplied/server/0413-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/0412-Use-distance-map-to-optimise-entity-tracker.patch similarity index 95% rename from patches/unapplied/server/0413-Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/0412-Use-distance-map-to-optimise-entity-tracker.patch index 6a4c3270a5..f77d5cb393 100644 --- a/patches/unapplied/server/0413-Use-distance-map-to-optimise-entity-tracker.patch +++ b/patches/server/0412-Use-distance-map-to-optimise-entity-tracker.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use distance map to optimise entity tracker Use the distance map to find candidate players for tracking. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76baa9a722 100644 +index 4b7c39595302a738e6d4a1749473ef9c81f84fea..503a642165f6f1292c07e8a9e618218bb96a97e9 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -68,6 +68,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; +@@ -71,6 +71,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket; import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket; import net.minecraft.network.protocol.game.DebugPackets; import io.papermc.paper.util.MCUtil; @@ -17,7 +17,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 import net.minecraft.server.level.progress.ChunkProgressListener; import net.minecraft.server.network.ServerPlayerConnection; import net.minecraft.util.CsvOutput; -@@ -167,6 +168,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -170,6 +171,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerChunkTickRangeMap; // Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning @@ -41,7 +41,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 void addPlayerToDistanceMaps(ServerPlayer player) { this.playerChunkManager.addPlayer(player); // Paper - replace chunk loader -@@ -179,6 +197,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -182,6 +200,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobDistanceMap.add(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); } // Paper end - per player mob spawning @@ -56,7 +56,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 } void removePlayerFromDistanceMaps(ServerPlayer player) { -@@ -193,6 +219,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -196,6 +222,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobDistanceMap.remove(player); } // Paper end - per player mob spawning @@ -68,7 +68,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 } void updateMaps(ServerPlayer player) { -@@ -206,6 +237,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -209,6 +240,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobDistanceMap.update(player, chunkX, chunkZ, io.papermc.paper.chunk.system.ChunkSystem.getTickViewDistance(player)); } // Paper end - per player mob spawning @@ -83,7 +83,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 } // Paper end // Paper start -@@ -292,6 +331,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -295,6 +334,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.add(this.dataRegionManager); // Paper end this.playerMobDistanceMap = this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets) : null; // Paper @@ -129,7 +129,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 // Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning this.playerChunkTickRangeMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets, (ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ, -@@ -998,17 +1076,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1001,17 +1079,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public void move(ServerPlayer player) { @@ -148,7 +148,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 int i = SectionPos.blockToSectionCoord(player.getBlockX()); int j = SectionPos.blockToSectionCoord(player.getBlockZ()); -@@ -1107,7 +1175,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1110,7 +1178,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); @@ -157,7 +157,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -1151,7 +1219,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1154,7 +1222,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider entity.tracker = null; // Paper - We're no longer tracked } @@ -195,7 +195,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 List list = Lists.newArrayList(); List list1 = this.level.players(); ObjectIterator objectiterator = this.entityMap.values().iterator(); -@@ -1248,46 +1346,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1261,46 +1359,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider })); // Paper end DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos()); @@ -243,7 +243,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 } -@@ -1342,6 +1401,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1355,6 +1414,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.lastSectionPos = SectionPos.of((EntityAccess) entity); } @@ -287,7 +287,7 @@ index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76 return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false; } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 462159a70eb92f463b25ef840656a8f8594d8b9d..016cfb63f686352db750065938894df9bc0ee233 100644 +index c69cc5dadac4bd81f08258f0420b7acd506cb04a..133a544274f4a80071c2a3306f5b0cd47cd6a270 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -57,6 +57,7 @@ import net.minecraft.network.syncher.EntityDataSerializers; @@ -298,7 +298,7 @@ index 462159a70eb92f463b25ef840656a8f8594d8b9d..016cfb63f686352db750065938894df9 import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -@@ -475,6 +476,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -476,6 +477,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public boolean updatingSectionStatus = false; // Paper end diff --git a/patches/unapplied/server/0414-Fix-villager-trading-demand-MC-163962.patch b/patches/server/0413-Fix-villager-trading-demand-MC-163962.patch similarity index 90% rename from patches/unapplied/server/0414-Fix-villager-trading-demand-MC-163962.patch rename to patches/server/0413-Fix-villager-trading-demand-MC-163962.patch index fb5e330854..fa81bd70ac 100644 --- a/patches/unapplied/server/0414-Fix-villager-trading-demand-MC-163962.patch +++ b/patches/server/0413-Fix-villager-trading-demand-MC-163962.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix villager trading demand - MC-163962 Prevent demand from going negative and tending to negative infinity diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java -index 987e65332058f364fcef0a29c97b206b14ad6457..8b46e494ecd0cce5ab0b2bf8e50cf50dc7e2a7e5 100644 +index f6fe6c39a8b11f4902e49e85db501808331392a2..8de9ea7928b272bbaf9c49940a8079f2499c8ee1 100644 --- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java +++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java @@ -113,7 +113,7 @@ public class MerchantOffer { diff --git a/patches/unapplied/server/0415-Maps-shouldn-t-load-chunks.patch b/patches/server/0414-Maps-shouldn-t-load-chunks.patch similarity index 100% rename from patches/unapplied/server/0415-Maps-shouldn-t-load-chunks.patch rename to patches/server/0414-Maps-shouldn-t-load-chunks.patch diff --git a/patches/unapplied/server/0416-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0415-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from patches/unapplied/server/0416-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/0415-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/patches/unapplied/server/0417-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/0416-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/unapplied/server/0417-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/0416-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/unapplied/server/0418-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0417-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from patches/unapplied/server/0418-Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/0417-Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/patches/unapplied/server/0419-Fix-sand-duping.patch b/patches/server/0418-Fix-sand-duping.patch similarity index 86% rename from patches/unapplied/server/0419-Fix-sand-duping.patch rename to patches/server/0418-Fix-sand-duping.patch index f9661aee55..0d292a0921 100644 --- a/patches/unapplied/server/0419-Fix-sand-duping.patch +++ b/patches/server/0418-Fix-sand-duping.patch @@ -7,10 +7,10 @@ If the falling block dies during teleportation (entity#move), then we need to detect that by placing a check after the move. diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 97b2d12713d2245f1621d3ade5b5655b5897cbf4..06f6fe4d1be4b14c45d2576561201c9386988dc1 100644 +index d5c30c48a6b59b01041dffc8b4b7b70ea27f0c7d..5967e5093af785b5ad33e0b0da2044b3a4065107 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -128,6 +128,11 @@ public class FallingBlockEntity extends Entity { +@@ -129,6 +129,11 @@ public class FallingBlockEntity extends Entity { @Override public void tick() { @@ -22,7 +22,7 @@ index 97b2d12713d2245f1621d3ade5b5655b5897cbf4..06f6fe4d1be4b14c45d2576561201c93 if (this.blockState.isAir()) { this.discard(); } else { -@@ -140,6 +145,12 @@ public class FallingBlockEntity extends Entity { +@@ -141,6 +146,12 @@ public class FallingBlockEntity extends Entity { this.move(MoverType.SELF, this.getDeltaMovement()); diff --git a/patches/unapplied/server/0420-Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/0419-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from patches/unapplied/server/0420-Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/0419-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/patches/unapplied/server/0421-Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/0420-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 91% rename from patches/unapplied/server/0421-Prevent-position-desync-in-playerconnection-causing-.patch rename to patches/server/0420-Prevent-position-desync-in-playerconnection-causing-.patch index 4989b13246..82d5480e66 100644 --- a/patches/unapplied/server/0421-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/patches/server/0420-Prevent-position-desync-in-playerconnection-causing-.patch @@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ec31ca45c7e95aea3ff8d1be690c96dfae470c81..eca6493287e46e2b9457d5a3a24dd8c1ca8acd6c 100644 +index 526e06bf895eb1b57e30df8c4c46aba885fad5d2..ce04df03f0cb2578e78cdb5bb72794815661c337 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1434,6 +1434,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1436,6 +1436,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move diff --git a/patches/unapplied/server/0422-Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/0421-Inventory-getHolder-method-without-block-snapshot.patch similarity index 92% rename from patches/unapplied/server/0422-Inventory-getHolder-method-without-block-snapshot.patch rename to patches/server/0421-Inventory-getHolder-method-without-block-snapshot.patch index 5fec002158..58e1c9d4de 100644 --- a/patches/unapplied/server/0422-Inventory-getHolder-method-without-block-snapshot.patch +++ b/patches/server/0421-Inventory-getHolder-method-without-block-snapshot.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Inventory getHolder method without block snapshot diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 94a71073a0d69145cf3429a2b6f646a2dc2015fd..7271cf41d9ad153ce10b5b5e08ebcdbb3bc65be9 100644 +index c3eff9a6734fe2d1809bbeff945c40da816bbddc..513f3311a9009996c27604f2ba7d60c80c7a2060 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -535,6 +535,13 @@ public class CraftInventory implements Inventory { +@@ -537,6 +537,13 @@ public class CraftInventory implements Inventory { return this.inventory.getOwner(); } diff --git a/patches/unapplied/server/0423-Improve-Arrow-API.patch b/patches/server/0422-Improve-Arrow-API.patch similarity index 100% rename from patches/unapplied/server/0423-Improve-Arrow-API.patch rename to patches/server/0422-Improve-Arrow-API.patch diff --git a/patches/unapplied/server/0424-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0423-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 92% rename from patches/unapplied/server/0424-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to patches/server/0423-Add-and-implement-PlayerRecipeBookClickEvent.patch index 8512277e7a..f7547c5710 100644 --- a/patches/unapplied/server/0424-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0423-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index eca6493287e46e2b9457d5a3a24dd8c1ca8acd6c..5e2dbde58deb8de7186f13468d51824082424451 100644 +index ce04df03f0cb2578e78cdb5bb72794815661c337..ad584ebfb69a76eb84a56baefa5fb8ee884b743d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3098,9 +3098,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3107,9 +3107,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!this.player.containerMenu.stillValid(this.player)) { ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu); } else { diff --git a/patches/unapplied/server/0425-Hide-sync-chunk-writes-behind-flag.patch b/patches/server/0424-Hide-sync-chunk-writes-behind-flag.patch similarity index 89% rename from patches/unapplied/server/0425-Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/0424-Hide-sync-chunk-writes-behind-flag.patch index f40c90779b..b28eab1072 100644 --- a/patches/unapplied/server/0425-Hide-sync-chunk-writes-behind-flag.patch +++ b/patches/server/0424-Hide-sync-chunk-writes-behind-flag.patch @@ -9,12 +9,12 @@ on harddrives. -DPaper.enable-sync-chunk-writes=true to enable diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -index e72fb5c548a9baef09ae547863c4bdc439ce28b2..c7e4330c93baff1f3027d7c75cf857b673d38970 100644 +index d144fc518442762e45f213550a9b0a21f77fcdd1..818289e831e3dad29345c43265e2efd7689bc500 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java @@ -144,7 +144,7 @@ public class DedicatedServerProperties extends Settings { - return Mth.clamp(integer, (int) 1, 29999984); + return Mth.clamp(integer, 1, 29999984); }, 29999984); - this.syncChunkWrites = this.get("sync-chunk-writes", true); + this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag diff --git a/patches/unapplied/server/0426-Add-permission-for-command-blocks.patch b/patches/server/0425-Add-permission-for-command-blocks.patch similarity index 96% rename from patches/unapplied/server/0426-Add-permission-for-command-blocks.patch rename to patches/server/0425-Add-permission-for-command-blocks.patch index 0c73b52520..a465e2c792 100644 --- a/patches/unapplied/server/0426-Add-permission-for-command-blocks.patch +++ b/patches/server/0425-Add-permission-for-command-blocks.patch @@ -18,10 +18,10 @@ index aee5144bdc5bd9f7b07ce3b72331bcfd42663ec9..a98254e38076e82f94db7b2f2112500e return false; } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5e2dbde58deb8de7186f13468d51824082424451..cdf72c506442c6cb9ab0e0856b429cdb90fc38cc 100644 +index ad584ebfb69a76eb84a56baefa5fb8ee884b743d..77f502c279ec471d65f6cc007d2bc08e3b34d79a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -866,7 +866,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -868,7 +868,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); @@ -30,7 +30,7 @@ index 5e2dbde58deb8de7186f13468d51824082424451..cdf72c506442c6cb9ab0e0856b429cdb this.player.sendSystemMessage(Component.translatable("advMode.notAllowed")); } else { BaseCommandBlock commandblocklistenerabstract = null; -@@ -933,7 +933,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -935,7 +935,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); diff --git a/patches/unapplied/server/0427-Ensure-Entity-AABB-s-are-never-invalid.patch b/patches/server/0426-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 87% rename from patches/unapplied/server/0427-Ensure-Entity-AABB-s-are-never-invalid.patch rename to patches/server/0426-Ensure-Entity-AABB-s-are-never-invalid.patch index 106c0de9df..53f17745fe 100644 --- a/patches/unapplied/server/0427-Ensure-Entity-AABB-s-are-never-invalid.patch +++ b/patches/server/0426-Ensure-Entity-AABB-s-are-never-invalid.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 016cfb63f686352db750065938894df9bc0ee233..1a33ce4ff0e00ac2f6bba288cb43880ca5dae19a 100644 +index 133a544274f4a80071c2a3306f5b0cd47cd6a270..4d62f7f88dfaedfbde598515a1e77716d0ee4a1b 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -713,8 +713,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -714,8 +714,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void setPos(double x, double y, double z) { @@ -19,7 +19,7 @@ index 016cfb63f686352db750065938894df9bc0ee233..1a33ce4ff0e00ac2f6bba288cb43880c } protected AABB makeBoundingBox() { -@@ -4004,6 +4004,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4068,6 +4068,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public final void setPosRaw(double x, double y, double z) { @@ -31,7 +31,7 @@ index 016cfb63f686352db750065938894df9bc0ee233..1a33ce4ff0e00ac2f6bba288cb43880c // Paper start - rewrite chunk system if (this.updatingSectionStatus) { LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable()); -@@ -4027,6 +4032,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4091,6 +4096,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.levelCallback.onMove(); } diff --git a/patches/unapplied/server/0428-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 90% rename from patches/unapplied/server/0428-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index e3bb2cdeea..bcb8c5235e 100644 --- a/patches/unapplied/server/0428-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0427-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 93c1a1bf602af1e73202590e78dac8336a5d3296..ce02077acd0958272e01e695c040a030eb8febdc 100644 +index 6da8e9530c0112b1d9119c6ff722a277e5826241..61f1d565254ccba500a8c30722183ae9bfc0deb3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -799,7 +799,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> 38), (int) ((packedPos << 52) >> 52), (int) ((packedPos << 26) >> 38)); // Paper - simplify/inline } - public long asLong() { -@@ -89,10 +91,7 @@ public class BlockPos extends Vec3i { + public static BlockPos containing(double x, double y, double z) { +@@ -85,10 +87,7 @@ public class BlockPos extends Vec3i { } public static long asLong(int x, int y, int z) { diff --git a/patches/unapplied/server/0432-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0431-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 95% rename from patches/unapplied/server/0432-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to patches/server/0431-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index 3c8a7584b9..19edfeafb8 100644 --- a/patches/unapplied/server/0432-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/0431-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d3694bfd0a3ca2519db4220d071f0c62f693cb5a..3d6725e281a612a873b40b9d6a67c990f94246d5 100644 +index 82b594729e595bfd7011334a27bdd3e427d2f903..2f978b0c5721b0cf145d324e6c7551d8f0c1eccf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -374,7 +374,7 @@ public final class CraftServer implements Server { +@@ -369,7 +369,7 @@ public final class CraftServer implements Server { this.overrideSpawnLimits(); console.autosavePeriod = this.configuration.getInt("ticks-per.autosave"); this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose")); @@ -34,7 +34,7 @@ index d3694bfd0a3ca2519db4220d071f0c62f693cb5a..3d6725e281a612a873b40b9d6a67c990 this.minimumAPI = this.configuration.getString("settings.minimum-api"); this.loadIcon(); -@@ -926,7 +926,7 @@ public final class CraftServer implements Server { +@@ -921,7 +921,7 @@ public final class CraftServer implements Server { this.console.setMotd(config.motd); this.overrideSpawnLimits(); this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose")); @@ -44,7 +44,7 @@ index d3694bfd0a3ca2519db4220d071f0c62f693cb5a..3d6725e281a612a873b40b9d6a67c990 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 d294af725e4df2109e486cee6a38f4872064bc7f..a25dbc2bd3005cb3d1aee61fb48522b13e7c4922 100644 +index efa01ad6ac0757da033f2bdf7729717239e474f2..977004b4b5a294c4eab2995777df6fb1faff4625 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -281,8 +281,21 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0433-incremental-chunk-and-player-saving.patch b/patches/server/0432-incremental-chunk-and-player-saving.patch similarity index 90% rename from patches/unapplied/server/0433-incremental-chunk-and-player-saving.patch rename to patches/server/0432-incremental-chunk-and-player-saving.patch index 6ce6b943cd..a2b8fd34e2 100644 --- a/patches/unapplied/server/0433-incremental-chunk-and-player-saving.patch +++ b/patches/server/0432-incremental-chunk-and-player-saving.patch @@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk and player saving diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ce02077acd0958272e01e695c040a030eb8febdc..8e101269ca2edf5f3cc9c1ccedd03afaf1392d19 100644 +index 61f1d565254ccba500a8c30722183ae9bfc0deb3..dfc8b3441ca35aba19a7e1bf61a0d60c5722ce96 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -872,7 +872,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit @@ -73,10 +73,10 @@ index 298e4468f7b5346733257f7117f76c66e9a1d8f0..d1652c237b2b272f0dfe80f774cff160 public void close() throws IOException { // CraftBukkit start diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 44ca46e7dff19ae99ff6cf0d82269c5f7ad7274a..95c53189e32aec6aca254fa3b157df7bc68d4d1a 100644 +index 51e8070864ffc4a35377021a7ded9813a40c1a11..06d20e9fde26540d1575975345f3d69405f767d0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1141,6 +1141,37 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1140,6 +1140,37 @@ public class ServerLevel extends Level implements WorldGenLevel { return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos); } @@ -115,10 +115,10 @@ index 44ca46e7dff19ae99ff6cf0d82269c5f7ad7274a..95c53189e32aec6aca254fa3b157df7b // Paper start - rewrite chunk system - add close param this.save(progressListener, flush, savingDisabled, false); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 425fd68d3a20aba52af7462bf91e15114978e42b..f2185620a76b0b376adca38a5db950a327abc897 100644 +index 3dd7c2b12d56c875074c8cc6032eae1408154aae..4e25b015c7b37b1249d2bca4a3d97d26bcefd61e 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -181,6 +181,7 @@ import org.bukkit.inventory.MainHand; +@@ -186,6 +186,7 @@ import org.bukkit.inventory.MainHand; public class ServerPlayer extends Player { private static final Logger LOGGER = LogUtils.getLogger(); @@ -127,10 +127,10 @@ index 425fd68d3a20aba52af7462bf91e15114978e42b..f2185620a76b0b376adca38a5db950a3 private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10; public ServerGamePacketListenerImpl connection; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a98e581002ff7496a5bc31330a1e7ca9e6c2d570..6876a614374adc269d2b503b1abbfeca69bd3e57 100644 +index d483f69d376b486dfca8b4b58d43855c319e60b5..68701c1de6d7060f65648b1404209e8c9891fccc 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -514,6 +514,7 @@ public abstract class PlayerList { +@@ -521,6 +521,7 @@ public abstract class PlayerList { protected void save(ServerPlayer player) { if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -138,7 +138,7 @@ index a98e581002ff7496a5bc31330a1e7ca9e6c2d570..6876a614374adc269d2b503b1abbfeca this.playerIo.save(player); ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit -@@ -1104,10 +1105,22 @@ public abstract class PlayerList { +@@ -1111,10 +1112,22 @@ public abstract class PlayerList { } public void saveAll() { diff --git a/patches/unapplied/server/0434-Stop-copy-on-write-operations-for-updating-light-dat.patch b/patches/server/0433-Stop-copy-on-write-operations-for-updating-light-dat.patch similarity index 100% rename from patches/unapplied/server/0434-Stop-copy-on-write-operations-for-updating-light-dat.patch rename to patches/server/0433-Stop-copy-on-write-operations-for-updating-light-dat.patch diff --git a/patches/unapplied/server/0435-Support-old-UUID-format-for-NBT.patch b/patches/server/0434-Support-old-UUID-format-for-NBT.patch similarity index 86% rename from patches/unapplied/server/0435-Support-old-UUID-format-for-NBT.patch rename to patches/server/0434-Support-old-UUID-format-for-NBT.patch index dc986421eb..0c701ba22a 100644 --- a/patches/unapplied/server/0435-Support-old-UUID-format-for-NBT.patch +++ b/patches/server/0434-Support-old-UUID-format-for-NBT.patch @@ -8,10 +8,10 @@ We have stored UUID in plenty of places that did not get DFU'd So just look for old format and load it if it exists. diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java -index 07593ecae8fb00412c5342681263e3333d3809c0..42ea3573c0e8559a264fd24fc09c3a5cd7628d9b 100644 +index 1d13bc15c56faa69699fb3ad39210233d6b6934d..7e94ebe06fc62293e665d6db19e42d947e7eb30f 100644 --- a/src/main/java/net/minecraft/nbt/CompoundTag.java +++ b/src/main/java/net/minecraft/nbt/CompoundTag.java -@@ -194,6 +194,12 @@ public class CompoundTag implements Tag { +@@ -196,6 +196,12 @@ public class CompoundTag implements Tag { } public void putUUID(String key, UUID value) { @@ -24,7 +24,7 @@ index 07593ecae8fb00412c5342681263e3333d3809c0..42ea3573c0e8559a264fd24fc09c3a5c this.tags.put(key, NbtUtils.createUUID(value)); } -@@ -202,10 +208,20 @@ public class CompoundTag implements Tag { +@@ -204,10 +210,20 @@ public class CompoundTag implements Tag { * You must use {@link #hasUUID(String)} before or else it will throw an NPE. */ public UUID getUUID(String key) { @@ -46,10 +46,10 @@ index 07593ecae8fb00412c5342681263e3333d3809c0..42ea3573c0e8559a264fd24fc09c3a5c return tag != null && tag.getType() == IntArrayTag.TYPE && ((IntArrayTag)tag).getAsIntArray().length == 4; } diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java -index c0fe7c576f2361e599bc23003da7c49bb7cb62b2..846f8267f7d24f52b84314483c8230c620ef2dce 100644 +index 1e7ba8d82269d2d375b2f2d3fc21ed922cce0942..7bc60901297d27d88efb401d02b4bc06d8b28874 100644 --- a/src/main/java/net/minecraft/nbt/NbtUtils.java +++ b/src/main/java/net/minecraft/nbt/NbtUtils.java -@@ -79,6 +79,11 @@ public final class NbtUtils { +@@ -76,6 +76,11 @@ public final class NbtUtils { if (nbt.contains("Name", 8)) { string = nbt.getString("Name"); } diff --git a/patches/unapplied/server/0436-Clean-up-duplicated-GameProfile-Properties.patch b/patches/server/0435-Clean-up-duplicated-GameProfile-Properties.patch similarity index 95% rename from patches/unapplied/server/0436-Clean-up-duplicated-GameProfile-Properties.patch rename to patches/server/0435-Clean-up-duplicated-GameProfile-Properties.patch index b54d06ed5a..2d55f77395 100644 --- a/patches/unapplied/server/0436-Clean-up-duplicated-GameProfile-Properties.patch +++ b/patches/server/0435-Clean-up-duplicated-GameProfile-Properties.patch @@ -9,10 +9,10 @@ growing to large sizes and preventing login. This now automatically cleans up the extra properties. diff --git a/src/main/java/net/minecraft/nbt/NbtUtils.java b/src/main/java/net/minecraft/nbt/NbtUtils.java -index 846f8267f7d24f52b84314483c8230c620ef2dce..c33a6d3d5700a7ec1dae2434d00cf0f480a5f0e5 100644 +index 7bc60901297d27d88efb401d02b4bc06d8b28874..6dac24354192bea79a4b9eb721543110826790b2 100644 --- a/src/main/java/net/minecraft/nbt/NbtUtils.java +++ b/src/main/java/net/minecraft/nbt/NbtUtils.java -@@ -97,7 +97,8 @@ public final class NbtUtils { +@@ -94,7 +94,8 @@ public final class NbtUtils { for(String string2 : compoundTag.getAllKeys()) { ListTag listTag = compoundTag.getList(string2, 10); diff --git a/patches/unapplied/server/0437-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0436-Convert-legacy-attributes-in-Item-Meta.patch similarity index 100% rename from patches/unapplied/server/0437-Convert-legacy-attributes-in-Item-Meta.patch rename to patches/server/0436-Convert-legacy-attributes-in-Item-Meta.patch diff --git a/patches/unapplied/server/0438-Remove-some-streams-from-structures.patch b/patches/server/0437-Remove-some-streams-from-structures.patch similarity index 100% rename from patches/unapplied/server/0438-Remove-some-streams-from-structures.patch rename to patches/server/0437-Remove-some-streams-from-structures.patch diff --git a/patches/unapplied/server/0439-Remove-streams-from-classes-related-villager-gossip.patch b/patches/server/0438-Remove-streams-from-classes-related-villager-gossip.patch similarity index 100% rename from patches/unapplied/server/0439-Remove-streams-from-classes-related-villager-gossip.patch rename to patches/server/0438-Remove-streams-from-classes-related-villager-gossip.patch diff --git a/patches/unapplied/server/0440-Support-components-in-ItemMeta.patch b/patches/server/0439-Support-components-in-ItemMeta.patch similarity index 100% rename from patches/unapplied/server/0440-Support-components-in-ItemMeta.patch rename to patches/server/0439-Support-components-in-ItemMeta.patch diff --git a/patches/unapplied/server/0441-Improve-fix-EntityTargetLivingEntityEvent.patch b/patches/server/0440-Improve-fix-EntityTargetLivingEntityEvent.patch similarity index 100% rename from patches/unapplied/server/0441-Improve-fix-EntityTargetLivingEntityEvent.patch rename to patches/server/0440-Improve-fix-EntityTargetLivingEntityEvent.patch diff --git a/patches/unapplied/server/0442-Add-entity-liquid-API.patch b/patches/server/0441-Add-entity-liquid-API.patch similarity index 90% rename from patches/unapplied/server/0442-Add-entity-liquid-API.patch rename to patches/server/0441-Add-entity-liquid-API.patch index 70543abb2d..227db87abd 100644 --- a/patches/unapplied/server/0442-Add-entity-liquid-API.patch +++ b/patches/server/0441-Add-entity-liquid-API.patch @@ -8,10 +8,10 @@ public net.minecraft.world.entity.Entity isInRain()Z public net.minecraft.world.entity.Entity isInBubbleColumn()Z diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index e900c64b8b07dc9cf47cc565e60df6781ca95756..6cc448268f786b06529f5488fa3153f6c8cc8fdf 100644 +index 13169525ce6260f6d4a0501af0f5bea284a5ba96..b1697227b34858da01603abbf7a7476494ce59be 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1273,5 +1273,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1308,5 +1308,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason() { return getHandle().spawnReason; } diff --git a/patches/unapplied/server/0443-Update-itemstack-legacy-name-and-lore.patch b/patches/server/0442-Update-itemstack-legacy-name-and-lore.patch similarity index 93% rename from patches/unapplied/server/0443-Update-itemstack-legacy-name-and-lore.patch rename to patches/server/0442-Update-itemstack-legacy-name-and-lore.patch index 5a47f65a58..d124b53a41 100644 --- a/patches/unapplied/server/0443-Update-itemstack-legacy-name-and-lore.patch +++ b/patches/server/0442-Update-itemstack-legacy-name-and-lore.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Update itemstack legacy name and lore diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 79023dace09c99587b5100de29b5b0ed3ba3fc57..ae4c8eb5c06a877c24b22e3ce15b2751449102fd 100644 +index fa83827a80335ac1075f28c9acdfe7ca2ada8790..e4e2d3676c354218e1d334a89a082c5f57a09673 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -170,6 +170,44 @@ public final class ItemStack { +@@ -171,6 +171,44 @@ public final class ItemStack { list.sort((java.util.Comparator) enchantSorter); // Paper } catch (Exception ignored) {} } @@ -53,7 +53,7 @@ index 79023dace09c99587b5100de29b5b0ed3ba3fc57..ae4c8eb5c06a877c24b22e3ce15b2751 // Paper end public ItemStack(ItemLike item) { -@@ -224,6 +262,7 @@ public final class ItemStack { +@@ -225,6 +263,7 @@ public final class ItemStack { this.tag = nbttagcompound.getCompound("tag").copy(); // CraftBukkit end this.processEnchantOrder(this.tag); // Paper diff --git a/patches/unapplied/server/0444-Spawn-player-in-correct-world-on-login.patch b/patches/server/0443-Spawn-player-in-correct-world-on-login.patch similarity index 90% rename from patches/unapplied/server/0444-Spawn-player-in-correct-world-on-login.patch rename to patches/server/0443-Spawn-player-in-correct-world-on-login.patch index d4e755e722..442759e79d 100644 --- a/patches/unapplied/server/0444-Spawn-player-in-correct-world-on-login.patch +++ b/patches/server/0443-Spawn-player-in-correct-world-on-login.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Spawn player in correct world on login diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 6876a614374adc269d2b503b1abbfeca69bd3e57..cedd57f7ee69f6e16c5cf45f7d82b3d9655746a5 100644 +index 68701c1de6d7060f65648b1404209e8c9891fccc..75ff056a8e68a1286ef6bd7fec841721951e1344 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -201,7 +201,18 @@ public abstract class PlayerList { +@@ -202,7 +202,18 @@ public abstract class PlayerList { } // CraftBukkit end diff --git a/patches/unapplied/server/0445-Add-PrepareResultEvent.patch b/patches/server/0444-Add-PrepareResultEvent.patch similarity index 89% rename from patches/unapplied/server/0445-Add-PrepareResultEvent.patch rename to patches/server/0444-Add-PrepareResultEvent.patch index 62ca3c6a39..a7ed9f86c6 100644 --- a/patches/unapplied/server/0445-Add-PrepareResultEvent.patch +++ b/patches/server/0444-Add-PrepareResultEvent.patch @@ -8,10 +8,10 @@ Adds a new event for all crafting stations that generate a result slot item Anvil, Grindstone and Smithing now extend this event diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index eb22059fe008c3d3fc0364a7f85f91b4cca8b328..506d758efbf16da9467f120321d2359a8832e477 100644 +index 0a132fbbc58f52e51f50a44e887a3f20d2e0a61c..b7a2295290227045e6426ee0f71707185d95b943 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -@@ -316,6 +316,7 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -332,6 +332,7 @@ public class AnvilMenu extends ItemCombinerMenu { } this.createResult(); @@ -20,7 +20,7 @@ index eb22059fe008c3d3fc0364a7f85f91b4cca8b328..506d758efbf16da9467f120321d2359a public int getCost() { diff --git a/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java b/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java -index 74447bd2ff36c5360db52d2a56fe3fbe56aee7d2..7733b5271307849e3e56c6089649c4caa7c0ac1d 100644 +index 8e4f331b9d90c98943e93a70b574d59cbb6d2909..310e447d8db86a322ca33d4e803b03ead8a7b202 100644 --- a/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java +++ b/src/main/java/net/minecraft/world/inventory/CartographyTableMenu.java @@ -150,6 +150,7 @@ public class CartographyTableMenu extends AbstractContainerMenu { @@ -32,7 +32,7 @@ index 74447bd2ff36c5360db52d2a56fe3fbe56aee7d2..7733b5271307849e3e56c6089649c4ca private void setupResultSlot(ItemStack map, ItemStack item, ItemStack oldResult) { diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java -index e3c3d202a9852adf32d5e94c9011c3799668419b..d610bd1468d506416fe61bf93d6be3bd0dc042a9 100644 +index 5bcd3857fd30ec43e0191a862fc9c7712149e3dd..4770f2b19847be6002f9fea9c258f8239b735589 100644 --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java @@ -159,6 +159,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -44,10 +44,10 @@ index e3c3d202a9852adf32d5e94c9011c3799668419b..d610bd1468d506416fe61bf93d6be3bd } diff --git a/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java b/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java -index a0caf5d4085305121f77089dc50e4b32cd1a8d9b..c34a66310969c3c837d09693159b827c1edddd3b 100644 +index 4087e381b2250be387b608d8742f6a6009a52879..6fc62df63c9645adeb6af69f84f7b67e9d924d74 100644 --- a/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/ItemCombinerMenu.java -@@ -78,6 +78,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { +@@ -110,6 +110,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { super.slotsChanged(inventory); if (inventory == this.inputSlots) { this.createResult(); @@ -56,7 +56,7 @@ index a0caf5d4085305121f77089dc50e4b32cd1a8d9b..c34a66310969c3c837d09693159b827c } diff --git a/src/main/java/net/minecraft/world/inventory/LoomMenu.java b/src/main/java/net/minecraft/world/inventory/LoomMenu.java -index cb08da8b5f6abc644ff5834f2ca32acf4fd0a255..b7f3dc81ecac0d814203028a9213f304bcc19574 100644 +index cdc7334b21120dde30705138436608a3af4acf05..6e2784938e1e1a29ac133567ae6c2d29429478f0 100644 --- a/src/main/java/net/minecraft/world/inventory/LoomMenu.java +++ b/src/main/java/net/minecraft/world/inventory/LoomMenu.java @@ -248,7 +248,8 @@ public class LoomMenu extends AbstractContainerMenu { @@ -70,10 +70,10 @@ index cb08da8b5f6abc644ff5834f2ca32acf4fd0a255..b7f3dc81ecac0d814203028a9213f304 this.resultSlot.set(ItemStack.EMPTY); this.selectablePatterns = List.of(); diff --git a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java -index 9c898862d665d073cccd0c33e5b0435c52fef5b6..c4cdf54dc5f7f84474a7af7ff43c5f986311b210 100644 +index d8437b76488e26451f3ed13c392fab6c2badc085..db73a4dda83a128aa0cd5f19e2f233b86479839a 100644 --- a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java +++ b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java -@@ -79,6 +79,7 @@ public class SmithingMenu extends ItemCombinerMenu { +@@ -107,6 +107,7 @@ public class SmithingMenu extends ItemCombinerMenu { } } @@ -82,7 +82,7 @@ index 9c898862d665d073cccd0c33e5b0435c52fef5b6..c4cdf54dc5f7f84474a7af7ff43c5f98 @Override diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -index 78c1bd1c709ef29ccfa75fa87d8af1217cc57b59..4ee54e3a61588e5574e3f7ba06a73bbd73975957 100644 +index 665b01ff3579c8fd87074edfc6da6b7ef07693b2..24c31e96be460bcb5062a1fcf7f86c1affc4978c 100644 --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java @@ -176,6 +176,7 @@ public class StonecutterMenu extends AbstractContainerMenu { @@ -94,7 +94,7 @@ index 78c1bd1c709ef29ccfa75fa87d8af1217cc57b59..4ee54e3a61588e5574e3f7ba06a73bbd private void setupRecipeList(Container input, ItemStack stack) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 4a260923efd062ccd72bf9c0c93255c9af73ab47..be1b4a27ccb4c7519ba9213267ab461304090b87 100644 +index eb8b13becd2d72c4cac12a11e27aa467d1901b7e..2cbe470e30807f7c54d1726a824c3c265fd3265c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1593,26 +1593,53 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0446-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0445-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch similarity index 82% rename from patches/unapplied/server/0446-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch rename to patches/server/0445-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch index a17ad58ea2..0f403623fe 100644 --- a/patches/unapplied/server/0446-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch +++ b/patches/server/0445-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 8cea2de440c1f45e376067c1adda3ea67dce2fe5..408d5ccfe450a4f12d9cc37d15dbc6e817c49cca 100644 +index b0a57ff0780c3f37110a9c3640f29cb08daa52d5..164c22a70f4b916615da36819cae09d94cd88d39 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3471,7 +3471,7 @@ public abstract class LivingEntity extends Entity { +@@ -3435,7 +3435,7 @@ public abstract class LivingEntity extends Entity implements Attackable { Entity entity = this.getVehicle(); super.stopRiding(suppressCancellation); // Paper - suppress diff --git a/patches/unapplied/server/0447-Optimize-NetworkManager-Exception-Handling.patch b/patches/server/0446-Optimize-NetworkManager-Exception-Handling.patch similarity index 93% rename from patches/unapplied/server/0447-Optimize-NetworkManager-Exception-Handling.patch rename to patches/server/0446-Optimize-NetworkManager-Exception-Handling.patch index fa890ce570..f634c90cf4 100644 --- a/patches/unapplied/server/0447-Optimize-NetworkManager-Exception-Handling.patch +++ b/patches/server/0446-Optimize-NetworkManager-Exception-Handling.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize NetworkManager Exception Handling diff --git a/src/main/java/net/minecraft/network/ConnectionProtocol.java b/src/main/java/net/minecraft/network/ConnectionProtocol.java -index 1c243b60bf955841d69d1a5ace9d243edf88a6fb..19f05a2d202e3b71391d20acbf54392f644978e4 100644 +index c4c1fc4e082d4d35327735e0704ada4e96195db2..fe66da8bfec647fc0ef5f26476877e6aff6da546 100644 --- a/src/main/java/net/minecraft/network/ConnectionProtocol.java +++ b/src/main/java/net/minecraft/network/ConnectionProtocol.java -@@ -300,6 +300,7 @@ public enum ConnectionProtocol { +@@ -329,6 +329,7 @@ public enum ConnectionProtocol implements BundlerInfo.Provider { @Nullable public Packet createPacket(int id, FriendlyByteBuf buf) { @@ -43,7 +43,7 @@ index 99b581052f937b0f2d6b5d73de699008c1d51774..81ec2011a93bb94200ad750f4666ba1c for(int i = 0; i < bs.length; ++i) { if (!byteBuf.isReadable()) { diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 049e64c355d5f064009b1107ad15d28c44f999dd..acfa1907bfc9c29d261cfccc00d65bad9ad1a002 100644 +index 4a1148a76020089caf01f888f87afdbb35788dc0..46d9ad9cd8002770c26ed61f98593af71f534e71 100644 --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java @@ -30,11 +30,15 @@ public class PacketUtils { diff --git a/patches/unapplied/server/0449-Fix-arrows-never-despawning-MC-125757.patch b/patches/server/0447-Fix-arrows-never-despawning-MC-125757.patch similarity index 91% rename from patches/unapplied/server/0449-Fix-arrows-never-despawning-MC-125757.patch rename to patches/server/0447-Fix-arrows-never-despawning-MC-125757.patch index 18bb8a0b53..3a2912d8b1 100644 --- a/patches/unapplied/server/0449-Fix-arrows-never-despawning-MC-125757.patch +++ b/patches/server/0447-Fix-arrows-never-despawning-MC-125757.patch @@ -9,7 +9,7 @@ instead of getting stuck in a never despawn state (bubble columns, etc). diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 915c15faa510f4bdd3a96d8ba83280f08b12dec6..f427ad266a1e00adb661b9e4bc7cfe2a7ec52caa 100644 +index 01ccd4f90ad8aed84a89630cf6df9f7ba9bc3fec..6486fa86e4bf3c90c09c0425d825bab568a68757 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -200,6 +200,7 @@ public abstract class AbstractArrow extends Projectile { diff --git a/patches/unapplied/server/0450-Thread-Safe-Vanilla-Command-permission-checking.patch b/patches/server/0448-Thread-Safe-Vanilla-Command-permission-checking.patch similarity index 100% rename from patches/unapplied/server/0450-Thread-Safe-Vanilla-Command-permission-checking.patch rename to patches/server/0448-Thread-Safe-Vanilla-Command-permission-checking.patch diff --git a/patches/unapplied/server/0451-Fix-SPIGOT-5989.patch b/patches/server/0449-Fix-SPIGOT-5989.patch similarity index 90% rename from patches/unapplied/server/0451-Fix-SPIGOT-5989.patch rename to patches/server/0449-Fix-SPIGOT-5989.patch index efe47d8eec..2b75a88bfc 100644 --- a/patches/unapplied/server/0451-Fix-SPIGOT-5989.patch +++ b/patches/server/0449-Fix-SPIGOT-5989.patch @@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is still at a respawn anchor. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index cedd57f7ee69f6e16c5cf45f7d82b3d9655746a5..02ac22774a5d3092309e88b89ba784f741482150 100644 +index 75ff056a8e68a1286ef6bd7fec841721951e1344..391375642822d95f6d874a26d41b27ec4f4b8c08 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -773,6 +773,7 @@ public abstract class PlayerList { +@@ -780,6 +780,7 @@ public abstract class PlayerList { // Paper start boolean isBedSpawn = false; boolean isRespawn = false; @@ -21,7 +21,7 @@ index cedd57f7ee69f6e16c5cf45f7d82b3d9655746a5..02ac22774a5d3092309e88b89ba784f7 // Paper end // CraftBukkit start - fire PlayerRespawnEvent -@@ -783,7 +784,7 @@ public abstract class PlayerList { +@@ -790,7 +791,7 @@ public abstract class PlayerList { Optional optional; if (blockposition != null) { @@ -30,7 +30,7 @@ index cedd57f7ee69f6e16c5cf45f7d82b3d9655746a5..02ac22774a5d3092309e88b89ba784f7 } else { optional = Optional.empty(); } -@@ -827,7 +828,12 @@ public abstract class PlayerList { +@@ -834,7 +835,12 @@ public abstract class PlayerList { } // Spigot End @@ -44,7 +44,7 @@ index cedd57f7ee69f6e16c5cf45f7d82b3d9655746a5..02ac22774a5d3092309e88b89ba784f7 if (!flag) entityplayer.reset(); // SPIGOT-4785 isRespawn = true; // Paper } else { -@@ -867,8 +873,14 @@ public abstract class PlayerList { +@@ -874,8 +880,14 @@ public abstract class PlayerList { } // entityplayer1.initInventoryMenu(); entityplayer1.setHealth(entityplayer1.getHealth()); diff --git a/patches/unapplied/server/0452-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/patches/server/0450-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch similarity index 96% rename from patches/unapplied/server/0452-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch rename to patches/server/0450-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch index d00eb7cdf5..8f7b49fc0c 100644 --- a/patches/unapplied/server/0452-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch +++ b/patches/server/0450-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SPIGOT-5824 Bukkit world-container is not used diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index c5224aac75df248df57018b6245f909f19904d7d..1cb5630dbeed601372f48aee2911f0f4530fdc93 100644 +index 12ff7071a5b78a8ae5567aa42b69191166a7cbca..51640f991f23ad9c10a969a2c8100bcfab882050 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -158,8 +158,17 @@ public class Main { +@@ -169,8 +169,17 @@ public class Main { return; } diff --git a/patches/unapplied/server/0453-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch b/patches/server/0451-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch similarity index 85% rename from patches/unapplied/server/0453-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch rename to patches/server/0451-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch index ece7da1e6a..297822e86c 100644 --- a/patches/unapplied/server/0453-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch +++ b/patches/server/0451-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SPIGOT-5885 Unable to disable advancements diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 1cb5630dbeed601372f48aee2911f0f4530fdc93..f935ab8e797b9ae6236c1bcce4bccfd9d0048182 100644 +index 51640f991f23ad9c10a969a2c8100bcfab882050..5516888e72adf3f0b39119ed4f24e9aab09b1f37 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -158,6 +158,7 @@ public class Main { +@@ -169,6 +169,7 @@ public class Main { return; }