diff --git a/patches/unapplied/server/0342-Anti-Xray.patch b/patches/server/0341-Anti-Xray.patch similarity index 98% rename from patches/unapplied/server/0342-Anti-Xray.patch rename to patches/server/0341-Anti-Xray.patch index 74a754174b..3ab41bd0f8 100644 --- a/patches/unapplied/server/0342-Anti-Xray.patch +++ b/patches/server/0341-Anti-Xray.patch @@ -1104,10 +1104,10 @@ index be89e5b8c1ea7f85aef267a15986affa5fa1fd4b..43472855136f26b282d94fd241853d86 public ClientboundLevelChunkWithLightPacket(FriendlyByteBuf buf) { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 88cde9de26d3da3d863a9d44f5c127eed0a1f4b6..90c80bc7fc7d6f9b91d9f9953d19eef021435780 100644 +index 84a3f0d2b9c3ad2c1ad1cb68a154155c065a2a32..86403239e04ddf7afc3c1c1f1badb3ca53b6f26b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -566,7 +566,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -568,7 +568,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // Holder holder = worlddimension.type(); // CraftBukkit - decompile error // Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error @@ -1117,7 +1117,7 @@ index 88cde9de26d3da3d863a9d44f5c127eed0a1f4b6..90c80bc7fc7d6f9b91d9f9953d19eef0 this.convertable = convertable_conversionsession; this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile()); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index c15d2b8862139a6f083547794617d8bd6c462287..0ff4372afa4b159acc59e3dbd2e9efbd7b7ab6a2 100644 +index 79020edc9fac79e8b186d0f57f956d2189d3dc8e..b7e6d8441e8444c36919c126a8adeaeed02df08c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerInteractEvent; @@ -1155,10 +1155,10 @@ index 5de5209e04d631bd6a50e28e8d3abebf148252c1..19b3f4fa7678a038bf25efc2a8b46dda DebugPackets.sendPoiPacketsForChunk(world, chunkPos); } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57d556121e 100644 +index c9c7c9934a672adb1529aabc26f7f8bb5829b931..48b264c5e50a33ee9a1d60bf592964eb1b6c79ce 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -175,6 +175,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -178,6 +178,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } // Paper end @@ -1166,7 +1166,7 @@ index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57 public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPos lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -193,7 +194,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -196,7 +197,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public abstract ResourceKey getTypeKey(); @@ -1175,7 +1175,7 @@ index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57 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; -@@ -279,6 +280,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -282,6 +283,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime); @@ -1183,7 +1183,7 @@ index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57 } // Paper start -@@ -544,6 +546,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -547,6 +549,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 @@ -1558,10 +1558,10 @@ index 545b14f02ac72dda30891d681eba585d19fd5e1d..6dc7e23e96aaffb912611a9dbd41459c private static final byte[] EMPTY_LIGHT = new byte[2048]; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 53f387da05ed3c9e981cea2141c42fe630b49892..871a1095d28bde74cfb63091d77c860f92a2ea0e 100644 +index 431750425e90b1e9d6b886e41a6d23d14b26b8ce..729a65973beb1079e393a633488535c3ecaeefa1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2341,7 +2341,7 @@ public final class CraftServer implements Server { +@@ -2373,7 +2373,7 @@ public final class CraftServer implements Server { public ChunkGenerator.ChunkData createChunkData(World world) { Preconditions.checkArgument(world != null, "World cannot be null"); ServerLevel handle = ((CraftWorld) world).getHandle(); @@ -1571,10 +1571,10 @@ index 53f387da05ed3c9e981cea2141c42fe630b49892..871a1095d28bde74cfb63091d77c860f @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 217aac550c3bed7ccb12ed8e8da9294652345d41..2d9a298e6f364d7ea6fec689833a72b58aba3c17 100644 +index 4b3d04d891edda8c02470bae189fbf17eb4e8a36..fcf2571a7aa9e93a82171d4a8ae8c11ee7452994 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -421,11 +421,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -422,11 +422,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { List playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false); if (playersInRange.isEmpty()) return true; // Paper - rewrite player chunk loader diff --git a/patches/unapplied/server/0343-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/0342-Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 94% rename from patches/unapplied/server/0343-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to patches/server/0342-Bees-get-gravity-in-void.-Fixes-MC-167279.patch index e561797b3b..60204a5824 100644 --- a/patches/unapplied/server/0343-Bees-get-gravity-in-void.-Fixes-MC-167279.patch +++ b/patches/server/0342-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 98b0b91a8033ae297fee3fe655ee641e9ab08154..27e3bed06cfb5c36125b55c4862fca94ade26a09 100644 +index 0f7b02d39b5dc781e65537c1b6d924e6c51e5dc7..d9297c0b2934084a065af7d7c93af8d44c3de8e1 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java @@ -147,7 +147,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { diff --git a/patches/unapplied/server/0344-Improve-Block-breakNaturally-API.patch b/patches/server/0343-Improve-Block-breakNaturally-API.patch similarity index 92% rename from patches/unapplied/server/0344-Improve-Block-breakNaturally-API.patch rename to patches/server/0343-Improve-Block-breakNaturally-API.patch index 27a3b4f8bb..b5d4bf1b2e 100644 --- a/patches/unapplied/server/0344-Improve-Block-breakNaturally-API.patch +++ b/patches/server/0343-Improve-Block-breakNaturally-API.patch @@ -18,10 +18,10 @@ 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 6f9cb55491da718cd6564425748ab3852fda9b68..5fbdc96f29e29dfc092b9e84a988032db0fa36ab 100644 +index c919b5a382b1bfcafd938ff926d9146cc5cf0cdc..f05998e0af1e844f19bf86b74f652a9901088c37 100644 --- a/src/main/java/net/minecraft/world/level/block/IceBlock.java +++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java -@@ -27,6 +27,11 @@ public class IceBlock extends HalfTransparentBlock { +@@ -35,6 +35,11 @@ public class IceBlock extends HalfTransparentBlock { @Override public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) { super.playerDestroy(world, player, pos, state, blockEntity, tool); @@ -34,10 +34,10 @@ index 6f9cb55491da718cd6564425748ab3852fda9b68..5fbdc96f29e29dfc092b9e84a988032d 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 -index b25ebc5f1c54ea3ecc38e96b79e5cca88aafb816..35e264172688be6cf6e82d948f591893d97a43aa 100644 +index 7f2e4fd1d81d6439475f30e62f0348f38bbc985d..d0b1a419c9bc73066d79459dc3e5998160f8038b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -451,6 +451,18 @@ public class CraftBlock implements Block { +@@ -452,6 +452,18 @@ public class CraftBlock implements Block { @Override public boolean breakNaturally(ItemStack item) { @@ -56,7 +56,7 @@ index b25ebc5f1c54ea3ecc38e96b79e5cca88aafb816..35e264172688be6cf6e82d948f591893 // Order matters here, need to drop before setting to air so skulls can get their data net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS(); net.minecraft.world.level.block.Block block = iblockdata.getBlock(); -@@ -460,11 +472,35 @@ public class CraftBlock implements Block { +@@ -461,11 +473,35 @@ public class CraftBlock implements Block { // Modelled off EntityHuman#hasBlock if (block != Blocks.AIR && (item == null || !iblockdata.requiresCorrectToolForDrops() || nmsItem.isCorrectToolForDrops(iblockdata))) { net.minecraft.world.level.block.Block.dropResources(iblockdata, this.world.getMinecraftWorld(), this.position, this.world.getBlockEntity(this.position), null, nmsItem); diff --git a/patches/unapplied/server/0345-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0344-Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 92% rename from patches/unapplied/server/0345-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to patches/server/0344-Optimise-getChunkAt-calls-for-loaded-chunks.patch index e48d184ea9..8270dafbce 100644 --- a/patches/unapplied/server/0345-Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/patches/server/0344-Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either, then unwrap it... diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index ce8afee7d1db99de43c9ec47edcbc929e025b159..8f5d30ad2cf6274bc6a1721be9ccde8dac0be333 100644 +index 9478b18839932af463181311586c7f590c497356..9adc447e89395f4d8564b0db7829ffccbb0f2344 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -270,6 +270,12 @@ public class ServerChunkCache extends ChunkSource { +@@ -268,6 +268,12 @@ public class ServerChunkCache extends ChunkSource { return this.getChunk(x, z, leastStatus, create); }, this.mainThreadProcessor).join(); } else { @@ -23,7 +23,7 @@ index ce8afee7d1db99de43c9ec47edcbc929e025b159..8f5d30ad2cf6274bc6a1721be9ccde8d ProfilerFiller gameprofilerfiller = this.level.getProfiler(); gameprofilerfiller.incrementCounter("getChunk"); -@@ -313,39 +319,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -311,39 +317,7 @@ public class ServerChunkCache extends ChunkSource { if (!io.papermc.paper.util.TickThread.isTickThread()) { // Paper - rewrite chunk system return null; } else { diff --git a/patches/unapplied/server/0346-Add-debug-for-sync-chunk-loads.patch b/patches/server/0345-Add-debug-for-sync-chunk-loads.patch similarity index 97% rename from patches/unapplied/server/0346-Add-debug-for-sync-chunk-loads.patch rename to patches/server/0345-Add-debug-for-sync-chunk-loads.patch index c6b69e9ed2..4d4066f24b 100644 --- a/patches/unapplied/server/0346-Add-debug-for-sync-chunk-loads.patch +++ b/patches/server/0345-Add-debug-for-sync-chunk-loads.patch @@ -300,10 +300,10 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 8f5d30ad2cf6274bc6a1721be9ccde8dac0be333..e27067e72a49e127aa4abb17f5ed1df09f943f3c 100644 +index 9adc447e89395f4d8564b0db7829ffccbb0f2344..3a8a4757b9b39b48cbedd65620a114130ae6ab1c 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -294,6 +294,7 @@ public class ServerChunkCache extends ChunkSource { +@@ -292,6 +292,7 @@ public class ServerChunkCache extends ChunkSource { // Paper start - async chunk io/loading io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.pushChunkWait(this.level, x1, z1); // Paper - rewrite chunk system // Paper end @@ -312,10 +312,10 @@ index 8f5d30ad2cf6274bc6a1721be9ccde8dac0be333..e27067e72a49e127aa4abb17f5ed1df0 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 90c80bc7fc7d6f9b91d9f9953d19eef021435780..6c8fa0ed1e445e77593b6d26c09eeaac1437787d 100644 +index 86403239e04ddf7afc3c1c1f1badb3ca53b6f26b..da59ce7c1eda353d0a5479317f347d78a70e0f95 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -645,6 +645,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -647,6 +647,13 @@ public class ServerLevel extends Level implements WorldGenLevel { this.entityLookup = new io.papermc.paper.chunk.system.entity.EntityLookup(this, new EntityCallbacks()); // Paper - rewrite chunk system } diff --git a/patches/unapplied/server/0347-Improve-java-version-check.patch b/patches/server/0346-Improve-java-version-check.patch similarity index 96% rename from patches/unapplied/server/0347-Improve-java-version-check.patch rename to patches/server/0346-Improve-java-version-check.patch index b5c206c627..b4f24c7c5f 100644 --- a/patches/unapplied/server/0347-Improve-java-version-check.patch +++ b/patches/server/0346-Improve-java-version-check.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Improve java version check Co-Authored-By: MiniDigger diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index ec442f1a6437f449d55739b990a4b69fcd48e8e0..a288b405052716ba13adefe43ef2006c8bf6242d 100644 +index bb2ed43dccac698ea7265739bc1ed253f345d314..17d74aa6d857e49b61f5aed30be2b17be871df4c 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -201,23 +201,27 @@ public class Main { diff --git a/patches/unapplied/server/0348-Add-ThrownEggHatchEvent.patch b/patches/server/0347-Add-ThrownEggHatchEvent.patch similarity index 84% rename from patches/unapplied/server/0348-Add-ThrownEggHatchEvent.patch rename to patches/server/0347-Add-ThrownEggHatchEvent.patch index aaf3812fef..a98738a89e 100644 --- a/patches/unapplied/server/0348-Add-ThrownEggHatchEvent.patch +++ b/patches/server/0347-Add-ThrownEggHatchEvent.patch @@ -7,7 +7,7 @@ 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 88e8ce770ddc61702fc87cd8dcee498183dc1032..588e5ac6fc9b2d12be3bb80bc3fe50d81470c441 100644 +index 98d42143e70c5be809deb6c03270987ff9db46d5..b64ecadae45c2126b92963ac8d118dde76126ddd 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java @@ -82,6 +82,13 @@ public class ThrownEgg extends ThrowableItemProjectile { @@ -23,4 +23,4 @@ index 88e8ce770ddc61702fc87cd8dcee498183dc1032..588e5ac6fc9b2d12be3bb80bc3fe50d8 + // Paper end for (int i = 0; i < b0; ++i) { - Entity entitychicken = this.level().getWorld().createEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit + Entity entitychicken = this.level().getWorld().makeEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit diff --git a/patches/unapplied/server/0349-Entity-Jump-API.patch b/patches/server/0348-Entity-Jump-API.patch similarity index 92% rename from patches/unapplied/server/0349-Entity-Jump-API.patch rename to patches/server/0348-Entity-Jump-API.patch index a77e75d1bc..4d9564b5bf 100644 --- a/patches/unapplied/server/0349-Entity-Jump-API.patch +++ b/patches/server/0348-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 c95c7619820d1dbabc52ae8ccef88e03a2f1d9a3..63e00b3aa1b31c14fc4630fb4b2d3355349bdf24 100644 +index cde3525320bd7f42c0664e2087d54fa75b7bfb70..2d28d9a42e89b7efadd4e798c3da61565221a5bd 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3281,8 +3281,10 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3283,8 +3283,10 @@ public abstract class LivingEntity extends Entity implements Attackable { } else if (this.isInLava() && (!this.onGround() || d3 > d4)) { this.jumpInLiquid(FluidTags.LAVA); } else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) { @@ -48,10 +48,10 @@ index 344e933311f5cdccb66069d486b111a003639dfe..add3cd866452df727107e94fb2039bdd } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 9e15c5e2adfb46ffa3548b3a2eda225de4c44fb5..904f34f52659e864d148204cb0eebb9b381cc24a 100644 +index e8cc06162f97eef14c47f2e19a979c6b92aa3252..1b7f2a23d475727644e22a60de0b2c7bfa7ca68f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -906,5 +906,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -911,5 +911,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public org.bukkit.inventory.EquipmentSlot getHandRaised() { return getHandle().getUsedItemHand() == net.minecraft.world.InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND; } diff --git a/patches/unapplied/server/0350-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0349-Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 78% rename from patches/unapplied/server/0350-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/0349-Add-option-to-nerf-pigmen-from-nether-portals.patch index 248b3d2aae..ccf77613b9 100644 --- a/patches/unapplied/server/0350-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/0349-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 7ba9b07c4f3335fabc3aeb28cdcd331b0c5ada86..15b807c0a49461ae5daecd6aef43f5c2d464b224 100644 +index 2e6b700b3648d716f63dca46019f425d2919e912..aba3e8e8873ef9b782382b09c6f5e243744c18b8 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -392,6 +392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -397,6 +397,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S // Paper start public long activatedImmunityTick = Integer.MIN_VALUE; // Paper public boolean isTemporarilyActive = false; // Paper @@ -16,7 +16,7 @@ index 7ba9b07c4f3335fabc3aeb28cdcd331b0c5ada86..15b807c0a49461ae5daecd6aef43f5c2 protected int numCollisions = 0; // Paper public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one @javax.annotation.Nullable -@@ -2208,6 +2209,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2231,6 +2232,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S if (spawnedViaMobSpawner) { nbt.putBoolean("Paper.FromMobSpawner", true); } @@ -24,9 +24,9 @@ index 7ba9b07c4f3335fabc3aeb28cdcd331b0c5ada86..15b807c0a49461ae5daecd6aef43f5c2 + nbt.putBoolean("Paper.FromNetherPortal", true); + } // Paper end - return nbt; + return nbttagcompound; } catch (Throwable throwable) { -@@ -2350,6 +2354,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2373,6 +2377,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status @@ -35,10 +35,10 @@ index 7ba9b07c4f3335fabc3aeb28cdcd331b0c5ada86..15b807c0a49461ae5daecd6aef43f5c2 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 47c99d86be833b7c6f9f76c76897fb89d6fca712..69f34c566bf825259253abbefd7d7ba2e847231b 100644 +index c9ff8a3fd8d65033ce5a476e8ceaf9d1b8e2d887..4e52e92846428b0d01635b90f3480b4a2c13a0b4 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 { +@@ -71,6 +71,8 @@ public class NetherPortalBlock extends Block { if (entity != null) { entity.setPortalCooldown(); diff --git a/patches/unapplied/server/0351-Make-the-GUI-graph-fancier.patch b/patches/server/0350-Make-the-GUI-graph-fancier.patch similarity index 100% rename from patches/unapplied/server/0351-Make-the-GUI-graph-fancier.patch rename to patches/server/0350-Make-the-GUI-graph-fancier.patch diff --git a/patches/unapplied/server/0352-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0351-add-hand-to-BlockMultiPlaceEvent.patch similarity index 93% rename from patches/unapplied/server/0352-add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/0351-add-hand-to-BlockMultiPlaceEvent.patch index 1fca97a93b..19cf75394b 100644 --- a/patches/unapplied/server/0352-add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/server/0351-add-hand-to-BlockMultiPlaceEvent.patch @@ -5,7 +5,7 @@ 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 ee1be98a7844e983e46cf4ef6f0da1aa1b8c1c1d..96e33c433605ae2e0473b36f03894e030e79cd0d 100644 +index 64ab19fdc94164f6be505dd1d2c79cf339832813..a63ff3a8286f323f7f5891aa33fdd72b9e2260b0 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -403,13 +403,18 @@ public class CraftEventFactory { diff --git a/patches/server/0352-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0352-Validate-tripwire-hook-placement-before-update.patch new file mode 100644 index 0000000000..65b54af128 --- /dev/null +++ b/patches/server/0352-Validate-tripwire-hook-placement-before-update.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Shane Freeder +Date: Sat, 7 Mar 2020 00:07:51 +0000 +Subject: [PATCH] Validate tripwire hook placement before update + + +diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +index eed36b6736a4f971022fdbce989da03f42794bb5..02b62ac13d4968f80cb0ae3702755d0f1d95e692 100644 +--- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java +@@ -188,6 +188,7 @@ public class TripWireHookBlock extends Block { + + TripWireHookBlock.emitState(world, pos, flag4, flag5, flag2, flag3); + if (!flag) { ++ if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate + world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3); + if (flag1) { + TripWireHookBlock.notifyNeighbors(block, world, pos, enumdirection); diff --git a/patches/unapplied/server/0354-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0353-Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 100% rename from patches/unapplied/server/0354-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/0353-Add-option-to-allow-iron-golems-to-spawn-in-air.patch diff --git a/patches/unapplied/server/0355-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0354-Configurable-chance-of-villager-zombie-infection.patch similarity index 100% rename from patches/unapplied/server/0355-Configurable-chance-of-villager-zombie-infection.patch rename to patches/server/0354-Configurable-chance-of-villager-zombie-infection.patch diff --git a/patches/unapplied/server/0356-Optimise-Chunk-getFluid.patch b/patches/server/0355-Optimise-Chunk-getFluid.patch similarity index 100% rename from patches/unapplied/server/0356-Optimise-Chunk-getFluid.patch rename to patches/server/0355-Optimise-Chunk-getFluid.patch diff --git a/patches/unapplied/server/0357-Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/0356-Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 100% rename from patches/unapplied/server/0357-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/0356-Set-spigots-verbose-world-setting-to-false-by-def.patch diff --git a/patches/unapplied/server/0358-Add-tick-times-API-and-mspt-command.patch b/patches/server/0357-Add-tick-times-API-and-mspt-command.patch similarity index 89% rename from patches/unapplied/server/0358-Add-tick-times-API-and-mspt-command.patch rename to patches/server/0357-Add-tick-times-API-and-mspt-command.patch index c78450b742..5ef254cd12 100644 --- a/patches/unapplied/server/0358-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0357-Add-tick-times-API-and-mspt-command.patch @@ -125,13 +125,13 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7 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 ef6d98d503fdca4322000278de4cf325df56f99d..f700e677d75f911b786a22b4cc9d0a016d99b02f 100644 +index 96fd66ed2742a79064852af6e936830ddaf14f4c..2deb639d404943ef5b028c4ede59cab99b31a40f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -247,6 +247,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 6c8fa0ed1e445e77593b6d26c09eeaac1437787d..0353b3e3a9d9a0bd44f48a61a02811ec0bad186a 100644 +index da59ce7c1eda353d0a5479317f347d78a70e0f95..a2c3a4b70ba4694fa6ce013bdf601e08f30cadae 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2466,7 +2466,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2502,7 +2502,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 6c8fa0ed1e445e77593b6d26c09eeaac1437787d..0353b3e3a9d9a0bd44f48a61a02811ec if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -2500,6 +2500,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2536,6 +2536,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.valid = true; // CraftBukkit diff --git a/patches/unapplied/server/0365-Don-t-tick-dead-players.patch b/patches/server/0364-Don-t-tick-dead-players.patch similarity index 85% rename from patches/unapplied/server/0365-Don-t-tick-dead-players.patch rename to patches/server/0364-Don-t-tick-dead-players.patch index ba510841bd..7e658ff419 100644 --- a/patches/unapplied/server/0365-Don-t-tick-dead-players.patch +++ b/patches/server/0364-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 100bcf5174c06bb4450f0056bb5b5ef610ee1da6..d35b358ec97762788fd72b37470d97f1d6d927ef 100644 +index 956c0090992a64860bed2c5f72991d86a528b7ba..4c0968ee547fe606b340ab28dfd391716745bc3f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -725,7 +725,7 @@ public class ServerPlayer extends Player { +@@ -732,7 +732,7 @@ public class ServerPlayer extends Player { public void doTick() { try { diff --git a/patches/unapplied/server/0366-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0365-Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 84% rename from patches/unapplied/server/0366-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to patches/server/0365-Dead-Player-s-shouldn-t-be-able-to-move.patch index e2aba05613..d5254786f8 100644 --- a/patches/unapplied/server/0366-Dead-Player-s-shouldn-t-be-able-to-move.patch +++ b/patches/server/0365-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 cc6a9e9566d6f9bf453f3d6fba132c886248bf1c..fb3f65feab6f5febf58be71f0b9b1a4381958f1d 100644 +index 110c751dc108dbdc2fd9fdd25ca07df7acc723e5..4bac05cb48d81dc9776d90502b6f12285b92122b 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1166,7 +1166,7 @@ public abstract class Player extends LivingEntity { +@@ -1161,7 +1161,7 @@ public abstract class Player extends LivingEntity { @Override protected boolean isImmobile() { diff --git a/patches/unapplied/server/0367-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0366-Optimize-Collision-to-not-load-chunks.patch similarity index 95% rename from patches/unapplied/server/0367-Optimize-Collision-to-not-load-chunks.patch rename to patches/server/0366-Optimize-Collision-to-not-load-chunks.patch index b01a858ade..2be6231d77 100644 --- a/patches/unapplied/server/0367-Optimize-Collision-to-not-load-chunks.patch +++ b/patches/server/0366-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 c5287f08c675550c897d72fd7eff3331d0640800..211cc5e508473f14827910aef88ee75a1203edab 100644 +index 29f1182026dade5b846ac411ff11260dbc9b5bc9..0d662f0c7530538e39001d5cf52ee00246a20092 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -824,6 +824,7 @@ public abstract class PlayerList { +@@ -822,6 +822,7 @@ public abstract class PlayerList { entityplayer1.setShiftKeyDown(false); entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); @@ -26,10 +26,10 @@ index c5287f08c675550c897d72fd7eff3331d0640800..211cc5e508473f14827910aef88ee75a // CraftBukkit end 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 15b807c0a49461ae5daecd6aef43f5c2d464b224..2f189712675b988a5bbb796abf54740470d836f4 100644 +index aba3e8e8873ef9b782382b09c6f5e243744c18b8..28b69ad104810721bb8c78fe4bda616e8598109f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -237,6 +237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -238,6 +238,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason; // Paper public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper diff --git a/patches/unapplied/server/0368-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0367-Don-t-move-existing-players-to-world-spawn.patch similarity index 86% rename from patches/unapplied/server/0368-Don-t-move-existing-players-to-world-spawn.patch rename to patches/server/0367-Don-t-move-existing-players-to-world-spawn.patch index 8910722e11..18e26db623 100644 --- a/patches/unapplied/server/0368-Don-t-move-existing-players-to-world-spawn.patch +++ b/patches/server/0367-Don-t-move-existing-players-to-world-spawn.patch @@ -13,10 +13,10 @@ 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 d35b358ec97762788fd72b37470d97f1d6d927ef..a5dd060ad0b978fddbc193feb8bbab99342b4d56 100644 +index 4c0968ee547fe606b340ab28dfd391716745bc3f..ff0191dd75b5014e224db8f1419dcec240cb1436 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -378,7 +378,7 @@ public class ServerPlayer extends Player { +@@ -385,7 +385,7 @@ public class ServerPlayer extends Player { this.stats = server.getPlayerList().getPlayerStats(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this); this.setMaxUpStep(1.0F); @@ -25,7 +25,7 @@ index d35b358ec97762788fd72b37470d97f1d6d927ef..a5dd060ad0b978fddbc193feb8bbab99 this.updateOptions(clientOptions); this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -612,7 +612,7 @@ public class ServerPlayer extends Player { +@@ -619,7 +619,7 @@ public class ServerPlayer extends Player { position = Vec3.atCenterOf(world.getSharedSpawnPos()); } this.setLevel(world); @@ -35,10 +35,10 @@ index d35b358ec97762788fd72b37470d97f1d6d927ef..a5dd060ad0b978fddbc193feb8bbab99 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 211cc5e508473f14827910aef88ee75a1203edab..f894d6549e4abf1001de68c8bc3ea0129e973e18 100644 +index 0d662f0c7530538e39001d5cf52ee00246a20092..1b49ac7da3c28712eeec7a5a3771105d4b28e3fa 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -228,6 +228,7 @@ public abstract class PlayerList { +@@ -226,6 +226,7 @@ public abstract class PlayerList { // Paper start if (nbttagcompound == null) { player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login diff --git a/patches/unapplied/server/0369-Optimize-GoalSelector-Goal.Flag-Set-operations.patch b/patches/server/0368-Optimize-GoalSelector-Goal.Flag-Set-operations.patch similarity index 100% rename from patches/unapplied/server/0369-Optimize-GoalSelector-Goal.Flag-Set-operations.patch rename to patches/server/0368-Optimize-GoalSelector-Goal.Flag-Set-operations.patch diff --git a/patches/unapplied/server/0370-Improved-Watchdog-Support.patch b/patches/server/0369-Improved-Watchdog-Support.patch similarity index 94% rename from patches/unapplied/server/0370-Improved-Watchdog-Support.patch rename to patches/server/0369-Improved-Watchdog-Support.patch index 934b465bbd..df3f3a06a9 100644 --- a/patches/unapplied/server/0370-Improved-Watchdog-Support.patch +++ b/patches/server/0369-Improved-Watchdog-Support.patch @@ -59,10 +59,10 @@ index 6aaed8e8bf8c721fc834da5c76ac72a4c3e92458..4b002e8b75d117b726b0de274a76d359 // Many servers tend to restart at a fixed time at xx:00 which causes an uneven distribution of requests on the // bStats backend. To circumvent this problem, we introduce some randomness into the initial and second delay. diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java -index d7995cadda8f48bbf642114935311180d3ebde5b..226cba0c1eeedd9e80acd603c46b802c183db1fa 100644 +index a9a0248b1bd1ac454064e977b61f9b7d80962ff8..059b1a0bf048af6a28c322f35da3d3cbbe426546 100644 --- a/src/main/java/net/minecraft/CrashReport.java +++ b/src/main/java/net/minecraft/CrashReport.java -@@ -230,6 +230,7 @@ public class CrashReport { +@@ -233,6 +233,7 @@ public class CrashReport { } public static CrashReport forThrowable(Throwable cause, String title) { @@ -71,10 +71,10 @@ index d7995cadda8f48bbf642114935311180d3ebde5b..226cba0c1eeedd9e80acd603c46b802c cause = cause.getCause(); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b2151e1604d 100644 +index 2deb639d404943ef5b028c4ede59cab99b31a40f..08f7f287af32597d8a39f429013adec9266020bf 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -291,7 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public Commands vanillaCommandDispatcher; @@ -83,7 +83,7 @@ index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b21 // CraftBukkit end // Spigot start public static final int TPS = 20; -@@ -302,6 +302,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 -@@ -868,6 +871,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 63e00b3aa1b31c14fc4630fb4b2d3355349bdf24..ad0c8e43d27feb24e614fa15569edab625eff875 100644 +index 2d28d9a42e89b7efadd4e798c3da61565221a5bd..8577eb85cfe6d061e9e8b7e380db452a8c4ec858 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3396,10 +3396,24 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3398,10 +3398,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/0376-Implement-Player-Client-Options-API.patch b/patches/server/0375-Implement-Player-Client-Options-API.patch similarity index 95% rename from patches/unapplied/server/0376-Implement-Player-Client-Options-API.patch rename to patches/server/0375-Implement-Player-Client-Options-API.patch index 1ca4e57468..3b6119bb30 100644 --- a/patches/unapplied/server/0376-Implement-Player-Client-Options-API.patch +++ b/patches/server/0375-Implement-Player-Client-Options-API.patch @@ -87,10 +87,10 @@ 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 b5e42c3602f45a5b540dfc54421ab22866f2e4d9..983b006d6db81bbc285fceac23ea4b9f15b2029b 100644 +index 3a026f766e2d67e005ae8a06337d465f92c8d1f3..352fbab070ccdb683e9a7558292c86cc443c018b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -379,7 +379,7 @@ public class ServerPlayer extends Player { +@@ -386,7 +386,7 @@ public class ServerPlayer extends Player { this.advancements = server.getPlayerList().getPlayerAdvancements(this); this.setMaxUpStep(1.0F); // this.fudgeSpawnLocation(world); // Paper - don't move to spawn on login, only first join @@ -99,7 +99,7 @@ index b5e42c3602f45a5b540dfc54421ab22866f2e4d9..983b006d6db81bbc285fceac23ea4b9f this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -1950,7 +1950,23 @@ public class ServerPlayer extends Player { +@@ -2051,7 +2051,23 @@ public class ServerPlayer extends Player { } } @@ -123,7 +123,7 @@ index b5e42c3602f45a5b540dfc54421ab22866f2e4d9..983b006d6db81bbc285fceac23ea4b9f // CraftBukkit start if (this.getMainArm() != clientOptions.mainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); -@@ -1962,6 +1978,11 @@ public class ServerPlayer extends Player { +@@ -2063,6 +2079,11 @@ public class ServerPlayer extends Player { this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper } // CraftBukkit end @@ -136,10 +136,10 @@ index b5e42c3602f45a5b540dfc54421ab22866f2e4d9..983b006d6db81bbc285fceac23ea4b9f this.adventure$locale = net.kyori.adventure.translation.Translator.parseLocale(this.language); // Paper this.requestedViewDistance = clientOptions.viewDistance(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8341d66dd5cad3cebdd95cfbc995cc3e8d43d934..7c40718a53d2ef480441fd053de7c45971efe416 100644 +index abbbd559ee0301e261419a4e1c2c082174a91881..e00e595677ce0b4e9e1e12883b06f99f55af7d31 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -604,6 +604,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -611,6 +611,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/0377-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/0376-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from patches/unapplied/server/0377-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to patches/server/0376-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/patches/unapplied/server/0378-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/0377-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch similarity index 91% rename from patches/unapplied/server/0378-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch rename to patches/server/0377-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch index 452276cccd..e5671be840 100644 --- a/patches/unapplied/server/0378-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch +++ b/patches/server/0377-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch @@ -43,10 +43,10 @@ index 0e3c89b9d75160d0e8947d042a1568da13d62fcf..8d12a6da0f0679fd14c2a498f9645bd0 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 983b006d6db81bbc285fceac23ea4b9f15b2029b..49d341605ac7e82c5dcdcc960b6581aa7e1fb8f3 100644 +index 352fbab070ccdb683e9a7558292c86cc443c018b..b2e980c1f2e2ec417f75fbd7bdd2188fdb4eba23 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 { +@@ -271,6 +271,7 @@ public class ServerPlayer extends Player { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -55,10 +55,10 @@ index 983b006d6db81bbc285fceac23ea4b9f15b2029b..49d341605ac7e82c5dcdcc960b6581aa // CraftBukkit end public boolean isRealPlayer; // Paper diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8bfa5ef9e3 100644 +index 96c1938a83cf70b76a3b547cd96a7d395a1b9d7e..c81818c77954aed263fd8e8a7d214ddd012f3d71 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -297,6 +297,12 @@ public abstract class PlayerList { +@@ -295,6 +295,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 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8b // CraftBukkit start CraftPlayer bukkitPlayer = player.getBukkitEntity(); -@@ -335,6 +341,8 @@ public abstract class PlayerList { +@@ -333,6 +339,8 @@ public abstract class PlayerList { player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1))); } player.sentListPacket = true; @@ -80,7 +80,7 @@ index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8b // CraftBukkit end player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn -@@ -357,6 +365,11 @@ public abstract class PlayerList { +@@ -355,6 +363,11 @@ public abstract class PlayerList { playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect)); } @@ -92,7 +92,7 @@ index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8b if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) { CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle"); // CraftBukkit start -@@ -405,6 +418,10 @@ public abstract class PlayerList { +@@ -403,6 +416,10 @@ public abstract class PlayerList { } } @@ -103,7 +103,7 @@ index 0267886463facdfda43b2dde7efc62001a9adf97..f8679d4b52a5948048a91338dc2cac8b player.initInventoryMenu(); // CraftBukkit - Moved from above, added world // Paper start - Add to collideRule team if needed -@@ -414,6 +431,7 @@ public abstract class PlayerList { +@@ -412,6 +429,7 @@ public abstract class PlayerList { scoreboard.addPlayerToTeam(player.getScoreboardName(), collideRuleTeam); } // Paper end diff --git a/patches/unapplied/server/0379-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/0378-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 92% rename from patches/unapplied/server/0379-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to patches/server/0378-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index a75044b8aa..997b9cf038 100644 --- a/patches/unapplied/server/0379-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/patches/server/0378-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -10,10 +10,10 @@ Co-authored-by: Wyatt Childers Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba8bc1c7c5 100644 +index c81818c77954aed263fd8e8a7d214ddd012f3d71..ac5e83589b812290032773755f51c89107ccb5a4 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -196,7 +196,7 @@ public abstract class PlayerList { +@@ -194,7 +194,7 @@ public abstract class PlayerList { } CompoundTag nbttagcompound = this.load(player); @@ -22,7 +22,7 @@ index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba // CraftBukkit start - Better rename detection if (nbttagcompound != null && nbttagcompound.contains("bukkit")) { CompoundTag bukkit = nbttagcompound.getCompound("bukkit"); -@@ -204,15 +204,42 @@ public abstract class PlayerList { +@@ -202,15 +202,42 @@ public abstract class PlayerList { } // CraftBukkit end @@ -67,7 +67,7 @@ index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba ResourceKey resourcekey1 = resourcekey; ServerLevel worldserver = this.server.getLevel(resourcekey1); -@@ -221,6 +248,7 @@ public abstract class PlayerList { +@@ -219,6 +246,7 @@ public abstract class PlayerList { if (worldserver == null) { PlayerList.LOGGER.warn("Unknown respawn dimension {}, defaulting to overworld", resourcekey1); worldserver1 = this.server.overworld(); @@ -75,7 +75,7 @@ index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba } else { worldserver1 = worldserver; } -@@ -228,6 +256,10 @@ public abstract class PlayerList { +@@ -226,6 +254,10 @@ public abstract class PlayerList { // Paper start if (nbttagcompound == null) { player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login @@ -87,10 +87,10 @@ index f8679d4b52a5948048a91338dc2cac8bfa5ef9e3..ac6c1c1cf0d736c31a4e3666cb9e10ba } // Paper end diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2f189712675b988a5bbb796abf54740470d836f4..186e9541031eb2daaf479d7d14782e917b3e16e5 100644 +index 28b69ad104810721bb8c78fe4bda616e8598109f..9626b9827dcf5bf86c95b210d2ec9b4285239a97 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2312,27 +2312,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2335,27 +2335,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } // CraftBukkit end diff --git a/patches/unapplied/server/0380-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0379-Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 92% rename from patches/unapplied/server/0380-Add-PlayerAttackEntityCooldownResetEvent.patch rename to patches/server/0379-Add-PlayerAttackEntityCooldownResetEvent.patch index c7a17cccc4..ae1d666725 100644 --- a/patches/unapplied/server/0380-Add-PlayerAttackEntityCooldownResetEvent.patch +++ b/patches/server/0379-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 ad0c8e43d27feb24e614fa15569edab625eff875..5d4bf7390a4b368e9ef8f39da2aa4ff60329c161 100644 +index 8577eb85cfe6d061e9e8b7e380db452a8c4ec858..9eea89e4c3ec5f999ec7f5773f4c37209211c173 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2193,7 +2193,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2190,7 +2190,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/0381-Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/0380-Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 86% rename from patches/unapplied/server/0381-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to patches/server/0380-Don-t-fire-BlockFade-on-worldgen-threads.patch index 614f7cf313..2d41b1259c 100644 --- a/patches/unapplied/server/0381-Don-t-fire-BlockFade-on-worldgen-threads.patch +++ b/patches/server/0380-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 9cda3353c033b3fb4e34a8a0e2cc4085fec9cdaa..893ff998afaa47500a03ae55ce45e9862ab1cc18 100644 +index 80e90bae3c05bbaf978a66629d9c4132c22efd1a..8fce3ad36a6ee8166f4abd9e0e369b641d487af9 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java -@@ -101,6 +101,7 @@ public class FireBlock extends BaseFireBlock { +@@ -108,6 +108,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 9cda3353c033b3fb4e34a8a0e2cc4085fec9cdaa..893ff998afaa47500a03ae55ce45e986 if (!this.canSurvive(state, world, pos)) { // Suppress during worldgen if (!(world instanceof Level)) { -@@ -116,7 +117,7 @@ public class FireBlock extends BaseFireBlock { +@@ -123,7 +124,7 @@ public class FireBlock extends BaseFireBlock { return blockState.getHandle(); } } diff --git a/patches/unapplied/server/0382-Add-phantom-creative-and-insomniac-controls.patch b/patches/server/0381-Add-phantom-creative-and-insomniac-controls.patch similarity index 95% rename from patches/unapplied/server/0382-Add-phantom-creative-and-insomniac-controls.patch rename to patches/server/0381-Add-phantom-creative-and-insomniac-controls.patch index ae5ef43e67..47e6a46746 100644 --- a/patches/unapplied/server/0382-Add-phantom-creative-and-insomniac-controls.patch +++ b/patches/server/0381-Add-phantom-creative-and-insomniac-controls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add phantom creative and insomniac controls diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java -index 668a7c3f36cdbe48e472cb810b27ae4ab39a65d6..d15e62da0307728a7c2be191a27f87da1bb29f49 100644 +index 170fbb1d80947b9b21c2106497baae5c37bcdc0c..68e4440765636295a74ea942862d772d47282ad6 100644 --- a/src/main/java/net/minecraft/world/entity/EntitySelector.java +++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java -@@ -27,6 +27,7 @@ public final class EntitySelector { +@@ -28,6 +28,7 @@ public final class EntitySelector { return !entity.isSpectator(); }; public static final Predicate CAN_BE_COLLIDED_WITH = EntitySelector.NO_SPECTATORS.and(Entity::canBeCollidedWith); diff --git a/patches/unapplied/server/0383-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/patches/server/0382-Fix-numerous-item-duplication-issues-and-teleport-is.patch similarity index 89% rename from patches/unapplied/server/0383-Fix-numerous-item-duplication-issues-and-teleport-is.patch rename to patches/server/0382-Fix-numerous-item-duplication-issues-and-teleport-is.patch index a86be5da2e..a4f8c5ec2e 100644 --- a/patches/unapplied/server/0383-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/patches/server/0382-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 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76f9a413c0 100644 +index 9626b9827dcf5bf86c95b210d2ec9b4285239a97..b3d50a16748a295aa952c22e90708ea33a7af992 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2436,11 +2436,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2465,11 +2465,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } 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 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76 entityitem.setDefaultPickUpDelay(); // CraftBukkit start -@@ -3242,6 +3243,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3271,6 +3272,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @Nullable public Entity teleportTo(ServerLevel worldserver, Vec3 location) { // CraftBukkit end @@ -47,7 +47,7 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76 if (this.level() instanceof ServerLevel && !this.isRemoved()) { this.level().getProfiler().push("changeDimension"); // CraftBukkit start -@@ -3268,6 +3275,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3297,6 +3304,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S // CraftBukkit end this.level().getProfiler().popPush("reloading"); @@ -59,7 +59,7 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76 Entity entity = this.getType().create(worldserver); if (entity != null) { -@@ -3281,10 +3293,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3314,10 +3326,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S // CraftBukkit start - Forward the CraftEntity to the new entity this.getBukkitEntity().setHandle(entity); entity.bukkitEntity = this.getBukkitEntity(); @@ -70,7 +70,7 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76 // CraftBukkit end } -@@ -3405,7 +3413,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3438,7 +3446,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } public boolean canChangeDimensions() { @@ -80,10 +80,10 @@ index 186e9541031eb2daaf479d7d14782e917b3e16e5..8ecb398ca26753e602c2862bf0c35b76 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 5d4bf7390a4b368e9ef8f39da2aa4ff60329c161..109c381adefd61c69768ce1572873b2e629aff0e 100644 +index 9eea89e4c3ec5f999ec7f5773f4c37209211c173..4b1366a456e7132d438fc99bd62e1dd77e35b35f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1708,9 +1708,9 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1705,9 +1705,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 5d4bf7390a4b368e9ef8f39da2aa4ff60329c161..109c381adefd61c69768ce1572873b2e // Paper start - clear equipment if event is not cancelled if (this instanceof Mob) { for (EquipmentSlot slot : this.clearedEquipmentSlots) { -@@ -1811,8 +1811,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1808,8 +1808,13 @@ public abstract class LivingEntity extends Entity implements Attackable { this.dropCustomDeathLoot(source, i, flag); this.clearEquipmentSlots = prev; // Paper } @@ -113,10 +113,10 @@ index 5d4bf7390a4b368e9ef8f39da2aa4ff60329c161..109c381adefd61c69768ce1572873b2e 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 91b9ec5831f439426a853ba9ac7a3f225629b099..e4e734e0f4c43c1687c8e3a8bbe15441e0bd8e76 100644 +index 2512e7757fa9135bfaf436790f5fce815d43b9ee..17b6649a7e36fc9322f857e83551d8a99f4f288d 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -637,7 +637,7 @@ public class ArmorStand extends LivingEntity { +@@ -624,7 +624,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 91b9ec5831f439426a853ba9ac7a3f225629b099..e4e734e0f4c43c1687c8e3a8bbe15441 this.handItems.set(i, ItemStack.EMPTY); } } -@@ -645,7 +645,7 @@ public class ArmorStand extends LivingEntity { +@@ -632,7 +632,7 @@ public class ArmorStand extends LivingEntity { for (i = 0; i < this.armorItems.size(); ++i) { itemstack = (ItemStack) this.armorItems.get(i); if (!itemstack.isEmpty()) { @@ -135,7 +135,7 @@ index 91b9ec5831f439426a853ba9ac7a3f225629b099..e4e734e0f4c43c1687c8e3a8bbe15441 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 96e33c433605ae2e0473b36f03894e030e79cd0d..39d710d98ca5435e7645ab91c109090c42ffc52f 100644 +index a63ff3a8286f323f7f5891aa33fdd72b9e2260b0..c743c9ad7cb68001a32317280ca8bedaae012a66 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -896,6 +896,11 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0384-Villager-Restocks-API.patch b/patches/server/0383-Villager-Restocks-API.patch similarity index 100% rename from patches/unapplied/server/0384-Villager-Restocks-API.patch rename to patches/server/0383-Villager-Restocks-API.patch diff --git a/patches/unapplied/server/0385-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0384-Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 91% rename from patches/unapplied/server/0385-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/0384-Validate-PickItem-Packet-and-kick-for-invalid.patch index f018765ed2..9b08ac49ab 100644 --- a/patches/unapplied/server/0385-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/patches/server/0384-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 93b1e0b287d195181cb2253b3490ed537efa6b8e..c06ce8822891e7d2a8fa2b649b02555ce6e3373c 100644 +index 9b7902fa7ba79ff44b215647f580ea1834b1aa74..d15321ac9c11056c253a62d6db8b9b404a2b5d5b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -867,7 +867,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -870,7 +870,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handlePickItem(ServerboundPickItemPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); diff --git a/patches/unapplied/server/0386-Expose-game-version.patch b/patches/server/0385-Expose-game-version.patch similarity index 82% rename from patches/unapplied/server/0386-Expose-game-version.patch rename to patches/server/0385-Expose-game-version.patch index 1d273f3f91..6a3fcdafe4 100644 --- a/patches/unapplied/server/0386-Expose-game-version.patch +++ b/patches/server/0385-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 83661761abdb31e62ea56af9d60fed393326be50..e7fbdccdd93bef036a7785acb19def334b039f0f 100644 +index 2c7370b6103faa6979b8d347d9e20248cbfc1740..4dfdb5bdfaf26921106a85ac0e6d4fc9ffbb9a7a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -586,6 +586,13 @@ public final class CraftServer implements Server { +@@ -581,6 +581,13 @@ public final class CraftServer implements Server { return this.bukkitVersion; } diff --git a/patches/unapplied/server/0387-Optimize-Voxel-Shape-Merging.patch b/patches/server/0386-Optimize-Voxel-Shape-Merging.patch similarity index 100% rename from patches/unapplied/server/0387-Optimize-Voxel-Shape-Merging.patch rename to patches/server/0386-Optimize-Voxel-Shape-Merging.patch diff --git a/patches/unapplied/server/0388-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/0387-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 93% rename from patches/unapplied/server/0388-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/0387-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch index a03ecf095c..2fe2392d88 100644 --- a/patches/unapplied/server/0388-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch +++ b/patches/server/0387-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch @@ -17,7 +17,7 @@ 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 bec85212b48f8ae0c89aef01c3cd245ae0c282fc..334743a8c82bbcb2f09d0919fc9597750a25b8dd 100644 +index ff16522a4ae4e0cb32f4c6b919bcaffc4507dfe8..f402d0ecc6ed3bfe76a3a2b6780dda5b8ecdd750 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -26,6 +26,7 @@ public class Main { diff --git a/patches/unapplied/server/0389-misc-debugging-dumps.patch b/patches/server/0388-misc-debugging-dumps.patch similarity index 88% rename from patches/unapplied/server/0389-misc-debugging-dumps.patch rename to patches/server/0388-misc-debugging-dumps.patch index 764871463d..d72e5e6bbe 100644 --- a/patches/unapplied/server/0389-misc-debugging-dumps.patch +++ b/patches/server/0388-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 5f8cf962a4b630223fb93ffea49d1b2151e1604d..fdaf757cbbc90841747989add56c13f252f645e5 100644 +index 08f7f287af32597d8a39f429013adec9266020bf..e230a6e3810929c2f9ac70a98c9fc41734ec06c2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -872,6 +872,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop set) { // Paper diff --git a/patches/unapplied/server/0391-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0390-Deobfuscate-stacktraces-in-log-messages-crash-report.patch similarity index 97% rename from patches/unapplied/server/0391-Deobfuscate-stacktraces-in-log-messages-crash-report.patch rename to patches/server/0390-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index b26702792f..46fbee9223 100644 --- a/patches/unapplied/server/0391-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0390-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -471,10 +471,10 @@ index 2d5494d2813b773e60ddba6790b750a9a08f21f8..0b210bdf7c1f5962afbd44195af6f84f } } diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java -index 226cba0c1eeedd9e80acd603c46b802c183db1fa..1d714d3eff11ed14f218656008190017494d4830 100644 +index 059b1a0bf048af6a28c322f35da3d3cbbe426546..e047dee632022abfe05865d1e71838be8d5d053a 100644 --- a/src/main/java/net/minecraft/CrashReport.java +++ b/src/main/java/net/minecraft/CrashReport.java -@@ -32,6 +32,7 @@ public class CrashReport { +@@ -34,6 +34,7 @@ public class CrashReport { private final SystemReport systemReport = new SystemReport(); public CrashReport(String message, Throwable cause) { @@ -545,7 +545,7 @@ index 45b4f1c295eda2fcc5067a4b21de247218ef117f..d364bd57b1675c8b21d781c2bc16c3e6 throw new SkipPacketException(var13); } diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index fce3edc97c7df45389bb3754f873a314d42929e4..557fc4e380c00bc2ca34381b36eb3d6a38177209 100644 +index fe47a38137f7b7fa94c507e790eec4fb7303595f..7f5ecea0ee78a534d7c56fa9e3ad2117b5192c0a 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -195,6 +195,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -557,10 +557,10 @@ index fce3edc97c7df45389bb3754f873a314d42929e4..557fc4e380c00bc2ca34381b36eb3d6a paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); 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 0353b3e3a9d9a0bd44f48a61a02811ec0bad186a..58a44898144af605e6e7d9253d99149ddc12bcbd 100644 +index a2c3a4b70ba4694fa6ce013bdf601e08f30cadae..8dc958dca402346d94d84c3d5c073cf00c438cee 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -221,7 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -223,7 +223,9 @@ public class ServerLevel extends Level implements WorldGenLevel { public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper public static Throwable getAddToWorldStackTrace(Entity entity) { @@ -571,7 +571,7 @@ index 0353b3e3a9d9a0bd44f48a61a02811ec0bad186a..58a44898144af605e6e7d9253d99149d } @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI -@@ -1469,7 +1471,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1488,7 +1490,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity.isRemoved()) { // Paper start if (DEBUG_ENTITIES) { @@ -581,7 +581,7 @@ index 0353b3e3a9d9a0bd44f48a61a02811ec0bad186a..58a44898144af605e6e7d9253d99149d } // Paper end diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java -index 77e19f345bf68d12686a65e669cd597cd92af910..8dbcc1b3a70b6bbea3bd2d15b6d66cc4f9cd53f8 100644 +index e48b287d6229f8043fba8a417f0b7558d6079783..cae10b963d153fb1777b18054796a45b2809342b 100644 --- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java @@ -133,7 +133,7 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis @@ -611,19 +611,19 @@ index caeead6c6082855f1651ee28263cc9f60423ca0c..b2bfb3893200362ac35ae60982f203f8 final MinecraftServer server; public volatile boolean running; diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java -index 5db27d7bcaaa2eeaeeb08401513d8d23f6cb63c7..ce43cb0152ba07c6c21e08142d65813d47c3b63b 100644 +index 6a64c58fff9bbed542bf29a029531996f2a50d00..c24898f8e81e8ab9a1f90bf4439ea6c6f42f0508 100644 --- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java +++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java -@@ -359,7 +359,7 @@ public class OldUsersConverter { +@@ -358,7 +358,7 @@ public class OldUsersConverter { try { - root = NbtIo.readCompressed(new java.io.FileInputStream(file5)); + root = NbtIo.readCompressed(new java.io.FileInputStream(file5), NbtAccounter.unlimitedHeap()); } catch (Exception exception) { - exception.printStackTrace(); + io.papermc.paper.util.TraceUtil.printStackTrace(exception); // Paper ServerInternalException.reportInternalException(exception); // Paper } -@@ -373,7 +373,7 @@ public class OldUsersConverter { +@@ -372,7 +372,7 @@ public class OldUsersConverter { try { NbtIo.writeCompressed(root, new java.io.FileOutputStream(file2)); } catch (Exception exception) { diff --git a/patches/unapplied/server/0392-Implement-Mob-Goal-API.patch b/patches/server/0391-Implement-Mob-Goal-API.patch similarity index 99% rename from patches/unapplied/server/0392-Implement-Mob-Goal-API.patch rename to patches/server/0391-Implement-Mob-Goal-API.patch index b7179a411c..88835b7935 100644 --- a/patches/unapplied/server/0392-Implement-Mob-Goal-API.patch +++ b/patches/server/0391-Implement-Mob-Goal-API.patch @@ -792,10 +792,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 6ad11ded56422417f3407b043c42eb5d17557e60..03ff1e8faec27f042aa9b3b5f5bcbe1abbde2cbd 100644 +index 66505398cff6f73a5c5d900ebb66450a5137a16a..913c1e4ee2df8160e1cd15a352fc71d61e7e38dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2845,5 +2845,11 @@ public final class CraftServer implements Server { +@@ -2877,5 +2877,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/patches/unapplied/server/0393-Add-villager-reputation-API.patch b/patches/server/0392-Add-villager-reputation-API.patch similarity index 100% rename from patches/unapplied/server/0393-Add-villager-reputation-API.patch rename to patches/server/0392-Add-villager-reputation-API.patch diff --git a/patches/unapplied/server/0394-Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/0393-Option-for-maximum-exp-value-when-merging-orbs.patch similarity index 79% rename from patches/unapplied/server/0394-Option-for-maximum-exp-value-when-merging-orbs.patch rename to patches/server/0393-Option-for-maximum-exp-value-when-merging-orbs.patch index be87bfcc03..819bc6203e 100644 --- a/patches/unapplied/server/0394-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/patches/server/0393-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,11 +5,11 @@ 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 39d710d98ca5435e7645ab91c109090c42ffc52f..195735de5f35c0d80a8c5ae4bca20f149ce49f90 100644 +index c743c9ad7cb68001a32317280ca8bedaae012a66..ee28500547c6e069ce8702bfaa095e7a9abcd30d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -690,16 +690,30 @@ public class CraftEventFactory { - net.minecraft.world.entity.ExperienceOrb xp = (net.minecraft.world.entity.ExperienceOrb) entity; +@@ -705,16 +705,30 @@ public class CraftEventFactory { + if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) { double radius = world.spigotConfig.expMerge; if (radius > 0) { + // Paper start - Maximum exp value when merging - Whole section has been tweaked, see comments for specifics @@ -19,8 +19,7 @@ index 39d710d98ca5435e7645ab91c109090c42ffc52f..195735de5f35c0d80a8c5ae4bca20f14 + List entities = world.getEntities(entity, entity.getBoundingBox().inflate(radius, radius, radius)); for (Entity e : entities) { - if (e instanceof net.minecraft.world.entity.ExperienceOrb) { - net.minecraft.world.entity.ExperienceOrb loopItem = (net.minecraft.world.entity.ExperienceOrb) e; + if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) { - if (!loopItem.isRemoved()) { + // Paper start + if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue)) { @@ -36,7 +35,8 @@ index 39d710d98ca5435e7645ab91c109090c42ffc52f..195735de5f35c0d80a8c5ae4bca20f14 } } } -+ } // Paper end - End iteration skip check - All tweaking ends here } ++ } // Paper end - End iteration skip check - All tweaking ends here + } // Spigot end - } else if (!(entity instanceof ServerPlayer)) { + diff --git a/patches/unapplied/server/0395-ExperienceOrbMergeEvent.patch b/patches/server/0394-ExperienceOrbMergeEvent.patch similarity index 84% rename from patches/unapplied/server/0395-ExperienceOrbMergeEvent.patch rename to patches/server/0394-ExperienceOrbMergeEvent.patch index f0074453c8..46f62813a0 100644 --- a/patches/unapplied/server/0395-ExperienceOrbMergeEvent.patch +++ b/patches/server/0394-ExperienceOrbMergeEvent.patch @@ -9,12 +9,12 @@ 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 195735de5f35c0d80a8c5ae4bca20f149ce49f90..c634a4b0d835df3ad6129ca03e11668f715ab8d2 100644 +index ee28500547c6e069ce8702bfaa095e7a9abcd30d..839deebc72a575eea5db4decd82c8c8b1884e621 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -700,7 +700,7 @@ public class CraftEventFactory { - if (e instanceof net.minecraft.world.entity.ExperienceOrb) { - net.minecraft.world.entity.ExperienceOrb loopItem = (net.minecraft.world.entity.ExperienceOrb) e; +@@ -714,7 +714,7 @@ public class CraftEventFactory { + for (Entity e : entities) { + if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) { // Paper start - if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue)) { + if (!loopItem.isRemoved() && !(maxValue > 0 && loopItem.value >= maxValue) && new com.destroystokyo.paper.event.entity.ExperienceOrbMergeEvent((org.bukkit.entity.ExperienceOrb) entity.getBukkitEntity(), (org.bukkit.entity.ExperienceOrb) loopItem.getBukkitEntity()).callEvent()) { // Paper - ExperienceOrbMergeEvent diff --git a/patches/unapplied/server/0396-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0395-Fix-PotionEffect-ignores-icon-flag.patch similarity index 92% rename from patches/unapplied/server/0396-Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/0395-Fix-PotionEffect-ignores-icon-flag.patch index 6e7fe54526..f4f663c607 100644 --- a/patches/unapplied/server/0396-Fix-PotionEffect-ignores-icon-flag.patch +++ b/patches/server/0395-Fix-PotionEffect-ignores-icon-flag.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 904f34f52659e864d148204cb0eebb9b381cc24a..38cad5b0d7e6018adda56b3292280738c46622e9 100644 +index 1b7f2a23d475727644e22a60de0b2c7bfa7ca68f..f5b9d1fe0d672e11b6295aefc9e182606dbebf88 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -443,7 +443,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -444,7 +444,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override public boolean addPotionEffect(PotionEffect effect, boolean force) { @@ -18,7 +18,7 @@ index 904f34f52659e864d148204cb0eebb9b381cc24a..38cad5b0d7e6018adda56b3292280738 return true; } -@@ -464,7 +464,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -465,7 +465,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override public PotionEffect getPotionEffect(PotionEffectType type) { MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraft(type)); @@ -27,7 +27,7 @@ index 904f34f52659e864d148204cb0eebb9b381cc24a..38cad5b0d7e6018adda56b3292280738 } @Override -@@ -476,7 +476,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -477,7 +477,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public Collection getActivePotionEffects() { List effects = new ArrayList(); for (MobEffectInstance handle : this.getHandle().activeEffects.values()) { diff --git a/patches/unapplied/server/0397-Optimize-brigadier-child-sorting-performance.patch b/patches/server/0396-Optimize-brigadier-child-sorting-performance.patch similarity index 100% rename from patches/unapplied/server/0397-Optimize-brigadier-child-sorting-performance.patch rename to patches/server/0396-Optimize-brigadier-child-sorting-performance.patch diff --git a/patches/unapplied/server/0398-Potential-bed-API.patch b/patches/server/0397-Potential-bed-API.patch similarity index 92% rename from patches/unapplied/server/0398-Potential-bed-API.patch rename to patches/server/0397-Potential-bed-API.patch index 0840f1d26f..b281ffe8a0 100644 --- a/patches/unapplied/server/0398-Potential-bed-API.patch +++ b/patches/server/0397-Potential-bed-API.patch @@ -8,7 +8,7 @@ Adds a new method to fetch the location of a player's bed without generating any getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 6a9ab8bab7eb443f83e939bed17cb6fc9d1f3906..4ac714e39804fc8d269a717e8abf98f5814319e8 100644 +index 03b3e5a49658ea6341cd303b75be36a328907863..9541ebf81c3c2c282c6d04f5e51b309e69d0802e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -12,6 +12,7 @@ import net.minecraft.nbt.CompoundTag; @@ -19,7 +19,7 @@ index 6a9ab8bab7eb443f83e939bed17cb6fc9d1f3906..4ac714e39804fc8d269a717e8abf98f5 import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.Entity; -@@ -130,6 +131,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -131,6 +132,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return this.getHandle().sleepCounter; } diff --git a/patches/unapplied/server/0399-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0398-Wait-for-Async-Tasks-during-shutdown.patch similarity index 88% rename from patches/unapplied/server/0399-Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/0398-Wait-for-Async-Tasks-during-shutdown.patch index d28439d3c2..9aac5f9248 100644 --- a/patches/unapplied/server/0399-Wait-for-Async-Tasks-during-shutdown.patch +++ b/patches/server/0398-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 fdaf757cbbc90841747989add56c13f252f645e5..6b7bacb0ea667c488b09da8c2a8a685d3a86608e 100644 +index e230a6e3810929c2f9ac70a98c9fc41734ec06c2..81d4870060ea418fecfdd01f1357899038c95fe9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -912,6 +912,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0.0F; f -= 0.22500001F) { BlockPos blockposition = BlockPos.containing(d4, d5, d6); BlockState iblockdata = this.level.getBlockState(blockposition); @@ -24,20 +24,11 @@ index c0227cda09b9ca508c1de1fbe1e57afd743a9426..93529defa5d36bb9b4c69eedda9b7ac3 FluidState fluid = iblockdata.getFluidState(); // Paper if (!this.level.isInWorldBounds(blockposition)) { -@@ -371,7 +372,7 @@ public class Explosion { - } - // CraftBukkit end - -- if (!iblockdata.isAir()) { -+ if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper - BlockPos blockposition1 = blockposition.immutable(); - - 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 046fa6e5b2013c0872176592dd8cc6681a9b308a..7825f6185a9a73dd395cdb6d86947d33d8512200 100644 +index 7a604d2679c65b15e6d651e65c0475404aee9592..121f82c3e27d0c1e935871ab0e7c994393e73398 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -518,6 +518,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -521,6 +521,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,10 +40,10 @@ index 046fa6e5b2013c0872176592dd8cc6681a9b308a..7825f6185a9a73dd395cdb6d86947d33 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 7646b66bc5ba0288608de0d836c7307e02eebe67..36b196c8834c4eb873bfca0b12f1fc2b421ea071 100644 +index bdf5443d5974d316b9b216291fadae4346a3123f..2c190473b98899e86d8bcd5a81c72bbc0a85b2a9 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java -@@ -88,6 +88,19 @@ public class Block extends BlockBehaviour implements ItemLike { +@@ -90,6 +90,19 @@ public class Block extends BlockBehaviour implements ItemLike { protected final StateDefinition stateDefinition; private BlockState defaultBlockState; // Paper start @@ -73,10 +64,10 @@ index 7646b66bc5ba0288608de0d836c7307e02eebe67..36b196c8834c4eb873bfca0b12f1fc2b public co.aikar.timings.Timing getTiming() { if (timing == null) { diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index e4e4ad933db6484589dc2b51ef2f5a6745ffb891..6b0f70907236065bc2769541bf430ccc66df5081 100644 +index b3732a6246a2b011e36c5c35fa2ac7749e75db16..bb6c38bb7a054b94a63690f6fd6036d6f376dae4 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -@@ -199,6 +199,12 @@ public class PistonBaseBlock extends DirectionalBlock { +@@ -212,6 +212,12 @@ public class PistonBaseBlock extends DirectionalBlock { @Override public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) { Direction enumdirection = (Direction) state.getValue(PistonBaseBlock.FACING); @@ -89,7 +80,7 @@ index e4e4ad933db6484589dc2b51ef2f5a6745ffb891..6b0f70907236065bc2769541bf430ccc BlockState iblockdata1 = (BlockState) state.setValue(PistonBaseBlock.EXTENDED, true); if (!world.isClientSide) { -@@ -232,7 +238,7 @@ public class PistonBaseBlock extends DirectionalBlock { +@@ -245,7 +251,7 @@ public class PistonBaseBlock extends DirectionalBlock { BlockState iblockdata2 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT); world.setBlock(pos, iblockdata2, 20); @@ -98,7 +89,7 @@ index e4e4ad933db6484589dc2b51ef2f5a6745ffb891..6b0f70907236065bc2769541bf430ccc world.blockUpdated(pos, iblockdata2.getBlock()); iblockdata2.updateNeighbourShapes(world, pos, 2); if (this.isSticky) { -@@ -261,7 +267,14 @@ public class PistonBaseBlock extends DirectionalBlock { +@@ -274,7 +280,14 @@ public class PistonBaseBlock extends DirectionalBlock { } } } else { @@ -115,10 +106,19 @@ index e4e4ad933db6484589dc2b51ef2f5a6745ffb891..6b0f70907236065bc2769541bf430ccc 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 916d7b35145345cb3bf5ca46df38eae0512c4e95..a5942b6683d38f067f8ca1dfbe467b72df242632 100644 +index b4241ccdf972feec3dc2802ceafeef4f004c62d5..c64213fe3ec0bd34cd1b31ae18eff1fecbcf63d6 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 -@@ -229,7 +229,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -182,7 +182,7 @@ public abstract class BlockBehaviour implements FeatureElement { + /** @deprecated */ + @Deprecated + public void onExplosionHit(BlockState state, Level world, BlockPos pos, Explosion explosion, BiConsumer stackMerger) { +- if (!state.isAir() && explosion.getBlockInteraction() != Explosion.BlockInteraction.TRIGGER_BLOCK) { ++ if (!state.isAir() && explosion.getBlockInteraction() != Explosion.BlockInteraction.TRIGGER_BLOCK && state.isDestroyable()) { // Paper + Block block = state.getBlock(); + boolean flag = explosion.getIndirectSourceEntity() instanceof Player; + +@@ -278,7 +278,7 @@ public abstract class BlockBehaviour implements FeatureElement { /** @deprecated */ @Deprecated public boolean canBeReplaced(BlockState state, BlockPlaceContext context) { @@ -127,7 +127,7 @@ index 916d7b35145345cb3bf5ca46df38eae0512c4e95..a5942b6683d38f067f8ca1dfbe467b72 } /** @deprecated */ -@@ -891,6 +891,12 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -958,6 +958,12 @@ public abstract class BlockBehaviour implements FeatureElement { return this.legacySolid; } @@ -140,7 +140,7 @@ index 916d7b35145345cb3bf5ca46df38eae0512c4e95..a5942b6683d38f067f8ca1dfbe467b72 public boolean isValidSpawn(BlockGetter world, BlockPos pos, EntityType type) { return this.getBlock().properties.isValidSpawn.test(this.asState(), world, pos, type); } -@@ -994,7 +1000,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1061,7 +1067,7 @@ public abstract class BlockBehaviour implements FeatureElement { } public PushReaction getPistonPushReaction() { diff --git a/patches/unapplied/server/0402-Ensure-safe-gateway-teleport.patch b/patches/server/0401-Ensure-safe-gateway-teleport.patch similarity index 100% rename from patches/unapplied/server/0402-Ensure-safe-gateway-teleport.patch rename to patches/server/0401-Ensure-safe-gateway-teleport.patch diff --git a/patches/unapplied/server/0403-Add-option-for-console-having-all-permissions.patch b/patches/server/0402-Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/unapplied/server/0403-Add-option-for-console-having-all-permissions.patch rename to patches/server/0402-Add-option-for-console-having-all-permissions.patch diff --git a/patches/unapplied/server/0404-Fix-villager-trading-demand-MC-163962.patch b/patches/server/0403-Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/unapplied/server/0404-Fix-villager-trading-demand-MC-163962.patch rename to patches/server/0403-Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/unapplied/server/0405-Maps-shouldn-t-load-chunks.patch b/patches/server/0404-Maps-shouldn-t-load-chunks.patch similarity index 95% rename from patches/unapplied/server/0405-Maps-shouldn-t-load-chunks.patch rename to patches/server/0404-Maps-shouldn-t-load-chunks.patch index 8fb69b3ba6..ad607fc26a 100644 --- a/patches/unapplied/server/0405-Maps-shouldn-t-load-chunks.patch +++ b/patches/server/0404-Maps-shouldn-t-load-chunks.patch @@ -15,7 +15,7 @@ Previously maps would load all chunks in a certain radius depending on five ticks that movement occur in anyways. diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index 592bdf191f8787cf35d8844f66371c92179545ad..709928f6220c2148f95afa94c34df2a87cff0e1f 100644 +index 6b6132943123c209b4cb49c5aadd913f2a16837c..0e2aef26fb89a435da4907a530507a86c6caa746 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java @@ -134,9 +134,9 @@ public class MapItem extends ComplexItem { diff --git a/patches/unapplied/server/0406-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0405-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 93% rename from patches/unapplied/server/0406-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/0405-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch index 7b6faee053..f5095ceeb1 100644 --- a/patches/unapplied/server/0406-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch +++ b/patches/server/0405-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use seed based lookup for Treasure Maps - Fixes lag from diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index 709928f6220c2148f95afa94c34df2a87cff0e1f..53515854d05a0c27a65f71193424236a21b11f5f 100644 +index 0e2aef26fb89a435da4907a530507a86c6caa746..b27a464cecb0efc2656d85e3c546f262e79de9a4 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java @@ -250,14 +250,13 @@ public class MapItem extends ComplexItem { diff --git a/patches/unapplied/server/0407-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/0406-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/unapplied/server/0407-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/0406-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/unapplied/server/0408-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0407-Fix-piston-physics-inconsistency-MC-188840.patch similarity index 96% rename from patches/unapplied/server/0408-Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/0407-Fix-piston-physics-inconsistency-MC-188840.patch index 0395c15e04..3bef753cf5 100644 --- a/patches/unapplied/server/0408-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/patches/server/0407-Fix-piston-physics-inconsistency-MC-188840.patch @@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840 This patch also fixes rail duping and carpet duping. diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index 6b0f70907236065bc2769541bf430ccc66df5081..929241e479a42011f073fb9d144739b6504132b1 100644 +index bb6c38bb7a054b94a63690f6fd6036d6f376dae4..565da027ca7c395f9b965505cbe9e85e62367834 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -@@ -413,14 +413,26 @@ public class PistonBaseBlock extends DirectionalBlock { +@@ -426,14 +426,26 @@ public class PistonBaseBlock extends DirectionalBlock { } for (j = list.size() - 1; j >= 0; --j) { diff --git a/patches/unapplied/server/0409-Fix-sand-duping.patch b/patches/server/0408-Fix-sand-duping.patch similarity index 94% rename from patches/unapplied/server/0409-Fix-sand-duping.patch rename to patches/server/0408-Fix-sand-duping.patch index b1e0d61dc8..d616a66fc1 100644 --- a/patches/unapplied/server/0409-Fix-sand-duping.patch +++ b/patches/server/0408-Fix-sand-duping.patch @@ -7,7 +7,7 @@ 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 c431ba283c31cf9bb7bfdb05dc8c181c9e1e0eb3..5164c2bfb32275beff01b6e76dfbd9d031231bc6 100644 +index 9be45ff8139c9d385c1deb1200e3718ed3add801..fc33d05cf1a3cceb220dab1ee1da33ffe37834db 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -131,6 +131,11 @@ public class FallingBlockEntity extends Entity { diff --git a/patches/unapplied/server/0410-Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/0409-Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from patches/unapplied/server/0410-Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/0409-Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/patches/unapplied/server/0411-Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/0410-Prevent-position-desync-in-playerconnection-causing-.patch similarity index 91% rename from patches/unapplied/server/0411-Prevent-position-desync-in-playerconnection-causing-.patch rename to patches/server/0410-Prevent-position-desync-in-playerconnection-causing-.patch index 543b03cce0..91913a6e7d 100644 --- a/patches/unapplied/server/0411-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/patches/server/0410-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 c251202cb6b69b4dfa46b6836c6da1664f533738..3f9f2e4b64df72f3f01aed191d57766978c5886c 100644 +index e152c3ac26ad37e547e196331802e30f4839632a..fd9f05c51e4a475d2bc8b2c39b0811d053f03dbe 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1341,6 +1341,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1368,6 +1368,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move diff --git a/patches/unapplied/server/0412-Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/0411-Inventory-getHolder-method-without-block-snapshot.patch similarity index 92% rename from patches/unapplied/server/0412-Inventory-getHolder-method-without-block-snapshot.patch rename to patches/server/0411-Inventory-getHolder-method-without-block-snapshot.patch index 83f965e80a..b30d42bf56 100644 --- a/patches/unapplied/server/0412-Inventory-getHolder-method-without-block-snapshot.patch +++ b/patches/server/0411-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 c064022d248ff3e0b52c0e815ab90527f9132fb7..3680f101036d98814fe47b707baeeb8e55bfc4b7 100644 +index 75eb794f796b31c0c5ef80a6d27a56711a522f5e..e824fe361286a5f41b137be92d799eef54ae4b87 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -538,6 +538,13 @@ public class CraftInventory implements Inventory { +@@ -543,6 +543,13 @@ public class CraftInventory implements Inventory { return this.inventory.getOwner(); } diff --git a/patches/unapplied/server/0413-Improve-Arrow-API.patch b/patches/server/0412-Improve-Arrow-API.patch similarity index 100% rename from patches/unapplied/server/0413-Improve-Arrow-API.patch rename to patches/server/0412-Improve-Arrow-API.patch diff --git a/patches/unapplied/server/0414-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0413-Add-and-implement-PlayerRecipeBookClickEvent.patch similarity index 95% rename from patches/unapplied/server/0414-Add-and-implement-PlayerRecipeBookClickEvent.patch rename to patches/server/0413-Add-and-implement-PlayerRecipeBookClickEvent.patch index 455db3f928..0c99c5a942 100644 --- a/patches/unapplied/server/0414-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0413-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 3f9f2e4b64df72f3f01aed191d57766978c5886c..292a80afecb7a67e5e5900578867612d91ca82a5 100644 +index fd9f05c51e4a475d2bc8b2c39b0811d053f03dbe..4041e3543c65d42920aafe2fed4de410d7d43198 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2959,16 +2959,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2967,16 +2967,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl 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/0415-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/0414-Use-distance-map-to-optimise-entity-tracker.patch similarity index 98% rename from patches/unapplied/server/0415-Use-distance-map-to-optimise-entity-tracker.patch rename to patches/server/0414-Use-distance-map-to-optimise-entity-tracker.patch index f13e26a7c9..63137a0b5a 100644 --- a/patches/unapplied/server/0415-Use-distance-map-to-optimise-entity-tracker.patch +++ b/patches/server/0414-Use-distance-map-to-optimise-entity-tracker.patch @@ -236,7 +236,7 @@ index 8d12a6da0f0679fd14c2a498f9645bd04b2d8ed7..290a231deb203eb46cb91eb23c28d8e9 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 8ecb398ca26753e602c2862bf0c35b76f9a413c0..082509d2ab18380b37868decef3fdff6542bf764 100644 +index b3d50a16748a295aa952c22e90708ea33a7af992..1ad820b4954f11d2bab92708eb0c44739317603e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -56,6 +56,7 @@ import net.minecraft.network.syncher.EntityDataSerializers; @@ -247,7 +247,7 @@ index 8ecb398ca26753e602c2862bf0c35b76f9a413c0..082509d2ab18380b37868decef3fdff6 import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; -@@ -481,6 +482,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -486,6 +487,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S public boolean updatingSectionStatus = false; // Paper end diff --git a/patches/unapplied/server/0416-Hide-sync-chunk-writes-behind-flag.patch b/patches/server/0415-Hide-sync-chunk-writes-behind-flag.patch similarity index 88% rename from patches/unapplied/server/0416-Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/0415-Hide-sync-chunk-writes-behind-flag.patch index 070cae85dd..d3846bbd23 100644 --- a/patches/unapplied/server/0416-Hide-sync-chunk-writes-behind-flag.patch +++ b/patches/server/0415-Hide-sync-chunk-writes-behind-flag.patch @@ -9,10 +9,10 @@ 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 bdf520c32847658fefaf2bde33bac16ea807002f..c5598adb8cbcbcf7277c2fd4dd72c243d44d9700 100644 +index 7edce6f8d1f313a9e1e100704d625e317f779fa0..1643186bcb2caf5d29fd551afd35830726dbb80a 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -145,7 +145,7 @@ public class DedicatedServerProperties extends Settings { return Mth.clamp(integer, 1, 29999984); }, 29999984); diff --git a/patches/unapplied/server/0417-Add-permission-for-command-blocks.patch b/patches/server/0416-Add-permission-for-command-blocks.patch similarity index 91% rename from patches/unapplied/server/0417-Add-permission-for-command-blocks.patch rename to patches/server/0416-Add-permission-for-command-blocks.patch index 526bf7a6a8..937f0322d5 100644 --- a/patches/unapplied/server/0417-Add-permission-for-command-blocks.patch +++ b/patches/server/0416-Add-permission-for-command-blocks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add permission for command blocks diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 0ff4372afa4b159acc59e3dbd2e9efbd7b7ab6a2..1685dd08ef6331e133d752cd9ce3874c9eda5a05 100644 +index b7e6d8441e8444c36919c126a8adeaeed02df08c..a9ede0d719e866655ab48fb5d0263c7d1bdcff60 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -399,7 +399,7 @@ public class ServerPlayerGameMode { @@ -18,10 +18,10 @@ index 0ff4372afa4b159acc59e3dbd2e9efbd7b7ab6a2..1685dd08ef6331e133d752cd9ce3874c 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 292a80afecb7a67e5e5900578867612d91ca82a5..6add371484deca6ed041e434fea5dc54c8db12d9 100644 +index 4041e3543c65d42920aafe2fed4de410d7d43198..bb457858e3f4d335ca5eb0c2a51b9a3b456a0b1f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -778,7 +778,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -781,7 +781,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); @@ -30,7 +30,7 @@ index 292a80afecb7a67e5e5900578867612d91ca82a5..6add371484deca6ed041e434fea5dc54 this.player.sendSystemMessage(Component.translatable("advMode.notAllowed")); } else { BaseCommandBlock commandblocklistenerabstract = null; -@@ -845,7 +845,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -848,7 +848,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); @@ -40,7 +40,7 @@ index 292a80afecb7a67e5e5900578867612d91ca82a5..6add371484deca6ed041e434fea5dc54 } else { BaseCommandBlock commandblocklistenerabstract = packet.getCommandBlock(this.player.level()); diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java -index 9c7b7434ccd64668eb5d7bb61d03a9cb4105ea6e..e05eb08a9c229b371887676da510df948b896a85 100644 +index ac0aeb53176069d0835b6b08c8d871edae846763..c56f5173fda6b38c2dcaea196217f2f5a7d7c641 100644 --- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java +++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java @@ -198,7 +198,7 @@ public abstract class BaseCommandBlock implements CommandSource { @@ -53,10 +53,10 @@ index 9c7b7434ccd64668eb5d7bb61d03a9cb4105ea6e..e05eb08a9c229b371887676da510df94 } else { if (player.getCommandSenderWorld().isClientSide) { diff --git a/src/main/java/net/minecraft/world/level/block/CommandBlock.java b/src/main/java/net/minecraft/world/level/block/CommandBlock.java -index 061a56e3828767cd6576d5a9edde5f3498e609d0..2e7c03b00bc941b86df6a7f1b2b188c9f0aede22 100644 +index 840226771819024de2c6e84f08f6e354e96474ba..7ef14e4441a329c680a5dfe4bfb5033ffcb8f9d5 100644 --- a/src/main/java/net/minecraft/world/level/block/CommandBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CommandBlock.java -@@ -130,7 +130,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { +@@ -143,7 +143,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { BlockEntity tileentity = world.getBlockEntity(pos); diff --git a/patches/unapplied/server/0418-Ensure-Entity-AABB-s-are-never-invalid.patch b/patches/server/0417-Ensure-Entity-AABB-s-are-never-invalid.patch similarity index 82% rename from patches/unapplied/server/0418-Ensure-Entity-AABB-s-are-never-invalid.patch rename to patches/server/0417-Ensure-Entity-AABB-s-are-never-invalid.patch index 51fac29bda..3100d0d71c 100644 --- a/patches/unapplied/server/0418-Ensure-Entity-AABB-s-are-never-invalid.patch +++ b/patches/server/0417-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 082509d2ab18380b37868decef3fdff6542bf764..78af47c54f8dd3b1b4f81b740bcd438132c27947 100644 +index 1ad820b4954f11d2bab92708eb0c44739317603e..76a1803f806d3bf1a54dae15d8155d6a0920cf07 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -721,8 +721,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -726,8 +726,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } public void setPos(double x, double y, double z) { @@ -19,7 +19,7 @@ index 082509d2ab18380b37868decef3fdff6542bf764..78af47c54f8dd3b1b4f81b740bcd4381 } protected AABB makeBoundingBox() { -@@ -4202,6 +4202,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4244,6 +4244,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S } public final void setPosRaw(double x, double y, double z) { @@ -31,7 +31,7 @@ index 082509d2ab18380b37868decef3fdff6542bf764..78af47c54f8dd3b1b4f81b740bcd4381 // 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()); -@@ -4225,6 +4230,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4267,6 +4272,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S this.levelCallback.onMove(); } diff --git a/patches/unapplied/server/0419-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0418-Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 87% rename from patches/unapplied/server/0419-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/0418-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 5f1ce2b82c..4c691c0920 100644 --- a/patches/unapplied/server/0419-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0418-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 6b7bacb0ea667c488b09da8c2a8a685d3a86608e..219e191ff4d590aee9b7a704ba6fe84c3c12f43a 100644 +index 81d4870060ea418fecfdd01f1357899038c95fe9..87e0cc467a2139e763130a375387b6df46336992 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -782,7 +782,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = new ArrayList(); -@@ -68,6 +69,7 @@ public final class CraftChatMessage { +@@ -67,6 +68,7 @@ public final class CraftChatMessage { Matcher matcher = (keepNewlines ? StringMessage.INCREMENTAL_PATTERN_KEEP_NEWLINES : StringMessage.INCREMENTAL_PATTERN).matcher(message); String match = null; boolean needsAdd = false; @@ -26,7 +26,7 @@ index 19a102792fab30f8f6a7364d0a9b4063d76f1489..7c36d2bd36926c0ae5a0db6a97bd47a8 while (matcher.find()) { int groupId = 0; while ((match = matcher.group(++groupId)) == null) { -@@ -113,7 +115,26 @@ public final class CraftChatMessage { +@@ -112,7 +114,26 @@ public final class CraftChatMessage { throw new AssertionError("Unexpected message format"); } } else { // Color resets formatting diff --git a/patches/unapplied/server/0422-Optimize-Bit-Operations-by-inlining.patch b/patches/server/0421-Optimize-Bit-Operations-by-inlining.patch similarity index 100% rename from patches/unapplied/server/0422-Optimize-Bit-Operations-by-inlining.patch rename to patches/server/0421-Optimize-Bit-Operations-by-inlining.patch diff --git a/patches/unapplied/server/0423-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0422-Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 89% rename from patches/unapplied/server/0423-Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to patches/server/0422-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index 2d30e2b221..0beec63bd1 100644 --- a/patches/unapplied/server/0423-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/0422-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 2ac9b9001f60e2b4c2b660cc104387e49141bcf5..c71a409a457deea6817b863ddbb8bcbf64206544 100644 +index d7a9673e7f07f5bc6739fe814fa2f9205c764b06..d355b46f23201163b70995a883994fcea1ac1689 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -386,7 +386,7 @@ public final class CraftServer implements Server { +@@ -381,7 +381,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 2ac9b9001f60e2b4c2b660cc104387e49141bcf5..c71a409a457deea6817b863ddbb8bcbf this.minimumAPI = this.configuration.getString("settings.minimum-api"); this.loadIcon(); -@@ -939,7 +939,7 @@ public final class CraftServer implements Server { +@@ -934,7 +934,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,10 +44,10 @@ index 2ac9b9001f60e2b4c2b660cc104387e49141bcf5..c71a409a457deea6817b863ddbb8bcbf this.printSaveWarning = false; this.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 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440a44d3a8c 100644 +index b57554333fd90da1f1ebc006cb1d0ebbfca9a499..2d90be2537faf281adc50f856daf3b4e8b842568 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -282,7 +282,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -283,7 +283,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Chunk getChunkAt(int x, int z) { @@ -62,7 +62,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440 return new CraftChunk(chunk); } -@@ -296,6 +302,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -297,6 +303,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { return new CraftChunk(this.getHandle(), x, z); } @@ -75,7 +75,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440 @Override public Chunk getChunkAt(Block block) { Preconditions.checkArgument(block != null, "null block"); -@@ -361,7 +373,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -362,7 +374,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean unloadChunkRequest(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot if (this.isChunkLoaded(x, z)) { @@ -84,7 +84,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440 } return true; -@@ -447,9 +459,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -448,9 +460,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot // Paper start - Optimize this method ChunkPos chunkPos = new ChunkPos(x, z); @@ -98,7 +98,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440 if (immediate == null) { immediate = world.getChunkSource().chunkMap.getUnloadingChunk(x, z); } -@@ -457,7 +472,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -458,7 +473,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!(immediate instanceof ImposterProtoChunk) && !(immediate instanceof net.minecraft.world.level.chunk.LevelChunk)) { return false; // not full status } @@ -107,7 +107,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440 world.getChunk(x, z); // make sure we're at ticket level 32 or lower return true; } -@@ -483,7 +498,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -484,7 +499,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // we do this so we do not re-read the chunk data on disk } @@ -116,7 +116,7 @@ index 5fc0c6652f2dff1b41bb447407a1780bd609c6bb..8306f8cce689260111fbf88b31515440 world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true); return true; // Paper end -@@ -2263,6 +2278,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2269,6 +2284,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { io.papermc.paper.chunk.system.ChunkSystem.scheduleChunkLoad(this.getHandle(), x, z, gen, ChunkStatus.FULL, true, priority, (c) -> { net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> { net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c; diff --git a/patches/unapplied/server/0353-Validate-tripwire-hook-placement-before-update.patch b/patches/unapplied/server/0353-Validate-tripwire-hook-placement-before-update.patch deleted file mode 100644 index fd8a74807c..0000000000 --- a/patches/unapplied/server/0353-Validate-tripwire-hook-placement-before-update.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Shane Freeder -Date: Sat, 7 Mar 2020 00:07:51 +0000 -Subject: [PATCH] Validate tripwire hook placement before update - - -diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -index a5f8c7d9d9998eebce7f15e01c157651b9831516..4a516828e5c6abd63511ee7c93fcff11203cf8d0 100644 ---- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -@@ -175,6 +175,7 @@ public class TripWireHookBlock extends Block { - - this.emitState(world, pos, flag4, flag5, flag2, flag3); - if (!beingRemoved) { -+ if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate - world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3); - if (flag1) { - this.notifyNeighbors(world, pos, enumdirection);