diff --git a/patches/unapplied/server/0227-Improve-BlockPosition-inlining.patch b/patches/server/0222-Improve-BlockPosition-inlining.patch similarity index 91% rename from patches/unapplied/server/0227-Improve-BlockPosition-inlining.patch rename to patches/server/0222-Improve-BlockPosition-inlining.patch index 52f65f41ad..469c5f7390 100644 --- a/patches/unapplied/server/0227-Improve-BlockPosition-inlining.patch +++ b/patches/server/0222-Improve-BlockPosition-inlining.patch @@ -21,10 +21,10 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java -index 64acf7d83d3419af603ad43172c35ed321a2d1c4..afb1e5ff7b1b6b42f81eaa7888a1ec3ded804ccb 100644 +index ea4660fe600db94e97a5dd335135f76dd5951468..df4c9b275752ad97a4efe9380ae0d511ee760695 100644 --- a/src/main/java/net/minecraft/core/Vec3i.java +++ b/src/main/java/net/minecraft/core/Vec3i.java -@@ -37,12 +37,12 @@ public class Vec3i implements Comparable { +@@ -35,12 +35,12 @@ public class Vec3i implements Comparable { } @Override @@ -39,7 +39,7 @@ index 64acf7d83d3419af603ad43172c35ed321a2d1c4..afb1e5ff7b1b6b42f81eaa7888a1ec3d return (this.getY() + this.getZ() * 31) * 31 + this.getX(); } -@@ -55,15 +55,15 @@ public class Vec3i implements Comparable { +@@ -53,15 +53,15 @@ public class Vec3i implements Comparable { } } diff --git a/patches/unapplied/server/0228-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0223-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 85% rename from patches/unapplied/server/0228-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to patches/server/0223-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 6824f8274c..705de5b49a 100644 --- a/patches/unapplied/server/0228-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/patches/server/0223-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 1353bb583ec576345b7bfea5134c4b0d59811a07..1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313 100644 +index d33c49c4a4b87a5203f9b4592deff9389e6e870d..62d63883f6a9f4da099491f697b309d4194b6082 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -338,6 +338,7 @@ public class ArmorStand extends LivingEntity { +@@ -344,6 +344,7 @@ public class ArmorStand extends LivingEntity { @Override protected void pushEntities() { @@ -17,10 +17,10 @@ index 1353bb583ec576345b7bfea5134c4b0d59811a07..1a3727bbd9d67c32846e7ad4bd4bc900 Iterator iterator = list.iterator(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 232281b12fb1970fae82ce8fd3ffe1586d02bfb3..6308aeb2129b4d3c5f51759977548279d6073ab4 100644 +index ce2957c8955b95865c07eb3f3d7d9fcca2438e5e..9e717a360dd50a2b4a5344011ae77811a3e182c1 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -768,6 +768,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -760,6 +760,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end - Prevent block entity and entity crashes } } diff --git a/patches/unapplied/server/0229-Vanished-players-don-t-have-rights.patch b/patches/server/0224-Vanished-players-don-t-have-rights.patch similarity index 90% rename from patches/unapplied/server/0229-Vanished-players-don-t-have-rights.patch rename to patches/server/0224-Vanished-players-don-t-have-rights.patch index 52526bd0e1..bcb5370317 100644 --- a/patches/unapplied/server/0229-Vanished-players-don-t-have-rights.patch +++ b/patches/server/0224-Vanished-players-don-t-have-rights.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index e432855ce79f69c0e91fa31e8f6c59a465b0d09e..4ebc38d0666d01c67c2728355fbbef296a0672e3 100644 +index 5e9ef75a14a91f01a1ae5b3fb591d7258740a75d..516999dc425d23c570dabfe4f3c829650a6d205d 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -237,6 +237,15 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -276,6 +276,15 @@ public abstract class Projectile extends Entity implements TraceableEntity { } else { Entity entity1 = this.getOwner(); @@ -25,10 +25,10 @@ index e432855ce79f69c0e91fa31e8f6c59a465b0d09e..4ebc38d0666d01c67c2728355fbbef29 } } diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index a6638e626600e4304a973497a39e3fac52203b16..c19069f65a9ecbc9000ea4333417a2df4ace1007 100644 +index 6ca74a5cf691ee92c84bd031e875f72440df6b32..cee3f1200af602b5dfd0b27d05eb01826c5bbb1d 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java -@@ -197,7 +197,8 @@ public class BlockItem extends Item { +@@ -174,7 +174,8 @@ public class BlockItem extends Item { Player entityhuman = context.getPlayer(); CollisionContext voxelshapecollision = entityhuman == null ? CollisionContext.empty() : CollisionContext.of(entityhuman); // CraftBukkit start - store default return @@ -39,10 +39,10 @@ index a6638e626600e4304a973497a39e3fac52203b16..c19069f65a9ecbc9000ea4333417a2df BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 6308aeb2129b4d3c5f51759977548279d6073ab4..2eb80978ffc26c6250f3a96b73ee20bfea4ecd45 100644 +index 9e717a360dd50a2b4a5344011ae77811a3e182c1..d050d72eb87a2d1b4723ab831dfef5e25c6a65b2 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -271,6 +271,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -265,6 +265,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime); } @@ -89,10 +89,10 @@ index 6308aeb2129b4d3c5f51759977548279d6073ab4..2eb80978ffc26c6250f3a96b73ee20bf public boolean isClientSide() { return this.isClientSide; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2456857cfcb3dd258781067cd7ddbe18d5f68309..5b2365fc9a9364f2df7e5078c9d88572c074e4e3 100644 +index 63fec320871781d92f5ec552aac7fc08b2009f59..cecadd303f40a0e4a3e8315aa58226b6eb3ff7c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1301,6 +1301,14 @@ public class CraftEventFactory { +@@ -1296,6 +1296,14 @@ public class CraftEventFactory { Projectile projectile = (Projectile) entity.getBukkitEntity(); org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity(); com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); diff --git a/patches/unapplied/server/0230-Allow-disabling-armor-stand-ticking.patch b/patches/server/0225-Allow-disabling-armor-stand-ticking.patch similarity index 90% rename from patches/unapplied/server/0230-Allow-disabling-armor-stand-ticking.patch rename to patches/server/0225-Allow-disabling-armor-stand-ticking.patch index 6106bf3ff7..b0daae19fd 100644 --- a/patches/unapplied/server/0230-Allow-disabling-armor-stand-ticking.patch +++ b/patches/server/0225-Allow-disabling-armor-stand-ticking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow disabling armor stand ticking diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313..0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe 100644 +index 62d63883f6a9f4da099491f697b309d4194b6082..042968ff848da74be0c9fcf9bac3d0adfb135802 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -94,9 +94,16 @@ public class ArmorStand extends LivingEntity { +@@ -97,9 +97,16 @@ public class ArmorStand extends LivingEntity { public Rotations leftLegPose; public Rotations rightLegPose; public boolean canMove = true; // Paper @@ -25,7 +25,7 @@ index 1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313..0634b88a5bbfb549d5ec5931e19f674f this.handItems = NonNullList.withSize(2, ItemStack.EMPTY); this.armorItems = NonNullList.withSize(4, ItemStack.EMPTY); this.headPose = ArmorStand.DEFAULT_HEAD_POSE; -@@ -191,6 +198,7 @@ public class ArmorStand extends LivingEntity { +@@ -202,6 +209,7 @@ public class ArmorStand extends LivingEntity { this.onEquipItem(enumitemslot, (ItemStack) this.armorItems.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit } @@ -33,7 +33,7 @@ index 1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313..0634b88a5bbfb549d5ec5931e19f674f } @Override -@@ -241,6 +249,7 @@ public class ArmorStand extends LivingEntity { +@@ -244,6 +252,7 @@ public class ArmorStand extends LivingEntity { } nbt.put("Pose", this.writePose()); @@ -41,7 +41,7 @@ index 1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313..0634b88a5bbfb549d5ec5931e19f674f } @Override -@@ -272,6 +281,12 @@ public class ArmorStand extends LivingEntity { +@@ -278,6 +287,12 @@ public class ArmorStand extends LivingEntity { this.setNoBasePlate(nbt.getBoolean("NoBasePlate")); this.setMarker(nbt.getBoolean("Marker")); this.noPhysics = !this.hasPhysics(); @@ -51,10 +51,10 @@ index 1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313..0634b88a5bbfb549d5ec5931e19f674f + this.canTickSetByAPI = true; + } + // Paper end - Allow ArmorStands not to tick - CompoundTag nbttagcompound1 = nbt.getCompound("Pose"); + CompoundTag nbttagcompound2 = nbt.getCompound("Pose"); - this.readPose(nbttagcompound1); -@@ -659,7 +674,29 @@ public class ArmorStand extends LivingEntity { + this.readPose(nbttagcompound2); +@@ -657,7 +672,29 @@ public class ArmorStand extends LivingEntity { @Override public void tick() { @@ -84,7 +84,7 @@ index 1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313..0634b88a5bbfb549d5ec5931e19f674f Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE); if (!this.headPose.equals(vector3f)) { -@@ -788,31 +825,37 @@ public class ArmorStand extends LivingEntity { +@@ -786,31 +823,37 @@ public class ArmorStand extends LivingEntity { public void setHeadPose(Rotations angle) { this.headPose = angle; this.entityData.set(ArmorStand.DATA_HEAD_POSE, angle); diff --git a/patches/unapplied/server/0231-SkeletonHorse-Additions.patch b/patches/server/0226-SkeletonHorse-Additions.patch similarity index 94% rename from patches/unapplied/server/0231-SkeletonHorse-Additions.patch rename to patches/server/0226-SkeletonHorse-Additions.patch index bd079ca41a..fa351dc912 100644 --- a/patches/unapplied/server/0231-SkeletonHorse-Additions.patch +++ b/patches/server/0226-SkeletonHorse-Additions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java -index 8f20239f3ef7ebe41fac8ee6e024c36dafec33c4..d00fb16ae3b94dfcb10fd1a7c1671595e2ff1855 100644 +index f3a02925833733ae50d706ffc681dd05344a7687..69714e0558419b1577c95cf8e75c1d67177ccb89 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java -@@ -18,6 +18,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper; +@@ -20,6 +20,7 @@ import net.minecraft.world.item.enchantment.ItemEnchantments; public class SkeletonTrapGoal extends Goal { private final SkeletonHorse horse; @@ -16,7 +16,7 @@ index 8f20239f3ef7ebe41fac8ee6e024c36dafec33c4..d00fb16ae3b94dfcb10fd1a7c1671595 public SkeletonTrapGoal(SkeletonHorse skeletonHorse) { this.horse = skeletonHorse; -@@ -25,12 +26,13 @@ public class SkeletonTrapGoal extends Goal { +@@ -27,12 +28,13 @@ public class SkeletonTrapGoal extends Goal { @Override public boolean canUse() { diff --git a/patches/unapplied/server/0232-Don-t-call-getItemMeta-on-hasItemMeta.patch b/patches/server/0227-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 91% rename from patches/unapplied/server/0232-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to patches/server/0227-Don-t-call-getItemMeta-on-hasItemMeta.patch index 939529febe..3853dd42e2 100644 --- a/patches/unapplied/server/0232-Don-t-call-getItemMeta-on-hasItemMeta.patch +++ b/patches/server/0227-Don-t-call-getItemMeta-on-hasItemMeta.patch @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set. Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 78f2159285e676b877f85df604889ddcf19e8923..f3195b37c314a1327752ece7ec33dfdae16f0bec 100644 +index a58e865a047550cc4508d0515cc6f2fc639f9b3d..13e6fc9f42d63fdbd659462070dc7f0767fbb1d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -679,7 +679,7 @@ public final class CraftItemStack extends ItemStack { +@@ -681,7 +681,7 @@ public final class CraftItemStack extends ItemStack { @Override public boolean hasItemMeta() { @@ -24,10 +24,10 @@ index 78f2159285e676b877f85df604889ddcf19e8923..f3195b37c314a1327752ece7ec33dfda static boolean hasItemMeta(net.minecraft.world.item.ItemStack item) { diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index 652207b92ac20c1ba3d20939dc2bbee3c494bf5f..adb7c742e8fe3b8e0c2ecf63c627e7566285fd55 100644 +index cf436c9e62a11b8c6cbf7638de0e5635c67459ac..7237e24686885c754c87e7eec53c6400fd0b47bf 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -@@ -107,6 +107,34 @@ public class ItemMetaTest extends AbstractTestingBase { +@@ -106,6 +106,34 @@ public class ItemMetaTest extends AbstractTestingBase { assertThat(itemMeta.hasConflictingEnchant(null), is(false)); } diff --git a/patches/unapplied/server/0233-Expand-ArmorStand-API.patch b/patches/server/0228-Expand-ArmorStand-API.patch similarity index 100% rename from patches/unapplied/server/0233-Expand-ArmorStand-API.patch rename to patches/server/0228-Expand-ArmorStand-API.patch diff --git a/patches/unapplied/server/0234-AnvilDamageEvent.patch b/patches/server/0229-AnvilDamageEvent.patch similarity index 84% rename from patches/unapplied/server/0234-AnvilDamageEvent.patch rename to patches/server/0229-AnvilDamageEvent.patch index fc3492a898..e7fa11cbd6 100644 --- a/patches/unapplied/server/0234-AnvilDamageEvent.patch +++ b/patches/server/0229-AnvilDamageEvent.patch @@ -5,11 +5,11 @@ Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index d829173d2fc9fc0e12c24d736f1ed44417b81612..878d3c3089635a515fa7f54c956159a1bb6ce29b 100644 +index 37cc70f46d85cef1d678ab9df4fb1a73a57ed877..4c766b879f935298ffa4249e9ce4045601cedb20 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -@@ -108,6 +108,16 @@ public class AnvilMenu extends ItemCombinerMenu { - if (!player.getAbilities().instabuild && iblockdata.is(BlockTags.ANVIL) && player.getRandom().nextFloat() < 0.12F) { +@@ -110,6 +110,16 @@ public class AnvilMenu extends ItemCombinerMenu { + if (!player.hasInfiniteMaterials() && iblockdata.is(BlockTags.ANVIL) && player.getRandom().nextFloat() < 0.12F) { BlockState iblockdata1 = AnvilBlock.damage(iblockdata); + // Paper start - AnvilDamageEvent diff --git a/patches/unapplied/server/0235-Add-TNTPrimeEvent.patch b/patches/server/0230-Add-TNTPrimeEvent.patch similarity index 87% rename from patches/unapplied/server/0235-Add-TNTPrimeEvent.patch rename to patches/server/0230-Add-TNTPrimeEvent.patch index acace9251d..f658793bb4 100644 --- a/patches/unapplied/server/0235-Add-TNTPrimeEvent.patch +++ b/patches/server/0230-Add-TNTPrimeEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add TNTPrimeEvent 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 0d84f1fb53384a827d7418c322a32e3286f4081a..6d01175ea2092bc5f5ebb7aa066450bfec2443a1 100644 +index 3e2f83e2c695b024bdec2c5e11ab38596730ed4a..789823dbaaf2e23942749145dbb64071539624aa 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 -@@ -559,6 +559,11 @@ public class EnderDragon extends Mob implements Enemy { +@@ -557,6 +557,11 @@ public class EnderDragon extends Mob implements Enemy { }); craftBlock.getNMS().spawnAfterBreak((ServerLevel) this.level(), blockposition, ItemStack.EMPTY, false); } @@ -21,7 +21,7 @@ index 0d84f1fb53384a827d7418c322a32e3286f4081a..6d01175ea2092bc5f5ebb7aa066450bf this.level().removeBlock(blockposition, false); diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 016c8b7762c2b4eacb95a455940db4684b34e03c..da9cd2da60186b94f3b8a259c13b20f20e50fccb 100644 +index c7c4b04dede992991229b149b96ff6a81f499ae3..886b8d2284e3ae85184c842b24869029b9ee4ebe 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -302,12 +302,19 @@ public class FireBlock extends BaseFireBlock { @@ -46,11 +46,11 @@ index 016c8b7762c2b4eacb95a455940db4684b34e03c..da9cd2da60186b94f3b8a259c13b20f2 } } diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java -index cc20c320cbb3420e5e302a94571bab374c8553c8..4edd2e7bb62df65d6da8c8a623cf03e7e947bf75 100644 +index 21b83d4d5b58da22ba1fadb0ca376a0076f2e23c..58b8c3cc579a1d34af26c44d6a7413bd5cc9e4e7 100644 --- a/src/main/java/net/minecraft/world/level/block/TntBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java -@@ -49,6 +49,12 @@ public class TntBlock extends Block { - public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { +@@ -50,6 +50,12 @@ public class TntBlock extends Block { + protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { if (!oldState.is(state.getBlock())) { if (world.hasNeighborSignal(pos) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.REDSTONE, null, null)) { // CraftBukkit - TNTPrimeEvent + // Paper start - TNTPrimeEvent @@ -62,9 +62,9 @@ index cc20c320cbb3420e5e302a94571bab374c8553c8..4edd2e7bb62df65d6da8c8a623cf03e7 TntBlock.explode(world, pos); world.removeBlock(pos, false); } -@@ -59,6 +65,12 @@ public class TntBlock extends Block { +@@ -60,6 +66,12 @@ public class TntBlock extends Block { @Override - public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { + protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { if (world.hasNeighborSignal(pos) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.REDSTONE, null, sourcePos)) { // CraftBukkit - TNTPrimeEvent + // Paper start - TNTPrimeEvent + org.bukkit.block.Block tntBlock = org.bukkit.craftbukkit.block.CraftBlock.at(world, pos); @@ -75,7 +75,7 @@ index cc20c320cbb3420e5e302a94571bab374c8553c8..4edd2e7bb62df65d6da8c8a623cf03e7 TntBlock.explode(world, pos); world.removeBlock(pos, false); } -@@ -77,6 +89,13 @@ public class TntBlock extends Block { +@@ -78,6 +90,13 @@ public class TntBlock extends Block { @Override public void wasExploded(Level world, BlockPos pos, Explosion explosion) { if (!world.isClientSide) { @@ -89,8 +89,8 @@ index cc20c320cbb3420e5e302a94571bab374c8553c8..4edd2e7bb62df65d6da8c8a623cf03e7 PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, explosion.getIndirectSourceEntity()); int i = entitytntprimed.getFuse(); -@@ -111,6 +130,12 @@ public class TntBlock extends Block { - return InteractionResult.CONSUME; +@@ -110,6 +129,12 @@ public class TntBlock extends Block { + return ItemInteractionResult.CONSUME; } // CraftBukkit end + // Paper start - TNTPrimeEvent @@ -101,8 +101,8 @@ index cc20c320cbb3420e5e302a94571bab374c8553c8..4edd2e7bb62df65d6da8c8a623cf03e7 + // Paper end - TNTPrimeEvent TntBlock.explode(world, pos, player); world.setBlock(pos, Blocks.AIR.defaultBlockState(), 11); - Item item = itemstack.getItem(); -@@ -142,6 +167,12 @@ public class TntBlock extends Block { + Item item = stack.getItem(); +@@ -139,6 +164,12 @@ public class TntBlock extends Block { return; } // CraftBukkit end diff --git a/patches/unapplied/server/0236-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0231-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 92% rename from patches/unapplied/server/0236-Break-up-and-make-tab-spam-limits-configurable.patch rename to patches/server/0231-Break-up-and-make-tab-spam-limits-configurable.patch index 99d88c7a3a..a5b47300c5 100644 --- a/patches/unapplied/server/0236-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/patches/server/0231-Break-up-and-make-tab-spam-limits-configurable.patch @@ -22,10 +22,10 @@ to take the burden of this into their own hand without having to rely on plugins doing unsafe things. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index de6fff0e915c66123d0691840b180cf60dc8a95a..7663110df928ec88fc97e3b7d65671001db2d1bc 100644 +index b9fb2472405c19afb9888720a9abd86687e9bf12..f49f412781a8f341eda02de323f7298d5f0b25ee 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -256,6 +256,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -266,6 +266,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private int ackBlockChangesUpTo = -1; // CraftBukkit start - multithreaded fields private final AtomicInteger chatSpamTickCount = new AtomicInteger(); @@ -33,7 +33,7 @@ index de6fff0e915c66123d0691840b180cf60dc8a95a..7663110df928ec88fc97e3b7d6567100 // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -373,6 +374,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -387,6 +388,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.keepConnectionAlive(); // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; @@ -41,7 +41,7 @@ index de6fff0e915c66123d0691840b180cf60dc8a95a..7663110df928ec88fc97e3b7d6567100 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -696,7 +698,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -722,7 +724,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // Paper - AsyncTabCompleteEvent; run this async // CraftBukkit start diff --git a/patches/unapplied/server/0237-Fix-NBT-type-issues.patch b/patches/server/0232-Fix-NBT-type-issues.patch similarity index 83% rename from patches/unapplied/server/0237-Fix-NBT-type-issues.patch rename to patches/server/0232-Fix-NBT-type-issues.patch index 6a16b60735..041a4039c7 100644 --- a/patches/unapplied/server/0237-Fix-NBT-type-issues.patch +++ b/patches/server/0232-Fix-NBT-type-issues.patch @@ -8,10 +8,10 @@ Addresses two issues: - Allay duplication cooldown is saved and exposed as a long, but loaded as an int diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 97524656b8af7b80aeb7845575c704585dade725..a9c30fb4cfe4ff7bb27d498218373c572031fab8 100644 +index 105b07cb8efd6a4304c4cf6650affa46a7852941..adc3e6298a1946fdea029c82a9954fb5b6e24497 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -@@ -296,7 +296,7 @@ public class ExperienceOrb extends Entity { +@@ -302,7 +302,7 @@ public class ExperienceOrb extends Entity { public void addAdditionalSaveData(CompoundTag nbt) { nbt.putShort("Health", (short) this.health); nbt.putShort("Age", (short) this.age); @@ -20,7 +20,7 @@ index 97524656b8af7b80aeb7845575c704585dade725..a9c30fb4cfe4ff7bb27d498218373c57 nbt.putInt("Count", this.count); this.savePaperNBT(nbt); // Paper } -@@ -305,7 +305,7 @@ public class ExperienceOrb extends Entity { +@@ -311,7 +311,7 @@ public class ExperienceOrb extends Entity { public void readAdditionalSaveData(CompoundTag nbt) { this.health = nbt.getShort("Health"); this.age = nbt.getShort("Age"); @@ -30,10 +30,10 @@ index 97524656b8af7b80aeb7845575c704585dade725..a9c30fb4cfe4ff7bb27d498218373c57 this.loadPaperNBT(nbt); // Paper } diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -index 41621adf597d76cad0a7098ac0da8ceb29b43ed7..5ad5f22e5aa26445e5eb229958e7bf356bdd460e 100644 +index 296a25deae065425ef9384b7ec15d5aeb76dbd66..991e3274091c4e25eebc6debd44653e5b566eedb 100644 --- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java +++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java -@@ -509,7 +509,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -487,7 +487,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS }); } diff --git a/patches/server/0233-Remove-unnecessary-itemmeta-handling.patch b/patches/server/0233-Remove-unnecessary-itemmeta-handling.patch new file mode 100644 index 0000000000..16fc84f82a --- /dev/null +++ b/patches/server/0233-Remove-unnecessary-itemmeta-handling.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Tue, 22 Nov 2016 00:40:42 -0500 +Subject: [PATCH] Remove unnecessary itemmeta handling + + +diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java +index 2535cbf50087a4631c4d1027a61b173121d729bc..6f1ff953e6311ff859d3ddc5734d33146237992b 100644 +--- a/src/main/java/net/minecraft/world/item/ItemStack.java ++++ b/src/main/java/net/minecraft/world/item/ItemStack.java +@@ -168,7 +168,7 @@ public final class ItemStack implements DataComponentHolder { + + // CraftBukkit start + ItemStack itemstack = new ItemStack(holder, i, datacomponentpatch); +- if (!datacomponentpatch.isEmpty()) { ++ if (false && !datacomponentpatch.isEmpty()) { // Paper - This is no longer needed with raw NBT being handled in metadata + CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); + } + return itemstack; +@@ -183,7 +183,7 @@ public final class ItemStack implements DataComponentHolder { + registryfriendlybytebuf.writeVarInt(itemstack.getCount()); + // Spigot start - filter + itemstack = itemstack.copy(); +- CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); ++ // CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); // Paper - This is no longer with raw NBT being handled in metadata + // Spigot end + ITEM_STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.getItemHolder()); // CraftBukkit - decompile error + DataComponentPatch.STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.components.asPatch()); diff --git a/patches/unapplied/server/0239-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0234-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 87% rename from patches/unapplied/server/0239-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to patches/server/0234-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 18b6234816..a79598c0fa 100644 --- a/patches/unapplied/server/0239-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0234-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 2a0e81a3ec0774ad98e2d74ac7672c167e28f38e..05b838f7008d5d031b18e161bbde7e72b8205b90 100644 +index 46da628073e2bfb77b3deab623dba46228d92618..1c508d1f122d287cd8dc0a905de96436c343327a 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1425,6 +1425,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1441,6 +1441,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas()); @@ -16,7 +16,7 @@ index 2a0e81a3ec0774ad98e2d74ac7672c167e28f38e..05b838f7008d5d031b18e161bbde7e72 this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.updatePlayers(this.level.players()); if (entity instanceof ServerPlayer) { -@@ -1467,7 +1468,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1481,7 +1482,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.broadcastRemoved(); } @@ -26,10 +26,10 @@ index 2a0e81a3ec0774ad98e2d74ac7672c167e28f38e..05b838f7008d5d031b18e161bbde7e72 protected void tick() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 113dce44ce086272fe7f20a2007efadee142ff85..0811a2e87192b46c39f54c26ce0e56fc6e9d87e5 100644 +index 75213d34740e512763a8eb4411ef2b48c6204434..ce89f04b74e579dedae05cfdf681827a92626f9a 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1197,6 +1197,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1203,6 +1203,12 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -43,10 +43,10 @@ index 113dce44ce086272fe7f20a2007efadee142ff85..0811a2e87192b46c39f54c26ce0e56fc // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit return false; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 36f0a43cc301840406eab260b162295fe760f8bb..c46ad2013439f043145fb7fc67bbcd80728e3c16 100644 +index c2dd3767fbeb7215c9b2703054c9068252828355..d39aec1b3233e91aa5b953396d876e7466a9a5bc 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -242,6 +242,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -245,6 +245,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; diff --git a/patches/unapplied/server/0240-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0235-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 91% rename from patches/unapplied/server/0240-Add-Early-Warning-Feature-to-WatchDog.patch rename to patches/server/0235-Add-Early-Warning-Feature-to-WatchDog.patch index 2142ed4de7..a44ad20bae 100644 --- a/patches/unapplied/server/0240-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0235-Add-Early-Warning-Feature-to-WatchDog.patch @@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash. This will help diagnose what was going on in that time before the crash. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 02df8d59ced48bfebfacbfab669e245539605ede..8196ecb2a7280a4f60a5fea18c484d6419953b48 100644 +index 875591131576cb3760193651fac22698e1eb9099..23a5358a5fe4784e75b327741e6fcb174c04d287 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1092,6 +1092,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> { diff --git a/patches/unapplied/server/0242-Use-a-Queue-for-Queueing-Commands.patch b/patches/server/0237-Use-a-Queue-for-Queueing-Commands.patch similarity index 90% rename from patches/unapplied/server/0242-Use-a-Queue-for-Queueing-Commands.patch rename to patches/server/0237-Use-a-Queue-for-Queueing-Commands.patch index 24d08d52b3..34b61b9cfc 100644 --- a/patches/unapplied/server/0242-Use-a-Queue-for-Queueing-Commands.patch +++ b/patches/server/0237-Use-a-Queue-for-Queueing-Commands.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a Queue for Queueing Commands Lists are bad as Queues mmmkay. diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 6db918db1984d298c57eb93f7cf38aa26f01a04c..78775feb965d6eb98a1ff655ae44b9f0399ef9aa 100644 +index 1b47e228ad7365b31d6ddd8c572d3bc5de90a591..bce5fc7337d4e29c3353600a35c999caaed1428e 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -69,7 +69,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -76,7 +76,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface static final Logger LOGGER = LogUtils.getLogger(); private static final int CONVERSION_RETRY_DELAY_MS = 5000; private static final int CONVERSION_RETRIES = 2; @@ -18,7 +18,7 @@ index 6db918db1984d298c57eb93f7cf38aa26f01a04c..78775feb965d6eb98a1ff655ae44b9f0 @Nullable private QueryThreadGs4 queryThreadGs4; // private final RemoteControlCommandListener rconConsoleSource; // CraftBukkit - remove field -@@ -412,13 +412,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -434,13 +434,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface } public void handleConsoleInput(String command, CommandSourceStack commandSource) { diff --git a/patches/unapplied/server/0243-Ability-to-get-block-entities-from-a-chunk-without-s.patch b/patches/server/0238-Ability-to-get-block-entities-from-a-chunk-without-s.patch similarity index 95% rename from patches/unapplied/server/0243-Ability-to-get-block-entities-from-a-chunk-without-s.patch rename to patches/server/0238-Ability-to-get-block-entities-from-a-chunk-without-s.patch index bc4f825d2a..7c3bd3c439 100644 --- a/patches/unapplied/server/0243-Ability-to-get-block-entities-from-a-chunk-without-s.patch +++ b/patches/server/0238-Ability-to-get-block-entities-from-a-chunk-without-s.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ability to get block entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index 70999e95116d50de1a7fecdd91bbad0bac2bf1d8..bfde7573acb6d84accfd3f7fee877bbfb3b0852f 100644 +index 1d4587a97e86251982a9df832949a7093b216862..fc335e4e80553e8c6c915e7813e9610ac10649c2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -173,6 +173,13 @@ public class CraftChunk implements Chunk { diff --git a/patches/unapplied/server/0244-Optimize-BlockPosition-helper-methods.patch b/patches/server/0239-Optimize-BlockPosition-helper-methods.patch similarity index 96% rename from patches/unapplied/server/0244-Optimize-BlockPosition-helper-methods.patch rename to patches/server/0239-Optimize-BlockPosition-helper-methods.patch index 876bc9b803..3e78fec75c 100644 --- a/patches/unapplied/server/0244-Optimize-BlockPosition-helper-methods.patch +++ b/patches/server/0239-Optimize-BlockPosition-helper-methods.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize BlockPosition helper methods diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java -index ead823fa2a143acb05b33152ee1e5ee4b4936a20..4bc994bacdf1fbb7689d799d21a50b7903bf9e59 100644 +index 2074d4327f0c356c220f3a6a9761439e76a15fc3..19fdd77d4830b7218b627fdf4ed755d8935c00aa 100644 --- a/src/main/java/net/minecraft/core/BlockPos.java +++ b/src/main/java/net/minecraft/core/BlockPos.java -@@ -131,67 +131,84 @@ public class BlockPos extends Vec3i { +@@ -153,67 +153,84 @@ public class BlockPos extends Vec3i { @Override public BlockPos above() { diff --git a/patches/unapplied/server/0245-Restore-vanilla-default-mob-spawn-range-and-water-an.patch b/patches/server/0240-Restore-vanilla-default-mob-spawn-range-and-water-an.patch similarity index 100% rename from patches/unapplied/server/0245-Restore-vanilla-default-mob-spawn-range-and-water-an.patch rename to patches/server/0240-Restore-vanilla-default-mob-spawn-range-and-water-an.patch diff --git a/patches/unapplied/server/0246-Slime-Pathfinder-Events.patch b/patches/server/0241-Slime-Pathfinder-Events.patch similarity index 90% rename from patches/unapplied/server/0246-Slime-Pathfinder-Events.patch rename to patches/server/0241-Slime-Pathfinder-Events.patch index 69e65adef2..dcc57291f0 100644 --- a/patches/unapplied/server/0246-Slime-Pathfinder-Events.patch +++ b/patches/server/0241-Slime-Pathfinder-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Slime Pathfinder Events 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 d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bcb0d9b1a9 100644 +index 136ec2413b6fe4680d7f2e903d04c9984b37f4c0..7062ef1cfd7d6279a4c6693cbdb80da49f23c542 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java -@@ -116,6 +116,7 @@ public class Slime extends Mob implements Enemy { +@@ -115,6 +115,7 @@ public class Slime extends Mob implements Enemy { @Override public void addAdditionalSaveData(CompoundTag nbt) { super.addAdditionalSaveData(nbt); @@ -16,7 +16,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc nbt.putInt("Size", this.getSize() - 1); nbt.putBoolean("wasOnGround", this.wasOnGround); } -@@ -124,6 +125,11 @@ public class Slime extends Mob implements Enemy { +@@ -123,6 +124,11 @@ public class Slime extends Mob implements Enemy { public void readAdditionalSaveData(CompoundTag nbt) { this.setSize(nbt.getInt("Size") + 1, false); super.readAdditionalSaveData(nbt); @@ -28,7 +28,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc this.wasOnGround = nbt.getBoolean("wasOnGround"); } -@@ -479,7 +485,7 @@ public class Slime extends Mob implements Enemy { +@@ -475,7 +481,7 @@ public class Slime extends Mob implements Enemy { @Override public boolean canUse() { @@ -37,7 +37,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc } @Override -@@ -518,7 +524,15 @@ public class Slime extends Mob implements Enemy { +@@ -512,7 +518,15 @@ public class Slime extends Mob implements Enemy { public boolean canUse() { LivingEntity entityliving = this.slime.getTarget(); @@ -54,7 +54,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc } @Override -@@ -531,7 +545,15 @@ public class Slime extends Mob implements Enemy { +@@ -525,7 +539,15 @@ public class Slime extends Mob implements Enemy { public boolean canContinueToUse() { LivingEntity entityliving = this.slime.getTarget(); @@ -71,7 +71,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc } @Override -@@ -556,6 +578,13 @@ public class Slime extends Mob implements Enemy { +@@ -548,6 +570,13 @@ public class Slime extends Mob implements Enemy { } } @@ -85,7 +85,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc } private static class SlimeRandomDirectionGoal extends Goal { -@@ -571,7 +600,7 @@ public class Slime extends Mob implements Enemy { +@@ -563,7 +592,7 @@ public class Slime extends Mob implements Enemy { @Override public boolean canUse() { @@ -94,7 +94,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc } @Override -@@ -579,6 +608,11 @@ public class Slime extends Mob implements Enemy { +@@ -571,6 +600,11 @@ public class Slime extends Mob implements Enemy { if (--this.nextRandomizeTime <= 0) { this.nextRandomizeTime = this.adjustedTickDelay(40 + this.slime.getRandom().nextInt(60)); this.chosenDegrees = (float) this.slime.getRandom().nextInt(360); @@ -106,7 +106,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc } MoveControl controllermove = this.slime.getMoveControl(); -@@ -603,7 +637,7 @@ public class Slime extends Mob implements Enemy { +@@ -593,7 +627,7 @@ public class Slime extends Mob implements Enemy { @Override public boolean canUse() { @@ -115,7 +115,7 @@ index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bc } @Override -@@ -618,4 +652,15 @@ public class Slime extends Mob implements Enemy { +@@ -606,4 +640,15 @@ public class Slime extends Mob implements Enemy { } } diff --git a/patches/unapplied/server/0247-Configurable-speed-for-water-flowing-over-lava.patch b/patches/server/0242-Configurable-speed-for-water-flowing-over-lava.patch similarity index 78% rename from patches/unapplied/server/0247-Configurable-speed-for-water-flowing-over-lava.patch rename to patches/server/0242-Configurable-speed-for-water-flowing-over-lava.patch index 1ae5655967..fafdd583ab 100644 --- a/patches/unapplied/server/0247-Configurable-speed-for-water-flowing-over-lava.patch +++ b/patches/server/0242-Configurable-speed-for-water-flowing-over-lava.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Configurable speed for water flowing over lava diff --git a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java -index 82afefbbc3b9d3571792d66e6d4f9d687971aa66..9b3dcf1a4d4cece92a629506d341f6bfe79d13d0 100644 +index 6d24989965e5215c1e256444a868633cf2772aa3..84623c632d8c2f0fa7ec939c711316d757117d23 100644 --- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java -@@ -140,11 +140,31 @@ public class LiquidBlock extends Block implements BucketPickup { +@@ -138,11 +138,31 @@ public class LiquidBlock extends Block implements BucketPickup { @Override - public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { + protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { if (this.shouldSpreadLiquid(world, pos, state)) { - world.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(world)); + world.scheduleTick(pos, state.getFluidState().getType(), this.getFlowSpeed(world, pos)); // Paper - Configurable speed for water flowing over lava @@ -39,11 +39,11 @@ index 82afefbbc3b9d3571792d66e6d4f9d687971aa66..9b3dcf1a4d4cece92a629506d341f6bf + // Paper end - Configurable speed for water flowing over lava + @Override - public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) { + protected BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) { if (state.getFluidState().isSource() || neighborState.getFluidState().isSource()) { -@@ -157,7 +177,7 @@ public class LiquidBlock extends Block implements BucketPickup { +@@ -155,7 +175,7 @@ public class LiquidBlock extends Block implements BucketPickup { @Override - public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { + protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { if (this.shouldSpreadLiquid(world, pos, state)) { - world.scheduleTick(pos, state.getFluidState().getType(), this.fluid.getTickDelay(world)); + world.scheduleTick(pos, state.getFluidState().getType(), this.getFlowSpeed(world, pos)); // Paper - Configurable speed for water flowing over lava diff --git a/patches/unapplied/server/0248-Optimize-CraftBlockData-Creation.patch b/patches/server/0243-Optimize-CraftBlockData-Creation.patch similarity index 89% rename from patches/unapplied/server/0248-Optimize-CraftBlockData-Creation.patch rename to patches/server/0243-Optimize-CraftBlockData-Creation.patch index 24ea11022c..022cecee9a 100644 --- a/patches/unapplied/server/0248-Optimize-CraftBlockData-Creation.patch +++ b/patches/server/0243-Optimize-CraftBlockData-Creation.patch @@ -7,10 +7,10 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData and cloning it when one is needed. 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 b6d3f9f9520e410526cfeabcdeb9720dbe30e4bf..6f60622f2dad5f82fb24505612e7e3a32722ab93 100644 +index 08eb369f8cb4c35be17cef816a0d33295a1ae3e0..da8b97c590fb38f65dee2e8a881a2f7ad658b5e7 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 -@@ -875,6 +875,14 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -807,6 +807,14 @@ public abstract class BlockBehaviour implements FeatureElement { this.instrument = blockbase_info.instrument; this.replaceable = blockbase_info.replaceable; } @@ -26,10 +26,10 @@ index b6d3f9f9520e410526cfeabcdeb9720dbe30e4bf..6f60622f2dad5f82fb24505612e7e3a3 private boolean calculateSolid() { if (((Block) this.owner).properties.forceSolidOn) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 85ea3d059efed939c56b612f3c8e2064a28c39e6..fce3fec5e1ff164b0596fdd6b3d7b5b0277253ef 100644 +index d2ec2d11736a74f8d568e25e9b560605518af987..19fab0d8d8a6211782df1fd99b5d60681aecd2f5 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -570,7 +570,17 @@ public class CraftBlockData implements BlockData { +@@ -571,7 +571,17 @@ public class CraftBlockData implements BlockData { return craft; } diff --git a/patches/unapplied/server/0249-Optimize-MappedRegistry.patch b/patches/server/0244-Optimize-MappedRegistry.patch similarity index 81% rename from patches/unapplied/server/0249-Optimize-MappedRegistry.patch rename to patches/server/0244-Optimize-MappedRegistry.patch index 6f50c2dc94..de87a88672 100644 --- a/patches/unapplied/server/0249-Optimize-MappedRegistry.patch +++ b/patches/server/0244-Optimize-MappedRegistry.patch @@ -8,10 +8,10 @@ Use larger initial sizes to increase bucket capacity on the BiMap BiMap.get was seen to be using a good bit of CPU time. diff --git a/src/main/java/net/minecraft/core/MappedRegistry.java b/src/main/java/net/minecraft/core/MappedRegistry.java -index ffa0d08c0a2c8cb8f3f1c896b435acff02bdaed6..020f00b5aba1873310fb0e044bcc47140c405ebd 100644 +index aac210f682303b85e207bb230decb1af62a1a25a..a35fe2b8ef35692fb7b5d520944d0c6ae53ac07e 100644 --- a/src/main/java/net/minecraft/core/MappedRegistry.java +++ b/src/main/java/net/minecraft/core/MappedRegistry.java -@@ -36,11 +36,11 @@ public class MappedRegistry implements WritableRegistry { +@@ -35,11 +35,11 @@ public class MappedRegistry implements WritableRegistry { private static final Logger LOGGER = LogUtils.getLogger(); final ResourceKey> key; private final ObjectList> byId = new ObjectArrayList<>(256); @@ -19,12 +19,12 @@ index ffa0d08c0a2c8cb8f3f1c896b435acff02bdaed6..020f00b5aba1873310fb0e044bcc4714 - private final Map> byLocation = new HashMap<>(); - private final Map, Holder.Reference> byKey = new HashMap<>(); - private final Map> byValue = new IdentityHashMap<>(); -- private final Map lifecycles = new IdentityHashMap<>(); +- private final Map, RegistrationInfo> registrationInfos = new IdentityHashMap<>(); + private final Reference2IntMap toId = Util.make(new Reference2IntOpenHashMap<>(2048), map -> map.defaultReturnValue(-1)); // Paper - Perf: Use bigger expected size to reduce collisions + private final Map> byLocation = new HashMap<>(2048); // Paper - Perf: Use bigger expected size to reduce collisions + private final Map, Holder.Reference> byKey = new HashMap<>(2048); // Paper - Perf: Use bigger expected size to reduce collisions + private final Map> byValue = new IdentityHashMap<>(2048); // Paper - Perf: Use bigger expected size to reduce collisions -+ private final Map lifecycles = new IdentityHashMap<>(2048); // Paper - Perf: Use bigger expected size to reduce collisions ++ private final Map, RegistrationInfo> registrationInfos = new IdentityHashMap<>(2048); // Paper - Perf: Use bigger expected size to reduce collisions private Lifecycle registryLifecycle; private volatile Map, HolderSet.Named> tags = new IdentityHashMap<>(); private boolean frozen; diff --git a/patches/unapplied/server/0250-Add-PhantomPreSpawnEvent.patch b/patches/server/0245-Add-PhantomPreSpawnEvent.patch similarity index 87% rename from patches/unapplied/server/0250-Add-PhantomPreSpawnEvent.patch rename to patches/server/0245-Add-PhantomPreSpawnEvent.patch index b8f3ee434f..20c2fee95a 100644 --- a/patches/unapplied/server/0250-Add-PhantomPreSpawnEvent.patch +++ b/patches/server/0245-Add-PhantomPreSpawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PhantomPreSpawnEvent diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java -index d19bf99d03bf505a1a277b49fba6ee4769802ef2..658393f451e46a93c5665fe3c580aa395ace68d1 100644 +index ef6bbcb6fc9d37748c74b68966e12637efd00aba..4292a0fbab588a8cd58db36bc279f2991231aeec 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java -@@ -172,6 +172,11 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -165,6 +165,11 @@ public class Phantom extends FlyingMob implements Enemy { } this.setPhantomSize(nbt.getInt("Size")); @@ -20,7 +20,7 @@ index d19bf99d03bf505a1a277b49fba6ee4769802ef2..658393f451e46a93c5665fe3c580aa39 } @Override -@@ -181,6 +186,11 @@ public class Phantom extends FlyingMob implements Enemy { +@@ -174,6 +179,11 @@ public class Phantom extends FlyingMob implements Enemy { nbt.putInt("AY", this.anchorPoint.getY()); nbt.putInt("AZ", this.anchorPoint.getZ()); nbt.putInt("Size", this.getPhantomSize()); @@ -32,26 +32,29 @@ index d19bf99d03bf505a1a277b49fba6ee4769802ef2..658393f451e46a93c5665fe3c580aa39 } @Override -@@ -241,6 +251,14 @@ public class Phantom extends FlyingMob implements Enemy { - return -0.125F; +@@ -219,6 +229,17 @@ public class Phantom extends FlyingMob implements Enemy { + return entitysize.scale(1.0F + 0.15F * (float) i); } + // Paper start ++ @Nullable + java.util.UUID spawningEntity; + ++ @Nullable + public java.util.UUID getSpawningEntity() { -+ return spawningEntity; ++ return this.spawningEntity; + } + public void setSpawningEntity(java.util.UUID entity) { this.spawningEntity = entity; } + // Paper end ++ private static enum AttackPhase { CIRCLE, SWOOP; diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -index 61ba99d99cc4e7782450ee6aa8b6c87b1a42cb3a..5d84bd022714f9726131d2e37d648c444052af9b 100644 +index 9d28e3855a9b150534ef8b6c89e186f5c4c47694..bb7f2d3ff7fc6f5cadb4ab24efb5a3a2f5bdc33f 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -@@ -70,9 +70,19 @@ public class PhantomSpawner implements CustomSpawner { +@@ -69,9 +69,19 @@ public class PhantomSpawner implements CustomSpawner { int k = 1 + randomsource.nextInt(difficultydamagescaler.getDifficulty().getId() + 1); for (int l = 0; l < k; ++l) { @@ -69,7 +72,7 @@ index 61ba99d99cc4e7782450ee6aa8b6c87b1a42cb3a..5d84bd022714f9726131d2e37d648c44 if (entityphantom != null) { + entityphantom.setSpawningEntity(entityplayer.getUUID()); // Paper - PhantomPreSpawnEvent entityphantom.moveTo(blockposition1, 0.0F, 0.0F); - groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity, (CompoundTag) null); + groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, MobSpawnType.NATURAL, groupdataentity); world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java index 0359c161448941f1b9fdac545a5c47a68f19b760..305a635b049741ac5e2670060c6818cb2c07e5ab 100644 diff --git a/patches/unapplied/server/0251-Add-More-Creeper-API.patch b/patches/server/0246-Add-More-Creeper-API.patch similarity index 90% rename from patches/unapplied/server/0251-Add-More-Creeper-API.patch rename to patches/server/0246-Add-More-Creeper-API.patch index a0cc33b49f..c5b211840f 100644 --- a/patches/unapplied/server/0251-Add-More-Creeper-API.patch +++ b/patches/server/0246-Add-More-Creeper-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add More Creeper API diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index 83b407e865e2ff4debb89c350727809601be1fa6..9657796d08f4a102d9d5ff7685f2a152d1a87fda 100644 +index dd57da9dc663484c4266d9973aee927899292749..4b94e21d05d6deae75f0c2fb711e43a4c7d06f90 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -@@ -133,7 +133,7 @@ public class Creeper extends Monster implements PowerableMob { +@@ -134,7 +134,7 @@ public class Creeper extends Monster implements PowerableMob { } if (nbt.getBoolean("ignited")) { @@ -17,7 +17,7 @@ index 83b407e865e2ff4debb89c350727809601be1fa6..9657796d08f4a102d9d5ff7685f2a152 } } -@@ -316,7 +316,18 @@ public class Creeper extends Monster implements PowerableMob { +@@ -314,7 +314,18 @@ public class Creeper extends Monster implements PowerableMob { } public void ignite() { diff --git a/patches/unapplied/server/0252-Inventory-removeItemAnySlot.patch b/patches/server/0247-Inventory-removeItemAnySlot.patch similarity index 100% rename from patches/unapplied/server/0252-Inventory-removeItemAnySlot.patch rename to patches/server/0247-Inventory-removeItemAnySlot.patch diff --git a/patches/unapplied/server/0253-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/0248-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch similarity index 92% rename from patches/unapplied/server/0253-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch rename to patches/server/0248-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 635394d1c0..afd29cbacc 100644 --- a/patches/unapplied/server/0253-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/patches/server/0248-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3d189fd1a1ac17f1dee4af631f8ed59387c977d4..fd04c5c7e08b54de65ffaf58385dcc05ef22bba0 100644 +index 59060c33f87db609510df111234b957b51badd87..4a7c418a497b98d5038794b6bbc38f5e0b7fedd7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -407,7 +407,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0254-Add-ray-tracing-methods-to-LivingEntity.patch b/patches/server/0249-Add-ray-tracing-methods-to-LivingEntity.patch similarity index 91% rename from patches/unapplied/server/0254-Add-ray-tracing-methods-to-LivingEntity.patch rename to patches/server/0249-Add-ray-tracing-methods-to-LivingEntity.patch index 4279bf5ba5..6059533369 100644 --- a/patches/unapplied/server/0254-Add-ray-tracing-methods-to-LivingEntity.patch +++ b/patches/server/0249-Add-ray-tracing-methods-to-LivingEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 88af8a11dfc3b645c5a2b5fb629a73fc1e2b2f80..c6c6fb195476e0d37b0007510044928ebe6e4572 100644 +index 7d44d4563e39f279cf335f307a4d84d0758858ee..67ba23c66e253d3a96f6b08a5580387859652aa2 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3849,6 +3849,19 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3932,6 +3932,19 @@ public abstract class LivingEntity extends Entity implements Attackable { } // Paper start - Make shield blocking delay configurable @@ -29,10 +29,10 @@ index 88af8a11dfc3b645c5a2b5fb629a73fc1e2b2f80..c6c6fb195476e0d37b0007510044928e public int getShieldBlockingDelay() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 0fe087cd6037b4dd694cc3c5c3eac8203ea6d519..8139ea88988e2e3551258b6686873753353ab9f8 100644 +index bd5b535663935dc8f4a2a8f5c233c1c720400bd7..fa2cb4820698d4f0f317d7abd14216bdd54143a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -201,6 +201,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -200,6 +200,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return blocks.get(0); } diff --git a/patches/unapplied/server/0255-Expose-attack-cooldown-methods-for-Player.patch b/patches/server/0250-Expose-attack-cooldown-methods-for-Player.patch similarity index 86% rename from patches/unapplied/server/0255-Expose-attack-cooldown-methods-for-Player.patch rename to patches/server/0250-Expose-attack-cooldown-methods-for-Player.patch index a6b78911f9..7f7776773c 100644 --- a/patches/unapplied/server/0255-Expose-attack-cooldown-methods-for-Player.patch +++ b/patches/server/0250-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d06d26133e00eb47b6ac950bb4efbf4ac6fe9da5..3482fef56307357a4d75d52a79c2fd9988bab22e 100644 +index 87e3eeb126284eab6d3391ae11d3bf2a8edfcb61..b3f6e1277c7afc77ff34ac14d3d16d1501abe14e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2899,6 +2899,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2964,6 +2964,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.adventure$pointers; } diff --git a/patches/unapplied/server/0256-Improve-death-events.patch b/patches/server/0251-Improve-death-events.patch similarity index 89% rename from patches/unapplied/server/0256-Improve-death-events.patch rename to patches/server/0251-Improve-death-events.patch index af42cf617f..33b628f3d7 100644 --- a/patches/unapplied/server/0256-Improve-death-events.patch +++ b/patches/server/0251-Improve-death-events.patch @@ -19,10 +19,10 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou public net.minecraft.world.entity.LivingEntity getSoundVolume()F diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0b039c43bd3bd46f31477fc75585038270242de2..054057482d191d8e77bf4d179d51e32b5d9ca16e 100644 +index e073b48ed6cbefc503216615f54d09b309217d80..c97410f580f31389987ef944fc410e44459a4693 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -248,6 +248,10 @@ public class ServerPlayer extends Player { +@@ -263,6 +263,10 @@ public class ServerPlayer extends Player { private int containerCounter; public boolean wonGame; private int containerUpdateDelay; // Paper - Configurable container update tick rate @@ -32,8 +32,8 @@ index 0b039c43bd3bd46f31477fc75585038270242de2..054057482d191d8e77bf4d179d51e32b + // Paper end - cancellable death event // CraftBukkit start - public String displayName; -@@ -810,7 +814,7 @@ public class ServerPlayer extends Player { + public CraftPlayer.TransferCookieConnection transferCookieConnection; +@@ -877,7 +881,7 @@ public class ServerPlayer extends Player { @Override public void die(DamageSource damageSource) { @@ -42,7 +42,7 @@ index 0b039c43bd3bd46f31477fc75585038270242de2..054057482d191d8e77bf4d179d51e32b boolean flag = this.level().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES); // CraftBukkit start - fire PlayerDeathEvent if (this.isRemoved()) { -@@ -838,6 +842,16 @@ public class ServerPlayer extends Player { +@@ -905,6 +909,16 @@ public class ServerPlayer extends Player { String deathmessage = defaultMessage.getString(); this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure @@ -59,7 +59,7 @@ index 0b039c43bd3bd46f31477fc75585038270242de2..054057482d191d8e77bf4d179d51e32b // SPIGOT-943 - only call if they have an inventory open if (this.containerMenu != this.inventoryMenu) { -@@ -986,8 +1000,17 @@ public class ServerPlayer extends Player { +@@ -1053,8 +1067,17 @@ public class ServerPlayer extends Player { } } } @@ -80,10 +80,10 @@ index 0b039c43bd3bd46f31477fc75585038270242de2..054057482d191d8e77bf4d179d51e32b } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2a8d25084 100644 +index 67ba23c66e253d3a96f6b08a5580387859652aa2..a770d2bda45cee739a5371119018e6f6e4cbb2cb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -260,6 +260,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -271,6 +271,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public Set collidableExemptions = new HashSet<>(); public boolean bukkitPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper @@ -91,14 +91,12 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 @Override public float getBukkitYaw() { -@@ -1530,13 +1531,12 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1543,11 +1544,12 @@ public abstract class LivingEntity extends Entity implements Attackable { if (this.isDeadOrDying()) { if (!this.checkTotemDeathProtection(source)) { -- SoundEvent soundeffect = this.getDeathSound(); -- -- if (flag1 && soundeffect != null) { -- this.playSound(soundeffect, this.getSoundVolume(), this.getVoicePitch()); +- if (flag1) { +- this.makeSound(this.getDeathSound()); - } + // Paper start - moved into CraftEventFactory event caller for cancellable death event + this.silentDeath = !flag1; // mark entity as dying silently @@ -109,7 +107,7 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 } } else if (flag1) { this.playHurtSound(source); -@@ -1688,6 +1688,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1706,6 +1708,7 @@ public abstract class LivingEntity extends Entity implements Attackable { Entity entity = damageSource.getEntity(); LivingEntity entityliving = this.getKillCredit(); @@ -117,7 +115,7 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 if (this.deathScore >= 0 && entityliving != null) { entityliving.awardKillScore(this, this.deathScore, damageSource); } -@@ -1699,24 +1700,59 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1717,24 +1720,59 @@ public abstract class LivingEntity extends Entity implements Attackable { if (!this.level().isClientSide && this.hasCustomName()) { if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot } @@ -131,8 +129,7 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 if (world instanceof ServerLevel) { ServerLevel worldserver = (ServerLevel) world; + // Paper - move below into if for onKill - -- if (entity == null || entity.killedEntity(worldserver, this)) { ++ + // Paper start + org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource); + if (deathEvent == null || !deathEvent.isCancelled()) { @@ -155,7 +152,8 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 + if (!this.level().isClientSide && this.hasCustomName()) { + if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot + } -+ + +- if (entity == null || entity.killedEntity(worldserver, this)) { + this.getCombatTracker().recheckStatus(); + if (entity != null) { + entity.killedEntity((ServerLevel) this.level(), this); @@ -182,7 +180,7 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 } } -@@ -1724,7 +1760,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1742,7 +1780,7 @@ public abstract class LivingEntity extends Entity implements Attackable { if (!this.level().isClientSide) { boolean flag = false; @@ -191,7 +189,7 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 if (this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { BlockPos blockposition = this.blockPosition(); BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState(); -@@ -1753,7 +1789,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1771,7 +1809,11 @@ public abstract class LivingEntity extends Entity implements Attackable { } } @@ -204,7 +202,7 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 Entity entity = source.getEntity(); int i; -@@ -1768,18 +1808,27 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1786,18 +1828,27 @@ public abstract class LivingEntity extends Entity implements Attackable { this.dropEquipment(); // CraftBukkit - from below if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { this.dropFromLootTable(source, flag); @@ -234,10 +232,10 @@ index c6c6fb195476e0d37b0007510044928ebe6e4572..4b3d1c8452bd759db6fc8d3d9fcf98e2 // CraftBukkit start public int getExpReward() { diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 655dfa9113ca82dc56bc8f4b083ea049ee5b4bee..3e6706671b3dc06b376eaa9d6d463c6a098104d1 100644 +index b740d931ad7ad81bf94afa62a9ae44a2fe9549d4..2b282ba23444110949508dac11a25fee4e472f5d 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1058,6 +1058,12 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1167,6 +1167,12 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti } @@ -250,7 +248,7 @@ index 655dfa9113ca82dc56bc8f4b083ea049ee5b4bee..3e6706671b3dc06b376eaa9d6d463c6a @Override protected void dropCustomDeathLoot(DamageSource source, int lootingMultiplier, boolean allowDrops) { super.dropCustomDeathLoot(source, lootingMultiplier, allowDrops); -@@ -1066,6 +1072,7 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1175,6 +1181,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti for (int k = 0; k < j; ++k) { EquipmentSlot enumitemslot = aenumitemslot[k]; @@ -258,7 +256,7 @@ index 655dfa9113ca82dc56bc8f4b083ea049ee5b4bee..3e6706671b3dc06b376eaa9d6d463c6a ItemStack itemstack = this.getItemBySlot(enumitemslot); float f = this.getEquipmentDropChance(enumitemslot); boolean flag1 = f > 1.0F; -@@ -1076,7 +1083,13 @@ public abstract class Mob extends LivingEntity implements Targeting { +@@ -1185,7 +1192,13 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti } this.spawnAtLocation(itemstack); @@ -273,10 +271,10 @@ index 655dfa9113ca82dc56bc8f4b083ea049ee5b4bee..3e6706671b3dc06b376eaa9d6d463c6a } diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index 6376908df89af1eff3a948ca1faef5d4925f0c3b..4ac32078cb074a78a2bb83307013b849f8d59f23 100644 +index d2dfccd1e31b2f050c9f480220cf17df71c687c3..82ced9f42dced65322a55579bb764fb4dc7c1b66 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java -@@ -715,16 +715,38 @@ public class Fox extends Animal implements VariantHolder { +@@ -704,16 +704,38 @@ public class Fox extends Animal implements VariantHolder { return this.getTrustedUUIDs().contains(uuid); } @@ -317,12 +315,12 @@ index 6376908df89af1eff3a948ca1faef5d4925f0c3b..4ac32078cb074a78a2bb83307013b849 + return deathEvent; // Paper - Cancellable death event } - @Override + public static boolean isPathClear(Fox fox, LivingEntity chasedEntity) { diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java -index e9137ea77a44eb8ded24a70f3a2b388d77379fa7..2b38ab1080d3693597e466f5517abbda9f1709f2 100644 +index b93ea19186e9988b75fa55736df602fa7e5d1648..557d938b65af6b0e55571011bd1c50decbb64a3d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractChestedHorse.java -@@ -70,9 +70,17 @@ public abstract class AbstractChestedHorse extends AbstractHorse { +@@ -77,9 +77,17 @@ public abstract class AbstractChestedHorse extends AbstractHorse { this.spawnAtLocation(Blocks.CHEST); } @@ -341,10 +339,10 @@ index e9137ea77a44eb8ded24a70f3a2b388d77379fa7..2b38ab1080d3693597e466f5517abbda @Override public void addAdditionalSaveData(CompoundTag nbt) { diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacddeeeb4f6 100644 +index 042968ff848da74be0c9fcf9bac3d0adfb135802..cb3729509e50fed64b17f16797825c1d21f7bf5b 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -493,8 +493,10 @@ public class ArmorStand extends LivingEntity { +@@ -499,8 +499,10 @@ public class ArmorStand extends LivingEntity { } // CraftBukkit end if (source.is(DamageTypeTags.IS_EXPLOSION)) { @@ -357,7 +355,7 @@ index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacd return false; } else if (source.is(DamageTypeTags.IGNITES_ARMOR_STANDS)) { if (this.isOnFire()) { -@@ -537,9 +539,9 @@ public class ArmorStand extends LivingEntity { +@@ -543,9 +545,9 @@ public class ArmorStand extends LivingEntity { this.gameEvent(GameEvent.ENTITY_DAMAGE, source.getEntity()); this.lastHit = i; } else { @@ -369,7 +367,7 @@ index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacd } return true; -@@ -591,8 +593,10 @@ public class ArmorStand extends LivingEntity { +@@ -597,8 +599,10 @@ public class ArmorStand extends LivingEntity { f1 -= amount; if (f1 <= 0.5F) { @@ -382,7 +380,7 @@ index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacd } else { this.setHealth(f1); this.gameEvent(GameEvent.ENTITY_DAMAGE, damageSource.getEntity()); -@@ -600,7 +604,7 @@ public class ArmorStand extends LivingEntity { +@@ -606,15 +610,15 @@ public class ArmorStand extends LivingEntity { } @@ -390,10 +388,7 @@ index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacd + private org.bukkit.event.entity.EntityDeathEvent brokenByPlayer(DamageSource damageSource) { // Paper ItemStack itemstack = new ItemStack(Items.ARMOR_STAND); - if (this.hasCustomName()) { -@@ -608,10 +612,10 @@ public class ArmorStand extends LivingEntity { - } - + itemstack.set(DataComponents.CUSTOM_NAME, this.getCustomName()); this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops - this.brokenByAnything(damageSource); + return this.brokenByAnything(damageSource); // Paper @@ -404,7 +399,7 @@ index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacd this.playBrokenSound(); // this.dropAllDeathLoot(damagesource); // CraftBukkit - moved down -@@ -633,7 +637,7 @@ public class ArmorStand extends LivingEntity { +@@ -636,7 +640,7 @@ public class ArmorStand extends LivingEntity { this.armorItems.set(i, ItemStack.EMPTY); } } @@ -413,7 +408,7 @@ index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacd } -@@ -760,7 +764,16 @@ public class ArmorStand extends LivingEntity { +@@ -758,7 +762,16 @@ public class ArmorStand extends LivingEntity { @Override public void kill() { @@ -432,10 +427,10 @@ index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacd this.gameEvent(GameEvent.ENTITY_DIE); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3482fef56307357a4d75d52a79c2fd9988bab22e..29ede2405a645499e804a2f914a2563ef443f919 100644 +index b3f6e1277c7afc77ff34ac14d3d16d1501abe14e..32bd55d8853cd1be12e910fc6626b96a6f3ea558 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2436,7 +2436,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2502,7 +2502,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void sendHealthUpdate() { FoodData foodData = this.getHandle().getFoodData(); @@ -452,10 +447,10 @@ index 3482fef56307357a4d75d52a79c2fd9988bab22e..29ede2405a645499e804a2f914a2563e public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 5b2365fc9a9364f2df7e5078c9d88572c074e4e3..449dab3d6e16b2b0fcc78c9e1b7173c822be9c53 100644 +index cecadd303f40a0e4a3e8315aa58226b6eb3ff7c3..e2d74bf7e888b5161b210393e72c484058a3657b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -892,9 +892,16 @@ public class CraftEventFactory { +@@ -891,9 +891,16 @@ public class CraftEventFactory { public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops) { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); @@ -472,7 +467,7 @@ index 5b2365fc9a9364f2df7e5078c9d88572c074e4e3..449dab3d6e16b2b0fcc78c9e1b7173c8 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -911,8 +918,15 @@ public class CraftEventFactory { +@@ -910,8 +917,15 @@ public class CraftEventFactory { PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel @@ -488,7 +483,7 @@ index 5b2365fc9a9364f2df7e5078c9d88572c074e4e3..449dab3d6e16b2b0fcc78c9e1b7173c8 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -929,6 +943,31 @@ public class CraftEventFactory { +@@ -928,6 +942,31 @@ public class CraftEventFactory { return event; } diff --git a/patches/unapplied/server/0257-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/0252-Allow-chests-to-be-placed-with-NBT-data.patch similarity index 82% rename from patches/unapplied/server/0257-Allow-chests-to-be-placed-with-NBT-data.patch rename to patches/server/0252-Allow-chests-to-be-placed-with-NBT-data.patch index ecee8a86b0..e378b2abf7 100644 --- a/patches/unapplied/server/0257-Allow-chests-to-be-placed-with-NBT-data.patch +++ b/patches/server/0252-Allow-chests-to-be-placed-with-NBT-data.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow chests to be placed with NBT data diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 9d34a7cd8361fd65d30537d4498c8e2a03d93bb1..0a3fec9b82a4d744f9046aebe30f80bb6e56c500 100644 +index 6f1ff953e6311ff859d3ddc5734d33146237992b..86aae218fb760d12e254dcf252c9f78c0ba856d5 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -409,6 +409,7 @@ public final class ItemStack { +@@ -461,6 +461,7 @@ public final class ItemStack implements DataComponentHolder { enuminteractionresult = InteractionResult.FAIL; // cancel placement // PAIL: Remove this when MC-99075 fixed placeEvent.getPlayer().updateInventory(); @@ -17,10 +17,10 @@ index 9d34a7cd8361fd65d30537d4498c8e2a03d93bb1..0a3fec9b82a4d744f9046aebe30f80bb world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710 for (BlockState blockstate : blocks) { diff --git a/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java -index d4f5af759bbb6208432ad7b5002af5455dc7958c..9b1243d96e0694c62fc9e82e9be540bce0d2b3ad 100644 +index 9d6262e286a00f840d88d6eb6bfdb304467466e3..b88aa184cd06a0485146f58a5b61a56a50911209 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/ChestBlockEntity.java -@@ -237,7 +237,7 @@ public class ChestBlockEntity extends RandomizableContainerBlockEntity implement +@@ -238,7 +238,7 @@ public class ChestBlockEntity extends RandomizableContainerBlockEntity implement // CraftBukkit start @Override public boolean onlyOpCanSetNbt() { diff --git a/patches/unapplied/server/0258-Mob-Pathfinding-API.patch b/patches/server/0253-Mob-Pathfinding-API.patch similarity index 97% rename from patches/unapplied/server/0258-Mob-Pathfinding-API.patch rename to patches/server/0253-Mob-Pathfinding-API.patch index 4074d75813..2adce44ac3 100644 --- a/patches/unapplied/server/0258-Mob-Pathfinding-API.patch +++ b/patches/server/0253-Mob-Pathfinding-API.patch @@ -172,10 +172,10 @@ index f6419f3b345e9e21a05b315aa4669090d7da4194..d9d0fff9962131808d54cca20f209df5 public Path(List nodes, BlockPos target, boolean reachesTarget) { this.nodes = nodes; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -index a75623fd1b2d36530c55c7a380e68b8dc7e58021..018884ced888fcd03d2fb17b3620f8e6125e67da 100644 +index 58e690a91aea9ea294f8e4ec9861aa92bc6060a0..d597eea5d5c2f223e87bff06f292619657596f1f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -@@ -15,8 +15,11 @@ import org.bukkit.loot.LootTable; +@@ -13,8 +13,11 @@ import org.bukkit.loot.LootTable; public abstract class CraftMob extends CraftLivingEntity implements Mob { public CraftMob(CraftServer server, net.minecraft.world.entity.Mob entity) { super(server, entity); @@ -187,7 +187,7 @@ index a75623fd1b2d36530c55c7a380e68b8dc7e58021..018884ced888fcd03d2fb17b3620f8e6 @Override public void setTarget(LivingEntity target) { Preconditions.checkState(!this.getHandle().generation, "Cannot set target during world generation"); -@@ -57,6 +60,14 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { +@@ -55,6 +58,14 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { return (net.minecraft.world.entity.Mob) this.entity; } diff --git a/patches/unapplied/server/0238-Remove-unnecessary-itemmeta-handling.patch b/patches/unapplied/server/0238-Remove-unnecessary-itemmeta-handling.patch deleted file mode 100644 index 19a56b5c05..0000000000 --- a/patches/unapplied/server/0238-Remove-unnecessary-itemmeta-handling.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Tue, 22 Nov 2016 00:40:42 -0500 -Subject: [PATCH] Remove unnecessary itemmeta handling - - -diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -index b9dd91927cb259789ad71b2241024c5fa2586d57..b863249ff7e13cf4939c8961601f0564c62fd661 100644 ---- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java -+++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -@@ -649,7 +649,7 @@ public class FriendlyByteBuf extends ByteBuf { - if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) { - // Spigot start - filter - stack = stack.copy(); -- CraftItemStack.setItemMeta(stack, CraftItemStack.getItemMeta(stack)); -+ // CraftItemStack.setItemMeta(stack, CraftItemStack.getItemMeta(stack)); // Paper - This is no longer with raw NBT being handled in metadata - // Spigot end - nbttagcompound = stack.getTag(); - } -@@ -670,7 +670,7 @@ public class FriendlyByteBuf extends ByteBuf { - - itemstack.setTag(this.readNbt()); - // CraftBukkit start -- if (itemstack.getTag() != null) { -+ if (false && itemstack.getTag() != null) { // Paper - This is no longer needed with raw NBT being handled in metadata - CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); - } - // CraftBukkit end