diff --git a/patches/unapplied/server/0806-Add-missing-structure-set-seed-configs.patch b/patches/removed/1.19.3/0806-Add-missing-structure-set-seed-configs.patch similarity index 100% rename from patches/unapplied/server/0806-Add-missing-structure-set-seed-configs.patch rename to patches/removed/1.19.3/0806-Add-missing-structure-set-seed-configs.patch diff --git a/patches/unapplied/server/0759-Always-parse-protochunk-light-sources-unless-it-is-m.patch b/patches/server/0753-Always-parse-protochunk-light-sources-unless-it-is-m.patch similarity index 95% rename from patches/unapplied/server/0759-Always-parse-protochunk-light-sources-unless-it-is-m.patch rename to patches/server/0753-Always-parse-protochunk-light-sources-unless-it-is-m.patch index 2b0620b8d6..c50685ec72 100644 --- a/patches/unapplied/server/0759-Always-parse-protochunk-light-sources-unless-it-is-m.patch +++ b/patches/server/0753-Always-parse-protochunk-light-sources-unless-it-is-m.patch @@ -8,10 +8,10 @@ Chunks not marked as lit will always go through the light engine, so they should always have their block sources parsed. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index 6e39c2c1556f41140b92064a6fa3a38427504aee..577eefd0990b0d6ae237dd685976975d3532d7fa 100644 +index 313a3319c630a4f26f9c53255a0ac67f3c15e410..d4c4d37bcef14e392739d9aae9e20b7d69b05c12 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -@@ -325,16 +325,33 @@ public class ChunkSerializer { +@@ -327,16 +327,33 @@ public class ChunkSerializer { BelowZeroRetrogen belowzeroretrogen = protochunk.getBelowZeroRetrogen(); boolean flag5 = chunkstatus.isOrAfter(ChunkStatus.LIGHT) || belowzeroretrogen != null && belowzeroretrogen.targetStatus().isOrAfter(ChunkStatus.LIGHT); diff --git a/patches/unapplied/server/0760-Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/0754-Fix-removing-recipes-from-RecipeIterator.patch similarity index 100% rename from patches/unapplied/server/0760-Fix-removing-recipes-from-RecipeIterator.patch rename to patches/server/0754-Fix-removing-recipes-from-RecipeIterator.patch diff --git a/patches/unapplied/server/0761-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0755-Prevent-sending-oversized-item-data-in-equipment-and.patch similarity index 89% rename from patches/unapplied/server/0761-Prevent-sending-oversized-item-data-in-equipment-and.patch rename to patches/server/0755-Prevent-sending-oversized-item-data-in-equipment-and.patch index 1403f86eff..0aac85f08d 100644 --- a/patches/unapplied/server/0761-Prevent-sending-oversized-item-data-in-equipment-and.patch +++ b/patches/server/0755-Prevent-sending-oversized-item-data-in-equipment-and.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent sending oversized item data in equipment and metadata diff --git a/src/main/java/net/minecraft/network/syncher/EntityDataSerializers.java b/src/main/java/net/minecraft/network/syncher/EntityDataSerializers.java -index dc6773ac18bc36ac69e7debf15315776033702ee..adaac498f3277e645d615775d8ca8d055d6d6652 100644 +index 6c8505d5d989a2f528a1311a562cd59f4f16fc6d..c5e82ec453a431486a9aed1d6c2637e8b335d0d6 100644 --- a/src/main/java/net/minecraft/network/syncher/EntityDataSerializers.java +++ b/src/main/java/net/minecraft/network/syncher/EntityDataSerializers.java -@@ -38,7 +38,7 @@ public class EntityDataSerializers { +@@ -39,7 +39,7 @@ public class EntityDataSerializers { public static final EntityDataSerializer ITEM_STACK = new EntityDataSerializer() { @Override public void write(FriendlyByteBuf buf, ItemStack value) { @@ -18,10 +18,10 @@ index dc6773ac18bc36ac69e7debf15315776033702ee..adaac498f3277e645d615775d8ca8d05 @Override diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 523a4963b644cec57c7338cdda72b5e17247f49a..715b49e5e00231e7bd4270534039d520b6549c72 100644 +index 64683e218c9c43cfd30514800cfa8da42e37563e..d2fed123ed56eaf550ac2c7a3fcc1678a127bba3 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -310,7 +310,10 @@ public class ServerEntity { +@@ -314,7 +314,10 @@ public class ServerEntity { ItemStack itemstack = ((LivingEntity) this.entity).getItemBySlot(enumitemslot); if (!itemstack.isEmpty()) { @@ -34,10 +34,10 @@ index 523a4963b644cec57c7338cdda72b5e17247f49a..715b49e5e00231e7bd4270534039d520 } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 2aefacac58212d9ba76cf449455241d9c1fd36db..1074ce38a92231bf6c08b1b8e4332dec7b1e04e9 100644 +index bd392ff909a217d069a81b2026ab3ce4c38662f3..4842442f4fd97ed72d1cc67334f976ea771ebb0c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3137,7 +3137,10 @@ public abstract class LivingEntity extends Entity { +@@ -3158,7 +3158,10 @@ public abstract class LivingEntity extends Entity { equipmentChanges.forEach((enumitemslot, itemstack) -> { ItemStack itemstack1 = itemstack.copy(); @@ -49,7 +49,7 @@ index 2aefacac58212d9ba76cf449455241d9c1fd36db..1074ce38a92231bf6c08b1b8e4332dec switch (enumitemslot.getType()) { case HAND: this.setLastHandItem(enumitemslot, itemstack1); -@@ -3150,6 +3153,34 @@ public abstract class LivingEntity extends Entity { +@@ -3171,6 +3174,34 @@ public abstract class LivingEntity extends Entity { ((ServerLevel) this.level).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list)); } diff --git a/patches/unapplied/server/0762-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0756-Hide-unnecessary-itemmeta-from-clients.patch similarity index 77% rename from patches/unapplied/server/0762-Hide-unnecessary-itemmeta-from-clients.patch rename to patches/server/0756-Hide-unnecessary-itemmeta-from-clients.patch index 69a4e5bc16..46d212e6e1 100644 --- a/patches/unapplied/server/0762-Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/0756-Hide-unnecessary-itemmeta-from-clients.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Hide unnecessary itemmeta from clients diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 715b49e5e00231e7bd4270534039d520b6549c72..036d7478c477ce1e794b8311d94f47c42fe9aee9 100644 +index d2fed123ed56eaf550ac2c7a3fcc1678a127bba3..77443525e68fab0211ff48af12020ff0399ba6d0 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -312,7 +312,7 @@ public class ServerEntity { +@@ -316,7 +316,7 @@ public class ServerEntity { if (!itemstack.isEmpty()) { // Paper start - prevent oversized data final ItemStack sanitized = LivingEntity.sanitizeItemStack(itemstack.copy(), false); @@ -18,25 +18,25 @@ index 715b49e5e00231e7bd4270534039d520b6549c72..036d7478c477ce1e794b8311d94f47c4 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index eab752600a2711a73516fa029b8eca17d52fde3c..3ba1af93aabbaa635aae60977abe1ed3f1474044 100644 +index 045f1b81e568d9adca8e5f9374b5a3ce1267d118..ff7298b9ecd11349dfe57aec4ed0ed0b458faa23 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2817,8 +2817,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2716,8 +2716,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + // Refresh the current entity metadata + entity.getEntityData().refresh(player); + // SPIGOT-7136 - Allays +- if (entity instanceof Allay) { +- ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList()))); ++ if (entity instanceof Allay allay) { // Paper ++ ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta + player.containerMenu.sendAllDataToRemote(); + } } - // Paper end - // SPIGOT-7136 - Allays -- if (entity instanceof Allay) { -- ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList()))); -+ if (entity instanceof Allay allay) { // Paper -+ ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta - player.containerMenu.sendAllDataToRemote(); - } - } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1074ce38a92231bf6c08b1b8e4332dec7b1e04e9..6b01f56aadda10a89796f2b017d0fca3e10dfd98 100644 +index 4842442f4fd97ed72d1cc67334f976ea771ebb0c..3d221fd0cec95799763c687222d5d5a917c2171d 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3139,7 +3139,7 @@ public abstract class LivingEntity extends Entity { +@@ -3160,7 +3160,7 @@ public abstract class LivingEntity extends Entity { // Paper start - prevent oversized data ItemStack toSend = sanitizeItemStack(itemstack1, true); @@ -45,7 +45,7 @@ index 1074ce38a92231bf6c08b1b8e4332dec7b1e04e9..6b01f56aadda10a89796f2b017d0fca3 // Paper end switch (enumitemslot.getType()) { case HAND: -@@ -3153,6 +3153,70 @@ public abstract class LivingEntity extends Entity { +@@ -3174,6 +3174,70 @@ public abstract class LivingEntity extends Entity { ((ServerLevel) this.level).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list)); } diff --git a/patches/unapplied/server/0763-Fix-Spigot-growth-modifiers.patch b/patches/server/0757-Fix-Spigot-growth-modifiers.patch similarity index 94% rename from patches/unapplied/server/0763-Fix-Spigot-growth-modifiers.patch rename to patches/server/0757-Fix-Spigot-growth-modifiers.patch index 19101d5d5c..6771da6bdc 100644 --- a/patches/unapplied/server/0763-Fix-Spigot-growth-modifiers.patch +++ b/patches/server/0757-Fix-Spigot-growth-modifiers.patch @@ -11,10 +11,10 @@ Co-authored-by: Jake Potrebic Co-authored-by: Noah van der Aa diff --git a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java -index 7d9056f9d841fbbdeaf1e323d818f2f1267b47e8..4940e101250874111e9c55aeb5b87b28602246f0 100644 +index fd03fe8d596e7ec05f2a35df0b6587dd2534d5a7..fc76cd43655e0f4b8a8d87f90f0a48a8678ef16c 100644 --- a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java -@@ -47,9 +47,17 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements Bonemealabl +@@ -48,9 +48,17 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements Bonemealabl @Override protected BlockState getGrowIntoState(BlockState state, RandomSource random) { @@ -34,7 +34,7 @@ index 7d9056f9d841fbbdeaf1e323d818f2f1267b47e8..4940e101250874111e9c55aeb5b87b28 public ItemStack getCloneItemStack(BlockGetter world, BlockPos pos, BlockState state) { return new ItemStack(Items.GLOW_BERRIES); diff --git a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java -index 4e30917fbc5c539fefc8dc391b902241f7c5ad35..b7517d1e8a5d5eb719de5eda424b7dd2449f1182 100644 +index 53b91cf8092b46dbf45afea9ccf439d565d1914a..3a1aa4e2405090ccebefb7f5944f36462929e221 100644 --- a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java +++ b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java @@ -56,12 +56,18 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements diff --git a/patches/unapplied/server/0764-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0758-Prevent-ContainerOpenersCounter-openCount-from-going.patch similarity index 100% rename from patches/unapplied/server/0764-Prevent-ContainerOpenersCounter-openCount-from-going.patch rename to patches/server/0758-Prevent-ContainerOpenersCounter-openCount-from-going.patch diff --git a/patches/unapplied/server/0765-Add-PlayerItemFrameChangeEvent.patch b/patches/server/0759-Add-PlayerItemFrameChangeEvent.patch similarity index 93% rename from patches/unapplied/server/0765-Add-PlayerItemFrameChangeEvent.patch rename to patches/server/0759-Add-PlayerItemFrameChangeEvent.patch index f9ce7fc78c..11caec573b 100644 --- a/patches/unapplied/server/0765-Add-PlayerItemFrameChangeEvent.patch +++ b/patches/server/0759-Add-PlayerItemFrameChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerItemFrameChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java -index ac0fe310b01506b3b2a767d47f65cefb57f58c7d..d2a77b4ca343d19e1c70afe3f3906a9bd53d0eec 100644 +index 880ca7cb3ebccc16949e24a0230b1f83887b653f..db60d29b051bad8d115b333e6c72287860a73123 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java @@ -3,6 +3,7 @@ package net.minecraft.world.entity.decoration; @@ -16,7 +16,7 @@ index ac0fe310b01506b3b2a767d47f65cefb57f58c7d..d2a77b4ca343d19e1c70afe3f3906a9b import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; -@@ -187,6 +188,13 @@ public class ItemFrame extends HangingEntity { +@@ -188,6 +189,13 @@ public class ItemFrame extends HangingEntity { return true; } // CraftBukkit end @@ -30,7 +30,7 @@ index ac0fe310b01506b3b2a767d47f65cefb57f58c7d..d2a77b4ca343d19e1c70afe3f3906a9b this.dropItem(source.getEntity(), false); this.playSound(this.getRemoveItemSound(), 1.0F, 1.0F); } -@@ -451,13 +459,22 @@ public class ItemFrame extends HangingEntity { +@@ -452,13 +460,22 @@ public class ItemFrame extends HangingEntity { return InteractionResult.FAIL; } } diff --git a/patches/unapplied/server/0766-Add-player-health-update-API.patch b/patches/server/0760-Add-player-health-update-API.patch similarity index 88% rename from patches/unapplied/server/0766-Add-player-health-update-API.patch rename to patches/server/0760-Add-player-health-update-API.patch index f1b7503350..029f2aff54 100644 --- a/patches/unapplied/server/0766-Add-player-health-update-API.patch +++ b/patches/server/0760-Add-player-health-update-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add player health update API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 44d2473625420490e35e79f0388a9890bff18fa8..5fc912dcb196b10f33a738951bdad124df449ec5 100644 +index ea2316ffa7b494f3f5f102b44fc8d3ec6d9a4131..10ff3f8aba814d73af931e6c91ea9a2c421592bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2225,9 +2225,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2227,9 +2227,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().maxHealthCache = getMaxHealth(); } @@ -22,7 +22,7 @@ index 44d2473625420490e35e79f0388a9890bff18fa8..5fc912dcb196b10f33a738951bdad124 if (this.getHandle().queueHealthUpdatePacket) { this.getHandle().queuedHealthUpdatePacket = packet; } else { -@@ -2235,7 +2237,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2237,7 +2239,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end } diff --git a/patches/unapplied/server/0767-Optimize-HashMapPalette.patch b/patches/server/0761-Optimize-HashMapPalette.patch similarity index 100% rename from patches/unapplied/server/0767-Optimize-HashMapPalette.patch rename to patches/server/0761-Optimize-HashMapPalette.patch diff --git a/patches/unapplied/server/0768-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0762-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 95% rename from patches/unapplied/server/0768-Allow-delegation-to-vanilla-chunk-gen.patch rename to patches/server/0762-Allow-delegation-to-vanilla-chunk-gen.patch index 5f4bbbd767..3bfed3844b 100644 --- a/patches/unapplied/server/0768-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/0762-Allow-delegation-to-vanilla-chunk-gen.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c648acdd0066f6c480d08927a3c72524cde32ec7..6a264ba85ca10f34ccda5287f8c2c4d492413ae9 100644 +index 3af2e5d3bdbf82c142f5ea2629456329bda7666f..9e0f99cdc544bdf1ca7ddd1fe7893592bafca2fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2329,6 +2329,90 @@ public final class CraftServer implements Server { - return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(net.minecraft.core.Registry.BIOME_REGISTRY), world); // Paper - Anti-Xray - Add parameters +@@ -2353,6 +2353,90 @@ public final class CraftServer implements Server { + return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME), world); // Paper - Anti-Xray - Add parameters } + // Paper start diff --git a/patches/unapplied/server/0769-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0763-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch similarity index 98% rename from patches/unapplied/server/0769-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch rename to patches/server/0763-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch index 7a1080497f..03b178c866 100644 --- a/patches/unapplied/server/0769-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch +++ b/patches/server/0763-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch @@ -1180,10 +1180,10 @@ index 0000000000000000000000000000000000000000..d67a40e7be030142443680c89e1763fc + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 1463d210656c801f8da89d8a2060680684e9c46e..dbd0f0be3c0aaa55fa52f84e557d6a1e29c1146b 100644 +index cbe4bf568d5bc97b316f3a9af7a1ad9d88f7f3b5..1b97987788a7180e2ab2c9edf4646925fa691fd6 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -408,7 +408,7 @@ public class ServerPlayer extends Player { +@@ -413,7 +413,7 @@ public class ServerPlayer extends Player { if (blockposition1 != null) { this.moveTo(blockposition1, 0.0F, 0.0F); @@ -1192,7 +1192,7 @@ index 1463d210656c801f8da89d8a2060680684e9c46e..dbd0f0be3c0aaa55fa52f84e557d6a1e break; } } -@@ -416,7 +416,7 @@ public class ServerPlayer extends Player { +@@ -421,7 +421,7 @@ public class ServerPlayer extends Player { } else { this.moveTo(blockposition, 0.0F, 0.0F); @@ -1202,10 +1202,10 @@ index 1463d210656c801f8da89d8a2060680684e9c46e..dbd0f0be3c0aaa55fa52f84e557d6a1e } } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 279b7953638d1400072bd153dc3d0c63efdf9035..870a48360dd35c190171f1302393f325f0db6692 100644 +index c4e5e2b6283bd3163711a09d6a647c516ed8a1c3..0d9a50fd3e0d97f49c35e2fd743f9e54eaa3b6f0 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -943,7 +943,7 @@ public abstract class PlayerList { +@@ -951,7 +951,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper @@ -1213,9 +1213,9 @@ index 279b7953638d1400072bd153dc3d0c63efdf9035..870a48360dd35c190171f1302393f325 + while (avoidSuffocation && !worldserver1.noCollision(entityplayer1, entityplayer1.getBoundingBox(), true) && entityplayer1.getY() < (double) worldserver1.getMaxBuildHeight()) { // Paper - make sure this loads chunks, we default to NOT loading now entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ()); } - // CraftBukkit start + diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3f71b0f328842b3659bc01af8502cdc9561c7e5d..97e308353f6e634887a9d5bc9559f84e46f4a507 100644 +index 9d7304e97ecc56b78e1a890762346d192c792f4c..9c2d5619f22a8be2d22c6ae926630132c2fffb30 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1160,9 +1160,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -1266,7 +1266,7 @@ index 3f71b0f328842b3659bc01af8502cdc9561c7e5d..97e308353f6e634887a9d5bc9559f84e if (this.remainingFireTicks <= 0) { this.setRemainingFireTicks(-this.getFireImmuneTicks()); } -@@ -1306,32 +1341,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1314,32 +1349,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } private Vec3 collide(Vec3 movement) { @@ -1366,7 +1366,7 @@ index 3f71b0f328842b3659bc01af8502cdc9561c7e5d..97e308353f6e634887a9d5bc9559f84e } public static Vec3 collideBoundingBox(@Nullable Entity entity, Vec3 movement, AABB entityBoundingBox, Level world, List collisions) { -@@ -2454,11 +2535,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2469,11 +2550,30 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { float f = this.dimensions.width * 0.8F; AABB axisalignedbb = AABB.ofSize(this.getEyePosition(), (double) f, 1.0E-6D, (double) f); @@ -1471,7 +1471,7 @@ index 56d94c94fb0d4dc468bb5d69be655ddd5c6b5360..d7d396ad73866a97cd9f63b34ad8c587 List getEntityCollisions(@Nullable Entity entity, AABB box); diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java -index e994db4f81bb94b2e5e8e142e01c05e90a09fa26..87beea39636b641dc5b46c2755a00285b7671ac5 100644 +index 66a5783e2a83c75ca46d1fd6f97d9de733c01a09..d860ddae508f53d06f74d8ae0efdfc500c1ddf07 100644 --- a/src/main/java/net/minecraft/world/level/EntityGetter.java +++ b/src/main/java/net/minecraft/world/level/EntityGetter.java @@ -49,7 +49,7 @@ public interface EntityGetter { @@ -1493,14 +1493,13 @@ index e994db4f81bb94b2e5e8e142e01c05e90a09fa26..87beea39636b641dc5b46c2755a00285 return List.of(); } else { 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 bfcd61e09a307e99d6f2e7edae33a0a069abcb51..b86c17b5572f8f74bfefd0f3c6f9d25187574392 100644 +index efbcd2b78d75481793e0f29a7431d3eb76489abc..9ebc53d434737c8cd39073470b2b5fcbad167812 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 -@@ -734,6 +734,13 @@ public abstract class BlockBehaviour { - protected boolean isTicking; - protected FluidState fluid; - // Paper end -+ // Paper start +@@ -762,6 +762,12 @@ public abstract class BlockBehaviour implements FeatureElement { + return this.conditionallyFullOpaque; + } + // Paper end - starlight + private long blockCollisionBehavior = io.papermc.paper.util.CollisionUtil.KNOWN_SPECIAL_BLOCK; + + public final long getBlockCollisionBehavior() { @@ -1509,8 +1508,8 @@ index bfcd61e09a307e99d6f2e7edae33a0a069abcb51..b86c17b5572f8f74bfefd0f3c6f9d251 + // Paper end public void initCache() { - this.fluid = this.getBlock().getFluidState(this.asState()); // Paper - moved from getFluid() -@@ -744,6 +751,35 @@ public abstract class BlockBehaviour { + this.fluidState = ((Block) this.owner).getFluidState(this.asState()); +@@ -772,6 +778,35 @@ public abstract class BlockBehaviour implements FeatureElement { this.shapeExceedsCube = this.cache == null || this.cache.largeCollisionShape; // Paper - moved from actual method to here this.opacityIfCached = this.cache == null || this.isConditionallyFullOpaque() ? -1 : this.cache.lightBlock; // Paper - starlight - cache opacity for light diff --git a/patches/unapplied/server/0770-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0764-Optimise-collision-checking-in-player-move-packet-ha.patch similarity index 93% rename from patches/unapplied/server/0770-Optimise-collision-checking-in-player-move-packet-ha.patch rename to patches/server/0764-Optimise-collision-checking-in-player-move-packet-ha.patch index 8596577e59..3ef4de1fc3 100644 --- a/patches/unapplied/server/0770-Optimise-collision-checking-in-player-move-packet-ha.patch +++ b/patches/server/0764-Optimise-collision-checking-in-player-move-packet-ha.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimise collision checking in player move packet handling Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c36977f3eae7 100644 +index ff7298b9ecd11349dfe57aec4ed0ed0b458faa23..41461d9a10abe49b823b92b3817693dbec70eb9e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -655,7 +655,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -647,7 +647,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } @@ -18,7 +18,7 @@ index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c369 d6 = d3 - this.vehicleLastGoodX; // Paper - diff on change, used for checking large move vectors above d7 = d4 - this.vehicleLastGoodY - 1.0E-6D; // Paper - diff on change, used for checking large move vectors above -@@ -663,6 +663,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -655,6 +655,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag1 = entity.verticalCollisionBelow; entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); @@ -26,7 +26,7 @@ index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c369 double d11 = d7; d6 = d3 - entity.getX(); -@@ -676,16 +677,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -668,16 +669,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag2 = false; if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot @@ -54,7 +54,7 @@ index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c369 entity.absMoveTo(d0, d1, d2, f, f1); this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit this.connection.send(new ClientboundMoveVehiclePacket(entity)); -@@ -771,7 +780,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -763,7 +772,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } private boolean noBlocksAround(Entity entity) { @@ -88,7 +88,7 @@ index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c369 } @Override -@@ -1351,7 +1385,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1343,7 +1377,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (this.awaitingPositionFromClient != null) { @@ -97,7 +97,7 @@ index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c369 this.awaitingTeleportTime = this.tickCount; this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot()); } -@@ -1445,7 +1479,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1437,7 +1471,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } @@ -106,7 +106,7 @@ index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c369 d7 = d0 - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above d8 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above -@@ -1486,6 +1520,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1478,6 +1512,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag1 = this.player.verticalCollisionBelow; this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); @@ -114,7 +114,7 @@ index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c369 this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move // Paper start - prevent position desync if (this.awaitingPositionFromClient != null) { -@@ -1505,12 +1540,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1497,12 +1532,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag2 = false; if (!this.player.isChangingDimension() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot @@ -138,9 +138,9 @@ index 3ba1af93aabbaa635aae60977abe1ed3f1474044..d4a9c03c557c14069a0227363c61c369 + } + if (!this.player.noPhysics && !this.player.isSleeping() && teleportBack) { // Paper end - optimise out extra getCubes this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet(), false); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet. + this.player.doCheckFallDamage(this.player.getY() - d6, packet.isOnGround()); } else { - // CraftBukkit start - fire PlayerMoveEvent -@@ -1596,6 +1642,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1589,6 +1635,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } diff --git a/patches/unapplied/server/0771-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/0765-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch similarity index 90% rename from patches/unapplied/server/0771-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch rename to patches/server/0765-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch index ffb998758e..f62838aadb 100644 --- a/patches/unapplied/server/0771-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch +++ b/patches/server/0765-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch @@ -6,13 +6,13 @@ Subject: [PATCH] Fix ChunkSnapshot#isSectionEmpty(int) and optimize diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 7f23c69e7d6232190a2c75cbc79e1ea56971e8fb..75c6b0aa2cb4ae8637460006ff24d7f6028396be 100644 +index 1ac0778fba70ba9f09487c76e086b5a873c6c12a..f7e19bb7d2ff8f8aaf061cec16462913d77c10d5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -283,13 +283,17 @@ public class CraftChunk implements Chunk { +@@ -284,13 +284,17 @@ public class CraftChunk implements Chunk { PalettedContainerRO>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null; - Registry iregistry = this.worldServer.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY); + Registry iregistry = this.worldServer.registryAccess().registryOrThrow(Registries.BIOME); - Codec>> biomeCodec = PalettedContainer.codecRO(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getHolderOrThrow(Biomes.PLAINS)); for (int i = 0; i < cs.length; i++) { @@ -31,7 +31,7 @@ index 7f23c69e7d6232190a2c75cbc79e1ea56971e8fb..75c6b0aa2cb4ae8637460006ff24d7f6 LevelLightEngine lightengine = chunk.level.getLightEngine(); DataLayer skyLightArray = lightengine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(x, i, z)); -@@ -308,8 +312,7 @@ public class CraftChunk implements Chunk { +@@ -309,8 +313,7 @@ public class CraftChunk implements Chunk { } if (biome != null) { diff --git a/patches/unapplied/server/0773-Add-more-Campfire-API.patch b/patches/server/0766-Add-more-Campfire-API.patch similarity index 95% rename from patches/unapplied/server/0773-Add-more-Campfire-API.patch rename to patches/server/0766-Add-more-Campfire-API.patch index 5381096620..5761fef3d0 100644 --- a/patches/unapplied/server/0773-Add-more-Campfire-API.patch +++ b/patches/server/0766-Add-more-Campfire-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more Campfire API diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java -index 18b22efe9f5335bb49aa0e899727d1911dc20718..8e198941b4ad7845d73ab1cfea5ac07b0014fe22 100644 +index 06df710f58ca7d55b19c0db9d393a73ca6e5aa79..830326496e2f961682daadc7a7859247042b4cdd 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java @@ -39,6 +39,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { @@ -34,7 +34,7 @@ index 18b22efe9f5335bb49aa0e899727d1911dc20718..8e198941b4ad7845d73ab1cfea5ac07b if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) { SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack}); -@@ -163,6 +167,16 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { +@@ -165,6 +169,16 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { System.arraycopy(aint, 0, this.cookingTime, 0, Math.min(this.cookingTime.length, aint.length)); } @@ -51,7 +51,7 @@ index 18b22efe9f5335bb49aa0e899727d1911dc20718..8e198941b4ad7845d73ab1cfea5ac07b } @Override -@@ -171,6 +185,13 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { +@@ -173,6 +187,13 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { ContainerHelper.saveAllItems(nbt, this.items, true); nbt.putIntArray("CookingTimes", this.cookingProgress); nbt.putIntArray("CookingTotalTimes", this.cookingTime); diff --git a/patches/unapplied/server/0774-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch b/patches/server/0767-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch similarity index 97% rename from patches/unapplied/server/0774-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch rename to patches/server/0767-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch index c5bfc50ff7..018059c29d 100644 --- a/patches/unapplied/server/0774-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch +++ b/patches/server/0767-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch @@ -47,7 +47,7 @@ index 9bae47f99336c377beb72c4b50b7f01cb4db15da..dcfe090c269d4cbcc2eb1b6f85392848 ByteBuffer bytebuffer = ByteBuffer.wrap(this.buf, 0, this.count); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index e71a451a6b385716cc46db7350b58b4192304547..8db3bcc63aeb23e5b50864ebea675acc75d184ff 100644 +index d5b501bcb33a785ef0301bf6bb8d396b9d4fbb6a..bd502ca721de0cab438d995efa00ad0554c0d2fe 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java @@ -302,10 +302,17 @@ public class RegionFileStorage implements AutoCloseable { diff --git a/patches/unapplied/server/0775-Fix-tripwire-state-inconsistency.patch b/patches/server/0768-Fix-tripwire-state-inconsistency.patch similarity index 100% rename from patches/unapplied/server/0775-Fix-tripwire-state-inconsistency.patch rename to patches/server/0768-Fix-tripwire-state-inconsistency.patch diff --git a/patches/unapplied/server/0776-Fix-fluid-logging-on-Block-breakNaturally.patch b/patches/server/0769-Fix-fluid-logging-on-Block-breakNaturally.patch similarity index 86% rename from patches/unapplied/server/0776-Fix-fluid-logging-on-Block-breakNaturally.patch rename to patches/server/0769-Fix-fluid-logging-on-Block-breakNaturally.patch index 1f9012a293..d86bd2dae1 100644 --- a/patches/unapplied/server/0776-Fix-fluid-logging-on-Block-breakNaturally.patch +++ b/patches/server/0769-Fix-fluid-logging-on-Block-breakNaturally.patch @@ -7,10 +7,10 @@ Leaves fluid if the block broken was fluid-logged which is what happens if a player breaks a fluid-logged block diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 2881bcb570dc86a7602309e1f540ecd1c7f00284..0030ac394d44acddcd2fc716277ae2b509a378af 100644 +index 016f58f452e19a00d72a277d41bcbbb107e4232b..2f5b9083a3d11834fca74d11d6ba10d325a7f7c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -515,6 +515,7 @@ public class CraftBlock implements Block { +@@ -517,6 +517,7 @@ public class CraftBlock implements Block { net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS(); net.minecraft.world.level.block.Block block = iblockdata.getBlock(); net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item); @@ -18,7 +18,7 @@ index 2881bcb570dc86a7602309e1f540ecd1c7f00284..0030ac394d44acddcd2fc716277ae2b5 boolean result = false; // Modelled off EntityHuman#hasBlock -@@ -525,7 +526,7 @@ public class CraftBlock implements Block { +@@ -527,7 +528,7 @@ public class CraftBlock implements Block { } // SPIGOT-6778: Directly call setBlock instead of setTypeAndData, so that the tile entiy is not removed and custom remove logic is run. diff --git a/patches/unapplied/server/0777-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0770-Forward-CraftEntity-in-teleport-command.patch similarity index 88% rename from patches/unapplied/server/0777-Forward-CraftEntity-in-teleport-command.patch rename to patches/server/0770-Forward-CraftEntity-in-teleport-command.patch index 4c29f6a838..abc37aa836 100644 --- a/patches/unapplied/server/0777-Forward-CraftEntity-in-teleport-command.patch +++ b/patches/server/0770-Forward-CraftEntity-in-teleport-command.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 97e308353f6e634887a9d5bc9559f84e46f4a507..305a70f4b4646fa6cb8f36af367222a2b7fa39d4 100644 +index 9c2d5619f22a8be2d22c6ae926630132c2fffb30..12a032f265a4a5aaac248599cc263896279b54bb 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3276,6 +3276,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3302,6 +3302,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void restoreFrom(Entity original) { @@ -22,7 +22,7 @@ index 97e308353f6e634887a9d5bc9559f84e46f4a507..305a70f4b4646fa6cb8f36af367222a2 CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag()); nbttagcompound.remove("Dimension"); -@@ -3357,10 +3364,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3383,10 +3390,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit } diff --git a/patches/unapplied/server/0778-Improve-scoreboard-entries.patch b/patches/server/0771-Improve-scoreboard-entries.patch similarity index 100% rename from patches/unapplied/server/0778-Improve-scoreboard-entries.patch rename to patches/server/0771-Improve-scoreboard-entries.patch diff --git a/patches/unapplied/server/0779-Entity-powdered-snow-API.patch b/patches/server/0772-Entity-powdered-snow-API.patch similarity index 91% rename from patches/unapplied/server/0779-Entity-powdered-snow-API.patch rename to patches/server/0772-Entity-powdered-snow-API.patch index a49f65775c..4aec4d27de 100644 --- a/patches/unapplied/server/0779-Entity-powdered-snow-API.patch +++ b/patches/server/0772-Entity-powdered-snow-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Entity powdered snow API public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 99a9ddbeee75611c5bab8d0e8952a9291bf73a16..446e6e97c4468d3cd60576c8d37e075f5a5b4dba 100644 +index 726a4ae7ab928eda3ae1c1e98f3421575af2e065..03b20cec361a2eff27c1187b2a4c5a65d2b4f9b4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1340,5 +1340,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1342,5 +1342,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { entity.setRot(location.getYaw(), location.getPitch()); return !entity.valid && entity.level.addFreshEntity(entity, reason); } diff --git a/patches/unapplied/server/0780-Add-API-for-item-entity-health.patch b/patches/server/0773-Add-API-for-item-entity-health.patch similarity index 100% rename from patches/unapplied/server/0780-Add-API-for-item-entity-health.patch rename to patches/server/0773-Add-API-for-item-entity-health.patch diff --git a/patches/unapplied/server/0781-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0774-Fix-entity-type-tags-suggestions-in-selectors.patch similarity index 90% rename from patches/unapplied/server/0781-Fix-entity-type-tags-suggestions-in-selectors.patch rename to patches/server/0774-Fix-entity-type-tags-suggestions-in-selectors.patch index 4e3235ade3..2d602e1ad6 100644 --- a/patches/unapplied/server/0781-Fix-entity-type-tags-suggestions-in-selectors.patch +++ b/patches/server/0774-Fix-entity-type-tags-suggestions-in-selectors.patch @@ -10,10 +10,10 @@ when if this was fixed on the client, that wouldn't be needed. Mojira Issue: https://bugs.mojang.com/browse/MC-235045 diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index 2ff021966426dd6c7c1081fbcfacf4677b404264..81f4e3c869623b6dd2d80886652fa41791fe7032 100644 +index c2af60bdb755034e46b85143826a29c4482d58f5..ae5dd08de75a7ed231295f306fd0974da3988249 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java -@@ -413,4 +413,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy +@@ -416,4 +416,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy return this.source.getBukkitSender(this); } // CraftBukkit end @@ -35,10 +35,10 @@ index 2ff021966426dd6c7c1081fbcfacf4677b404264..81f4e3c869623b6dd2d80886652fa417 + // Paper end } diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 27093aed1f4112a5414671fd5d9c4e683011506d..67ab16743b36dbf8b4336e33988d8e78433f566d 100644 +index 9cf69ef59ef4330a69753cab7aa8ec7716587d32..6a82d83bca27b3b023d9d6771d194b4db9c97dc2 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -433,6 +433,7 @@ public class Commands { +@@ -441,6 +441,7 @@ public class Commands { private void fillUsableCommands(CommandNode tree, CommandNode result, CommandSourceStack source, Map, CommandNode> resultNodes) { Iterator iterator = tree.getChildren().iterator(); @@ -46,7 +46,7 @@ index 27093aed1f4112a5414671fd5d9c4e683011506d..67ab16743b36dbf8b4336e33988d8e78 while (iterator.hasNext()) { CommandNode commandnode2 = (CommandNode) iterator.next(); // Paper start -@@ -459,6 +460,12 @@ public class Commands { +@@ -467,6 +468,12 @@ public class Commands { if (requiredargumentbuilder.getSuggestionsProvider() != null) { requiredargumentbuilder.suggests(SuggestionProviders.safelySwap(requiredargumentbuilder.getSuggestionsProvider())); @@ -73,10 +73,10 @@ index 850db283bf12345e9e7d7e8e590dbe8135c6dce1..a2ea64b7ec5f47224312a1e08dd64347 try { argumentparserselector.parse(); diff --git a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java -index ad99d67af92cda03beb1142b02082ee1bfc8a64a..a57ae219d57ed47baedfb73b3d815f39d4f87035 100644 +index cdc1319a7cb45a7c5ea30885958b8c3c54f0a241..4cc2ee22369aef22c9bf9d2b244c7278d6db39bb 100644 --- a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java +++ b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java -@@ -115,12 +115,19 @@ public class EntitySelectorParser { +@@ -113,12 +113,19 @@ public class EntitySelectorParser { private boolean hasScores; private boolean hasAdvancements; private boolean usesSelectors; @@ -97,10 +97,10 @@ index ad99d67af92cda03beb1142b02082ee1bfc8a64a..a57ae219d57ed47baedfb73b3d815f39 this.level = MinMaxBounds.Ints.ANY; this.rotX = WrappedMinMaxBounds.ANY; diff --git a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java -index c2b26a089c423e5df9a5cbfd1c70efbd1acb0e7a..f2376374c4c6efdfd5cfcea4d30c4b8b4dbbb0d5 100644 +index d34d70029ef30ea8c4f1598f676ad65557c066e1..b6abbf5775b8aa73d32494e6ac0e9afbeb534ae2 100644 --- a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java +++ b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java -@@ -67,6 +67,19 @@ public class EntitySelectorOptions { +@@ -66,6 +66,19 @@ public class EntitySelectorOptions { public static final DynamicCommandExceptionType ERROR_ENTITY_TYPE_INVALID = new DynamicCommandExceptionType((entity) -> { return Component.translatable("argument.entity.options.type.invalid", entity); }); @@ -120,12 +120,12 @@ index c2b26a089c423e5df9a5cbfd1c70efbd1acb0e7a..f2376374c4c6efdfd5cfcea4d30c4b8b private static void register(String id, EntitySelectorOptions.Modifier handler, Predicate condition, Component description) { OPTIONS.put(id, new EntitySelectorOptions.Option(handler, condition, description)); -@@ -314,6 +327,12 @@ public class EntitySelectorOptions { +@@ -313,6 +326,12 @@ public class EntitySelectorOptions { if (reader.isTag()) { - TagKey> tagKey = TagKey.create(Registry.ENTITY_TYPE_REGISTRY, ResourceLocation.read(reader.getReader())); + TagKey> tagKey = TagKey.create(Registries.ENTITY_TYPE, ResourceLocation.read(reader.getReader())); + // Paper start - throw error if invalid entity tag (only on suggestions to keep cmd success behavior) -+ if (reader.parsingEntityArgumentSuggestions && io.papermc.paper.configuration.GlobalConfiguration.get().commands.fixTargetSelectorTagCompletion && !Registry.ENTITY_TYPE.isKnownTagName(tagKey)) { ++ if (reader.parsingEntityArgumentSuggestions && io.papermc.paper.configuration.GlobalConfiguration.get().commands.fixTargetSelectorTagCompletion && net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.getTag(tagKey).isEmpty()) { + reader.getReader().setCursor(i); + throw ERROR_ENTITY_TAG_INVALID.createWithContext(reader.getReader(), tagKey); + } diff --git a/patches/unapplied/server/0782-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0775-Configurable-max-block-light-for-monster-spawning.patch similarity index 100% rename from patches/unapplied/server/0782-Configurable-max-block-light-for-monster-spawning.patch rename to patches/server/0775-Configurable-max-block-light-for-monster-spawning.patch diff --git a/patches/unapplied/server/0783-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0776-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch similarity index 100% rename from patches/unapplied/server/0783-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch rename to patches/server/0776-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch diff --git a/patches/unapplied/server/0784-Load-effect-amplifiers-greater-than-127-correctly.patch b/patches/server/0777-Load-effect-amplifiers-greater-than-127-correctly.patch similarity index 85% rename from patches/unapplied/server/0784-Load-effect-amplifiers-greater-than-127-correctly.patch rename to patches/server/0777-Load-effect-amplifiers-greater-than-127-correctly.patch index 768bf70b1f..47f8f8c050 100644 --- a/patches/unapplied/server/0784-Load-effect-amplifiers-greater-than-127-correctly.patch +++ b/patches/server/0777-Load-effect-amplifiers-greater-than-127-correctly.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Load effect amplifiers greater than 127 correctly MOJIRA: MC-118857 diff --git a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java -index 3232ecbf96761528be1bc88f223b51771386ad37..f5c9be3fde2654bd5a6b3ee737afe96a9393e836 100644 +index 5ac1aad619a71684a48a2cbd73a8cefc66c587b7..038ba61e4845a4a71bb78ba388ed249d19529b78 100644 --- a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java +++ b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java -@@ -265,7 +265,7 @@ public class MobEffectInstance implements Comparable { +@@ -264,7 +264,7 @@ public class MobEffectInstance implements Comparable { } private static MobEffectInstance loadSpecifiedEffect(MobEffect type, CompoundTag nbt) { diff --git a/patches/unapplied/server/0785-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/0778-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch similarity index 100% rename from patches/unapplied/server/0785-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch rename to patches/server/0778-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch diff --git a/patches/unapplied/server/0786-Fix-bees-aging-inside-hives.patch b/patches/server/0779-Fix-bees-aging-inside-hives.patch similarity index 100% rename from patches/unapplied/server/0786-Fix-bees-aging-inside-hives.patch rename to patches/server/0779-Fix-bees-aging-inside-hives.patch diff --git a/patches/unapplied/server/0787-Bucketable-API.patch b/patches/server/0780-Bucketable-API.patch similarity index 96% rename from patches/unapplied/server/0787-Bucketable-API.patch rename to patches/server/0780-Bucketable-API.patch index ff1194970a..3dd4d8263f 100644 --- a/patches/unapplied/server/0787-Bucketable-API.patch +++ b/patches/server/0780-Bucketable-API.patch @@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..c4eee682f5b8cd82f71f92f0549f39b7 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java -index cd751a13a29c34be1d084253f19bf2dce8399d01..cdaf860ec1b84c4ad9f2345968786d878f483f74 100644 +index 2947298fe69aa8330d4fe399bf2441c367e8bd80..a82acbbe62bf6aa497e627587e2f3b9be2fbf487 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java @@ -5,7 +5,7 @@ import org.bukkit.craftbukkit.CraftServer; diff --git a/patches/unapplied/server/0788-Validate-usernames.patch b/patches/server/0781-Validate-usernames.patch similarity index 83% rename from patches/unapplied/server/0788-Validate-usernames.patch rename to patches/server/0781-Validate-usernames.patch index 114e581a31..693a4046cb 100644 --- a/patches/unapplied/server/0788-Validate-usernames.patch +++ b/patches/server/0781-Validate-usernames.patch @@ -5,19 +5,19 @@ Subject: [PATCH] Validate usernames diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index e8d3f455a1a08606568079a3811e2b3ed9d666c7..d6fa1fb3e06a3712b1910990d5b706187c12b51a 100644 +index 1a88f9f49aea58321d1c1d4d720944c565c00968..b1648a1cfcc64b77c7bbec19f77d2c968b063fa3 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -65,6 +65,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se - private ServerPlayer delayedAcceptPlayer; +@@ -60,6 +60,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + private final String serverId; @Nullable - private ProfilePublicKey.Data profilePublicKeyData; + private ServerPlayer delayedAcceptPlayer; + public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) { this.state = ServerLoginPacketListenerImpl.State.HELLO; -@@ -244,10 +245,38 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se - } +@@ -212,10 +213,38 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + // Paper end } + // Paper start - validate usernames @@ -52,14 +52,14 @@ index e8d3f455a1a08606568079a3811e2b3ed9d666c7..d6fa1fb3e06a3712b1910990d5b70618 + } + } + // Paper end - validate usernames - this.profilePublicKeyData = (ProfilePublicKey.Data) packet.publicKey().orElse(null); // CraftBukkit - decompile error GameProfile gameprofile = this.server.getSingleplayerProfile(); + if (gameprofile != null && packet.name().equalsIgnoreCase(gameprofile.getName())) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 870a48360dd35c190171f1302393f325f0db6692..10a4b9b2a954fc5d86ebf3f643cdc940911e7693 100644 +index 0d9a50fd3e0d97f49c35e2fd743f9e54eaa3b6f0..a12c3c5c9f7733f3e84a676cd4e58b95e9ad49bf 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -714,7 +714,7 @@ public abstract class PlayerList { +@@ -722,7 +722,7 @@ public abstract class PlayerList { for (int i = 0; i < this.players.size(); ++i) { entityplayer = (ServerPlayer) this.players.get(i); diff --git a/patches/unapplied/server/0789-Make-water-animal-spawn-height-configurable.patch b/patches/server/0782-Make-water-animal-spawn-height-configurable.patch similarity index 100% rename from patches/unapplied/server/0789-Make-water-animal-spawn-height-configurable.patch rename to patches/server/0782-Make-water-animal-spawn-height-configurable.patch diff --git a/patches/unapplied/server/0790-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0783-Expose-vanilla-BiomeProvider-from-WorldInfo.patch similarity index 84% rename from patches/unapplied/server/0790-Expose-vanilla-BiomeProvider-from-WorldInfo.patch rename to patches/server/0783-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 69fe5912b1..97929c0a08 100644 --- a/patches/unapplied/server/0790-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0783-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,36 +5,36 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 75651db840072806bb4ef15c4de370fdf6b46c05..2699381f72ff00bb0a9711e3b286e820f1b8dc32 100644 +index 0868805c78d991c602d8f1d1b5aeb5c790c13384..6986d5475b090bca60b5ae892512fd5e55ae9b07 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -562,7 +562,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver)); + LevelStem worlddimension = (LevelStem) dimensions.get(dimensionKey); -- org.bukkit.generator.WorldInfo worldInfo = new org.bukkit.craftbukkit.generator.CraftWorldInfo(iworlddataserver, worldSession, org.bukkit.World.Environment.getEnvironment(dimension), worlddimension.typeHolder().value()); -+ org.bukkit.generator.WorldInfo worldInfo = new org.bukkit.craftbukkit.generator.CraftWorldInfo(iworlddataserver, worldSession, org.bukkit.World.Environment.getEnvironment(dimension), worlddimension.typeHolder().value(), worlddimension.generator(), this.registryAccess()); // Paper +- org.bukkit.generator.WorldInfo worldInfo = new org.bukkit.craftbukkit.generator.CraftWorldInfo(iworlddataserver, worldSession, org.bukkit.World.Environment.getEnvironment(dimension), worlddimension.type().value()); ++ org.bukkit.generator.WorldInfo worldInfo = new org.bukkit.craftbukkit.generator.CraftWorldInfo(iworlddataserver, worldSession, org.bukkit.World.Environment.getEnvironment(dimension), worlddimension.type().value(), worlddimension.generator(), this.registryAccess()); // Paper if (biomeProvider == null && gen != null) { biomeProvider = gen.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6a264ba85ca10f34ccda5287f8c2c4d492413ae9..74440a86dd163d5d624b483a5a8b2b993d53e2fb 100644 +index 9e0f99cdc544bdf1ca7ddd1fe7893592bafca2fd..1fa90e90b1989aa9ce72beea6c15cd8fb1e24d06 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1212,7 +1212,7 @@ public final class CraftServer implements Server { - net.minecraft.core.Registry iregistry = worlddata.worldGenSettings().dimensions(); +@@ -1236,7 +1236,7 @@ public final class CraftServer implements Server { + List list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata)); LevelStem worlddimension = (LevelStem) iregistry.get(actualDimension); -- WorldInfo worldInfo = new CraftWorldInfo(worlddata, worldSession, creator.environment(), worlddimension.typeHolder().value()); -+ WorldInfo worldInfo = new CraftWorldInfo(worlddata, worldSession, creator.environment(), worlddimension.typeHolder().value(), worlddimension.generator(), this.getHandle().getServer().registryAccess()); // Paper +- WorldInfo worldInfo = new CraftWorldInfo(worlddata, worldSession, creator.environment(), worlddimension.type().value()); ++ WorldInfo worldInfo = new CraftWorldInfo(worlddata, worldSession, creator.environment(), worlddimension.type().value(), worlddimension.generator(), this.getHandle().getServer().registryAccess()); // Paper if (biomeProvider == null && generator != null) { biomeProvider = generator.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 80abef83b4b2533fdc50773d4d76c3c6af662df1..579fd470e6198a5caefaaf815510ca1f78325f68 100644 +index 7a3aaeb5191f03b8288dde7567bed686150e70a0..c9ec47de502adfc63f5d3ef4ec479208635f3967 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -200,6 +200,30 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -199,6 +199,30 @@ public class CraftWorld extends CraftRegionAccessor implements World { public int getPlayerCount() { return world.players().size(); } @@ -66,7 +66,7 @@ index 80abef83b4b2533fdc50773d4d76c3c6af662df1..579fd470e6198a5caefaaf815510ca1f private static final Random rand = new Random(); diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftWorldInfo.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftWorldInfo.java -index 3795dc9b12d62113146e803554283acd8d0e5db9..b9af0c68bfa877314de0d45741a54795b581d9b8 100644 +index 5d655d6cd3e23e0287069f8bdf77601487e862fd..e17366910813a6149d3cd403a54de2daf9008cf8 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CraftWorldInfo.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftWorldInfo.java @@ -17,8 +17,14 @@ public class CraftWorldInfo implements WorldInfo { diff --git a/patches/unapplied/server/0791-Add-config-option-for-worlds-affected-by-time-cmd.patch b/patches/server/0784-Add-config-option-for-worlds-affected-by-time-cmd.patch similarity index 100% rename from patches/unapplied/server/0791-Add-config-option-for-worlds-affected-by-time-cmd.patch rename to patches/server/0784-Add-config-option-for-worlds-affected-by-time-cmd.patch diff --git a/patches/unapplied/server/0792-Add-new-overload-to-PersistentDataContainer-has.patch b/patches/server/0785-Add-new-overload-to-PersistentDataContainer-has.patch similarity index 100% rename from patches/unapplied/server/0792-Add-new-overload-to-PersistentDataContainer-has.patch rename to patches/server/0785-Add-new-overload-to-PersistentDataContainer-has.patch diff --git a/patches/unapplied/server/0793-Multiple-Entries-with-Scoreboards.patch b/patches/server/0786-Multiple-Entries-with-Scoreboards.patch similarity index 100% rename from patches/unapplied/server/0793-Multiple-Entries-with-Scoreboards.patch rename to patches/server/0786-Multiple-Entries-with-Scoreboards.patch diff --git a/patches/unapplied/server/0794-Reset-placed-block-on-exception.patch b/patches/server/0787-Reset-placed-block-on-exception.patch similarity index 91% rename from patches/unapplied/server/0794-Reset-placed-block-on-exception.patch rename to patches/server/0787-Reset-placed-block-on-exception.patch index 3881c0d6de..308089d693 100644 --- a/patches/unapplied/server/0794-Reset-placed-block-on-exception.patch +++ b/patches/server/0787-Reset-placed-block-on-exception.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset placed block on exception diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index 78cac63e5bd7c84f59b8e00ee40899be78e8cdb1..00d31df5ba7e147b4b969a89cfc2b5088a988169 100644 +index e68b7a1b03783e4f9de24c5ae8773fc359bd2d37..e581dc10f3c805f7f8b6e4c842092609e7e1a0f8 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java -@@ -78,6 +78,7 @@ public class BlockItem extends Item { +@@ -80,6 +80,7 @@ public class BlockItem extends Item { if (this instanceof PlaceOnWaterBlockItem || this instanceof SolidBucketItem) { blockstate = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos()); } @@ -16,7 +16,7 @@ index 78cac63e5bd7c84f59b8e00ee40899be78e8cdb1..00d31df5ba7e147b4b969a89cfc2b508 // CraftBukkit end if (iblockdata == null) { -@@ -93,7 +94,19 @@ public class BlockItem extends Item { +@@ -95,7 +96,19 @@ public class BlockItem extends Item { if (iblockdata1.is(iblockdata.getBlock())) { iblockdata1 = this.updateBlockStateFromTag(blockposition, world, itemstack, iblockdata1); diff --git a/patches/unapplied/server/0795-Add-configurable-height-for-slime-spawn.patch b/patches/server/0788-Add-configurable-height-for-slime-spawn.patch similarity index 92% rename from patches/unapplied/server/0795-Add-configurable-height-for-slime-spawn.patch rename to patches/server/0788-Add-configurable-height-for-slime-spawn.patch index a05bae35ee..8bda76b4ac 100644 --- a/patches/unapplied/server/0795-Add-configurable-height-for-slime-spawn.patch +++ b/patches/server/0788-Add-configurable-height-for-slime-spawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable height for slime spawn diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index 15d5a8290be35c2caebf8e296300e8f32cb597c7..fa79316adb11ab39cf921475e12a50058fd82a87 100644 +index 7b05640465a47ea8680b4a0b6648a77ea7a1b404..3da612821708f10f7f53b1c9e70adc649689529e 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java -@@ -320,7 +320,11 @@ public class Slime extends Mob implements Enemy { +@@ -322,7 +322,11 @@ public class Slime extends Mob implements Enemy { public static boolean checkSlimeSpawnRules(EntityType type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) { if (world.getDifficulty() != Difficulty.PEACEFUL) { @@ -21,7 +21,7 @@ index 15d5a8290be35c2caebf8e296300e8f32cb597c7..fa79316adb11ab39cf921475e12a5005 return checkMobSpawnRules(type, world, spawnReason, pos, random); } -@@ -331,7 +335,10 @@ public class Slime extends Mob implements Enemy { +@@ -333,7 +337,10 @@ public class Slime extends Mob implements Enemy { ChunkPos chunkcoordintpair = new ChunkPos(pos); boolean flag = world.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper diff --git a/patches/unapplied/server/0796-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0789-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch similarity index 87% rename from patches/unapplied/server/0796-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch rename to patches/server/0789-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch index 068c0bd9fe..16fc153d07 100644 --- a/patches/unapplied/server/0796-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch +++ b/patches/server/0789-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Added getHostname to AsyncPlayerPreLoginEvent diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index d6fa1fb3e06a3712b1910990d5b706187c12b51a..96e33103773ae2b8807a6c0a6daac95c35c18bda 100644 +index b1648a1cfcc64b77c7bbec19f77d2c968b063fa3..d2cba3fb9eb0d344b71c79387d1d160596b1dc62 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -410,7 +410,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -371,7 +371,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, // Paper start com.destroystokyo.paper.profile.PlayerProfile profile = com.destroystokyo.paper.profile.CraftPlayerProfile.asBukkitMirror(ServerLoginPacketListenerImpl.this.gameProfile); diff --git a/patches/unapplied/server/0797-Fix-xp-reward-for-baby-zombies.patch b/patches/server/0790-Fix-xp-reward-for-baby-zombies.patch similarity index 88% rename from patches/unapplied/server/0797-Fix-xp-reward-for-baby-zombies.patch rename to patches/server/0790-Fix-xp-reward-for-baby-zombies.patch index e5cc876754..0d0e962337 100644 --- a/patches/unapplied/server/0797-Fix-xp-reward-for-baby-zombies.patch +++ b/patches/server/0790-Fix-xp-reward-for-baby-zombies.patch @@ -9,10 +9,10 @@ so this resets it after each call to Zombie#getExperienceReward diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index bbaf3e5d29814ce49de68be63411517de3fd320f..e0e16d3b4ba0afc3cfc66b93ecf5f889599f48dd 100644 +index 185f0c0d709f374cf6df2654dd9708fca90b1349..9976205537cfe228735687f1e9c52c74ac025690 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -173,11 +173,16 @@ public class Zombie extends Monster { +@@ -174,11 +174,16 @@ public class Zombie extends Monster { @Override public int getExperienceReward() { diff --git a/patches/unapplied/server/0798-Kick-on-main-for-illegal-chat.patch b/patches/server/0791-Kick-on-main-for-illegal-chat.patch similarity index 75% rename from patches/unapplied/server/0798-Kick-on-main-for-illegal-chat.patch rename to patches/server/0791-Kick-on-main-for-illegal-chat.patch index 57f7fe897f..053e12f118 100644 --- a/patches/unapplied/server/0798-Kick-on-main-for-illegal-chat.patch +++ b/patches/server/0791-Kick-on-main-for-illegal-chat.patch @@ -7,10 +7,10 @@ Makes the PlayerKickEvent fire on the main thread for illegal characters or chat out-of-order errors. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d4a9c03c557c14069a0227363c61c36977f3eae7..913ef8c087aea0dbb1e9cd7bcbfd4c2397cb301f 100644 +index 41461d9a10abe49b823b92b3817693dbec70eb9e..e94c307a56a0fc3040b8c1d992e078aefa3bdf85 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2175,7 +2175,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2172,7 +2172,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) { @@ -18,9 +18,9 @@ index d4a9c03c557c14069a0227363c61c36977f3eae7..913ef8c087aea0dbb1e9cd7bcbfd4c23 this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add cause + }); // Paper - push to main for event firing } else { - if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { - // this.server.submit(() -> { // CraftBukkit - async chat -@@ -2203,7 +2205,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + Optional optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages()); + +@@ -2206,7 +2208,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -28,15 +28,15 @@ index d4a9c03c557c14069a0227363c61c36977f3eae7..913ef8c087aea0dbb1e9cd7bcbfd4c23 this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper + }); // Paper - push to main for event firing } else { - if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) { - this.server.submit(() -> { -@@ -2289,7 +2293,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { + Optional optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages()); + +@@ -2286,7 +2290,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); + this.server.scheduleOnMain(() -> { // Paper - push to main - this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause + this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca + }); // Paper - push to main - return false; + return Optional.empty(); } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); diff --git a/patches/unapplied/server/0799-Multi-Block-Change-API-Implementation.patch b/patches/server/0792-Multi-Block-Change-API-Implementation.patch similarity index 93% rename from patches/unapplied/server/0799-Multi-Block-Change-API-Implementation.patch rename to patches/server/0792-Multi-Block-Change-API-Implementation.patch index 30c5c1fc43..e30611d7f4 100644 --- a/patches/unapplied/server/0799-Multi-Block-Change-API-Implementation.patch +++ b/patches/server/0792-Multi-Block-Change-API-Implementation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Multi Block Change API Implementation diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java -index 285da70a15f6e4c868747af9d40ac30bd4e42ef4..a0aeac9c29300a0cf6bad55133019e8c29f6cc1c 100644 +index 0d851e197e65ec79386ad1f981f6d1d38b65124a..24c677e80af652952263253409c050641e72e3b5 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java @@ -63,6 +63,15 @@ public class ClientboundSectionBlocksUpdatePacket implements Packet +Date: Mon, 21 Jun 2021 14:23:50 +0100 +Subject: [PATCH] Fix NotePlayEvent + +== AT == +public org.bukkit.craftbukkit.block.data.CraftBlockData toNMS(Ljava/lang/Enum;Ljava/lang/Class;)Ljava/lang/Enum; + +diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java +index 52a174884f416c9e61591e18aba3b4cd0073ea02..df7965c86b9c9e89b07b76c75b638d391ea6cc34 100644 +--- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java +@@ -88,11 +88,12 @@ public class NoteBlock extends Block { + private void playNote(@Nullable Entity entity, BlockState state, Level world, BlockPos pos) { + if (!((NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT)).requiresAirAbove() || world.getBlockState(pos.above()).isAir()) { + // CraftBukkit start +- org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, state.getValue(NoteBlock.INSTRUMENT), state.getValue(NoteBlock.NOTE)); +- if (event.isCancelled()) { +- return; +- } ++ // org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, state.getValue(NoteBlock.INSTRUMENT), state.getValue(NoteBlock.NOTE)); ++ // if (event.isCancelled()) { ++ // return; ++ // } + // CraftBukkit end ++ // Paper - TODO any way to cancel the game event? + world.blockEvent(pos, this, 0, 0); + world.gameEvent(entity, GameEvent.NOTE_BLOCK_PLAY, pos); + } +@@ -122,11 +123,15 @@ public class NoteBlock extends Block { + + @Override + public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) { ++ // Paper start - move NotePlayEvent call to fix instrument/note changes ++ org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, state.getValue(INSTRUMENT), state.getValue(NOTE)); ++ if (event.isCancelled()) return false; ++ // Paper end + NoteBlockInstrument blockpropertyinstrument = (NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT); + float f; + + if (blockpropertyinstrument.isTunable()) { +- int k = (Integer) state.getValue(NoteBlock.NOTE); ++ int k = event.getNote().getId(); // Paper + + f = (float) Math.pow(2.0D, (double) (k - 12) / 12.0D); + world.addParticle(ParticleTypes.NOTE, (double) pos.getX() + 0.5D, (double) pos.getY() + 1.2D, (double) pos.getZ() + 0.5D, (double) k / 24.0D, 0.0D, 0.0D); +@@ -148,7 +153,7 @@ public class NoteBlock extends Block { + holder = blockpropertyinstrument.getSoundEvent(); + } + +- world.playSeededSound((Player) null, (double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, holder, SoundSource.RECORDS, 3.0F, f, world.random.nextLong()); ++ world.playSeededSound((Player) null, (double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, org.bukkit.craftbukkit.block.data.CraftBlockData.toNMS(event.getInstrument(), NoteBlockInstrument.class).getSoundEvent(), SoundSource.RECORDS, 3.0F, f, world.random.nextLong()); // Paper + return true; + } + diff --git a/patches/unapplied/server/0801-Freeze-Tick-Lock-API.patch b/patches/server/0794-Freeze-Tick-Lock-API.patch similarity index 86% rename from patches/unapplied/server/0801-Freeze-Tick-Lock-API.patch rename to patches/server/0794-Freeze-Tick-Lock-API.patch index 0c279ca9c2..803cdc9818 100644 --- a/patches/unapplied/server/0801-Freeze-Tick-Lock-API.patch +++ b/patches/server/0794-Freeze-Tick-Lock-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Freeze Tick Lock API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 305a70f4b4646fa6cb8f36af367222a2b7fa39d4..476668fe955841f61cf12d032b0d3bd1e400cd93 100644 +index 12a032f265a4a5aaac248599cc263896279b54bb..9c9251f9f8ac83dddef87561af1d3ea2ab37009c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -396,6 +396,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -25,7 +25,7 @@ index 305a70f4b4646fa6cb8f36af367222a2b7fa39d4..476668fe955841f61cf12d032b0d3bd1 this.setTicksFrozen(0); this.level.levelEvent((Player) null, 1009, this.blockPosition, 1); } -@@ -2261,6 +2262,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2276,6 +2277,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (fromNetherPortal) { nbt.putBoolean("Paper.FromNetherPortal", true); } @@ -35,7 +35,7 @@ index 305a70f4b4646fa6cb8f36af367222a2b7fa39d4..476668fe955841f61cf12d032b0d3bd1 // Paper end return nbt; } catch (Throwable throwable) { -@@ -2425,6 +2429,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2440,6 +2444,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (spawnReason == null) { spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; } @@ -46,10 +46,10 @@ index 305a70f4b4646fa6cb8f36af367222a2b7fa39d4..476668fe955841f61cf12d032b0d3bd1 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6b01f56aadda10a89796f2b017d0fca3e10dfd98..655253c267925a704e55abe23f1142c15ecb8d2e 100644 +index 3d221fd0cec95799763c687222d5d5a917c2171d..2ee07665521804157e4c0a3f6f09455b14b2867f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3390,7 +3390,7 @@ public abstract class LivingEntity extends Entity { +@@ -3411,7 +3411,7 @@ public abstract class LivingEntity extends Entity { boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES); int i; @@ -59,10 +59,10 @@ index 6b01f56aadda10a89796f2b017d0fca3e10dfd98..655253c267925a704e55abe23f1142c1 if (this.isInPowderSnow && this.canFreeze()) { this.setTicksFrozen(Math.min(this.getTicksRequiredToFreeze(), i + 1)); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 446e6e97c4468d3cd60576c8d37e075f5a5b4dba..ea9622e80c8799b33e0edfc2a4a94ba35d1a3b12 100644 +index 03b20cec361a2eff27c1187b2a4c5a65d2b4f9b4..32b9816283c8c1de929d5664733553277cf6bf3c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -650,6 +650,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -652,6 +652,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return this.getHandle().isFullyFrozen(); } diff --git a/patches/unapplied/server/0802-Dolphin-API.patch b/patches/server/0795-Dolphin-API.patch similarity index 100% rename from patches/unapplied/server/0802-Dolphin-API.patch rename to patches/server/0795-Dolphin-API.patch diff --git a/patches/unapplied/server/0803-More-PotionEffectType-API.patch b/patches/server/0796-More-PotionEffectType-API.patch similarity index 96% rename from patches/unapplied/server/0803-More-PotionEffectType-API.patch rename to patches/server/0796-More-PotionEffectType-API.patch index 5d8c4415d3..04c6074259 100644 --- a/patches/unapplied/server/0803-More-PotionEffectType-API.patch +++ b/patches/server/0796-More-PotionEffectType-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java -index a220102c6e981e4c7d03039340423f05b8c2aeb9..29830a30a886f88254a6d0e7c5245fa14f44bd09 100644 +index 5a8c29cc117ce9478cc205f6fdbe63d227268775..c9a2cf4b7476f7b5d7de38ac70e2fc69a486d2a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java -@@ -104,4 +104,46 @@ public class CraftPotionEffectType extends PotionEffectType { +@@ -105,4 +105,46 @@ public class CraftPotionEffectType extends PotionEffectType { public Color getColor() { return Color.fromRGB(this.handle.getColor()); } diff --git a/patches/unapplied/server/0804-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/0797-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch similarity index 88% rename from patches/unapplied/server/0804-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to patches/server/0797-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch index 02ee15a8e1..35ef55a5e2 100644 --- a/patches/unapplied/server/0804-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch +++ b/patches/server/0797-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a CHM for StructureTemplate.Pallete cache fixes a CME due to this collection being shared across threads diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 9c45e49f480ccd72f6d6c94e5dec41c4becc76cf..4aac9be67a073e60272a68b52c2cda026d4ee28f 100644 +index 76666318690368bab672c2302c90dd3abb050299..d1bfb95114b733dde9537c4de6bd1bccb696cd18 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -@@ -832,7 +832,7 @@ public class StructureTemplate { +@@ -833,7 +833,7 @@ public class StructureTemplate { public static final class Palette { private final List blocks; diff --git a/patches/unapplied/server/0805-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0798-API-for-creating-command-sender-which-forwards-feedb.patch similarity index 97% rename from patches/unapplied/server/0805-API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/server/0798-API-for-creating-command-sender-which-forwards-feedb.patch index 72e18036d6..56dda68156 100644 --- a/patches/unapplied/server/0805-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0798-API-for-creating-command-sender-which-forwards-feedb.patch @@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 74440a86dd163d5d624b483a5a8b2b993d53e2fb..9ff71bff0d67a46a4e1317daa918809136885a66 100644 +index 1fa90e90b1989aa9ce72beea6c15cd8fb1e24d06..82d3869afe0f4e9fd453d2e1cb179c4aabce9f14 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1990,6 +1990,13 @@ public final class CraftServer implements Server { +@@ -2014,6 +2014,13 @@ public final class CraftServer implements Server { return console.console; } diff --git a/patches/unapplied/server/0807-Implement-regenerateChunk.patch b/patches/server/0799-Implement-regenerateChunk.patch similarity index 96% rename from patches/unapplied/server/0807-Implement-regenerateChunk.patch rename to patches/server/0799-Implement-regenerateChunk.patch index b37120e7aa..b722ddf84a 100644 --- a/patches/unapplied/server/0807-Implement-regenerateChunk.patch +++ b/patches/server/0799-Implement-regenerateChunk.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Implement regenerateChunk Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 579fd470e6198a5caefaaf815510ca1f78325f68..439a360c351f0d82245ee7703f7d0bf48a29c2fa 100644 +index c9ec47de502adfc63f5d3ef4ec479208635f3967..2ce47f709f0e7dbfbfe9f7e4e25266b1ed5ed53d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -139,6 +139,7 @@ import org.bukkit.util.Vector; +@@ -138,6 +138,7 @@ import org.bukkit.util.Vector; public class CraftWorld extends CraftRegionAccessor implements World { public static final int CUSTOM_DIMENSION_OFFSET = 10; private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); @@ -17,7 +17,7 @@ index 579fd470e6198a5caefaaf815510ca1f78325f68..439a360c351f0d82245ee7703f7d0bf4 private final ServerLevel world; private WorldBorder worldBorder; -@@ -419,27 +420,62 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -418,27 +419,62 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean regenerateChunk(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot diff --git a/patches/unapplied/server/0808-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0800-Fix-cancelled-powdered-snow-bucket-placement.patch similarity index 88% rename from patches/unapplied/server/0808-Fix-cancelled-powdered-snow-bucket-placement.patch rename to patches/server/0800-Fix-cancelled-powdered-snow-bucket-placement.patch index cbc7d7ec3b..03f89be4c3 100644 --- a/patches/unapplied/server/0808-Fix-cancelled-powdered-snow-bucket-placement.patch +++ b/patches/server/0800-Fix-cancelled-powdered-snow-bucket-placement.patch @@ -8,10 +8,10 @@ snow bucket didn't revert grass that became snowy because of the placement. diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index 00d31df5ba7e147b4b969a89cfc2b5088a988169..62d6c5b7590ff4faef5d8c7a8be03155b7338480 100644 +index e581dc10f3c805f7f8b6e4c842092609e7e1a0f8..b0204af850ee182773ad458208cccd946ad148d5 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java -@@ -115,6 +115,7 @@ public class BlockItem extends Item { +@@ -117,6 +117,7 @@ public class BlockItem extends Item { blockstate.update(true, false); if (this instanceof SolidBucketItem) { @@ -20,10 +20,10 @@ index 00d31df5ba7e147b4b969a89cfc2b5088a988169..62d6c5b7590ff4faef5d8c7a8be03155 } return InteractionResult.FAIL; diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8ed905d4ef43e2314c64758d0ed075cb969a075c..0611db371b013738a88e5a6c61623a77ea15652e 100644 +index a2d92e0ed4348e632b8a55a4fae71ecc3777edcb..64738fffa5ab0cb9ea22fa7198856ea69d8e9cfd 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -337,7 +337,7 @@ public final class ItemStack { +@@ -345,7 +345,7 @@ public final class ItemStack { int oldCount = this.getCount(); ServerLevel world = (ServerLevel) itemactioncontext.getLevel(); @@ -32,7 +32,7 @@ index 8ed905d4ef43e2314c64758d0ed075cb969a075c..0611db371b013738a88e5a6c61623a77 world.captureBlockStates = true; // special case bonemeal if (this.getItem() == Items.BONE_MEAL) { -@@ -391,7 +391,7 @@ public final class ItemStack { +@@ -399,7 +399,7 @@ public final class ItemStack { world.capturedBlockStates.clear(); if (blocks.size() > 1) { placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ()); diff --git a/patches/unapplied/server/0809-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0801-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 86% rename from patches/unapplied/server/0809-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/0801-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 98cfb96a13..bca7cc62e4 100644 --- a/patches/unapplied/server/0809-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0801-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9ff71bff0d67a46a4e1317daa918809136885a66..1c2c848edcd95f1d187d9036852b08887fdbf311 100644 +index 82d3869afe0f4e9fd453d2e1cb179c4aabce9f14..278bbd6b1bfc3abc434d982a77f18e7b5fe1a70f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2164,6 +2164,8 @@ public final class CraftServer implements Server { +@@ -2188,6 +2188,8 @@ public final class CraftServer implements Server { @Override public int getSpawnLimit(SpawnCategory spawnCategory) { // Paper start diff --git a/patches/unapplied/server/0810-Add-GameEvent-tags.patch b/patches/server/0802-Add-GameEvent-tags.patch similarity index 92% rename from patches/unapplied/server/0810-Add-GameEvent-tags.patch rename to patches/server/0802-Add-GameEvent-tags.patch index f7ebc617b1..f096b1a04c 100644 --- a/patches/unapplied/server/0810-Add-GameEvent-tags.patch +++ b/patches/server/0802-Add-GameEvent-tags.patch @@ -45,11 +45,11 @@ index 0000000000000000000000000000000000000000..cb78a3d4e21376ea24347187478525d5 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1c2c848edcd95f1d187d9036852b08887fdbf311..049ce463c8da4f0730edf5a03439685eb547433e 100644 +index 278bbd6b1bfc3abc434d982a77f18e7b5fe1a70f..462b1732205d4d36ff5f6d8f2ce56fe851080bf0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2575,6 +2575,15 @@ public final class CraftServer implements Server { - return (org.bukkit.Tag) new CraftEntityTag(net.minecraft.core.Registry.ENTITY_TYPE, entityTagKey); +@@ -2599,6 +2599,15 @@ public final class CraftServer implements Server { + return (org.bukkit.Tag) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey); } } + // Paper start @@ -64,8 +64,8 @@ index 1c2c848edcd95f1d187d9036852b08887fdbf311..049ce463c8da4f0730edf5a03439685e default -> throw new IllegalArgumentException(); } -@@ -2607,6 +2616,13 @@ public final class CraftServer implements Server { - net.minecraft.core.Registry> entityTags = net.minecraft.core.Registry.ENTITY_TYPE; +@@ -2631,6 +2640,13 @@ public final class CraftServer implements Server { + net.minecraft.core.Registry> entityTags = BuiltInRegistries.ENTITY_TYPE; return entityTags.getTags().map(pair -> (org.bukkit.Tag) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList()); } + // Paper start diff --git a/patches/unapplied/server/0811-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0803-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 94% rename from patches/unapplied/server/0811-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0803-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index b4cc8be55d..e0c24f58e2 100644 --- a/patches/unapplied/server/0811-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0803-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -9,7 +9,7 @@ This might result in chunks loading far slower in the nether, for example. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2699381f72ff00bb0a9711e3b286e820f1b8dc32..3cd3beb7625a9cf18951f4311d80dbdf00e1334f 100644 +index 6986d5475b090bca60b5ae892512fd5e55ae9b07..fa28023738fc50ac6c28e12bb7bbe249ddfc9a4a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1308,6 +1308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= 1 || Math.abs(j - this.xRotp) >= 1; diff --git a/patches/unapplied/server/0818-Custom-Potion-Mixes.patch b/patches/server/0810-Custom-Potion-Mixes.patch similarity index 92% rename from patches/unapplied/server/0818-Custom-Potion-Mixes.patch rename to patches/server/0810-Custom-Potion-Mixes.patch index 8dc7e8dad6..b0d7b84032 100644 --- a/patches/unapplied/server/0818-Custom-Potion-Mixes.patch +++ b/patches/server/0810-Custom-Potion-Mixes.patch @@ -24,11 +24,11 @@ index 0000000000000000000000000000000000000000..6b0bed550763f34e18c9e92f9a47ec0c + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index b3e272bf7329a17094850e2fac9ee0c69d5e045d..300f6af9e01ce966ca03110c444139f1ae7e691c 100644 +index b79486847e1568a65673ef944a1eeabfa3bdd1a1..cbdf2753fca41663185cbfc3b375516b40d238c1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2043,6 +2043,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 11ee6a2b264b570b61facec5625f6257259432bd..4f7fa1d7b7f90c8326011f58825b4cca0da152bc 100644 +index bb486249d409743b0fc9891ac5ae76a38034800b..e365081bf532488f2b41b22deb2fb2346d4f2322 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -566,7 +566,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -570,7 +570,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { // Paper end } else if (FallingBlock.class.isAssignableFrom(clazz)) { BlockPos pos = new BlockPos(x, y, z); @@ -24,10 +24,10 @@ index 11ee6a2b264b570b61facec5625f6257259432bd..4f7fa1d7b7f90c8326011f58825b4cca if (Snowball.class.isAssignableFrom(clazz)) { entity = new net.minecraft.world.entity.projectile.Snowball(world, x, y, z); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 439a360c351f0d82245ee7703f7d0bf48a29c2fa..1aa28195d2d2ef466764a162891c232f99b678e7 100644 +index 2ce47f709f0e7dbfbfe9f7e4e25266b1ed5ed53d..70fc51e5689dd1012afac8df40c2d1200baffd0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1395,7 +1395,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1394,7 +1394,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Validate.notNull(material, "Material cannot be null"); Validate.isTrue(material.isBlock(), "Material must be a block"); @@ -41,7 +41,7 @@ index 439a360c351f0d82245ee7703f7d0bf48a29c2fa..1aa28195d2d2ef466764a162891c232f return (FallingBlock) entity.getBukkitEntity(); } -@@ -1404,7 +1409,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1403,7 +1408,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Validate.notNull(location, "Location cannot be null"); Validate.notNull(data, "BlockData cannot be null"); diff --git a/patches/unapplied/server/0822-Expose-furnace-minecart-push-values.patch b/patches/server/0814-Expose-furnace-minecart-push-values.patch similarity index 100% rename from patches/unapplied/server/0822-Expose-furnace-minecart-push-values.patch rename to patches/server/0814-Expose-furnace-minecart-push-values.patch diff --git a/patches/unapplied/server/0823-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0815-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch similarity index 91% rename from patches/unapplied/server/0823-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch rename to patches/server/0815-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch index c025095487..8fe51ff3d9 100644 --- a/patches/unapplied/server/0823-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch +++ b/patches/server/0815-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch @@ -15,10 +15,10 @@ piercing arrows to avoid duplicate damage being applied. protected net.minecraft.world.entity.projectile.Projectile hitCancelled diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 39136b9707221e4e4934ee0ef18fc2cb92723aa2..def3b3f8dac4b28eaaafdd9bc2e7f4b9ec9d6855 100644 +index dcd3c5b4d3982f02214f8e0306eab37ebbf15299..e7ef36dac559d03d127cf45373a7e0dc935b80a8 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -300,6 +300,19 @@ public abstract class AbstractArrow extends Projectile { +@@ -301,6 +301,19 @@ public abstract class AbstractArrow extends Projectile { } } diff --git a/patches/unapplied/server/0824-More-Projectile-API.patch b/patches/server/0816-More-Projectile-API.patch similarity index 97% rename from patches/unapplied/server/0824-More-Projectile-API.patch rename to patches/server/0816-More-Projectile-API.patch index 9a64f36f82..1eb6c7b146 100644 --- a/patches/unapplied/server/0824-More-Projectile-API.patch +++ b/patches/server/0816-More-Projectile-API.patch @@ -18,10 +18,10 @@ public net.minecraft.world.entity.projectile.Projectile leftOwner Co-authored-by: Nassim Jahnke diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -index fee09e6ff72cf1da389d5811dd005642cd50a5b4..4f276b2a86735a2c664738450ae0fbdd82031d4e 100644 +index 87c148922d693b5a5bfde89b0dcbc44438df592b..488bf8a197f06a9024bae97ca005f112e4afbb51 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -@@ -98,6 +98,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie +@@ -100,6 +100,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie @Override protected void onHit(HitResult hitResult) { super.onHit(hitResult); @@ -33,7 +33,7 @@ index fee09e6ff72cf1da389d5811dd005642cd50a5b4..4f276b2a86735a2c664738450ae0fbdd if (!this.level.isClientSide) { ItemStack itemstack = this.getItem(); Potion potionregistry = PotionUtils.getPotion(itemstack); -@@ -110,7 +115,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie +@@ -112,7 +117,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie if (this.isLingering()) { this.makeAreaOfEffectCloud(itemstack, potionregistry); } else { @@ -340,7 +340,7 @@ index 832981b07ef5c633ef00a382f56798ee87eec0df..faf071201b7c1414225a33fe9641eac9 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index f3abcd5949011eaef3d1ba68f4cc0751042d2834..bfb1ad0b6e20e10fee53f94a3e6c4f8aad7aae7d 100644 +index 05dc7159f178b971a8bd5aa06b0b6551ef27ec7d..2d0e828687e9f4e860348eb10b1a40e12a654f2a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -278,12 +278,20 @@ public final class CraftItemStack extends ItemStack { diff --git a/patches/unapplied/server/0825-Fix-swamp-hut-cat-generation-deadlock.patch b/patches/server/0817-Fix-swamp-hut-cat-generation-deadlock.patch similarity index 83% rename from patches/unapplied/server/0825-Fix-swamp-hut-cat-generation-deadlock.patch rename to patches/server/0817-Fix-swamp-hut-cat-generation-deadlock.patch index ae8f7dbdb2..9d7e822fc0 100644 --- a/patches/unapplied/server/0825-Fix-swamp-hut-cat-generation-deadlock.patch +++ b/patches/server/0817-Fix-swamp-hut-cat-generation-deadlock.patch @@ -10,23 +10,23 @@ indefinitely. Instead of using the world state, we use the already supplied ServerLevelAccessor which will always have the chunk available. diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java -index 5ad968a2f1add27da0d6a858e683d5d771128092..e44352857272a2a4027c67bd25a28a9498b7bb49 100644 +index ad4392c3ec8f9f5f910f3be40f6b7dbfed223ca7..366f32b11f39a79210532c614fdbb2230b87d88f 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java -@@ -361,7 +361,7 @@ public class Cat extends TamableAnimal { +@@ -366,7 +366,7 @@ public class Cat extends TamableAnimal implements VariantHolder { }); ServerLevel worldserver = world.getLevel(); - if (worldserver.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK).isValid()) { + if (worldserver.structureManager().getStructureWithPieceAt(this.blockPosition(), StructureTags.CATS_SPAWN_AS_BLACK, world).isValid()) { // Paper - fix deadlock - this.setCatVariant(CatVariant.ALL_BLACK); + this.setVariant((CatVariant) BuiltInRegistries.CAT_VARIANT.getOrThrow(CatVariant.ALL_BLACK)); this.setPersistenceRequired(); } diff --git a/src/main/java/net/minecraft/world/level/StructureManager.java b/src/main/java/net/minecraft/world/level/StructureManager.java -index e7445c1ff0d1e3e989fcd8d3630dd5269a64598d..64ca546a905d69a795bbdafb4f9860b31cd863d1 100644 +index 924c7a67abe334494c571f9b4c5c8a7d5dfef5b4..bad7031426ae6c750ae4376beb238186e7d65270 100644 --- a/src/main/java/net/minecraft/world/level/StructureManager.java +++ b/src/main/java/net/minecraft/world/level/StructureManager.java -@@ -43,7 +43,12 @@ public class StructureManager { +@@ -44,7 +44,12 @@ public class StructureManager { } public List startsForStructure(ChunkPos pos, Predicate predicate) { @@ -40,7 +40,7 @@ index e7445c1ff0d1e3e989fcd8d3630dd5269a64598d..64ca546a905d69a795bbdafb4f9860b3 ImmutableList.Builder builder = ImmutableList.builder(); for(Map.Entry entry : map.entrySet()) { -@@ -107,13 +112,18 @@ public class StructureManager { +@@ -108,13 +113,18 @@ public class StructureManager { } public StructureStart getStructureWithPieceAt(BlockPos pos, TagKey structureTag) { @@ -49,11 +49,11 @@ index e7445c1ff0d1e3e989fcd8d3630dd5269a64598d..64ca546a905d69a795bbdafb4f9860b3 + } + public StructureStart getStructureWithPieceAt(BlockPos pos, TagKey structureTag, @Nullable ServerLevelAccessor levelAccessor) { + // Paper end - Registry registry = this.registryAccess().registryOrThrow(Registry.STRUCTURE_REGISTRY); + Registry registry = this.registryAccess().registryOrThrow(Registries.STRUCTURE); for(StructureStart structureStart : this.startsForStructure(new ChunkPos(pos), (structure) -> { - return registry.getHolder(registry.getId(structure)).map((holder) -> { - return holder.is(structureTag); + return registry.getHolder(registry.getId(structure)).map((reference) -> { + return reference.is(structureTag); }).orElse(false); - })) { + }, levelAccessor)) { // Paper diff --git a/patches/unapplied/server/0826-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0818-Don-t-allow-vehicle-movement-from-players-while-tele.patch similarity index 88% rename from patches/unapplied/server/0826-Don-t-allow-vehicle-movement-from-players-while-tele.patch rename to patches/server/0818-Don-t-allow-vehicle-movement-from-players-while-tele.patch index 0d7894a11f..5c8f6677bb 100644 --- a/patches/unapplied/server/0826-Don-t-allow-vehicle-movement-from-players-while-tele.patch +++ b/patches/server/0818-Don-t-allow-vehicle-movement-from-players-while-tele.patch @@ -7,10 +7,10 @@ Bring the vehicle move packet behavior in line with the regular player move packet. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 913ef8c087aea0dbb1e9cd7bcbfd4c2397cb301f..cf5ef052a262a910ed5348ba83ccf9274450a030 100644 +index e94c307a56a0fc3040b8c1d992e078aefa3bdf85..b51e0dfad64cf9844bd511689786a456f7c8e48e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -585,6 +585,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -577,6 +577,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else { Entity entity = this.player.getRootVehicle(); diff --git a/patches/unapplied/server/0827-Implement-getComputedBiome-API.patch b/patches/server/0819-Implement-getComputedBiome-API.patch similarity index 86% rename from patches/unapplied/server/0827-Implement-getComputedBiome-API.patch rename to patches/server/0819-Implement-getComputedBiome-API.patch index 3653f116c2..f7553e77a6 100644 --- a/patches/unapplied/server/0827-Implement-getComputedBiome-API.patch +++ b/patches/server/0819-Implement-getComputedBiome-API.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Implement getComputedBiome API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 4f7fa1d7b7f90c8326011f58825b4cca0da152bc..d5cc47eb1fd1ea9a0638827483b03165f6a7e10c 100644 +index e365081bf532488f2b41b22deb2fb2346d4f2322..3209d13a12a033e157621920a0cefdad5727463f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -211,6 +211,13 @@ public abstract class CraftRegionAccessor implements RegionAccessor { - return CraftBlock.biomeBaseToBiome(this.getHandle().registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), this.getHandle().getNoiseBiome(x >> 2, y >> 2, z >> 2)); +@@ -214,6 +214,13 @@ public abstract class CraftRegionAccessor implements RegionAccessor { + return CraftBlock.biomeBaseToBiome(this.getHandle().registryAccess().registryOrThrow(Registries.BIOME), this.getHandle().getNoiseBiome(x >> 2, y >> 2, z >> 2)); } + // Paper start @@ -23,10 +23,10 @@ index 4f7fa1d7b7f90c8326011f58825b4cca0da152bc..d5cc47eb1fd1ea9a0638827483b03165 public void setBiome(Location location, Biome biome) { this.setBiome(location.getBlockX(), location.getBlockY(), location.getBlockZ(), biome); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 0030ac394d44acddcd2fc716277ae2b509a378af..22356c2380741dd811810420127e247e46b0b8e2 100644 +index 2f5b9083a3d11834fca74d11d6ba10d325a7f7c3..38408e37cd3d8742a5cbf6711d48b9c7a35159a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -341,6 +341,13 @@ public class CraftBlock implements Block { +@@ -343,6 +343,13 @@ public class CraftBlock implements Block { return this.getWorld().getBiome(this.getX(), this.getY(), this.getZ()); } diff --git a/patches/unapplied/server/0828-Make-some-itemstacks-nonnull.patch b/patches/server/0820-Make-some-itemstacks-nonnull.patch similarity index 100% rename from patches/unapplied/server/0828-Make-some-itemstacks-nonnull.patch rename to patches/server/0820-Make-some-itemstacks-nonnull.patch diff --git a/patches/unapplied/server/0829-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch b/patches/server/0821-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch similarity index 94% rename from patches/unapplied/server/0829-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch rename to patches/server/0821-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch index fe6855e900..0a71ed424d 100644 --- a/patches/unapplied/server/0829-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch +++ b/patches/server/0821-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch @@ -8,10 +8,10 @@ also adds 'Paper.debugInvalidSkullProfiles' system property which can be set to 'true' for extra debug info (trace of updateGameprofile caller). diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java -index c5d5d90d10b30f30d1262367b3d75df43fbdb231..e017020b7630f54c506d93ab0504c6f3299fc80b 100644 +index 91fb6678214d5f23b33d5d3b65a29fdfbb003c58..e4d4dec63260c7b3ec3ed841a1e509eb67e66fb2 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java -@@ -114,13 +114,28 @@ public class SkullBlockEntity extends BlockEntity { +@@ -131,13 +131,28 @@ public class SkullBlockEntity extends BlockEntity { updateGameprofile(this.owner, (owner) -> { this.owner = owner; this.setChanged(); @@ -40,7 +40,7 @@ index c5d5d90d10b30f30d1262367b3d75df43fbdb231..e017020b7630f54c506d93ab0504c6f3 Util.ifElse(profile, (profilex) -> { Property property = Iterables.getFirst(profilex.getProperties().get("textures"), (Property)null); if (property == null) { -@@ -137,6 +152,20 @@ public class SkullBlockEntity extends BlockEntity { +@@ -154,6 +169,20 @@ public class SkullBlockEntity extends BlockEntity { callback.accept(owner); }); }); diff --git a/patches/unapplied/server/0830-Implement-enchantWithLevels-API.patch b/patches/server/0822-Implement-enchantWithLevels-API.patch similarity index 92% rename from patches/unapplied/server/0830-Implement-enchantWithLevels-API.patch rename to patches/server/0822-Implement-enchantWithLevels-API.patch index 92dab8814e..790b5c7b86 100644 --- a/patches/unapplied/server/0830-Implement-enchantWithLevels-API.patch +++ b/patches/server/0822-Implement-enchantWithLevels-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement enchantWithLevels API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 30bff345b33a1b4f7909efbe4b3622d7780e7bbf..8e5bc2bf5fed1f70a9fdcdeb4b23468aa0c7fb8e 100644 +index 2d25b7fb8e0c8984a6d3bad94b177713e3114533..4214420d6670b394758f14dbf6de628420c56e3b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -376,6 +376,21 @@ public final class CraftItemFactory implements ItemFactory { +@@ -401,6 +401,21 @@ public final class CraftItemFactory implements ItemFactory { } // Paper start diff --git a/patches/unapplied/server/0831-Fix-saving-in-unloadWorld.patch b/patches/server/0823-Fix-saving-in-unloadWorld.patch similarity index 83% rename from patches/unapplied/server/0831-Fix-saving-in-unloadWorld.patch rename to patches/server/0823-Fix-saving-in-unloadWorld.patch index 57b7aaeaf9..5be35a39a3 100644 --- a/patches/unapplied/server/0831-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0823-Fix-saving-in-unloadWorld.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix saving in unloadWorld Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f26ef8db95292a73e99b0cbb2c25128087ff9346..acb82138d7b375dc7ef1e02e63a60c8d420995eb 100644 +index 03961e7c61170b912e118d93a0c996e0b7070424..8c0ad5680e20b2a5109a3c5d2c8d46854438cc1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1289,7 +1289,7 @@ public final class CraftServer implements Server { +@@ -1313,7 +1313,7 @@ public final class CraftServer implements Server { try { if (save) { diff --git a/patches/unapplied/server/0832-Buffer-OOB-setBlock-calls.patch b/patches/server/0824-Buffer-OOB-setBlock-calls.patch similarity index 89% rename from patches/unapplied/server/0832-Buffer-OOB-setBlock-calls.patch rename to patches/server/0824-Buffer-OOB-setBlock-calls.patch index 62e5606e17..4e1905eb3b 100644 --- a/patches/unapplied/server/0832-Buffer-OOB-setBlock-calls.patch +++ b/patches/server/0824-Buffer-OOB-setBlock-calls.patch @@ -13,10 +13,10 @@ we'll also only gen a trace for the first one, I see no real pressing need to generate more, given that that would *massively* negate this patch otherwise diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -index 51d3150e732f95be13f5f54d994dab1fa89ed3f2..80c1e0e47818486a68e0114b063395290365346b 100644 +index 73b96f804079288e9c5fcc11da54e61e89a6782a..52fd12c474c01f3b53d0f6596b7a6fafee52bd0d 100644 --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -@@ -274,6 +274,7 @@ public class WorldGenRegion implements WorldGenLevel { +@@ -275,6 +275,7 @@ public class WorldGenRegion implements WorldGenLevel { } } @@ -24,7 +24,7 @@ index 51d3150e732f95be13f5f54d994dab1fa89ed3f2..80c1e0e47818486a68e0114b06339529 @Override public boolean ensureCanWrite(BlockPos pos) { int i = SectionPos.blockToSectionCoord(pos.getX()); -@@ -293,7 +294,15 @@ public class WorldGenRegion implements WorldGenLevel { +@@ -294,7 +295,15 @@ public class WorldGenRegion implements WorldGenLevel { return true; } else { diff --git a/patches/unapplied/server/0833-Add-TameableDeathMessageEvent.patch b/patches/server/0825-Add-TameableDeathMessageEvent.patch similarity index 100% rename from patches/unapplied/server/0833-Add-TameableDeathMessageEvent.patch rename to patches/server/0825-Add-TameableDeathMessageEvent.patch diff --git a/patches/unapplied/server/0834-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0826-Fix-new-block-data-for-EntityChangeBlockEvent.patch similarity index 100% rename from patches/unapplied/server/0834-Fix-new-block-data-for-EntityChangeBlockEvent.patch rename to patches/server/0826-Fix-new-block-data-for-EntityChangeBlockEvent.patch diff --git a/patches/unapplied/server/0835-fix-player-loottables-running-when-mob-loot-gamerule.patch b/patches/server/0827-fix-player-loottables-running-when-mob-loot-gamerule.patch similarity index 87% rename from patches/unapplied/server/0835-fix-player-loottables-running-when-mob-loot-gamerule.patch rename to patches/server/0827-fix-player-loottables-running-when-mob-loot-gamerule.patch index 69f3bac97a..74921013b7 100644 --- a/patches/unapplied/server/0835-fix-player-loottables-running-when-mob-loot-gamerule.patch +++ b/patches/server/0827-fix-player-loottables-running-when-mob-loot-gamerule.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fix player loottables running when mob loot gamerule is false diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index dbd0f0be3c0aaa55fa52f84e557d6a1e29c1146b..58d17cc0c5ba5093fe306c8a1514c27f355f49ae 100644 +index 1b97987788a7180e2ab2c9edf4646925fa691fd6..2741a218ce45377479ad47ec0141fa70e2b0acca 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -846,12 +846,14 @@ public class ServerPlayer extends Player { +@@ -868,12 +868,14 @@ public class ServerPlayer extends Player { } } } diff --git a/patches/unapplied/server/0836-Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/0828-Ensure-entity-passenger-world-matches-ridden-entity.patch similarity index 88% rename from patches/unapplied/server/0836-Ensure-entity-passenger-world-matches-ridden-entity.patch rename to patches/server/0828-Ensure-entity-passenger-world-matches-ridden-entity.patch index ed69a224f1..10be93f941 100644 --- a/patches/unapplied/server/0836-Ensure-entity-passenger-world-matches-ridden-entity.patch +++ b/patches/server/0828-Ensure-entity-passenger-world-matches-ridden-entity.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity Bad plugins doing this would cause some obvious problems... diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 476668fe955841f61cf12d032b0d3bd1e400cd93..dd53f6a00ba4a5714fe6314b527195c3c84fdb90 100644 +index 9c9251f9f8ac83dddef87561af1d3ea2ab37009c..4728b08a363dfc9e33f6858a88faba404d79af6f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2684,6 +2684,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2703,6 +2703,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } protected boolean addPassenger(Entity entity) { // CraftBukkit diff --git a/patches/unapplied/server/0837-Guard-against-invalid-entity-positions.patch b/patches/server/0829-Guard-against-invalid-entity-positions.patch similarity index 92% rename from patches/unapplied/server/0837-Guard-against-invalid-entity-positions.patch rename to patches/server/0829-Guard-against-invalid-entity-positions.patch index 79d45fd9ba..70a9d84af8 100644 --- a/patches/unapplied/server/0837-Guard-against-invalid-entity-positions.patch +++ b/patches/server/0829-Guard-against-invalid-entity-positions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Guard against invalid entity positions Anything not finite should be blocked and logged diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index dd53f6a00ba4a5714fe6314b527195c3c84fdb90..d81ee5367205ba96eb23f885ec648a27f2cf62f8 100644 +index 4728b08a363dfc9e33f6858a88faba404d79af6f..8770c02b6ba1d1dcb7b5fa3ac7f006a7097234f5 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4197,11 +4197,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4247,11 +4247,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale); } diff --git a/patches/unapplied/server/0838-cache-resource-keys.patch b/patches/server/0830-cache-resource-keys.patch similarity index 75% rename from patches/unapplied/server/0838-cache-resource-keys.patch rename to patches/server/0830-cache-resource-keys.patch index 4234b8673f..85b30c15e9 100644 --- a/patches/unapplied/server/0838-cache-resource-keys.patch +++ b/patches/server/0830-cache-resource-keys.patch @@ -5,10 +5,10 @@ Subject: [PATCH] cache resource keys diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 22356c2380741dd811810420127e247e46b0b8e2..bfe9dc935c87e01fb435d8b46ce413b84ca74856 100644 +index 38408e37cd3d8742a5cbf6711d48b9c7a35159a1..47ee348a7042a8e0705bc7d2c4077c0f270a8239 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -366,12 +366,13 @@ public class CraftBlock implements Block { +@@ -368,12 +368,13 @@ public class CraftBlock implements Block { return (biome == null) ? Biome.CUSTOM : biome; } @@ -18,24 +18,24 @@ index 22356c2380741dd811810420127e247e46b0b8e2..bfe9dc935c87e01fb435d8b46ce413b8 return null; } -- return registry.getHolderOrThrow(ResourceKey.create(net.minecraft.core.Registry.BIOME_REGISTRY, CraftNamespacedKey.toMinecraft(bio.getKey()))); -+ return registry.getHolderOrThrow(BIOME_KEY_CACHE.computeIfAbsent(bio, b -> ResourceKey.create(net.minecraft.core.Registry.BIOME_REGISTRY, CraftNamespacedKey.toMinecraft(b.getKey())))); // Paper - cache key +- return registry.getHolderOrThrow(ResourceKey.create(Registries.BIOME, CraftNamespacedKey.toMinecraft(bio.getKey()))); ++ return registry.getHolderOrThrow(BIOME_KEY_CACHE.computeIfAbsent(bio, b -> ResourceKey.create(Registries.BIOME, CraftNamespacedKey.toMinecraft(b.getKey())))); // Paper - cache key } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/tag/CraftEntityTag.java b/src/main/java/org/bukkit/craftbukkit/tag/CraftEntityTag.java -index 393bb27648501c6f25cf846e929f4c95b1a0b11f..979f82d589e378b9e52417d20b48d66f077f5dfd 100644 +index e0bf615fb1b99abbab2be55a4ee345204b36e218..7b3b12b4b2f5dbd37e23a7f5a0ad2abd04d259e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/tag/CraftEntityTag.java +++ b/src/main/java/org/bukkit/craftbukkit/tag/CraftEntityTag.java @@ -16,9 +16,10 @@ public class CraftEntityTag extends CraftTag>> KEY_CACHE = Collections.synchronizedMap(new java.util.EnumMap<>(EntityType.class)); // Paper ++ private static final java.util.Map>> KEY_CACHE = java.util.Collections.synchronizedMap(new java.util.EnumMap<>(EntityType.class)); // Paper @Override public boolean isTagged(EntityType entity) { -- return registry.getHolderOrThrow(ResourceKey.create(net.minecraft.core.Registry.ENTITY_TYPE_REGISTRY, CraftNamespacedKey.toMinecraft(entity.getKey()))).is(tag); -+ return registry.getHolderOrThrow(KEY_CACHE.computeIfAbsent(entity, type -> ResourceKey.create(net.minecraft.core.Registry.ENTITY_TYPE_REGISTRY, CraftNamespacedKey.toMinecraft(type.getKey())))).is(tag); // Paper - cache key +- return registry.getHolderOrThrow(ResourceKey.create(Registries.ENTITY_TYPE, CraftNamespacedKey.toMinecraft(entity.getKey()))).is(tag); ++ return registry.getHolderOrThrow(KEY_CACHE.computeIfAbsent(entity, type -> ResourceKey.create(Registries.ENTITY_TYPE, CraftNamespacedKey.toMinecraft(type.getKey())))).is(tag); // Paper - cache key } @Override diff --git a/patches/unapplied/server/0839-Allow-to-change-the-podium-for-the-EnderDragon.patch b/patches/server/0831-Allow-to-change-the-podium-for-the-EnderDragon.patch similarity index 97% rename from patches/unapplied/server/0839-Allow-to-change-the-podium-for-the-EnderDragon.patch rename to patches/server/0831-Allow-to-change-the-podium-for-the-EnderDragon.patch index 8dde383d5e..2ba3eec3be 100644 --- a/patches/unapplied/server/0839-Allow-to-change-the-podium-for-the-EnderDragon.patch +++ b/patches/server/0831-Allow-to-change-the-podium-for-the-EnderDragon.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow to change the podium for the EnderDragon diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index 3f854bea2e6be82c7ad12b4d13064de8baec55c7..b786bd5178a605a5dfb7682b7cb809646895aea3 100644 +index d8c9beab9163820df949f6002bbb9224a044c6f3..84ee7c1d3c2923090445422f38880e5b59668288 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java @@ -99,6 +99,10 @@ public class EnderDragon extends Mob implements Enemy { @@ -71,10 +71,10 @@ index a64ee433e34538ce2b52207b6183999ae611e5dd..0f78e1ab090bb1df7b863c90b3c7465a } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java -index e58f608e424e384606289d9ff27bf8f9c63aeeb2..4c338d7f3d5274a36db768e4a1cdedca130127d4 100644 +index adec9aec93d545941a3d592b54c5fe064cdb1437..77206aba171d063691b8f32afcebd570784d7da2 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java -@@ -55,7 +55,7 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance { +@@ -54,7 +54,7 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance { private void findNewTarget() { if (this.currentPath != null && this.currentPath.isDone()) { diff --git a/patches/unapplied/server/0840-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch b/patches/server/0832-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch similarity index 91% rename from patches/unapplied/server/0840-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch rename to patches/server/0832-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch index 9ef13e101f..c3c5f8e970 100644 --- a/patches/unapplied/server/0840-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch +++ b/patches/server/0832-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch @@ -9,10 +9,10 @@ is not a WorldGenRegion, we can bypass the deadlock entirely. See https://bugs.mojang.com/browse/MC-246262 diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 4aac9be67a073e60272a68b52c2cda026d4ee28f..30c44b39f9b7a434bb77d6307d2514f2ce9d2857 100644 +index d1bfb95114b733dde9537c4de6bd1bccb696cd18..1d809de3db6c6de64f938f66d81356c5b58967f8 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -@@ -266,7 +266,11 @@ public class StructureTemplate { +@@ -267,7 +267,11 @@ public class StructureTemplate { if (definedstructure_blockinfo.nbt != null) { tileentity = world.getBlockEntity(blockposition2); @@ -25,7 +25,7 @@ index 4aac9be67a073e60272a68b52c2cda026d4ee28f..30c44b39f9b7a434bb77d6307d2514f2 world.setBlock(blockposition2, Blocks.BARRIER.defaultBlockState(), 20); } -@@ -381,7 +385,11 @@ public class StructureTemplate { +@@ -382,7 +386,11 @@ public class StructureTemplate { if (pair1.getSecond() != null) { tileentity = world.getBlockEntity(blockposition6); if (tileentity != null) { diff --git a/patches/server/0833-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch b/patches/server/0833-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch new file mode 100644 index 0000000000..fbb9b72b07 --- /dev/null +++ b/patches/server/0833-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> +Date: Tue, 12 Apr 2022 16:36:15 -0700 +Subject: [PATCH] Fix StructureGrowEvent species for RED_MUSHROOM + + +diff --git a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java +index 09ed467f98c47dd5295f5cb7c0082fc8c1a03c28..f6f8e155223cba10c4073ddca602d1aa3aa872d7 100644 +--- a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java +@@ -92,7 +92,7 @@ public class MushroomBlock extends BushBlock implements BonemealableBlock { + return false; + } else { + world.removeBlock(pos, false); +- SaplingBlock.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.BROWN_MUSHROOM; // CraftBukkit ++ SaplingBlock.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.RED_MUSHROOM; // CraftBukkit // Paper + if (((ConfiguredFeature) ((Holder) optional.get()).value()).place(world, world.getChunkSource().getGenerator(), random, pos)) { + return true; + } else { diff --git a/patches/unapplied/server/0842-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0834-Prevent-tile-entity-copies-loading-chunks.patch similarity index 89% rename from patches/unapplied/server/0842-Prevent-tile-entity-copies-loading-chunks.patch rename to patches/server/0834-Prevent-tile-entity-copies-loading-chunks.patch index efde8a8da3..1c0bbb7575 100644 --- a/patches/unapplied/server/0842-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0834-Prevent-tile-entity-copies-loading-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cf5ef052a262a910ed5348ba83ccf9274450a030..e783dbe494b85928d67a0490a664e4b7dbef832c 100644 +index b51e0dfad64cf9844bd511689786a456f7c8e48e..93603aabe8b96c8d85a355dcf8c2d5ca45036f89 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3412,7 +3412,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3319,7 +3319,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); if (this.player.level.isLoaded(blockposition)) { diff --git a/patches/unapplied/server/0843-Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/0835-Use-username-instead-of-display-name-in-PlayerList-g.patch similarity index 87% rename from patches/unapplied/server/0843-Use-username-instead-of-display-name-in-PlayerList-g.patch rename to patches/server/0835-Use-username-instead-of-display-name-in-PlayerList-g.patch index 73130dbdc1..3ec01796ea 100644 --- a/patches/unapplied/server/0843-Use-username-instead-of-display-name-in-PlayerList-g.patch +++ b/patches/server/0835-Use-username-instead-of-display-name-in-PlayerList-g.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 4fe2184223568a6d8b800e83faa9ade1bba7d31f..3be9352ae9b0b84acf07064b45562ceffd30391b 100644 +index d9c1445fee611ebd3dbb19e1e60da3a8bb752d42..cb0d6f2eba67b0f45ce0ce0f6c6b76167a87de10 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1483,7 +1483,7 @@ public abstract class PlayerList { +@@ -1474,7 +1474,7 @@ public abstract class PlayerList { // CraftBukkit start public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) { ServerStatsCounter serverstatisticmanager = entityhuman.getStats(); diff --git a/patches/unapplied/server/0844-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch b/patches/server/0836-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch similarity index 89% rename from patches/unapplied/server/0844-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch rename to patches/server/0836-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch index 951baf9062..5d498e8783 100644 --- a/patches/unapplied/server/0844-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch +++ b/patches/server/0836-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch @@ -7,10 +7,10 @@ Fixes MC-50647 by just checking if the spawn type is a SPAWNER and then bypassing the spawn check logic if on slimes if it is. diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index fa79316adb11ab39cf921475e12a50058fd82a87..7e85ad7ba31bbb32ea1e1dff5d1c83e7ce68b4b3 100644 +index 3da612821708f10f7f53b1c9e70adc649689529e..87c2e50c6f817d1a77e0cfd64366765b265f9ba0 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java -@@ -320,6 +320,11 @@ public class Slime extends Mob implements Enemy { +@@ -322,6 +322,11 @@ public class Slime extends Mob implements Enemy { public static boolean checkSlimeSpawnRules(EntityType type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, RandomSource random) { if (world.getDifficulty() != Difficulty.PEACEFUL) { diff --git a/patches/unapplied/server/0845-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0837-Pass-ServerLevel-for-gamerule-callbacks.patch similarity index 90% rename from patches/unapplied/server/0845-Pass-ServerLevel-for-gamerule-callbacks.patch rename to patches/server/0837-Pass-ServerLevel-for-gamerule-callbacks.patch index c48bca0b63..036564244b 100644 --- a/patches/unapplied/server/0845-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0837-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Pass ServerLevel for gamerule callbacks diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index c399aaeee89e12a7da4e054acd877fe033676dfd..ff3eced0e20c39b825586897ee2fed01dd471d88 100644 +index 5b46cabf4f2e2a1f7feaad378dd98d64aeef8671..51b3db0b6c2cede95b584268e035c0fb36d38094 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -309,7 +309,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -304,7 +304,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface //DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s); // Paper moved to after init if (dedicatedserverproperties.announcePlayerAchievements != null) { @@ -18,10 +18,10 @@ index c399aaeee89e12a7da4e054acd877fe033676dfd..ff3eced0e20c39b825586897ee2fed01 if (dedicatedserverproperties.enableQuery) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e783dbe494b85928d67a0490a664e4b7dbef832c..7ef7a9203f6376cd13e6a9803dd01522d217f700 100644 +index 93603aabe8b96c8d85a355dcf8c2d5ca45036f89..b5a8bea33fbaf0cf793808a1bba364a2d87431be 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3008,7 +3008,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2910,7 +2910,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false); if (this.server.isHardcore()) { this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper @@ -31,7 +31,7 @@ index e783dbe494b85928d67a0490a664e4b7dbef832c..7ef7a9203f6376cd13e6a9803dd01522 } break; diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java -index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9537722e3 100644 +index fa8cd4438c19a262272da47985a57f7e84654f1b..663c1d8c1611af915a1bae733920dd75ad73feb1 100644 --- a/src/main/java/net/minecraft/world/level/GameRules.java +++ b/src/main/java/net/minecraft/world/level/GameRules.java @@ -51,7 +51,7 @@ public class GameRules { @@ -52,7 +52,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 while (iterator.hasNext()) { ServerPlayer entityplayer = (ServerPlayer) iterator.next(); -@@ -157,13 +157,13 @@ public class GameRules { +@@ -164,13 +164,13 @@ public class GameRules { ((GameRules.Type) type).callVisitor(consumer, (GameRules.Key) key); // CraftBukkit - decompile error } @@ -68,7 +68,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 T t0 = rules.getRule(key); this.getRule(key).setFrom(t0, server); -@@ -231,10 +231,10 @@ public class GameRules { +@@ -238,10 +238,10 @@ public class GameRules { private final Supplier> argument; private final Function, T> constructor; @@ -81,7 +81,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 this.argument = argumentType; this.constructor = ruleFactory; this.callback = changeCallback; -@@ -266,10 +266,10 @@ public class GameRules { +@@ -273,10 +273,10 @@ public class GameRules { public void setFromArgument(CommandContext context, String name, GameRules.Key gameRuleKey) { // Paper this.updateFromArgument(context, name, gameRuleKey); // Paper @@ -94,7 +94,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 if (server != null) { this.type.callback.accept(server, this.getSelf()); } -@@ -290,7 +290,7 @@ public class GameRules { +@@ -297,7 +297,7 @@ public class GameRules { protected abstract T copy(); @@ -103,7 +103,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 } public interface GameRuleTypeVisitor { -@@ -306,7 +306,7 @@ public class GameRules { +@@ -313,7 +313,7 @@ public class GameRules { private boolean value; @@ -112,7 +112,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 return new GameRules.Type<>(BoolArgumentType::bool, (gamerules_gameruledefinition) -> { return new GameRules.BooleanValue(gamerules_gameruledefinition, initialValue); }, changeCallback, GameRules.GameRuleTypeVisitor::visitBoolean); -@@ -334,7 +334,7 @@ public class GameRules { +@@ -341,7 +341,7 @@ public class GameRules { return this.value; } @@ -121,7 +121,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 this.value = value; this.onChanged(server); } -@@ -364,7 +364,7 @@ public class GameRules { +@@ -371,7 +371,7 @@ public class GameRules { return new GameRules.BooleanValue(this.type, this.value); } @@ -130,7 +130,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 this.value = rule.value; this.onChanged(server); } -@@ -374,7 +374,7 @@ public class GameRules { +@@ -381,7 +381,7 @@ public class GameRules { private int value; @@ -139,7 +139,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 return new GameRules.Type<>(IntegerArgumentType::integer, (gamerules_gameruledefinition) -> { return new GameRules.IntegerValue(gamerules_gameruledefinition, initialValue); }, changeCallback, GameRules.GameRuleTypeVisitor::visitInteger); -@@ -402,7 +402,7 @@ public class GameRules { +@@ -409,7 +409,7 @@ public class GameRules { return this.value; } @@ -148,7 +148,7 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 this.value = value; this.onChanged(server); } -@@ -453,7 +453,7 @@ public class GameRules { +@@ -460,7 +460,7 @@ public class GameRules { return new GameRules.IntegerValue(this.type, this.value); } @@ -158,10 +158,10 @@ index 392ab42d3c4fa6ef1815279a02b1fce236f725fa..2c500cfdd594e24b039d698bced1f9f9 this.onChanged(server); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1aa28195d2d2ef466764a162891c232f99b678e7..5fcea8546b574a6fc91502c0674ab8f9389c7cf3 100644 +index 70fc51e5689dd1012afac8df40c2d1200baffd0e..2976b3469a7870611862c28ef555be974309ee34 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1899,7 +1899,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1898,7 +1898,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper end GameRules.Value handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule)); handle.deserialize(event.getValue()); // Paper @@ -170,7 +170,7 @@ index 1aa28195d2d2ef466764a162891c232f99b678e7..5fcea8546b574a6fc91502c0674ab8f9 return true; } -@@ -1939,7 +1939,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1938,7 +1938,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper end GameRules.Value handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule.getName())); handle.deserialize(event.getValue()); // Paper diff --git a/patches/unapplied/server/0846-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch b/patches/server/0838-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch similarity index 89% rename from patches/unapplied/server/0846-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch rename to patches/server/0838-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch index 7016bfb7cb..683861bcf1 100644 --- a/patches/unapplied/server/0846-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch +++ b/patches/server/0838-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add pre-unbreaking amount to PlayerItemDamageEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 0611db371b013738a88e5a6c61623a77ea15652e..6eda115b5cd3312123784e758b59973e0a55773c 100644 +index 64738fffa5ab0cb9ea22fa7198856ea69d8e9cfd..8450a22b0fc6e8dc5cad0f61ac52a82b3cd3791e 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -563,10 +563,11 @@ public final class ItemStack { +@@ -571,10 +571,11 @@ public final class ItemStack { } } diff --git a/patches/unapplied/server/0847-WorldCreator-keepSpawnLoaded.patch b/patches/server/0839-WorldCreator-keepSpawnLoaded.patch similarity index 85% rename from patches/unapplied/server/0847-WorldCreator-keepSpawnLoaded.patch rename to patches/server/0839-WorldCreator-keepSpawnLoaded.patch index 091473ac19..c5a0760062 100644 --- a/patches/unapplied/server/0847-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0839-WorldCreator-keepSpawnLoaded.patch @@ -5,10 +5,10 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index acb82138d7b375dc7ef1e02e63a60c8d420995eb..0f3156c2dd1884bc5952708636ec559307bb61ba 100644 +index 8c0ad5680e20b2a5109a3c5d2c8d46854438cc1c..85413bb569a3b60cb06fa80fabfaa279529c0071 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1248,6 +1248,7 @@ public final class CraftServer implements Server { +@@ -1272,6 +1272,7 @@ public final class CraftServer implements Server { internal.setSpawnSettings(true, true); // Paper - move up diff --git a/patches/unapplied/server/0848-Fix-NPE-for-BlockDataMeta-getBlockData.patch b/patches/server/0840-Fix-NPE-for-BlockDataMeta-getBlockData.patch similarity index 100% rename from patches/unapplied/server/0848-Fix-NPE-for-BlockDataMeta-getBlockData.patch rename to patches/server/0840-Fix-NPE-for-BlockDataMeta-getBlockData.patch diff --git a/patches/unapplied/server/0849-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch b/patches/server/0841-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch similarity index 94% rename from patches/unapplied/server/0849-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch rename to patches/server/0841-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch index 86b9af2f3b..4d3efef473 100644 --- a/patches/unapplied/server/0849-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch +++ b/patches/server/0841-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Trigger bee_nest_destroyed trigger in the correct place diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 1ad1f958a9b6e1bc21f1c505aa7ea54950de6cad..9378e83a67a70dbb1fb4f05b33f1e553d008e62b 100644 +index 17c313b9cb45c8158cab751ffc4e0dc3b7e1fa3c..796d17f51496974cfdfed2593753b8c09b5c81c1 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -419,12 +419,16 @@ public class ServerPlayerGameMode { @@ -40,7 +40,7 @@ index 1ad1f958a9b6e1bc21f1c505aa7ea54950de6cad..9378e83a67a70dbb1fb4f05b33f1e553 return true; // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java -index dd51ea83935028a083c9cf368e6826fa32c00462..c2715a576d2b36188da2e2e472b22a3ea2f9d7d3 100644 +index 81048c54c45b77894ee1e2045870446dff7c71d4..fe7daa57119af137eeb76ca2c0e54bf7903ebbca 100644 --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java @@ -88,7 +88,7 @@ public class BeehiveBlock extends BaseEntityBlock { diff --git a/patches/unapplied/server/0850-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/server/0842-Add-EntityDyeEvent-and-CollarColorable-interface.patch similarity index 89% rename from patches/unapplied/server/0850-Add-EntityDyeEvent-and-CollarColorable-interface.patch rename to patches/server/0842-Add-EntityDyeEvent-and-CollarColorable-interface.patch index 8eacb2217e..d8b9159962 100644 --- a/patches/unapplied/server/0850-Add-EntityDyeEvent-and-CollarColorable-interface.patch +++ b/patches/server/0842-Add-EntityDyeEvent-and-CollarColorable-interface.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityDyeEvent and CollarColorable interface diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java -index e44352857272a2a4027c67bd25a28a9498b7bb49..ab86bfdaebe9b8791f0cfa6e0c61f80c8f891a93 100644 +index 366f32b11f39a79210532c614fdbb2230b87d88f..a0dd4a58937a4e49e430d8c1470fe84b709e8044 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java -@@ -399,6 +399,13 @@ public class Cat extends TamableAnimal { +@@ -404,6 +404,13 @@ public class Cat extends TamableAnimal implements VariantHolder { DyeColor enumcolor = ((DyeItem) item).getDyeColor(); if (enumcolor != this.getCollarColor()) { @@ -23,7 +23,7 @@ index e44352857272a2a4027c67bd25a28a9498b7bb49..ab86bfdaebe9b8791f0cfa6e0c61f80c if (!player.getAbilities().instabuild) { itemstack.shrink(1); diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java -index 34dadacb8238896b799716875ea5d0e924c323e8..45c3cec839a7c23903dedf6e3e004305da2adceb 100644 +index c44bbdea03856ac3a7652674263d1ec78ed02473..a6a50eb4f4ac85751071571876ac804d44ee1ee6 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java +++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java @@ -392,6 +392,13 @@ public class Wolf extends TamableAnimal implements NeutralMob { diff --git a/patches/unapplied/server/0851-Fire-CauldronLevelChange-on-initial-fill.patch b/patches/server/0843-Fire-CauldronLevelChange-on-initial-fill.patch similarity index 100% rename from patches/unapplied/server/0851-Fire-CauldronLevelChange-on-initial-fill.patch rename to patches/server/0843-Fire-CauldronLevelChange-on-initial-fill.patch diff --git a/patches/unapplied/server/0852-fix-powder-snow-cauldrons-not-turning-to-water.patch b/patches/server/0844-fix-powder-snow-cauldrons-not-turning-to-water.patch similarity index 100% rename from patches/unapplied/server/0852-fix-powder-snow-cauldrons-not-turning-to-water.patch rename to patches/server/0844-fix-powder-snow-cauldrons-not-turning-to-water.patch diff --git a/patches/unapplied/server/0772-Update-Log4j.patch b/patches/unapplied/server/0772-Update-Log4j.patch deleted file mode 100644 index a37693cff0..0000000000 --- a/patches/unapplied/server/0772-Update-Log4j.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: darbyjack -Date: Thu, 9 Dec 2021 19:17:02 -0600 -Subject: [PATCH] Update Log4j - - -diff --git a/build.gradle.kts b/build.gradle.kts -index 88000dae363f55044f86e72e9f6fb0214cd320bc..ea1faaf4820059b4a67dbd229a90bc6b78b861bc 100644 ---- a/build.gradle.kts -+++ b/build.gradle.kts -@@ -18,10 +18,11 @@ dependencies { - all its classes to check if they are plugins. - Scanning takes about 1-2 seconds so adding this speeds up the server start. - */ -- implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation -- annotationProcessor("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - Needed to generate meta for our Log4j plugins -+ implementation("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - implementation -+ annotationProcessor("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - Needed to generate meta for our Log4j plugins - // Paper end - implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper -+ implementation("org.apache.logging.log4j:log4j-slf4j18-impl:2.17.1") // Paper - implementation("org.ow2.asm:asm:9.3") - implementation("org.ow2.asm:asm-commons:9.3") // Paper - ASM event executor generation - implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files diff --git a/patches/unapplied/server/0800-Fix-NotePlayEvent.patch b/patches/unapplied/server/0800-Fix-NotePlayEvent.patch deleted file mode 100644 index f870090c76..0000000000 --- a/patches/unapplied/server/0800-Fix-NotePlayEvent.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Kieran Wallbanks -Date: Mon, 21 Jun 2021 14:23:50 +0100 -Subject: [PATCH] Fix NotePlayEvent - -== AT == -public org.bukkit.craftbukkit.block.data.CraftBlockData toNMS(Ljava/lang/Enum;Ljava/lang/Class;)Ljava/lang/Enum; - -diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -index 293affa9821bcf7c6f4c2d57818958ae2765c5de..c14eb4f7decdbcd6176d3bff95d595a947d4ec95 100644 ---- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -@@ -63,11 +63,12 @@ public class NoteBlock extends Block { - private void playNote(@Nullable Entity entity, Level world, BlockPos blockposition, BlockState data) { // CraftBukkit - if (world.getBlockState(blockposition.above()).isAir()) { - // CraftBukkit start -- org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, blockposition, data.getValue(NoteBlock.INSTRUMENT), data.getValue(NoteBlock.NOTE)); -- if (event.isCancelled()) { -- return; -- } -+ // org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, blockposition, data.getValue(NoteBlock.INSTRUMENT), data.getValue(NoteBlock.NOTE)); // Paper - move event into block event handler -+ // if (event.isCancelled()) { -+ // return; -+ // } - // CraftBukkit end -+ // Paper - TODO any way to cancel the game event? - world.blockEvent(blockposition, this, 0, 0); - world.gameEvent(entity, GameEvent.NOTE_BLOCK_PLAY, blockposition); - } -@@ -97,10 +98,14 @@ public class NoteBlock extends Block { - - @Override - public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) { -- int k = (Integer) state.getValue(NoteBlock.NOTE); -+ // Paper start - move NotePlayEvent call to fix instrument/note changes -+ org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, state.getValue(INSTRUMENT), state.getValue(NOTE)); -+ if (event.isCancelled()) return false; -+ int k = event.getNote().getId(); - float f = (float) Math.pow(2.0D, (double) (k - 12) / 12.0D); - -- world.playSound((Player) null, pos, ((NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT)).getSoundEvent(), SoundSource.RECORDS, 3.0F, f); -+ world.playSound(null, pos, org.bukkit.craftbukkit.block.data.CraftBlockData.toNMS(event.getInstrument(), NoteBlockInstrument.class).getSoundEvent(), SoundSource.RECORDS, 3.0F, f); -+ // Paper end - world.addParticle(ParticleTypes.NOTE, (double) pos.getX() + 0.5D, (double) pos.getY() + 1.2D, (double) pos.getZ() + 0.5D, (double) k / 24.0D, 0.0D, 0.0D); - return true; - } diff --git a/patches/unapplied/server/0841-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch b/patches/unapplied/server/0841-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch deleted file mode 100644 index 55e32b5b6d..0000000000 --- a/patches/unapplied/server/0841-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> -Date: Tue, 12 Apr 2022 16:36:15 -0700 -Subject: [PATCH] Fix StructureGrowEvent species for RED_MUSHROOM - - -diff --git a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java -index 30dac710f355de75e620b807f88c6a209615b05f..88a7b38f33500a618f42aed427e7e15db9e837b3 100644 ---- a/src/main/java/net/minecraft/world/level/block/MushroomBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/MushroomBlock.java -@@ -85,7 +85,7 @@ public class MushroomBlock extends BushBlock implements BonemealableBlock { - - public boolean growMushroom(ServerLevel world, BlockPos pos, BlockState state, RandomSource random) { - world.removeBlock(pos, false); -- SaplingBlock.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.BROWN_MUSHROOM; // CraftBukkit -+ SaplingBlock.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.RED_MUSHROOM; // CraftBukkit // Paper - if (((ConfiguredFeature) ((Holder) this.featureSupplier.get()).value()).place(world, world.getChunkSource().getGenerator(), random, pos)) { - return true; - } else {