From 4d9e824a44c1b84907a8d1184610537b3c593a53 Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Wed, 24 Apr 2024 23:23:56 +0200 Subject: [PATCH] more more work (806) --- ...758-Add-NamespacedKey-biome-methods.patch} | 4 +- ...x-plugin-loggers-on-server-shutdown.patch} | 6 +- ...ok-changes-from-crashing-the-server.patch} | 8 +- ...tityChangeBlockEvent-in-more-places.patch} | 95 ++++++------ .../0762-Missing-eating-regain-reason.patch} | 26 ++-- .../0763-Missing-effect-cause.patch} | 26 ++-- ...serialization-deserialization-for-P.patch} | 0 ...rameter-to-ProjectileSource-launchP.patch} | 6 +- ...6-Call-BlockPhysicsEvent-more-often.patch} | 2 +- ...0767-Configurable-chat-thread-limit.patch} | 0 ...of-WorldCreator-keepSpawnLoaded-ret.patch} | 6 +- .../0769-fix-Jigsaw-block-kicking-user.patch} | 8 +- ...mEvent-for-mud-converting-into-clay.patch} | 6 +- .../0771-Add-getDrops-to-BlockState.patch} | 4 +- .../0772-Fix-a-bunch-of-vanilla-bugs.patch} | 140 +++++------------- ...y-onTrackingStart-during-navigation.patch} | 14 +- .../0774-Fix-custom-piglin-loved-items.patch} | 2 +- .../0775-EntityPickupItemEvent-fixes.patch} | 12 +- ...interactions-with-items-on-cooldown.patch} | 14 +- ...-Add-PlayerInventorySlotChangeEvent.patch} | 6 +- .../0778-Elder-Guardian-appearance-API.patch} | 4 +- ...ow-changing-bed-s-occupied-property.patch} | 0 .../0780-Add-entity-knockback-API.patch} | 4 +- .../0781-Detect-headless-JREs.patch} | 4 +- ...-vehicle-collision-event-not-called.patch} | 4 +- .../0783-Add-EntityToggleSitEvent.patch} | 28 ++-- .../0784-Add-fire-tick-delay-option.patch} | 12 +- .../0785-Add-Moving-Piston-API.patch} | 12 +- .../0786-Ignore-impossible-spawn-tick.patch} | 4 +- ...t-suggestion-permissions-to-align-w.patch} | 4 +- ...Event-cancellation-cant-fully-preve.patch} | 10 +- ...0789-Add-PrePlayerAttackEntityEvent.patch} | 8 +- ...e-reset-EnderDragon-boss-event-name.patch} | 2 +- ...7-green-map-markers-do-not-disappear.patch | 39 +++++ .../0792-Add-Player-Warden-Warning-API.patch} | 4 +- ...a-friendly-methods-to-update-trades.patch} | 6 +- ...794-Add-paper-dumplisteners-command.patch} | 0 ...lobal-player-list-where-appropriate.patch} | 18 +-- ...sync-entity-add-due-to-fungus-trees.patch} | 6 +- .../0797-ItemStack-damage-API.patch} | 4 +- .../0798-Friction-API.patch} | 43 +++--- ...trol-player-s-insomnia-and-phantoms.patch} | 6 +- ...-premature-player-kicks-on-shutdown.patch} | 8 +- .../0801-Sync-offhand-slot-in-menus.patch} | 6 +- .../0802-Player-Entity-Tracking-Events.patch} | 8 +- .../0803-Limit-pet-look-distance.patch} | 4 +- ...nd-additions-to-the-SpawnReason-API.patch} | 10 +- .../0805-fix-Instruments.patch} | 4 +- ...for-some-hot-BlockBehavior-and-Flui.patch} | 14 +- ...7-green-map-markers-do-not-disappear.patch | 35 ----- ...-source-for-fireworks-from-dispenser.patch | 0 51 files changed, 315 insertions(+), 381 deletions(-) rename patches/{unapplied/server/0786-Add-NamespacedKey-biome-methods.patch => server/0758-Add-NamespacedKey-biome-methods.patch} (92%) rename patches/{unapplied/server/0787-Fix-plugin-loggers-on-server-shutdown.patch => server/0759-Fix-plugin-loggers-on-server-shutdown.patch} (90%) rename patches/{unapplied/server/0788-Stop-large-look-changes-from-crashing-the-server.patch => server/0760-Stop-large-look-changes-from-crashing-the-server.patch} (89%) rename patches/{unapplied/server/0789-Fire-EntityChangeBlockEvent-in-more-places.patch => server/0761-Fire-EntityChangeBlockEvent-in-more-places.patch} (82%) rename patches/{unapplied/server/0790-Missing-eating-regain-reason.patch => server/0762-Missing-eating-regain-reason.patch} (61%) rename patches/{unapplied/server/0791-Missing-effect-cause.patch => server/0763-Missing-effect-cause.patch} (64%) rename patches/{unapplied/server/0792-Added-byte-array-serialization-deserialization-for-P.patch => server/0764-Added-byte-array-serialization-deserialization-for-P.patch} (100%) rename patches/{unapplied/server/0793-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch => server/0765-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch} (94%) rename patches/{unapplied/server/0794-Call-BlockPhysicsEvent-more-often.patch => server/0766-Call-BlockPhysicsEvent-more-often.patch} (95%) rename patches/{unapplied/server/0795-Configurable-chat-thread-limit.patch => server/0767-Configurable-chat-thread-limit.patch} (100%) rename patches/{unapplied/server/0796-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch => server/0768-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch} (85%) rename patches/{unapplied/server/0797-fix-Jigsaw-block-kicking-user.patch => server/0769-fix-Jigsaw-block-kicking-user.patch} (87%) rename patches/{unapplied/server/0798-use-BlockFormEvent-for-mud-converting-into-clay.patch => server/0770-use-BlockFormEvent-for-mud-converting-into-clay.patch} (84%) rename patches/{unapplied/server/0799-Add-getDrops-to-BlockState.patch => server/0771-Add-getDrops-to-BlockState.patch} (91%) rename patches/{unapplied/server/0800-Fix-a-bunch-of-vanilla-bugs.patch => server/0772-Fix-a-bunch-of-vanilla-bugs.patch} (76%) rename patches/{unapplied/server/0801-Remove-unnecessary-onTrackingStart-during-navigation.patch => server/0773-Remove-unnecessary-onTrackingStart-during-navigation.patch} (78%) rename patches/{unapplied/server/0802-Fix-custom-piglin-loved-items.patch => server/0774-Fix-custom-piglin-loved-items.patch} (93%) rename patches/{unapplied/server/0803-EntityPickupItemEvent-fixes.patch => server/0775-EntityPickupItemEvent-fixes.patch} (87%) rename patches/{unapplied/server/0804-Correctly-handle-interactions-with-items-on-cooldown.patch => server/0776-Correctly-handle-interactions-with-items-on-cooldown.patch} (86%) rename patches/{unapplied/server/0805-Add-PlayerInventorySlotChangeEvent.patch => server/0777-Add-PlayerInventorySlotChangeEvent.patch} (93%) rename patches/{unapplied/server/0806-Elder-Guardian-appearance-API.patch => server/0778-Elder-Guardian-appearance-API.patch} (84%) rename patches/{unapplied/server/0807-Allow-changing-bed-s-occupied-property.patch => server/0779-Allow-changing-bed-s-occupied-property.patch} (100%) rename patches/{unapplied/server/0808-Add-entity-knockback-API.patch => server/0780-Add-entity-knockback-API.patch} (86%) rename patches/{unapplied/server/0809-Detect-headless-JREs.patch => server/0781-Detect-headless-JREs.patch} (94%) rename patches/{unapplied/server/0810-fix-entity-vehicle-collision-event-not-called.patch => server/0782-fix-entity-vehicle-collision-event-not-called.patch} (88%) rename patches/{unapplied/server/0811-Add-EntityToggleSitEvent.patch => server/0783-Add-EntityToggleSitEvent.patch} (81%) rename patches/{unapplied/server/0812-Add-fire-tick-delay-option.patch => server/0784-Add-fire-tick-delay-option.patch} (69%) rename patches/{unapplied/server/0813-Add-Moving-Piston-API.patch => server/0785-Add-Moving-Piston-API.patch} (81%) rename patches/{unapplied/server/0814-Ignore-impossible-spawn-tick.patch => server/0786-Ignore-impossible-spawn-tick.patch} (84%) rename patches/{unapplied/server/0816-Fix-EntityArgument-suggestion-permissions-to-align-w.patch => server/0787-Fix-EntityArgument-suggestion-permissions-to-align-w.patch} (91%) rename patches/{unapplied/server/0817-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch => server/0788-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch} (79%) rename patches/{unapplied/server/0818-Add-PrePlayerAttackEntityEvent.patch => server/0789-Add-PrePlayerAttackEntityEvent.patch} (80%) rename patches/{unapplied/server/0819-ensure-reset-EnderDragon-boss-event-name.patch => server/0790-ensure-reset-EnderDragon-boss-event-name.patch} (96%) create mode 100644 patches/server/0791-fix-MC-252817-green-map-markers-do-not-disappear.patch rename patches/{unapplied/server/0821-Add-Player-Warden-Warning-API.patch => server/0792-Add-Player-Warden-Warning-API.patch} (93%) rename patches/{unapplied/server/0822-More-vanilla-friendly-methods-to-update-trades.patch => server/0793-More-vanilla-friendly-methods-to-update-trades.patch} (94%) rename patches/{unapplied/server/0823-Add-paper-dumplisteners-command.patch => server/0794-Add-paper-dumplisteners-command.patch} (100%) rename patches/{unapplied/server/0824-check-global-player-list-where-appropriate.patch => server/0795-check-global-player-list-where-appropriate.patch} (86%) rename patches/{unapplied/server/0825-Fix-async-entity-add-due-to-fungus-trees.patch => server/0796-Fix-async-entity-add-due-to-fungus-trees.patch} (89%) rename patches/{unapplied/server/0826-ItemStack-damage-API.patch => server/0797-ItemStack-damage-API.patch} (95%) rename patches/{unapplied/server/0827-Friction-API.patch => server/0798-Friction-API.patch} (80%) rename patches/{unapplied/server/0828-Ability-to-control-player-s-insomnia-and-phantoms.patch => server/0799-Ability-to-control-player-s-insomnia-and-phantoms.patch} (95%) rename patches/{unapplied/server/0829-Fix-premature-player-kicks-on-shutdown.patch => server/0800-Fix-premature-player-kicks-on-shutdown.patch} (90%) rename patches/{unapplied/server/0830-Sync-offhand-slot-in-menus.patch => server/0801-Sync-offhand-slot-in-menus.patch} (92%) rename patches/{unapplied/server/0831-Player-Entity-Tracking-Events.patch => server/0802-Player-Entity-Tracking-Events.patch} (86%) rename patches/{unapplied/server/0832-Limit-pet-look-distance.patch => server/0803-Limit-pet-look-distance.patch} (86%) rename patches/{unapplied/server/0833-Fixes-and-additions-to-the-SpawnReason-API.patch => server/0804-Fixes-and-additions-to-the-SpawnReason-API.patch} (90%) rename patches/{unapplied/server/0834-fix-Instruments.patch => server/0805-fix-Instruments.patch} (94%) rename patches/{unapplied/server/0835-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch => server/0806-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch} (83%) delete mode 100644 patches/unapplied/server/0820-fix-MC-252817-green-map-markers-do-not-disappear.patch rename {patches/unapplied/server => removed-patches-1-20-5}/0815-Track-projectile-source-for-fireworks-from-dispenser.patch (100%) diff --git a/patches/unapplied/server/0786-Add-NamespacedKey-biome-methods.patch b/patches/server/0758-Add-NamespacedKey-biome-methods.patch similarity index 92% rename from patches/unapplied/server/0786-Add-NamespacedKey-biome-methods.patch rename to patches/server/0758-Add-NamespacedKey-biome-methods.patch index 60b5cb2a50..c4323c8757 100644 --- a/patches/unapplied/server/0786-Add-NamespacedKey-biome-methods.patch +++ b/patches/server/0758-Add-NamespacedKey-biome-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index be82e1d52d7026facb20bf07f4b3a394e77ab708..0d49d7b92305977fe66f13c1e66739c1430dc7fd 100644 +index 8191fedcdc7d96de9574f567a8e95ce121a15df4..b2755299789dea3bcc49e66d3647a6e8a5080b4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -625,6 +625,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -622,6 +622,19 @@ public final class CraftMagicNumbers implements UnsafeValues { Preconditions.checkArgument(material.isBlock(), material + " is not a block"); return getBlock(material).hasCollision; } diff --git a/patches/unapplied/server/0787-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0759-Fix-plugin-loggers-on-server-shutdown.patch similarity index 90% rename from patches/unapplied/server/0787-Fix-plugin-loggers-on-server-shutdown.patch rename to patches/server/0759-Fix-plugin-loggers-on-server-shutdown.patch index bb6eb10602..c915b7946e 100644 --- a/patches/unapplied/server/0787-Fix-plugin-loggers-on-server-shutdown.patch +++ b/patches/server/0759-Fix-plugin-loggers-on-server-shutdown.patch @@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2a96d128dd42b937b16e25274b39fb66c3d9a097..ad2583c581e78e9cf352567b7dbde193319d4301 100644 +index 00457548d43e1d2143d1f6027593a1178f02564a..9416daa3edef2d9bb780fe3b2aa210d92a300cf1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1223,6 +1223,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 2b7325d3bcea2175ec22a45101f5bbaf29c2231a..09a26622db4bb4b504f735454e2b031f4840b092 100644 +index f3ca6f6c7a8f2dc51e263ee879412bf2806b0946..4bda4252889cc42bb5a38c45d87f5ec0f2c281b3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3076,37 +3076,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3136,37 +3136,15 @@ public abstract class LivingEntity extends Entity implements Attackable { this.level().getProfiler().pop(); this.level().getProfiler().push("rangeChecks"); @@ -54,10 +54,10 @@ index 2b7325d3bcea2175ec22a45101f5bbaf29c2231a..09a26622db4bb4b504f735454e2b031f this.level().getProfiler().pop(); this.animStep += f2; 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 20842ed5b730dda88efd0cda9292a37f879a4017..0a207f3f2e4c0790e784fb4b0c3c2dfa49c39724 100644 +index 40348e45b02be9a0b397a883940a476fb6738ef4..734e00caf72a694654319f69f793dcbf616f1784 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -259,13 +259,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -298,13 +298,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { } protected static float lerpRotation(float prevRot, float newRot) { diff --git a/patches/unapplied/server/0789-Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/0761-Fire-EntityChangeBlockEvent-in-more-places.patch similarity index 82% rename from patches/unapplied/server/0789-Fire-EntityChangeBlockEvent-in-more-places.patch rename to patches/server/0761-Fire-EntityChangeBlockEvent-in-more-places.patch index 87d13244aa..16cb128e55 100644 --- a/patches/unapplied/server/0789-Fire-EntityChangeBlockEvent-in-more-places.patch +++ b/patches/server/0761-Fire-EntityChangeBlockEvent-in-more-places.patch @@ -7,10 +7,10 @@ Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com> Co-authored-by: maxcom1 <46265094+maxcom1@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java -index a298f511c8a7eb208a0dd63b24ec050848a31476..41a3ca4edf4fa662f2af13efd7b78b56e24aa4a7 100644 +index bf5015c4bb68e5c46313bab1e59c0a4d45053b73..0471d9c85af02133f99cca4e181b83b58a3f1abc 100644 --- a/src/main/java/net/minecraft/world/entity/LightningBolt.java +++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java -@@ -98,7 +98,7 @@ public class LightningBolt extends Entity { +@@ -99,7 +99,7 @@ public class LightningBolt extends Entity { } this.powerLightningRod(); @@ -19,7 +19,7 @@ index a298f511c8a7eb208a0dd63b24ec050848a31476..41a3ca4edf4fa662f2af13efd7b78b56 this.gameEvent(GameEvent.LIGHTNING_STRIKE); } } -@@ -192,7 +192,7 @@ public class LightningBolt extends Entity { +@@ -193,7 +193,7 @@ public class LightningBolt extends Entity { } } @@ -28,7 +28,7 @@ index a298f511c8a7eb208a0dd63b24ec050848a31476..41a3ca4edf4fa662f2af13efd7b78b56 BlockState iblockdata = world.getBlockState(pos); BlockPos blockposition1; BlockState iblockdata1; -@@ -206,24 +206,29 @@ public class LightningBolt extends Entity { +@@ -207,24 +207,29 @@ public class LightningBolt extends Entity { } if (iblockdata1.getBlock() instanceof WeatheringCopper) { @@ -62,7 +62,7 @@ index a298f511c8a7eb208a0dd63b24ec050848a31476..41a3ca4edf4fa662f2af13efd7b78b56 if (optional.isEmpty()) { break; -@@ -234,7 +239,7 @@ public class LightningBolt extends Entity { +@@ -235,7 +240,7 @@ public class LightningBolt extends Entity { } @@ -71,7 +71,7 @@ index a298f511c8a7eb208a0dd63b24ec050848a31476..41a3ca4edf4fa662f2af13efd7b78b56 Iterator iterator = BlockPos.randomInCube(world.random, 10, pos, 1).iterator(); BlockPos blockposition1; -@@ -251,6 +256,7 @@ public class LightningBolt extends Entity { +@@ -252,6 +257,7 @@ public class LightningBolt extends Entity { BlockPos blockposition1Final = blockposition1; // CraftBukkit - decompile error WeatheringCopper.getPrevious(iblockdata).ifPresent((iblockdata1) -> { @@ -80,10 +80,10 @@ index a298f511c8a7eb208a0dd63b24ec050848a31476..41a3ca4edf4fa662f2af13efd7b78b56 }); world.levelEvent(3002, blockposition1, -1); diff --git a/src/main/java/net/minecraft/world/item/AxeItem.java b/src/main/java/net/minecraft/world/item/AxeItem.java -index 596f4c6b69e5a9bd9eeebee60cf49128264727ae..4f8689e8cbc8b6b9f44168126b95cc864a383c9e 100644 +index bc689df6b43d42566aed875de6aa0081341c5c44..9fd2d97ff0e05578a3e6a0b86dc1974691845c5d 100644 --- a/src/main/java/net/minecraft/world/item/AxeItem.java +++ b/src/main/java/net/minecraft/world/item/AxeItem.java -@@ -60,6 +60,11 @@ public class AxeItem extends DiggerItem { +@@ -61,6 +61,11 @@ public class AxeItem extends DiggerItem { return InteractionResult.PASS; } else { ItemStack itemStack = context.getItemInHand(); @@ -96,10 +96,10 @@ index 596f4c6b69e5a9bd9eeebee60cf49128264727ae..4f8689e8cbc8b6b9f44168126b95cc86 CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, blockPos, itemStack); } diff --git a/src/main/java/net/minecraft/world/item/EnderEyeItem.java b/src/main/java/net/minecraft/world/item/EnderEyeItem.java -index 1977e702f6af39ebf100c1f2f2edc2d1c4d003b0..cfcd1778b5ae66395400221879dde3575591b23d 100644 +index 37cfb9694dc06f693b7b54f20bc31dfd9f95c76c..4d8c98db89ae32baa407830d9380ece3b34c642a 100644 --- a/src/main/java/net/minecraft/world/item/EnderEyeItem.java +++ b/src/main/java/net/minecraft/world/item/EnderEyeItem.java -@@ -43,6 +43,11 @@ public class EnderEyeItem extends Item { +@@ -44,6 +44,11 @@ public class EnderEyeItem extends Item { return InteractionResult.SUCCESS; } else { BlockState iblockdata1 = (BlockState) iblockdata.setValue(EndPortalFrameBlock.HAS_EYE, true); @@ -131,13 +131,13 @@ index decabf6fccaca3d1bfeba679ac71677d33315f5e..14d37bf64af719eae3ea154ea7f952cc CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, blockPos, itemStack); } diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java -index 5c62741e3a3854a7f674bfec49758f837f3bb9a0..b93ed2896ebeb8ec75eb3cfb717a740c97dd9622 100644 +index 042a9cf9c15fd30bc30e03d0e0311c70e40e6950..db038cb423c3b951890c81d833aa77ebcea3304f 100644 --- a/src/main/java/net/minecraft/world/item/PotionItem.java +++ b/src/main/java/net/minecraft/world/item/PotionItem.java -@@ -107,6 +107,12 @@ public class PotionItem extends Item { +@@ -109,6 +109,12 @@ public class PotionItem extends Item { BlockState iblockdata = world.getBlockState(blockposition); - if (context.getClickedFace() != Direction.DOWN && iblockdata.is(BlockTags.CONVERTABLE_TO_MUD) && PotionUtils.getPotion(itemstack) == Potions.WATER) { + if (context.getClickedFace() != Direction.DOWN && iblockdata.is(BlockTags.CONVERTABLE_TO_MUD) && potioncontents.is(Potions.WATER)) { + // Paper start + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityhuman, blockposition, Blocks.MUD.defaultBlockState())) { + entityhuman.containerMenu.sendAllDataToRemote(); @@ -148,10 +148,10 @@ index 5c62741e3a3854a7f674bfec49758f837f3bb9a0..b93ed2896ebeb8ec75eb3cfb717a740c entityhuman.setItemInHand(context.getHand(), ItemUtils.createFilledResult(itemstack, entityhuman, new ItemStack(Items.GLASS_BOTTLE))); entityhuman.awardStat(Stats.ITEM_USED.get(itemstack.getItem())); diff --git a/src/main/java/net/minecraft/world/item/ShovelItem.java b/src/main/java/net/minecraft/world/item/ShovelItem.java -index 6118bee65c1fe65482db2cd8d1e0e3c2dad4c8f3..9aba0211f37501bbd19b583d22fa83eae32390d9 100644 +index c0e96284bb470353c0e54ad4e0c2205017913e61..24f6a158e4759aac3be8da4cf5e0d40bd295355b 100644 --- a/src/main/java/net/minecraft/world/item/ShovelItem.java +++ b/src/main/java/net/minecraft/world/item/ShovelItem.java -@@ -45,20 +45,29 @@ public class ShovelItem extends DiggerItem { +@@ -46,20 +46,29 @@ public class ShovelItem extends DiggerItem { Player player = context.getPlayer(); BlockState blockState2 = FLATTENABLES.get(blockState.getBlock()); BlockState blockState3 = null; @@ -183,23 +183,24 @@ index 6118bee65c1fe65482db2cd8d1e0e3c2dad4c8f3..9aba0211f37501bbd19b583d22fa83ea level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(player, blockState3)); if (player != null) { diff --git a/src/main/java/net/minecraft/world/level/block/CakeBlock.java b/src/main/java/net/minecraft/world/level/block/CakeBlock.java -index 49fe91a8eaeb2580c8ad0166e72540168af605f6..ca1ccedb5a551328ebfad907f39594b220efaefe 100644 +index 430312f4e67a253465c54e3fe5e5cfad365cfa22..e1d853e5cb97046dd481cd14b4199be27c593d3b 100644 --- a/src/main/java/net/minecraft/world/level/block/CakeBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CakeBlock.java -@@ -62,6 +62,12 @@ public class CakeBlock extends Block { - Block block = Block.byItem(item); +@@ -64,7 +64,12 @@ public class CakeBlock extends Block { if (block instanceof CandleBlock) { + CandleBlock candleblock = (CandleBlock) block; +- + // Paper start - call change block event + if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, CandleCakeBlock.byCandle(block))) { + player.containerMenu.sendAllDataToRemote(); // update inv because candle could decrease -+ return InteractionResult.PASS; ++ return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + } + // Paper end - call change block event if (!player.isCreative()) { - itemstack.shrink(1); + stack.shrink(1); } -@@ -91,6 +97,14 @@ public class CakeBlock extends Block { +@@ -99,6 +104,14 @@ public class CakeBlock extends Block { if (!player.canEat(false)) { return InteractionResult.PASS; } else { @@ -214,23 +215,23 @@ index 49fe91a8eaeb2580c8ad0166e72540168af605f6..ca1ccedb5a551328ebfad907f39594b2 player.awardStat(Stats.EAT_CAKE_SLICE); // CraftBukkit start // entityhuman.getFoodData().eat(2, 0.1F); -@@ -104,7 +118,7 @@ public class CakeBlock extends Block { +@@ -112,7 +125,7 @@ public class CakeBlock extends Block { ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity().sendHealthUpdate(); // CraftBukkit end - int i = (Integer) state.getValue(CakeBlock.BITES); + // Paper - move up - world.gameEvent((Entity) player, GameEvent.EAT, pos); + world.gameEvent((Entity) player, (Holder) GameEvent.EAT, pos); if (i < 6) { diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -index 6cccdd1d19488275ff3fe90838cf1c31e844d517..413b307acaad5823b9e06f49fa2faf561f5f7b9a 100644 +index 804adb5ed92dfcf4c29c756dd95d7164150a9666..fcd8a977eaa52cd478507c3b44fa72b194df9540 100644 --- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -@@ -238,6 +238,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { - if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) { +@@ -239,6 +239,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(stack.getItem())) { if (i < 7 && !world.isClientSide) { - BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack); + BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, stack); + // Paper start - handle cancelled events + if (iblockdata1 == null) { + return InteractionResult.PASS; @@ -238,8 +239,8 @@ index 6cccdd1d19488275ff3fe90838cf1c31e844d517..413b307acaad5823b9e06f49fa2faf56 + // Paper end world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0); - player.awardStat(Stats.ITEM_USED.get(itemstack.getItem())); -@@ -261,11 +266,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { + player.awardStat(Stats.ITEM_USED.get(stack.getItem())); +@@ -269,11 +274,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { if (i < 7 && ComposterBlock.COMPOSTABLES.containsKey(stack.getItem())) { // CraftBukkit start double rand = world.getRandom().nextDouble(); @@ -258,7 +259,7 @@ index 6cccdd1d19488275ff3fe90838cf1c31e844d517..413b307acaad5823b9e06f49fa2faf56 // CraftBukkit end stack.shrink(1); -@@ -306,11 +316,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -314,11 +324,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { return iblockdata1; } @@ -272,7 +273,7 @@ index 6cccdd1d19488275ff3fe90838cf1c31e844d517..413b307acaad5823b9e06f49fa2faf56 static BlockState addItem(@Nullable Entity entity, BlockState iblockdata, LevelAccessor generatoraccess, BlockPos blockposition, ItemStack itemstack, double rand) { // CraftBukkit end int i = (Integer) iblockdata.getValue(ComposterBlock.LEVEL); -@@ -321,6 +333,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -329,6 +341,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { } else { int j = i + 1; BlockState iblockdata1 = (BlockState) iblockdata.setValue(ComposterBlock.LEVEL, j); @@ -283,34 +284,34 @@ index 6cccdd1d19488275ff3fe90838cf1c31e844d517..413b307acaad5823b9e06f49fa2faf56 + // Paper end generatoraccess.setBlock(blockposition, iblockdata1, 3); - generatoraccess.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, iblockdata1)); + generatoraccess.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, iblockdata1)); diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -index 55b0e2bf98a285cdcd30e40d94192b7a1802efd8..d445ed0895293dd45c36226051f5809be8587ebe 100644 +index b18494d2a83473e9bc4197f86ff599de59043217..6fb7ec36f6f7a3021fac4b9e31fd333dfd5ea5e5 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java -@@ -264,7 +264,13 @@ public class BeehiveBlockEntity extends BlockEntity { - --j; - } - -- world.setBlockAndUpdate(blockposition, (BlockState) iblockdata.setValue(BeehiveBlock.HONEY_LEVEL, i + j)); -+ // Paper start - Fire EntityChangeBlockEvent in more places -+ BlockState newBlockState = iblockdata.setValue(BeehiveBlock.HONEY_LEVEL, i + j); -+ -+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entitybee, blockposition, newBlockState)) { -+ world.setBlockAndUpdate(blockposition, newBlockState); -+ } -+ // Paper end - Fire EntityChangeBlockEvent in more places +@@ -259,7 +259,13 @@ public class BeehiveBlockEntity extends BlockEntity { + --j; } + +- world.setBlockAndUpdate(blockposition, (BlockState) iblockdata.setValue(BeehiveBlock.HONEY_LEVEL, i + j)); ++ // Paper start - Fire EntityChangeBlockEvent in more places ++ BlockState newBlockState = iblockdata.setValue(BeehiveBlock.HONEY_LEVEL, i + j); ++ ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entitybee, blockposition, newBlockState)) { ++ world.setBlockAndUpdate(blockposition, newBlockState); ++ } ++ // Paper end - Fire EntityChangeBlockEvent in more places } } + } diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -index 67c9009b735429e887e706baf50a6023d572a46c..7956002e2d4d583c27e277562312d27ea6871557 100644 +index daf3c26fce7569761951bfd5594c6726d854a9ff..e8a73d34dbb372581b03018aade170a31c266099 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java @@ -120,7 +120,7 @@ public class DummyGeneratorAccess implements WorldGenLevel { @Override - public void gameEvent(GameEvent event, Vec3 emitterPos, GameEvent.Context emitter) { + public void gameEvent(Holder event, Vec3 emitterPos, GameEvent.Context emitter) { - // Used by BlockComposter + // Used by ComposterBlock } diff --git a/patches/unapplied/server/0790-Missing-eating-regain-reason.patch b/patches/server/0762-Missing-eating-regain-reason.patch similarity index 61% rename from patches/unapplied/server/0790-Missing-eating-regain-reason.patch rename to patches/server/0762-Missing-eating-regain-reason.patch index 1a46d0af82..408a9a5ec4 100644 --- a/patches/unapplied/server/0790-Missing-eating-regain-reason.patch +++ b/patches/server/0762-Missing-eating-regain-reason.patch @@ -5,23 +5,23 @@ Subject: [PATCH] Missing eating regain reason 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 1d0c424be2b67cad0f8bca85070a9c46a6b283da..f760ce7d9df79ef58f8963de3e901cba3e12fcaa 100644 +index 57c22ca91e9f3a161f5277914e379ea9dc8eeeef..827c5800b9e898418ff7a641c97ffb86935a914c 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java -@@ -387,7 +387,7 @@ public class Cat extends TamableAnimal implements VariantHolder { - if (!(item instanceof DyeItem)) { - if (item.isEdible() && this.isFood(itemstack) && this.getHealth() < this.getMaxHealth()) { - this.usePlayerItem(player, hand, itemstack); -- this.heal((float) item.getFoodProperties().getNutrition()); -+ this.heal((float) item.getFoodProperties().getNutrition(), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason - return InteractionResult.CONSUME; - } +@@ -408,7 +408,7 @@ public class Cat extends TamableAnimal implements VariantHolder 0.0F) { diff --git a/patches/unapplied/server/0791-Missing-effect-cause.patch b/patches/server/0763-Missing-effect-cause.patch similarity index 64% rename from patches/unapplied/server/0791-Missing-effect-cause.patch rename to patches/server/0763-Missing-effect-cause.patch index 3fcbc0382f..17172c3b36 100644 --- a/patches/unapplied/server/0791-Missing-effect-cause.patch +++ b/patches/server/0763-Missing-effect-cause.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Missing effect cause diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index af5db5da4e5b2fd90a5cf0ca3c92e87ba82d4779..b21e180641d17438997a80e5bcb0ec7998d24a2e 100644 +index 0a6ebd5c5fcad420659f3ade3280beaf6ac115f2..a8cc6ddbf45370fe632e5c5fb7ceef3d299e62a4 100644 --- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -419,7 +419,7 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder user.addEffect(effect.createEffectInstance())); -+ listPotionEffects(itemStack, effect -> user.addEffect(effect.createEffectInstance(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD)); // Paper - Add missing effect cause - return user instanceof Player && ((Player)user).getAbilities().instabuild ? itemStack : new ItemStack(Items.BOWL); - } - } +@@ -37,7 +37,7 @@ public class SuspiciousStewItem extends Item { + SuspiciousStewEffects suspiciousStewEffects = stack.getOrDefault(DataComponents.SUSPICIOUS_STEW_EFFECTS, SuspiciousStewEffects.EMPTY); + + for (SuspiciousStewEffects.Entry entry : suspiciousStewEffects.effects()) { +- user.addEffect(entry.createEffectInstance()); ++ user.addEffect(entry.createEffectInstance(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // Paper - Add missing effect cause + } + + super.finishUsingItem(stack, world, user); diff --git a/patches/unapplied/server/0792-Added-byte-array-serialization-deserialization-for-P.patch b/patches/server/0764-Added-byte-array-serialization-deserialization-for-P.patch similarity index 100% rename from patches/unapplied/server/0792-Added-byte-array-serialization-deserialization-for-P.patch rename to patches/server/0764-Added-byte-array-serialization-deserialization-for-P.patch diff --git a/patches/unapplied/server/0793-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/server/0765-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch similarity index 94% rename from patches/unapplied/server/0793-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch rename to patches/server/0765-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch index 6adc2a884c..f36e95fca8 100644 --- a/patches/unapplied/server/0793-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch +++ b/patches/server/0765-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 5a760234a4604cec289705f1439f03c821bb0aab..9ae20d759965bc9b88b52c15372155ad10bcc199 100644 +index 6344ab27c113dd42c729e0b05b957670c4930722..bf58fb8acd09723cbc55f6ac41c24cccda97bac8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -562,8 +562,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -561,8 +561,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } @Override @@ -25,7 +25,7 @@ index 5a760234a4604cec289705f1439f03c821bb0aab..9ae20d759965bc9b88b52c15372155ad Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation"); net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle(); -@@ -650,6 +657,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -649,6 +656,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { if (velocity != null) { ((T) launch.getBukkitEntity()).setVelocity(velocity); } diff --git a/patches/unapplied/server/0794-Call-BlockPhysicsEvent-more-often.patch b/patches/server/0766-Call-BlockPhysicsEvent-more-often.patch similarity index 95% rename from patches/unapplied/server/0794-Call-BlockPhysicsEvent-more-often.patch rename to patches/server/0766-Call-BlockPhysicsEvent-more-often.patch index 1839fbe711..b2dc803286 100644 --- a/patches/unapplied/server/0794-Call-BlockPhysicsEvent-more-often.patch +++ b/patches/server/0766-Call-BlockPhysicsEvent-more-often.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call BlockPhysicsEvent more often diff --git a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java -index 457a963ee6ebd3cf5c3831f6660e3850335af49f..106af2b2c7ff72c7549975aef75cdcff8d9a7d97 100644 +index 61744d8fde3ba98585cf261fc09f0acc042b67b8..c0adfa72a6b43b72825797572c5c2557042e2a42 100644 --- a/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java +++ b/src/main/java/net/minecraft/world/level/redstone/CollectingNeighborUpdater.java @@ -119,7 +119,20 @@ public class CollectingNeighborUpdater implements NeighborUpdater { diff --git a/patches/unapplied/server/0795-Configurable-chat-thread-limit.patch b/patches/server/0767-Configurable-chat-thread-limit.patch similarity index 100% rename from patches/unapplied/server/0795-Configurable-chat-thread-limit.patch rename to patches/server/0767-Configurable-chat-thread-limit.patch diff --git a/patches/unapplied/server/0796-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0768-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch similarity index 85% rename from patches/unapplied/server/0796-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch rename to patches/server/0768-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch index ffb644e841..1e968253ab 100644 --- a/patches/unapplied/server/0796-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch +++ b/patches/server/0768-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch @@ -7,11 +7,11 @@ Subject: [PATCH] Mitigate effects of WorldCreator#keepSpawnLoaded ret type TODO: Remove in 1.21? diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 010014c06fcea7d603160928f124f54d6e5e63d8..bc008773f8cf0d416182152ecfc5a64b70744009 100644 +index b08de24fbc5addefe61d5b1919898775260d4a54..c46bb5ab1a9f365099a5e86ec6411e504fac372f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -394,6 +394,12 @@ public class Commodore { - super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CB_PACKAGE + "/advancement/CraftAdvancement", "getDisplay0", desc, false); +@@ -373,6 +373,12 @@ public class Commodore { + super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, CB_PACKAGE_PREFIX + "advancement/CraftAdvancement", "getDisplay0", desc, false); return; } + if (owner.equals("org/bukkit/WorldCreator") && name.equals("keepSpawnLoaded") && desc.equals("(Lnet/kyori/adventure/util/TriState;)V")) { diff --git a/patches/unapplied/server/0797-fix-Jigsaw-block-kicking-user.patch b/patches/server/0769-fix-Jigsaw-block-kicking-user.patch similarity index 87% rename from patches/unapplied/server/0797-fix-Jigsaw-block-kicking-user.patch rename to patches/server/0769-fix-Jigsaw-block-kicking-user.patch index 2e5fd7e357..0c52c47ce9 100644 --- a/patches/unapplied/server/0797-fix-Jigsaw-block-kicking-user.patch +++ b/patches/server/0769-fix-Jigsaw-block-kicking-user.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fix Jigsaw block kicking user diff --git a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java -index f39a35f7c6ee61d5d7375e9792957f27e507cf0c..447b0359922011fe12b1bb9628d23a47c9d7dc89 100644 +index 3a80b0e9c0e12a84034aadebd0ff6f6b51d0d2ea..922592f2073eaea8ca361a3a1efcda8b18bea21c 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/JigsawBlockEntity.java -@@ -136,7 +136,12 @@ public class JigsawBlockEntity extends BlockEntity { +@@ -137,7 +137,12 @@ public class JigsawBlockEntity extends BlockEntity { public void generate(ServerLevel world, int maxDepth, boolean keepJigsaws) { BlockPos blockPos = this.getBlockPos().relative(this.getBlockState().getValue(JigsawBlock.ORIENTATION).front()); Registry registry = world.registryAccess().registryOrThrow(Registries.TEMPLATE_POOL); @@ -23,10 +23,10 @@ index f39a35f7c6ee61d5d7375e9792957f27e507cf0c..447b0359922011fe12b1bb9628d23a47 } diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool.java b/src/main/java/net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool.java -index c8e41cd51bddfafb3675352ea9ec39188ee91a80..488ddcc22dfb08baedc080326b1531151826a702 100644 +index 23ac340661cf0f5940c0d6333c74a9c7b36dca26..7ba11f734bd73dde165d155a633b47dac979a8e9 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/pools/StructureTemplatePool.java -@@ -98,7 +98,13 @@ public class StructureTemplatePool { +@@ -97,7 +97,13 @@ public class StructureTemplatePool { } public StructurePoolElement getRandomTemplate(RandomSource random) { diff --git a/patches/unapplied/server/0798-use-BlockFormEvent-for-mud-converting-into-clay.patch b/patches/server/0770-use-BlockFormEvent-for-mud-converting-into-clay.patch similarity index 84% rename from patches/unapplied/server/0798-use-BlockFormEvent-for-mud-converting-into-clay.patch rename to patches/server/0770-use-BlockFormEvent-for-mud-converting-into-clay.patch index 2da3483da9..8653ffd786 100644 --- a/patches/unapplied/server/0798-use-BlockFormEvent-for-mud-converting-into-clay.patch +++ b/patches/server/0770-use-BlockFormEvent-for-mud-converting-into-clay.patch @@ -5,10 +5,10 @@ Subject: [PATCH] use BlockFormEvent for mud converting into clay diff --git a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -index d0e679745a794228bf62a9aa59422776760f3867..5835872df922b859a31b44e3723c67097f21a641 100644 +index 95cb7492ac691a8e8aa9894f701b802a7eda5446..a2bd54dae4b0460d200f6d5300194a7ef5a28830 100644 --- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -@@ -214,10 +214,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate +@@ -215,10 +215,13 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate if (((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState.is(Blocks.MUD) && fluidtype == Fluids.WATER) { BlockState iblockdata1 = Blocks.CLAY.defaultBlockState(); @@ -16,7 +16,7 @@ index d0e679745a794228bf62a9aa59422776760f3867..5835872df922b859a31b44e3723c6709 + // Paper start - Call BlockFormEvent + if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, iblockdata1)) { Block.pushEntitiesUp(((PointedDripstoneBlock.FluidInfo) optional.get()).sourceState, iblockdata1, world, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos); - world.gameEvent(GameEvent.BLOCK_CHANGE, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, GameEvent.Context.of(iblockdata1)); + world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, ((PointedDripstoneBlock.FluidInfo) optional.get()).pos, GameEvent.Context.of(iblockdata1)); world.levelEvent(1504, blockposition1, 0); + } + // Paper end - Call BlockFormEvent diff --git a/patches/unapplied/server/0799-Add-getDrops-to-BlockState.patch b/patches/server/0771-Add-getDrops-to-BlockState.patch similarity index 91% rename from patches/unapplied/server/0799-Add-getDrops-to-BlockState.patch rename to patches/server/0771-Add-getDrops-to-BlockState.patch index ba33e973c5..ea12f69bde 100644 --- a/patches/unapplied/server/0799-Add-getDrops-to-BlockState.patch +++ b/patches/server/0771-Add-getDrops-to-BlockState.patch @@ -7,10 +7,10 @@ Originally added isPreferredTool to BlockData but upstream added that. diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java -index 08716e757b2e100f7bc47a046f02db664d882aba..2cfaa59a0bb6b5253b5a8dcc38ae65e0f085fd3f 100644 +index e96023b71845526383288917e8d7c5759a4c0e9b..fa63a6cfcfcc4eee4503a82d85333c139c8c8b2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java -@@ -337,5 +337,24 @@ public class CraftBlockState implements BlockState { +@@ -347,5 +347,24 @@ public class CraftBlockState implements BlockState { public boolean isCollidable() { return this.data.getBlock().hasCollision; } diff --git a/patches/unapplied/server/0800-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0772-Fix-a-bunch-of-vanilla-bugs.patch similarity index 76% rename from patches/unapplied/server/0800-Fix-a-bunch-of-vanilla-bugs.patch rename to patches/server/0772-Fix-a-bunch-of-vanilla-bugs.patch index 4b96d454ab..74462d10f9 100644 --- a/patches/unapplied/server/0800-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0772-Fix-a-bunch-of-vanilla-bugs.patch @@ -3,9 +3,6 @@ From: Jake Potrebic Date: Mon, 11 Jul 2022 11:56:41 -0700 Subject: [PATCH] Fix a bunch of vanilla bugs -https://bugs.mojang.com/browse/MC-253884 - show raid entity event to all tracking players - https://bugs.mojang.com/browse/MC-253721 wrong msg for opping multiple players @@ -49,12 +46,6 @@ https://bugs.mojang.com/browse/MC-123848 https://bugs.mojang.com/browse/MC-84789 Fix wild wolves not considering bones interesting -https://bugs.mojang.com/browse/MC-225381 - Fix overfilled bundles duplicating items / being filled with air - -https://bugs.mojang.com/browse/MC-173303 - Fix leashed pets teleporting to owner when loaded - https://bugs.mojang.com/browse/MC-174630 Fix secondary beacon effect remaining after switching effect @@ -74,10 +65,10 @@ Co-authored-by: William Blake Galbreath Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 829c72333664da0c06ce04af93ea39bb90ce0b67..b4f7e3ae855cbf48925f0db916501adf513ae08c 100644 +index f880f9faa1e5660853f28c0e2daf4ab6bc6a55fd..2bb3d1f0b89ef5b9b1f9f8da1070d21168830645 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -351,7 +351,7 @@ public interface DispenseItemBehavior { +@@ -241,7 +241,7 @@ public interface DispenseItemBehavior { } } // CraftBukkit end @@ -113,10 +104,10 @@ index 6854ca4d4fec2b4fa541c3fabf63787665572609..e7b444a10b244828827b3c66c5346520 } diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index f2d3dc066b00b685715eb5104234945c41a15f92..43c8f6a0615f392cc560b2259b116cc9d5fba4e7 100644 +index 3532febc8e34c8436a69a4c4b472b1776f21ee48..de19a5ea96fa38621513e970e04d153576f4f6ae 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1233,7 +1233,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1252,7 +1252,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // CraftBukkit end } @@ -126,10 +117,10 @@ index f2d3dc066b00b685715eb5104234945c41a15f92..43c8f6a0615f392cc560b2259b116cc9 return this.anyPlayerCloseEnoughForSpawning(pos, false); } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 57f54e3399f9d2d7fecdae62858d20e50caf7afd..b804941c76582871813ba813b9eef2422e7e71f0 100644 +index 90500b6a5b3612c85a06660fe67e89351d4c0fd1..78fc8689438d90eb792f7836f6b2ec03be0b407c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -770,7 +770,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -776,7 +776,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } else { AABB axisalignedbb = AABB.encapsulatingFullBlocks(blockposition1, new BlockPos(blockposition1.atY(this.getMaxBuildHeight()))).inflate(3.0D); List list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> { @@ -139,10 +130,10 @@ index 57f54e3399f9d2d7fecdae62858d20e50caf7afd..b804941c76582871813ba813b9eef242 if (!list.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c99a672dd2d2e4972e9d4025e10e8863d0af1e6a..d831fb1f66dc38b6c9d3592944f94cc5eeaac864 100644 +index 22e9009e2943a70f21da6fa1ceefb5cfc9d20dab..9a56a019b604e95f9ce536333223fa058d2a6550 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -419,14 +419,14 @@ public class ServerPlayer extends Player { +@@ -435,14 +435,14 @@ public class ServerPlayer extends Player { BlockPos blockposition1 = PlayerRespawnLogic.getOverworldRespawnPos(world, blockposition.getX() + j2 - i, blockposition.getZ() + k2 - i); if (blockposition1 != null) { @@ -160,10 +151,10 @@ index c99a672dd2d2e4972e9d4025e10e8863d0af1e6a..d831fb1f66dc38b6c9d3592944f94cc5 while (!world.noCollision((Entity) this) && this.getY() < (double) (world.getMaxBuildHeight() - 1)) { this.setPos(this.getX(), this.getY() + 1.0D, this.getZ()); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index f3389dc345d8b6e5389ae37848d9b268d4bbad83..5d1b8bae981dc538ee1fe4fb993e44f227168233 100644 +index 77e78808171daac78502ef3fcc70f03579eaa9e3..0cfdd01778fb4f2150a4dea2d9dc6b3b830af987 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -92,7 +92,7 @@ public class ServerPlayerGameMode { +@@ -91,7 +91,7 @@ public class ServerPlayerGameMode { return event; // Paper - Expand PlayerGameModeChangeEvent } // CraftBukkit end @@ -173,10 +164,10 @@ index f3389dc345d8b6e5389ae37848d9b268d4bbad83..5d1b8bae981dc538ee1fe4fb993e44f2 this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit this.level.updateSleepingPlayerList(); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 6fbcea8fd32a425cab936330d5d9545782e03346..1478def0ba4bc02c1c466d80cc2b90919612c18a 100644 +index 42d609cc3bd13e957b6f2194552da34393849790..b2634bdedfe8359da602cf600a2bdddbd762e7c2 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -710,8 +710,10 @@ public abstract class PlayerList { +@@ -709,8 +709,10 @@ public abstract class PlayerList { Player player = entity.getBukkitEntity(); PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress()); @@ -250,19 +241,6 @@ index d802985f1431be4332c07f0dab88feebedea4ce2..4e2c23ccdf4e4a4d65b291dbe20952ba if (this.mob.getRandom().nextInt(this.mob.isBaby() ? 50 : 1000) != 0) { return false; } else { -diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java -index 11cc26954b4e97114b59df35a4f9b75a09132e20..0a3f7dcc0e205a85dbaa6dee1fc9ae2c7fa9e02d 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java -+++ b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java -@@ -74,7 +74,7 @@ public class FollowOwnerGoal extends Goal { - } - - private boolean unableToMove() { -- return this.tamable.isOrderedToSit() || this.tamable.isPassenger() || this.tamable.isLeashed(); -+ return this.tamable.isOrderedToSit() || this.tamable.isPassenger() || this.tamable.isLeashed() || this.tamable.leashInfoTag != null; // Paper - Fix MC-173303 - } - - @Override diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java index ef71b3ef4444c05b4211de87e1c8ec52cbe3e72a..137ec75ee803789deb7b1ca93dd9369c9af362b9 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/SwellGoal.java @@ -282,10 +260,10 @@ index ef71b3ef4444c05b4211de87e1c8ec52cbe3e72a..137ec75ee803789deb7b1ca93dd9369c public void start() { this.creeper.getNavigation().stop(); diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index 110dd5418b0512a2f27f0c4d5a5f1812356a6a12..5d247ac38fe8a61603b3d934f3000bcda773142b 100644 +index 923806900ef6248576e71260d40e9caf2c8943e8..02e49c7ae5e120302b6479cf3e3934b9217eebf0 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -@@ -239,9 +239,10 @@ public class Goat extends Animal { +@@ -243,9 +243,10 @@ public class Goat extends Animal { player.setItemInHand(hand, itemstack1); return InteractionResult.sidedSuccess(this.level().isClientSide); } else { @@ -298,10 +276,10 @@ index 110dd5418b0512a2f27f0c4d5a5f1812356a6a12..5d247ac38fe8a61603b3d934f3000bcd } diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -index 56cc6ecf7f95687db7c7c062b4ee979bfe49844b..94dd97662ba07689fbfa16ef5c7d99fe12ce83de 100644 +index 57952ad65c905265799ba2d8f99cc4cf4aa69f94..8cae4e154ca07493aba9acadd4ff7150d7ae4f67 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -@@ -252,7 +252,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, +@@ -321,7 +321,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, @Override public void equipSaddle(@Nullable SoundSource sound) { @@ -315,13 +293,13 @@ index 56cc6ecf7f95687db7c7c062b4ee979bfe49844b..94dd97662ba07689fbfa16ef5c7d99fe + // Paper end } - public void equipArmor(Player player, ItemStack stack) { + public void equipBodyArmor(Player player, ItemStack stack) { 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 ab85050a64d4897aff11d0780d8cb26660918ac7..bfb9694087821de206fafe867f207e07a4a6a988 100644 +index bb22b84c32848869967a47a60f9d8a0629a59e2a..cb3de05dba7daa925b6fa7e0c7bbb8e3c53b51f4 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java -@@ -282,6 +282,14 @@ public class ItemFrame extends HangingEntity { - } +@@ -295,6 +295,14 @@ public class ItemFrame extends HangingEntity { + return (ItemStack) this.getEntityData().get(ItemFrame.DATA_ITEM); } + // Paper start - Fix MC-123848 (spawn item frame drops above block) @@ -332,83 +310,39 @@ index ab85050a64d4897aff11d0780d8cb26660918ac7..bfb9694087821de206fafe867f207e07 + } + // Paper end + - private void removeFramedMap(ItemStack itemstack) { - this.getFramedMapId().ifPresent((i) -> { - MapItemSavedData worldmap = MapItem.getSavedData(i, this.level()); + @Nullable + public MapId getFramedMapId() { + return (MapId) this.getItem().get(DataComponents.MAP_ID); diff --git a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java -index c718cee92522a0d3c0e30eafd09fa8178c7e6e4a..5d1610eddcaf0cf65c726a5438b42e53bab85332 100644 +index 08dcc94c9eca9a5fd61055f05b7737ba5840b5bf..e0e5046c84941a8d17e18c177f3daea9cb631940 100644 --- a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java -@@ -83,8 +83,8 @@ public class CatSpawner implements CustomSpawner { +@@ -82,8 +82,8 @@ public class CatSpawner implements CustomSpawner { if (cat == null) { return 0; } else { + cat.moveTo(pos, 0.0F, 0.0F); // Paper - move up - Fix MC-147659 - cat.finalizeSpawn(world, world.getCurrentDifficultyAt(pos), MobSpawnType.NATURAL, null, null); + cat.finalizeSpawn(world, world.getCurrentDifficultyAt(pos), MobSpawnType.NATURAL, null); - cat.moveTo(pos, 0.0F, 0.0F); world.addFreshEntityWithPassengers(cat); return 1; } -diff --git a/src/main/java/net/minecraft/world/entity/raid/Raids.java b/src/main/java/net/minecraft/world/entity/raid/Raids.java -index 4a0f4c83228187a2082ad029680056b1801f77bd..31831811ce16265e9828fa34d9e67d8ac195d723 100644 ---- a/src/main/java/net/minecraft/world/entity/raid/Raids.java -+++ b/src/main/java/net/minecraft/world/entity/raid/Raids.java -@@ -134,7 +134,7 @@ public class Raids extends SavedData { - // CraftBukkit end - } else { - player.removeEffect(MobEffects.BAD_OMEN); -- player.connection.send(new ClientboundEntityEventPacket(player, (byte) 43)); -+ this.level.broadcastEntityEvent(player, net.minecraft.world.entity.EntityEvent.BAD_OMEN_TRIGGERED /* (byte) 43 */); // Paper - Fix MC-253884 - } - - if (flag) { -@@ -149,7 +149,7 @@ public class Raids extends SavedData { - } - // CraftBukkit end - raid.absorbBadOmen(player); -- player.connection.send(new ClientboundEntityEventPacket(player, (byte) 43)); -+ this.level.broadcastEntityEvent(player, net.minecraft.world.entity.EntityEvent.BAD_OMEN_TRIGGERED /* (byte) 43 */); // Paper - Fix MC-253884 - if (!raid.hasFirstWaveSpawned()) { - player.awardStat(Stats.RAID_TRIGGER); - CriteriaTriggers.BAD_OMEN.trigger(player); diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index b670c0cb3886c99d38a91b5c13aa2cefaae702cf..9599a5f96601030bf7f7cbd3392861d626959f9d 100644 +index 866dd476829bd59501021a8c24bde6d8e8778963..580e5714c62aef5a5fdd16606712b96f3d41c938 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -@@ -177,6 +177,11 @@ public class BeaconMenu extends AbstractContainerMenu { +@@ -178,6 +178,11 @@ public class BeaconMenu extends AbstractContainerMenu { // Paper end - Add PlayerChangeBeaconEffectEvent - public void updateEffects(Optional primary, Optional secondary) { + public void updateEffects(Optional> primary, Optional> secondary) { + // Paper start - fix MC-174630 - validate secondary power -+ if (secondary.isPresent() && secondary.get() != net.minecraft.world.effect.MobEffects.REGENERATION && (primary.isPresent() && secondary.get() != primary.get())) { ++ if (secondary.isPresent() && secondary.get().value() != net.minecraft.world.effect.MobEffects.REGENERATION && (primary.isPresent() && secondary.get() != primary.get())) { + secondary = Optional.empty(); + } + // Paper end if (this.paymentSlot.hasItem()) { // Paper start - Add PlayerChangeBeaconEffectEvent io.papermc.paper.event.player.PlayerChangeBeaconEffectEvent event = new io.papermc.paper.event.player.PlayerChangeBeaconEffectEvent((org.bukkit.entity.Player) this.player.player.getBukkitEntity(), convert(primary), convert(secondary), this.access.getLocation().getBlock()); -diff --git a/src/main/java/net/minecraft/world/item/BundleItem.java b/src/main/java/net/minecraft/world/item/BundleItem.java -index 1e538c691d867a96a57fec9350b4f663d01f8e93..c4c966c555407b7146053187e2ed16cfb99a2dc9 100644 ---- a/src/main/java/net/minecraft/world/item/BundleItem.java -+++ b/src/main/java/net/minecraft/world/item/BundleItem.java -@@ -49,7 +49,7 @@ public class BundleItem extends Item { - removeOne(stack).ifPresent(removedStack -> add(stack, slot.safeInsert(removedStack))); - } else if (itemStack.getItem().canFitInsideContainerItems()) { - int i = (64 - getContentWeight(stack)) / getWeight(itemStack); -- int j = add(stack, slot.safeTake(itemStack.getCount(), i, player)); -+ int j = add(stack, slot.safeTake(itemStack.getCount(), Math.max(0, i), player)); // Paper - prevent item addition on overfilled bundles - safeTake will yield EMPTY for amount == 0. - if (j > 0) { - this.playInsertSound(player); - } -@@ -120,7 +120,7 @@ public class BundleItem extends Item { - int i = getContentWeight(bundle); - int j = getWeight(stack); - int k = Math.min(stack.getCount(), (64 - i) / j); -- if (k == 0) { -+ if (k <= 0) { // Paper - prevent item addition on overfilled bundles - return 0; - } else { - ListTag listTag = compoundTag.getList("Items", 10); diff --git a/src/main/java/net/minecraft/world/item/SaddleItem.java b/src/main/java/net/minecraft/world/item/SaddleItem.java index a569b404ece21fa9571e73947334f5aa57a8080c..51d350add4ca1756cb9e364e066bbee7949ffb8c 100644 --- a/src/main/java/net/minecraft/world/item/SaddleItem.java @@ -423,7 +357,7 @@ index a569b404ece21fa9571e73947334f5aa57a8080c..51d350add4ca1756cb9e364e066bbee7 stack.shrink(1); } diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java -index 655956f3c50d6a78b0cbfaa23d6a62cd776c1e52..85484d061090d989de8246df81f8e9e5f8906072 100644 +index cd90129be2cf8095abd80528e5de3bbe05022a9d..65dfad03a9f82d2ce65d0ec7d5bd22bd6fed15a2 100644 --- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java +++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java @@ -51,4 +51,11 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock { @@ -439,10 +373,10 @@ index 655956f3c50d6a78b0cbfaa23d6a62cd776c1e52..85484d061090d989de8246df81f8e9e5 + // Paper end } diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java -index 42c1e3dfec23d6a7d832bf73d47ecae1212ec2c9..a4857675772d4fe849ba85fc21a369decca42fc0 100644 +index fa5366961861370c2366e6f0ff026a6d65128316..a5c7c2d24498c66159316a4f92677625975ce5ca 100644 --- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java -@@ -68,7 +68,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { +@@ -69,7 +69,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!world.isClientSide && entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) { // CraftBukkit start @@ -452,10 +386,10 @@ index 42c1e3dfec23d6a7d832bf73d47ecae1212ec2c9..a4857675772d4fe849ba85fc21a369de return; } diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index c7ba7ac1a3869e4db1ef6b0350b3cab7f31a94c4..d7beeac4a8e4a16221809663a5aa03389a759742 100644 +index 614ddebb92aba91694951fc22900fed362b3426d..d19e799491f790ca967a0731ef95a06993a7ab9a 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -@@ -675,13 +675,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -645,13 +645,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @Override public void fillStackedContents(StackedContents finder) { @@ -474,10 +408,10 @@ index c7ba7ac1a3869e4db1ef6b0350b3cab7f31a94c4..d7beeac4a8e4a16221809663a5aa0338 } } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 61a618f09af475407a78343eecb4352052b1df1e..247f24c7fadc203ee0f6a6f85122c91ab4c82f80 100644 +index 7cec5aeee93e4fb14d403559293ec3c9be7955a6..35c7d05b1898adf6b193d0b0b53f3c3be186d4ce 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -291,7 +291,11 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -295,7 +295,11 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(level, worldPosition); new io.papermc.paper.event.block.BeaconDeactivatedEvent(block).callEvent(); // Paper end - beacon activation/deactivation events diff --git a/patches/unapplied/server/0801-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0773-Remove-unnecessary-onTrackingStart-during-navigation.patch similarity index 78% rename from patches/unapplied/server/0801-Remove-unnecessary-onTrackingStart-during-navigation.patch rename to patches/server/0773-Remove-unnecessary-onTrackingStart-during-navigation.patch index ea3e8cfcd2..e9e2db2db1 100644 --- a/patches/unapplied/server/0801-Remove-unnecessary-onTrackingStart-during-navigation.patch +++ b/patches/server/0773-Remove-unnecessary-onTrackingStart-during-navigation.patch @@ -5,22 +5,22 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b804941c76582871813ba813b9eef2422e7e71f0..b5eda9931a82a667c25ca1a49980b01b042dc0cc 100644 +index 78fc8689438d90eb792f7836f6b2ec03be0b407c..79d91a4e54a20c0b3681eaeb7245acda0ab5bbc3 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2263,7 +2263,7 @@ public class ServerLevel extends Level implements WorldGenLevel { - if (entity instanceof Mob) { - Mob entityinsentient = (Mob) entity; +@@ -2216,7 +2216,7 @@ public class ServerLevel extends Level implements WorldGenLevel { + } + if (entity instanceof Mob entityinsentient) { - if (ServerLevel.this.isUpdatingNavigations) { + if (false && ServerLevel.this.isUpdatingNavigations) { // Paper - Remove unnecessary onTrackingStart during navigation warning String s = "onTrackingStart called during navigation iteration"; Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration")); -@@ -2348,7 +2348,7 @@ public class ServerLevel extends Level implements WorldGenLevel { - if (entity instanceof Mob) { - Mob entityinsentient = (Mob) entity; +@@ -2296,7 +2296,7 @@ public class ServerLevel extends Level implements WorldGenLevel { + } + if (entity instanceof Mob entityinsentient) { - if (ServerLevel.this.isUpdatingNavigations) { + if (false && ServerLevel.this.isUpdatingNavigations) { // Paper - Remove unnecessary onTrackingStart during navigation warning String s = "onTrackingStart called during navigation iteration"; diff --git a/patches/unapplied/server/0802-Fix-custom-piglin-loved-items.patch b/patches/server/0774-Fix-custom-piglin-loved-items.patch similarity index 93% rename from patches/unapplied/server/0802-Fix-custom-piglin-loved-items.patch rename to patches/server/0774-Fix-custom-piglin-loved-items.patch index 6a9dc8a7d4..043217eed5 100644 --- a/patches/unapplied/server/0802-Fix-custom-piglin-loved-items.patch +++ b/patches/server/0774-Fix-custom-piglin-loved-items.patch @@ -7,7 +7,7 @@ Upstream didn't modify the isLovedItem check in wantsToPickup so piglins never actually tried to pickup interestItems diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -index 9d905ba5c306409ff846f93e3569d1e4c3c6bbf7..2a3bdf7cd8207732983d033c1301fa051df5b126 100644 +index 96d8f0fea969fa14bae77afc60c6a64032ca4957..d69b92849733f5228ac65e3feefd6838bb5b9a74 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java @@ -403,7 +403,7 @@ public class PiglinAi { diff --git a/patches/unapplied/server/0803-EntityPickupItemEvent-fixes.patch b/patches/server/0775-EntityPickupItemEvent-fixes.patch similarity index 87% rename from patches/unapplied/server/0803-EntityPickupItemEvent-fixes.patch rename to patches/server/0775-EntityPickupItemEvent-fixes.patch index b378f986f4..5780237591 100644 --- a/patches/unapplied/server/0803-EntityPickupItemEvent-fixes.patch +++ b/patches/server/0775-EntityPickupItemEvent-fixes.patch @@ -12,10 +12,10 @@ Fires the event when a Raider tries to pick up a raid banner to become raid leader. diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -index ea0902b4ba68a89b1f51281b10c1dfd1bfb42833..a9813da7f2b248f98f22e0ad2e7842915025ec12 100644 +index 20d9690127aed9c8ae2632bcf497ba0e473b7bea..a8ab486c7e11ec137da48174af6f1030dfd48056 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -424,7 +424,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -413,7 +413,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento @Override protected void pickUpItem(ItemEntity item) { @@ -25,7 +25,7 @@ index ea0902b4ba68a89b1f51281b10c1dfd1bfb42833..a9813da7f2b248f98f22e0ad2e784291 } diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -index 2a3bdf7cd8207732983d033c1301fa051df5b126..4f4f557b7f4232ec3b90dda43c6bed30521318ba 100644 +index d69b92849733f5228ac65e3feefd6838bb5b9a74..e25af9af8f87e6762716749c367658bf6bda9e34 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java @@ -242,11 +242,16 @@ public class PiglinAi { @@ -47,13 +47,13 @@ index 2a3bdf7cd8207732983d033c1301fa051df5b126..4f4f557b7f4232ec3b90dda43c6bed30 itemstack = PiglinAi.removeOneItemFromItemEntity(drop); } else { diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java -index d783b4d561e252af8928e4b1ea13c4e61598f8bf..93bbf7556f9599e9dd90761085a57d78bd521867 100644 +index d3fef00a351a6c6ae6af1f1dcf793c5954fd3485..98e558338b5d9fb03869d2cc21b3e90eb45b95f6 100644 --- a/src/main/java/net/minecraft/world/entity/raid/Raider.java +++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java -@@ -248,6 +248,11 @@ public abstract class Raider extends PatrollingMonster { +@@ -267,6 +267,11 @@ public abstract class Raider extends PatrollingMonster { boolean flag = this.hasActiveRaid() && this.getCurrentRaid().getLeader(this.getWave()) != null; - if (this.hasActiveRaid() && !flag && ItemStack.matches(itemstack, Raid.getLeaderBannerInstance())) { + if (this.hasActiveRaid() && !flag && ItemStack.matches(itemstack, Raid.getLeaderBannerInstance(this.registryAccess().lookupOrThrow(Registries.BANNER_PATTERN)))) { + // Paper start - EntityPickupItemEvent fixes + if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, item, 0, false).isCancelled()) { + return; diff --git a/patches/unapplied/server/0804-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0776-Correctly-handle-interactions-with-items-on-cooldown.patch similarity index 86% rename from patches/unapplied/server/0804-Correctly-handle-interactions-with-items-on-cooldown.patch rename to patches/server/0776-Correctly-handle-interactions-with-items-on-cooldown.patch index f1a45a8700..abeca5857c 100644 --- a/patches/unapplied/server/0804-Correctly-handle-interactions-with-items-on-cooldown.patch +++ b/patches/server/0776-Correctly-handle-interactions-with-items-on-cooldown.patch @@ -5,18 +5,18 @@ Subject: [PATCH] Correctly handle interactions with items on cooldown diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 5d1b8bae981dc538ee1fe4fb993e44f227168233..3621770701c6fb1da75c69a41297684493380e37 100644 +index 0cfdd01778fb4f2150a4dea2d9dc6b3b830af987..ee7f36700863b9f504a70a56c5f28c8e39b45c91 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -514,6 +514,7 @@ public class ServerPlayerGameMode { +@@ -509,6 +509,7 @@ public class ServerPlayerGameMode { + BlockPos blockposition = hitResult.getBlockPos(); BlockState iblockdata = world.getBlockState(blockposition); - InteractionResult enuminteractionresult = InteractionResult.PASS; boolean cancelledBlock = false; + boolean cancelledItem = false; // Paper - correctly handle items on cooldown if (!iblockdata.getBlock().isEnabled(world.enabledFeatures())) { return InteractionResult.FAIL; -@@ -523,10 +524,10 @@ public class ServerPlayerGameMode { +@@ -518,10 +519,10 @@ public class ServerPlayerGameMode { } if (player.getCooldowns().isOnCooldown(stack.getItem())) { @@ -30,10 +30,10 @@ index 5d1b8bae981dc538ee1fe4fb993e44f227168233..3621770701c6fb1da75c69a412976844 this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactPosition = blockposition.immutable(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 13366b67b20b812a037a199b8a1e6609a4a54444..6b226ab2b6365788362683e629c8cece12118233 100644 +index 70489085763475d29ddddc0bd3279974d0eb73cf..c52cb55cd1da988ec646e4e1484ec1a72513291d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -546,6 +546,12 @@ public class CraftEventFactory { +@@ -545,6 +545,12 @@ public class CraftEventFactory { } public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) { @@ -46,7 +46,7 @@ index 13366b67b20b812a037a199b8a1e6609a4a54444..6b226ab2b6365788362683e629c8cece Player player = (who == null) ? null : (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack); -@@ -580,6 +586,11 @@ public class CraftEventFactory { +@@ -579,6 +585,11 @@ public class CraftEventFactory { if (cancelledBlock) { event.setUseInteractedBlock(Event.Result.DENY); } diff --git a/patches/unapplied/server/0805-Add-PlayerInventorySlotChangeEvent.patch b/patches/server/0777-Add-PlayerInventorySlotChangeEvent.patch similarity index 93% rename from patches/unapplied/server/0805-Add-PlayerInventorySlotChangeEvent.patch rename to patches/server/0777-Add-PlayerInventorySlotChangeEvent.patch index 14f1948d31..c9503fa774 100644 --- a/patches/unapplied/server/0805-Add-PlayerInventorySlotChangeEvent.patch +++ b/patches/server/0777-Add-PlayerInventorySlotChangeEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerInventorySlotChangeEvent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d831fb1f66dc38b6c9d3592944f94cc5eeaac864..2a1722db668b141705ce47389cd24d0a247e373d 100644 +index 9a56a019b604e95f9ce536333223fa058d2a6550..15a00f156036ed364e05216cb34ad6556b0ba714 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -330,6 +330,25 @@ public class ServerPlayer extends Player { +@@ -346,6 +346,25 @@ public class ServerPlayer extends Player { } } @@ -35,7 +35,7 @@ index d831fb1f66dc38b6c9d3592944f94cc5eeaac864..2a1722db668b141705ce47389cd24d0a @Override public void dataChanged(AbstractContainerMenu handler, int property, int value) {} diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 94fe6bd403222049e4e7a407bb6ca99bcaab6acb..399b2f4ddb7e9ef26fbc5e83f3b77c46d3868814 100644 +index 00031a013d8e1e9f40bc1ef9491da6df3b061d5f..ea84d4549815ddfd2829cb2fd3885ddd1114bfa8 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -302,7 +302,7 @@ public abstract class AbstractContainerMenu { diff --git a/patches/unapplied/server/0806-Elder-Guardian-appearance-API.patch b/patches/server/0778-Elder-Guardian-appearance-API.patch similarity index 84% rename from patches/unapplied/server/0806-Elder-Guardian-appearance-API.patch rename to patches/server/0778-Elder-Guardian-appearance-API.patch index 2611823ca6..70c1cf7fdf 100644 --- a/patches/unapplied/server/0806-Elder-Guardian-appearance-API.patch +++ b/patches/server/0778-Elder-Guardian-appearance-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ccc706733689f07f9b4e1635db4a0259817f71aa..4acbd7359d8528916e4b74466697401bde8559a4 100644 +index 7d0cf5cba735b3726d8d9594ce0ac88360149680..175c49c6b8fa4e00e8a6205f27ee06467f069960 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3217,6 +3217,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3282,6 +3282,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/unapplied/server/0807-Allow-changing-bed-s-occupied-property.patch b/patches/server/0779-Allow-changing-bed-s-occupied-property.patch similarity index 100% rename from patches/unapplied/server/0807-Allow-changing-bed-s-occupied-property.patch rename to patches/server/0779-Allow-changing-bed-s-occupied-property.patch diff --git a/patches/unapplied/server/0808-Add-entity-knockback-API.patch b/patches/server/0780-Add-entity-knockback-API.patch similarity index 86% rename from patches/unapplied/server/0808-Add-entity-knockback-API.patch rename to patches/server/0780-Add-entity-knockback-API.patch index 8f119833a2..24a5eb02ff 100644 --- a/patches/unapplied/server/0808-Add-entity-knockback-API.patch +++ b/patches/server/0780-Add-entity-knockback-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add entity knockback API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 9ae20d759965bc9b88b52c15372155ad10bcc199..8be0e064f1f7e98e6bfd5915cd4eaf814b5f1d26 100644 +index bf58fb8acd09723cbc55f6ac41c24cccda97bac8..a188aefec543352b4e0d9ce03103ac842db61fc8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1121,4 +1121,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1106,4 +1106,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category"); } // Paper end - more enchant API diff --git a/patches/unapplied/server/0809-Detect-headless-JREs.patch b/patches/server/0781-Detect-headless-JREs.patch similarity index 94% rename from patches/unapplied/server/0809-Detect-headless-JREs.patch rename to patches/server/0781-Detect-headless-JREs.patch index 9dd8f30c67..4f9486860f 100644 --- a/patches/unapplied/server/0809-Detect-headless-JREs.patch +++ b/patches/server/0781-Detect-headless-JREs.patch @@ -27,10 +27,10 @@ index 6bd0afddbcc461149dfe9a5c7a86fff6ea13a5f1..148d233f4f5278ff39eacdaa0f4f0e7d + } } diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index d3b1fa89c1ae96abebfc0a792f2bc592de05443f..953e228afc6f706b819bb26655b91761436cc68d 100644 +index 467b8ca8007c5d3a7b72b88e3a979bdf09f1a283..13e1a914d4523f1c192db2a9a1ee6522e0ee27da 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -164,6 +164,18 @@ public class Main { +@@ -167,6 +167,18 @@ public class Main { return; } diff --git a/patches/unapplied/server/0810-fix-entity-vehicle-collision-event-not-called.patch b/patches/server/0782-fix-entity-vehicle-collision-event-not-called.patch similarity index 88% rename from patches/unapplied/server/0810-fix-entity-vehicle-collision-event-not-called.patch rename to patches/server/0782-fix-entity-vehicle-collision-event-not-called.patch index 9fe5a7cf02..fdb817e0f7 100644 --- a/patches/unapplied/server/0810-fix-entity-vehicle-collision-event-not-called.patch +++ b/patches/server/0782-fix-entity-vehicle-collision-event-not-called.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fix entity vehicle collision event not called diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index 9a6b6120c248a57d9dc86ca215146f6de980bd0d..d514ec1e4cbdc579c3a61533998437903afdc8b6 100644 +index 2f73ca283f2d6e6bc5265c95ef767b3f606a3d69..4d7454e5a64fc18e63793a221daa94617f17c666 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -168,7 +168,15 @@ public abstract class AbstractMinecart extends VehicleEntity { +@@ -165,7 +165,15 @@ public abstract class AbstractMinecart extends VehicleEntity { @Override public boolean canCollideWith(Entity other) { diff --git a/patches/unapplied/server/0811-Add-EntityToggleSitEvent.patch b/patches/server/0783-Add-EntityToggleSitEvent.patch similarity index 81% rename from patches/unapplied/server/0811-Add-EntityToggleSitEvent.patch rename to patches/server/0783-Add-EntityToggleSitEvent.patch index 2f61a7420e..555f6fd377 100644 --- a/patches/unapplied/server/0811-Add-EntityToggleSitEvent.patch +++ b/patches/server/0783-Add-EntityToggleSitEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityToggleSitEvent diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -index 01b91388577b6013d7bd5c9112a03f818fee1f9c..cf5cd0e49c4966e7b636a8ad4dec7a12806c6a4d 100644 +index ed2514de46d0939259ca4e45a6dc96d7c1dac20d..45284bb0f081377bc5913876c6877a424285c0bb 100644 --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java +++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -@@ -69,7 +69,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { +@@ -68,7 +68,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { } this.orderedToSit = nbt.getBoolean("Sitting"); @@ -17,7 +17,7 @@ index 01b91388577b6013d7bd5c9112a03f818fee1f9c..cf5cd0e49c4966e7b636a8ad4dec7a12 } @Override -@@ -125,6 +125,12 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { +@@ -126,6 +126,12 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { } public void setInSittingPose(boolean inSittingPose) { @@ -31,10 +31,10 @@ index 01b91388577b6013d7bd5c9112a03f818fee1f9c..cf5cd0e49c4966e7b636a8ad4dec7a12 if (inSittingPose) { this.entityData.set(DATA_FLAGS_ID, (byte)(b | 1)); 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 4c2e090a72dbd5bfb928e6ccbcedb1a25231d5b1..f7a7810fdc2f74b79fa14470493485e4b74539ab 100644 +index 1aa5485f2608000e4ac07350d1c537bc9bd92de4..e705449496b1a06270ecbc13f4dce5357479845b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java -@@ -437,7 +437,7 @@ public class Fox extends Animal implements VariantHolder { +@@ -432,7 +432,7 @@ public class Fox extends Animal implements VariantHolder { this.setSleeping(nbt.getBoolean("Sleeping")); this.setVariant(Fox.Type.byName(nbt.getString("Type"))); @@ -43,7 +43,7 @@ index 4c2e090a72dbd5bfb928e6ccbcedb1a25231d5b1..f7a7810fdc2f74b79fa14470493485e4 this.setIsCrouching(nbt.getBoolean("Crouching")); if (this.level() instanceof ServerLevel) { this.setTargetGoals(); -@@ -450,6 +450,12 @@ public class Fox extends Animal implements VariantHolder { +@@ -445,6 +445,12 @@ public class Fox extends Animal implements VariantHolder { } public void setSitting(boolean sitting) { @@ -57,10 +57,10 @@ index 4c2e090a72dbd5bfb928e6ccbcedb1a25231d5b1..f7a7810fdc2f74b79fa14470493485e4 } diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java -index 4abd26c7baf8f198f13dd41a3146f9ece13a4164..0297e234f17c6157cfff79420b9eeaf4e0e2c3ab 100644 +index 83d8a09980c4ab3c7c97b07c3dcdb3d7dab9e1aa..0440fd2d1bb3f87641ad88de6d5ae64617536a6d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Panda.java +++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java -@@ -139,6 +139,7 @@ public class Panda extends Animal { +@@ -144,6 +144,7 @@ public class Panda extends Animal { } public void sit(boolean sitting) { @@ -69,28 +69,28 @@ index 4abd26c7baf8f198f13dd41a3146f9ece13a4164..0297e234f17c6157cfff79420b9eeaf4 } diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index 090d36d73b12fec59782142e2e85f17ba35dc6be..7860331b640fe48d1f2357d9f8e2e40c682b3620 100644 +index f3fcfd3b358f496d26748099e1d5a95721a6a0d8..33531cbdd9b2a5607092d2364ce5655a63c2361c 100644 --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -@@ -580,7 +580,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl +@@ -560,7 +560,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl } public void sitDown() { - if (!this.isCamelSitting()) { + if (!this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), true).callEvent()) { // Paper - Add EntityToggleSitEvent - this.playSound(SoundEvents.CAMEL_SIT, 1.0F, this.getVoicePitch()); + this.makeSound(SoundEvents.CAMEL_SIT); this.setPose(Pose.SITTING); this.gameEvent(GameEvent.ENTITY_ACTION); -@@ -589,7 +589,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl +@@ -569,7 +569,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl } public void standUp() { - if (this.isCamelSitting()) { + if (this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) { // Paper - Add EntityToggleSitEvent - this.playSound(SoundEvents.CAMEL_STAND, 1.0F, this.getVoicePitch()); + this.makeSound(SoundEvents.CAMEL_STAND); this.setPose(Pose.STANDING); this.gameEvent(GameEvent.ENTITY_ACTION); -@@ -598,6 +598,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl +@@ -578,6 +578,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl } public void standUpInstantly() { diff --git a/patches/unapplied/server/0812-Add-fire-tick-delay-option.patch b/patches/server/0784-Add-fire-tick-delay-option.patch similarity index 69% rename from patches/unapplied/server/0812-Add-fire-tick-delay-option.patch rename to patches/server/0784-Add-fire-tick-delay-option.patch index b38e866fe5..848f831f0e 100644 --- a/patches/unapplied/server/0812-Add-fire-tick-delay-option.patch +++ b/patches/server/0784-Add-fire-tick-delay-option.patch @@ -5,24 +5,24 @@ Subject: [PATCH] Add fire-tick-delay option 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 c5116d12f3c073f0a8695a8cd00545e6d947644d..7f05e58358024d303eab9ab4fbc1bb299760ad1e 100644 +index 5dad1aa26a8908cba6a08398a4bad27f31d4c2c0..4d467ecf0dd8006b9fa4fb8fb5aadc0622a1e512 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -171,7 +171,7 @@ public class FireBlock extends BaseFireBlock { @Override - public void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { + protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { - world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random)); -+ world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world)); // Paper - Add fire-tick-delay option ++ world.scheduleTick(pos, this, FireBlock.getFireTickDelay(world)); // Paper - Add fire-tick-delay option if (world.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) { if (!state.canSurvive(world, pos)) { this.fireExtinguished(world, pos); // CraftBukkit - invalid place location @@ -372,11 +372,11 @@ public class FireBlock extends BaseFireBlock { - public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, net.minecraft.world.item.context.UseOnContext context) { + protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, net.minecraft.world.item.context.UseOnContext context) { super.onPlace(state, world, pos, oldState, notify, context); - // Paper end - UseOnContext param + // Paper end - UseOnContext param - world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random)); -+ world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world)); // Paper - Add fire-tick-delay option ++ world.scheduleTick(pos, this, FireBlock.getFireTickDelay(world)); // Paper - Add fire-tick-delay option } - private static int getFireTickDelay(RandomSource random) { diff --git a/patches/unapplied/server/0813-Add-Moving-Piston-API.patch b/patches/server/0785-Add-Moving-Piston-API.patch similarity index 81% rename from patches/unapplied/server/0813-Add-Moving-Piston-API.patch rename to patches/server/0785-Add-Moving-Piston-API.patch index b0b64257f1..e3d3955822 100644 --- a/patches/unapplied/server/0813-Add-Moving-Piston-API.patch +++ b/patches/server/0785-Add-Moving-Piston-API.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Add Moving Piston API diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftMovingPiston.java b/src/main/java/org/bukkit/craftbukkit/block/CraftMovingPiston.java -index c685846a539756ca7f0857e27f2b60d25cc13959..93ad5fed9a4d92169af0546c7e1cd8a62d19d1d7 100644 +index 25b759dee5ae2b311965f26ba311591199894be4..293ac0b658224fc0b3c2acdfc86eff3c8a9fdc04 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftMovingPiston.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftMovingPiston.java -@@ -3,7 +3,7 @@ package org.bukkit.craftbukkit.block; - import net.minecraft.world.level.block.piston.PistonMovingBlockEntity; +@@ -4,7 +4,7 @@ import net.minecraft.world.level.block.piston.PistonMovingBlockEntity; + import org.bukkit.Location; import org.bukkit.World; -public class CraftMovingPiston extends CraftBlockEntityState { @@ -17,9 +17,9 @@ index c685846a539756ca7f0857e27f2b60d25cc13959..93ad5fed9a4d92169af0546c7e1cd8a6 public CraftMovingPiston(World world, PistonMovingBlockEntity tileEntity) { super(world, tileEntity); -@@ -17,4 +17,26 @@ public class CraftMovingPiston extends CraftBlockEntityState { +@@ -127,7 +127,12 @@ public class EntityArgument implements ArgumentType { StringReader stringreader = new StringReader(suggestionsbuilder.getInput()); stringreader.setCursor(suggestionsbuilder.getStart()); diff --git a/patches/unapplied/server/0817-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0788-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch similarity index 79% rename from patches/unapplied/server/0817-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch rename to patches/server/0788-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch index e1712bed3b..4de5efdb09 100644 --- a/patches/unapplied/server/0817-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch +++ b/patches/server/0788-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch @@ -6,13 +6,13 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 8b44dc6cfddf77bdfe3684d1cdb15bb9125c4137..640d7f248e3696b73ef8d7668358a78037081320 100644 +index 4b54b3e121508fb1590654123e86c6c5de54a755..0a4069e6c544deb0ad576350ec371fe1ec5de8f4 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3111,6 +3111,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -3127,6 +3127,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess pluginManager.callEvent(entityCombustEvent); if (!entityCombustEvent.isCancelled()) { - this.setSecondsOnFire(entityCombustEvent.getDuration(), false); + this.igniteForSeconds(entityCombustEvent.getDuration(), false); + // Paper start - fix EntityCombustEvent cancellation + } else { + this.setRemainingFireTicks(this.remainingFireTicks - 1); @@ -21,13 +21,13 @@ index 8b44dc6cfddf77bdfe3684d1cdb15bb9125c4137..640d7f248e3696b73ef8d7668358a780 // CraftBukkit end } diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -index ceb5f9867f714b3b6a4602c787574dfa83c006f6..bd7cb2ddcac5cdc1d61899d12fc3383fd00598b1 100644 +index b18c1ca558e4005354ff42cde3056df9408f7fdc..139d65d2dfb48857415dc2a350204862031f83c9 100644 --- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java @@ -134,6 +134,10 @@ public abstract class BaseFireBlock extends Block { if (!event.isCancelled()) { - entity.setSecondsOnFire(event.getDuration(), false); + entity.igniteForSeconds(event.getDuration(), false); + // Paper start - fix EntityCombustEvent cancellation + } else { + entity.setRemainingFireTicks(entity.getRemainingFireTicks() - 1); diff --git a/patches/unapplied/server/0818-Add-PrePlayerAttackEntityEvent.patch b/patches/server/0789-Add-PrePlayerAttackEntityEvent.patch similarity index 80% rename from patches/unapplied/server/0818-Add-PrePlayerAttackEntityEvent.patch rename to patches/server/0789-Add-PrePlayerAttackEntityEvent.patch index 7541ba69cb..6ea383ac09 100644 --- a/patches/unapplied/server/0818-Add-PrePlayerAttackEntityEvent.patch +++ b/patches/server/0789-Add-PrePlayerAttackEntityEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PrePlayerAttackEntityEvent diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 7c0db708575ef26a1dd73709bf22653f21e0c863..262cefa51856cf6a58ae3b80b1ae93a5dd7bfaa7 100644 +index 4003dfeae8b2486045a3dbe4c1adc65a882e70ba..761e8a0c4e1db465c18892999e86885f27ca8075 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1234,8 +1234,17 @@ public abstract class Player extends LivingEntity { +@@ -1246,8 +1246,17 @@ public abstract class Player extends LivingEntity { } public void attack(Entity target) { @@ -26,5 +26,5 @@ index 7c0db708575ef26a1dd73709bf22653f21e0c863..262cefa51856cf6a58ae3b80b1ae93a5 + { + // Paper end - PlayerAttackEntityEvent float f = (float) this.getAttributeValue(Attributes.ATTACK_DAMAGE); - float f1; - + float f1 = EnchantmentHelper.getDamageBonus(this.getMainHandItem(), target.getType()); + float f2 = this.getAttackStrengthScale(0.5F); diff --git a/patches/unapplied/server/0819-ensure-reset-EnderDragon-boss-event-name.patch b/patches/server/0790-ensure-reset-EnderDragon-boss-event-name.patch similarity index 96% rename from patches/unapplied/server/0819-ensure-reset-EnderDragon-boss-event-name.patch rename to patches/server/0790-ensure-reset-EnderDragon-boss-event-name.patch index 07dc251b4d..854c391fc5 100644 --- a/patches/unapplied/server/0819-ensure-reset-EnderDragon-boss-event-name.patch +++ b/patches/server/0790-ensure-reset-EnderDragon-boss-event-name.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ensure reset EnderDragon boss event name Fix MC-257487 diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 50071bec6825ec2b34662de14128070510d16afb..8737501e14792de13adf95da24fa6177bfb77946 100644 +index b8bba857aa390e5435b8a199a25065a940d6a972..f6f5fad52e41d5ccc37dc28c40904fce014907fb 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java @@ -73,6 +73,7 @@ public class EndDragonFight { diff --git a/patches/server/0791-fix-MC-252817-green-map-markers-do-not-disappear.patch b/patches/server/0791-fix-MC-252817-green-map-markers-do-not-disappear.patch new file mode 100644 index 0000000000..c87a0a8475 --- /dev/null +++ b/patches/server/0791-fix-MC-252817-green-map-markers-do-not-disappear.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: braindead +Date: Sat, 5 Nov 2022 17:47:26 -0400 +Subject: [PATCH] fix MC-252817 (green map markers do not disappear). + +this bug is caused by the fact that the itemframe's item is set to empty before the green marker is requested to be removed. this is fixed by getting the mapid from this method's parameter, rather than the air block now stored by the item frame. + +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 cb3de05dba7daa925b6fa7e0c7bbb8e3c53b51f4..ef6d63cdc823280c9db491c744af598b94b6922e 100644 +--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java ++++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +@@ -277,8 +277,7 @@ public class ItemFrame extends HangingEntity { + } + + private void removeFramedMap(ItemStack stack) { +- MapId mapid = this.getFramedMapId(); +- ++ MapId mapid = this.getFramedMapIdForItem(stack); // Paper - fix MC-252817 (green map markers do not disappear) + if (mapid != null) { + MapItemSavedData worldmap = MapItem.getSavedData(mapid, this.level()); + +@@ -305,9 +304,16 @@ public class ItemFrame extends HangingEntity { + + @Nullable + public MapId getFramedMapId() { +- return (MapId) this.getItem().get(DataComponents.MAP_ID); ++ // Paper start ++ return this.getFramedMapIdForItem(this.getItem()); + } + ++ @Nullable ++ public MapId getFramedMapIdForItem(ItemStack item) { ++ return (MapId) item.get(DataComponents.MAP_ID); ++ } ++ // Paper end ++ + public boolean hasFramedMap() { + return this.getItem().has(DataComponents.MAP_ID); + } diff --git a/patches/unapplied/server/0821-Add-Player-Warden-Warning-API.patch b/patches/server/0792-Add-Player-Warden-Warning-API.patch similarity index 93% rename from patches/unapplied/server/0821-Add-Player-Warden-Warning-API.patch rename to patches/server/0792-Add-Player-Warden-Warning-API.patch index 2109390769..79c9547177 100644 --- a/patches/unapplied/server/0821-Add-Player-Warden-Warning-API.patch +++ b/patches/server/0792-Add-Player-Warden-Warning-API.patch @@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4acbd7359d8528916e4b74466697401bde8559a4..35213408270522d08e0f8a10989db232ea24c0f7 100644 +index 175c49c6b8fa4e00e8a6205f27ee06467f069960..0262e0cd3ad5f4ab3a264aa110b946f81e9e92c1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3222,6 +3222,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3287,6 +3287,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void showElderGuardian(boolean silent) { if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F)); } diff --git a/patches/unapplied/server/0822-More-vanilla-friendly-methods-to-update-trades.patch b/patches/server/0793-More-vanilla-friendly-methods-to-update-trades.patch similarity index 94% rename from patches/unapplied/server/0822-More-vanilla-friendly-methods-to-update-trades.patch rename to patches/server/0793-More-vanilla-friendly-methods-to-update-trades.patch index d992c79d48..5280c03219 100644 --- a/patches/unapplied/server/0822-More-vanilla-friendly-methods-to-update-trades.patch +++ b/patches/server/0793-More-vanilla-friendly-methods-to-update-trades.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More vanilla friendly methods to update trades diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index a01e089ed7689485a7ac33ab29bc27c4b68bc1df..fa2569fecefb3e3af3264928a3c7a347710deedf 100644 +index 4d3a04e1d7910c4e71ac9a1cebb58e482958671a..1e8579c994098fb18d9725e3f1604a582be4162f 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -927,6 +927,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -919,6 +919,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override protected void updateTrades() { @@ -21,7 +21,7 @@ index a01e089ed7689485a7ac33ab29bc27c4b68bc1df..fa2569fecefb3e3af3264928a3c7a347 VillagerData villagerdata = this.getVillagerData(); Int2ObjectMap int2objectmap; -@@ -944,9 +950,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -936,9 +942,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler if (avillagertrades_imerchantrecipeoption != null) { MerchantOffers merchantrecipelist = this.getOffers(); diff --git a/patches/unapplied/server/0823-Add-paper-dumplisteners-command.patch b/patches/server/0794-Add-paper-dumplisteners-command.patch similarity index 100% rename from patches/unapplied/server/0823-Add-paper-dumplisteners-command.patch rename to patches/server/0794-Add-paper-dumplisteners-command.patch diff --git a/patches/unapplied/server/0824-check-global-player-list-where-appropriate.patch b/patches/server/0795-check-global-player-list-where-appropriate.patch similarity index 86% rename from patches/unapplied/server/0824-check-global-player-list-where-appropriate.patch rename to patches/server/0795-check-global-player-list-where-appropriate.patch index bf8f80fdbd..19396a1d70 100644 --- a/patches/unapplied/server/0824-check-global-player-list-where-appropriate.patch +++ b/patches/server/0795-check-global-player-list-where-appropriate.patch @@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player instead of just checking players in their world. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b5eda9931a82a667c25ca1a49980b01b042dc0cc..5f1a4a35d2179b7ff5a95390f82d65cacf4fd457 100644 +index 79d91a4e54a20c0b3681eaeb7245acda0ab5bbc3..2eda55a09632a6c5668600251a8c491c501fbe2b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2385,4 +2385,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2332,4 +2332,12 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::move); } } @@ -24,10 +24,10 @@ index b5eda9931a82a667c25ca1a49980b01b042dc0cc..5f1a4a35d2179b7ff5a95390f82d65ca + // Paper end - check global player list where appropriate } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 09a26622db4bb4b504f735454e2b031f4840b092..b19b5b8678ce2fb912b703382ae79f5755e025e7 100644 +index 4bda4252889cc42bb5a38c45d87f5ec0f2c281b3..fdd0cf40b4e0df7d1987889c635fd90cd63727b6 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3698,7 +3698,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3682,7 +3682,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void onItemPickup(ItemEntity item) { @@ -37,11 +37,11 @@ index 09a26622db4bb4b504f735454e2b031f4840b092..b19b5b8678ce2fb912b703382ae79f57 if (entity instanceof ServerPlayer) { CriteriaTriggers.THROWN_ITEM_PICKED_UP_BY_ENTITY.trigger((ServerPlayer) entity, item.getItem(), this); diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -index d4ac3e566b47cfc8688bcc2ab08385b6de4693f8..7de9d012e7416eaa0189b513a0972c846e93c4b6 100644 +index deedc707971be0bd1b7757f4e9b6d2729cc669d0..f38acc96f71298e40ce9433e7759fd223ca55e48 100644 --- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -272,7 +272,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { - entityvillager.finalizeSpawn(world, world.getCurrentDifficultyAt(entityvillager.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null); +@@ -273,7 +273,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { + entityvillager.finalizeSpawn(world, world.getCurrentDifficultyAt(entityvillager.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null); entityvillager.refreshBrain(world); if (this.conversionStarter != null) { - Player entityhuman = world.getPlayerByUUID(this.conversionStarter); @@ -66,10 +66,10 @@ index d465fb01af4c8610f83ecb9c68b83127cf7e95ae..bd20bea7f76a7307f1698fb2dfef3712 + // Paper end - check global player list where appropriate } diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java -index d71a9fb54269f7c7e251e0e3bdd8b5a072af5201..a2ab5291605a3a3c4fda067c23da7d9aafe1cc38 100644 +index baa876db3a58a3c756a72ef1ad081964b358f58e..974d195d147dacb79f29dbfe2c6f4a0e0ebf28be 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java -@@ -97,6 +97,13 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi +@@ -99,6 +99,13 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi @Nullable public static ServerPlayer tryGetPlayer(@Nullable Entity entity) { diff --git a/patches/unapplied/server/0825-Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/0796-Fix-async-entity-add-due-to-fungus-trees.patch similarity index 89% rename from patches/unapplied/server/0825-Fix-async-entity-add-due-to-fungus-trees.patch rename to patches/server/0796-Fix-async-entity-add-due-to-fungus-trees.patch index 63a99ea749..c773854cd5 100644 --- a/patches/unapplied/server/0825-Fix-async-entity-add-due-to-fungus-trees.patch +++ b/patches/server/0796-Fix-async-entity-add-due-to-fungus-trees.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix async entity add due to fungus trees diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -index ff94af5be8de374f5cde2607eebbb23e65705581..209596e89307b9e1d0ff4c465876d29fef4fc290 100644 +index a343bb1b1ee2cd2ecd75be00aa91d5418dcdec76..713509e08c6325816fef7c09477d36aacb0008ef 100644 --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -@@ -228,6 +228,7 @@ public class WorldGenRegion implements WorldGenLevel { +@@ -236,6 +236,7 @@ public class WorldGenRegion implements WorldGenLevel { if (iblockdata.isAir()) { return false; } else { @@ -17,7 +17,7 @@ index ff94af5be8de374f5cde2607eebbb23e65705581..209596e89307b9e1d0ff4c465876d29f BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 5680e9772a2d90e997d2d0aacdda9eddb7edef56..7c7dbd030ada8d2fab494b6a125664ddc3955639 100644 +index 72c275d7da798ee10a224bbd3f4c92abd82601e1..0e307c2bb788c1ec856613b0203f5fc7aca7e85d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java @@ -257,10 +257,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { diff --git a/patches/unapplied/server/0826-ItemStack-damage-API.patch b/patches/server/0797-ItemStack-damage-API.patch similarity index 95% rename from patches/unapplied/server/0826-ItemStack-damage-API.patch rename to patches/server/0797-ItemStack-damage-API.patch index 207d179c13..bddda0f769 100644 --- a/patches/unapplied/server/0826-ItemStack-damage-API.patch +++ b/patches/server/0797-ItemStack-damage-API.patch @@ -11,10 +11,10 @@ the logic associated with damaging them public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 8be0e064f1f7e98e6bfd5915cd4eaf814b5f1d26..711eb84fee6c46341928a765970defa47e1fe0c3 100644 +index a188aefec543352b4e0d9ce03103ac842db61fc8..48505c6df9d5fdbd426127e306926fae9824d0a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1129,4 +1129,52 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1114,4 +1114,52 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.getHandle().knockback(strength, directionX, directionZ); }; // Paper end - knockback API diff --git a/patches/unapplied/server/0827-Friction-API.patch b/patches/server/0798-Friction-API.patch similarity index 80% rename from patches/unapplied/server/0827-Friction-API.patch rename to patches/server/0798-Friction-API.patch index 691571962d..ef7cbe4bae 100644 --- a/patches/unapplied/server/0827-Friction-API.patch +++ b/patches/server/0798-Friction-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Friction API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b19b5b8678ce2fb912b703382ae79f5755e025e7..084d988ec3dcdae54a10309d34d335ca4f37b7b0 100644 +index fdd0cf40b4e0df7d1987889c635fd90cd63727b6..6ac6848fe27336a96a813c84d7d797cc9bc4c297 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -273,6 +273,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public boolean bukkitPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event @@ -16,7 +16,7 @@ index b19b5b8678ce2fb912b703382ae79f5755e025e7..084d988ec3dcdae54a10309d34d335ca @Override public float getBukkitYaw() { -@@ -717,7 +718,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -738,7 +739,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public boolean shouldDiscardFriction() { @@ -25,7 +25,7 @@ index b19b5b8678ce2fb912b703382ae79f5755e025e7..084d988ec3dcdae54a10309d34d335ca } public void setDiscardFriction(boolean noDrag) { -@@ -768,6 +769,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -799,6 +800,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void addAdditionalSaveData(CompoundTag nbt) { @@ -37,7 +37,7 @@ index b19b5b8678ce2fb912b703382ae79f5755e025e7..084d988ec3dcdae54a10309d34d335ca nbt.putFloat("Health", this.getHealth()); nbt.putShort("HurtTime", (short) this.hurtTime); nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp); -@@ -811,6 +817,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -842,6 +848,16 @@ public abstract class LivingEntity extends Entity implements Attackable { } this.internalSetAbsorptionAmount(absorptionAmount); // Paper end - Check for NaN @@ -55,10 +55,10 @@ index b19b5b8678ce2fb912b703382ae79f5755e025e7..084d988ec3dcdae54a10309d34d335ca this.getAttributes().load(nbt.getList("Attributes", 10)); } diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index d0dac3dc89b9bb645a1d8498802fb8c6bff6a78e..29ce703a79f7893ac990ad80e0f1c1cf63546e6c 100644 +index b392fda26982517cbc2c04156897184275ce69e5..8fd3845c4965843be9c37498760d93f1ebdff541 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -58,6 +58,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -62,6 +62,7 @@ public class ItemEntity extends Entity implements TraceableEntity { private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit public boolean canMobPickup = true; // Paper - Item#canEntityPickup private int despawnRate = -1; // Paper - Alternative item-despawn-rate @@ -66,25 +66,20 @@ index d0dac3dc89b9bb645a1d8498802fb8c6bff6a78e..29ce703a79f7893ac990ad80e0f1c1cf public ItemEntity(EntityType type, Level world) { super(type, world); -@@ -179,11 +180,15 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -185,7 +186,11 @@ public class ItemEntity extends Entity implements TraceableEntity { this.move(MoverType.SELF, this.getDeltaMovement()); - float f1 = 0.98F; + float f = 0.98F; - if (this.onGround()) { + // Paper start - Friction API + if (frictionState == net.kyori.adventure.util.TriState.FALSE) { -+ f1 = 1F; ++ f = 1F; + } else if (this.onGround()) { + // Paper end - Friction API - f1 = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F; + f = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F; } -- this.setDeltaMovement(this.getDeltaMovement().multiply((double) f1, 0.98D, (double) f1)); -+ this.setDeltaMovement(this.getDeltaMovement().multiply((double) f1, frictionState == net.kyori.adventure.util.TriState.FALSE ? 1D : 0.98D, (double) f1)); // Paper - Friction API - if (this.onGround()) { - Vec3 vec3d1 = this.getDeltaMovement(); - -@@ -388,6 +393,11 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -394,6 +399,11 @@ public class ItemEntity extends Entity implements TraceableEntity { @Override public void addAdditionalSaveData(CompoundTag nbt) { @@ -96,8 +91,8 @@ index d0dac3dc89b9bb645a1d8498802fb8c6bff6a78e..29ce703a79f7893ac990ad80e0f1c1cf nbt.putShort("Health", (short) this.health); nbt.putShort("Age", (short) this.age); nbt.putShort("PickupDelay", (short) this.pickupDelay); -@@ -422,6 +432,17 @@ public class ItemEntity extends Entity implements TraceableEntity { - this.cachedThrower = null; +@@ -436,6 +446,17 @@ public class ItemEntity extends Entity implements TraceableEntity { + this.setItem(ItemStack.EMPTY); } + // Paper start - Friction API @@ -111,9 +106,9 @@ index d0dac3dc89b9bb645a1d8498802fb8c6bff6a78e..29ce703a79f7893ac990ad80e0f1c1cf + } + // Paper end - Friction API + - CompoundTag nbttagcompound1 = nbt.getCompound("Item"); - - this.setItem(ItemStack.of(nbttagcompound1)); + if (this.getItem().isEmpty()) { + this.discard(null); // CraftBukkit - add Bukkit remove cause + } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java index 1a291dd8a287db30e71dcb315599fc4b038764c4..30d62ee4d5cd2ddacb8783b5bbbf475d592b3e02 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java @@ -138,10 +133,10 @@ index 1a291dd8a287db30e71dcb315599fc4b038764c4..30d62ee4d5cd2ddacb8783b5bbbf475d public int getHealth() { return this.getHandle().health; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 711eb84fee6c46341928a765970defa47e1fe0c3..b0c03854ee9936b1dac9cbf89e9977d978712d56 100644 +index 48505c6df9d5fdbd426127e306926fae9824d0a9..51e9b9f7460ec4f8b14d570356026d433351806d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1177,4 +1177,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1162,4 +1162,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { }); } // Paper end - ItemStack damage API diff --git a/patches/unapplied/server/0828-Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/0799-Ability-to-control-player-s-insomnia-and-phantoms.patch similarity index 95% rename from patches/unapplied/server/0828-Ability-to-control-player-s-insomnia-and-phantoms.patch rename to patches/server/0799-Ability-to-control-player-s-insomnia-and-phantoms.patch index a5a831fc6e..5bc45a7af4 100644 --- a/patches/unapplied/server/0828-Ability-to-control-player-s-insomnia-and-phantoms.patch +++ b/patches/server/0799-Ability-to-control-player-s-insomnia-and-phantoms.patch @@ -29,10 +29,10 @@ index e382a29b441b656f35bc24cb90f95cb4def433d2..d8cc5614502db7025349e085381b6b32 private EntitySelector() {} // Paper start - Affects Spawning API 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 76982e0dbab0ecb6f7d4cd8a748af940492a31e7..ed80960777b18faca2d6a99783e53daf5fa19e09 100644 +index f74d41e57570a40cd5ce4da3076f3210b6594a63..1b1b475ca27e799e251d6f8a8c9fe1a4fd8bae83 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -@@ -33,13 +33,22 @@ public class PhantomSpawner implements CustomSpawner { +@@ -32,13 +32,22 @@ public class PhantomSpawner implements CustomSpawner { } else if (!world.getGameRules().getBoolean(GameRules.RULE_DOINSOMNIA)) { return 0; } else { @@ -56,7 +56,7 @@ index 76982e0dbab0ecb6f7d4cd8a748af940492a31e7..ed80960777b18faca2d6a99783e53daf if (world.getSkyDarken() < 5 && world.dimensionType().hasSkyLight()) { return 0; } else { -@@ -60,7 +69,7 @@ public class PhantomSpawner implements CustomSpawner { +@@ -59,7 +68,7 @@ public class PhantomSpawner implements CustomSpawner { int j = Mth.clamp(serverstatisticmanager.getValue(Stats.CUSTOM.get(Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE); boolean flag2 = true; diff --git a/patches/unapplied/server/0829-Fix-premature-player-kicks-on-shutdown.patch b/patches/server/0800-Fix-premature-player-kicks-on-shutdown.patch similarity index 90% rename from patches/unapplied/server/0829-Fix-premature-player-kicks-on-shutdown.patch rename to patches/server/0800-Fix-premature-player-kicks-on-shutdown.patch index 1c1059d40a..4d3deffdfc 100644 --- a/patches/unapplied/server/0829-Fix-premature-player-kicks-on-shutdown.patch +++ b/patches/server/0800-Fix-premature-player-kicks-on-shutdown.patch @@ -35,10 +35,10 @@ index 0000000000000000000000000000000000000000..2c5cd77103c5a33d4349ab6b9ee2d837 + } +} diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 22a7f17180b76b6c3548d3b54ae8218a469401a8..c399625a342ffd61102bb96a97ac24b0669e8e17 100644 +index fd2a5c829899d45641a5b5d30116f4f368953c15..f57679d88cd015caa8996d44b486da694df29521 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -290,6 +290,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -277,6 +277,7 @@ public class Connection extends SimpleChannelInboundHandler> { Connection.genericsFtw(packet, packetlistener); } catch (RunningOnDifferentThreadException cancelledpackethandleexception) { ; @@ -47,10 +47,10 @@ index 22a7f17180b76b6c3548d3b54ae8218a469401a8..c399625a342ffd61102bb96a97ac24b0 this.disconnect(Component.translatable("multiplayer.disconnect.server_shutdown")); } catch (ClassCastException classcastexception) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ad2583c581e78e9cf352567b7dbde193319d4301..a540c744ca88884207c4520794091c01c1c9f50e 100644 +index 9416daa3edef2d9bb780fe3b2aa210d92a300cf1..f12165838f77ae83437f5770faeac1e46b326e98 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2013,7 +2013,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 035af9ccf679a562203a4a2c4f2b38098c57b492..557df259ae54defb43e475e10fc4732854e64f77 100644 +index fb621b161b0a47fac2c44b369ed01c27278bc4f6..3ac31c869d0e53410558ddeb79c21d3f5a3decb6 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -353,7 +353,7 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -366,7 +366,7 @@ public class EntityType implements FeatureElement, EntityTypeT @Nullable public T spawn(ServerLevel world, @Nullable ItemStack stack, @Nullable Player player, BlockPos pos, MobSpawnType spawnReason, boolean alignPosition, boolean invertY) { // CraftBukkit start @@ -21,7 +21,7 @@ index 035af9ccf679a562203a4a2c4f2b38098c57b492..557df259ae54defb43e475e10fc47328 @Nullable diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java -index 58723ea75f7db9bf3889b99139669b14a284a3a1..6bf11d526b82403e9a5443ac77645cf2b4bc1ad8 100644 +index cecfae3bee405fb57df28e83b005e100e72b896b..cde9d03286a3cbb80005b59efe7d57de86fe4eda 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java @@ -64,7 +64,7 @@ public class DragonFireball extends AbstractHurtingProjectile { @@ -34,7 +34,7 @@ index 58723ea75f7db9bf3889b99139669b14a284a3a1..6bf11d526b82403e9a5443ac77645cf2 this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause } diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java -index 1a842694c076d71b14733904c2052183d86d1f5d..eb2f6038133be72c32d31bd1a25bc80f5aa4028f 100644 +index 2c076a5b23c09f634fa6807c207e5e06e1795e8a..f87614eec0aa4e6f967add78c6758f78e7ad9505 100644 --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java @@ -117,7 +117,7 @@ public class FrogspawnBlock extends Block { @@ -47,7 +47,7 @@ index 1a842694c076d71b14733904c2052183d86d1f5d..eb2f6038133be72c32d31bd1a25bc80f } } diff --git a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java -index 1ff0e5c120418c3e5f92326580af7254fb4c699f..9766a919f85abfd52497ecd6d2e2002d3de8051d 100644 +index 38288f20306632e6546c95b4cb1a42806be49975..f53808e200bd83ab80954ec5c1e9c14250302be8 100644 --- a/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SnifferEggBlock.java @@ -87,7 +87,7 @@ public class SnifferEggBlock extends Block { diff --git a/patches/unapplied/server/0834-fix-Instruments.patch b/patches/server/0805-fix-Instruments.patch similarity index 94% rename from patches/unapplied/server/0834-fix-Instruments.patch rename to patches/server/0805-fix-Instruments.patch index 46c17b097e..3786ebde05 100644 --- a/patches/unapplied/server/0834-fix-Instruments.patch +++ b/patches/server/0805-fix-Instruments.patch @@ -6,10 +6,10 @@ Subject: [PATCH] fix Instruments properly handle Player#playNote diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 35213408270522d08e0f8a10989db232ea24c0f7..f80a71100d317c8670b728a7c289ffa40dd2038b 100644 +index 0262e0cd3ad5f4ab3a264aa110b946f81e9e92c1..af6713dc949cce945f3625092a01f04ad41120e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -690,7 +690,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -765,7 +765,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Sound instrumentSound = instrument.getSound(); if (instrumentSound == null) return; diff --git a/patches/unapplied/server/0835-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/0806-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch similarity index 83% rename from patches/unapplied/server/0835-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch rename to patches/server/0806-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch index 8b39f81526..29b7af93eb 100644 --- a/patches/unapplied/server/0835-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch +++ b/patches/server/0806-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Improve inlining for some hot BlockBehavior and FluidState 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 c7b6377aafd32f67eb8ba4dedd7cce5841b2d58d..e57e3a26b0fb856e1ab693df5783fe8b9bee9719 100644 +index 939d116ea940d52b319e08a11f08d1ccc406cb76..f76ce68ed8e08167cf1cbd7bfec67ae01567c38d 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 -@@ -975,15 +975,15 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -906,15 +906,15 @@ public abstract class BlockBehaviour implements FeatureElement { return this.shapeExceedsCube; // Paper - moved into shape cache init } @@ -28,7 +28,7 @@ index c7b6377aafd32f67eb8ba4dedd7cce5841b2d58d..e57e3a26b0fb856e1ab693df5783fe8b return this.isAir; } -@@ -1067,7 +1067,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -998,7 +998,7 @@ public abstract class BlockBehaviour implements FeatureElement { } } @@ -37,7 +37,7 @@ index c7b6377aafd32f67eb8ba4dedd7cce5841b2d58d..e57e3a26b0fb856e1ab693df5783fe8b return this.canOcclude; } -@@ -1275,11 +1275,11 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1214,11 +1214,11 @@ public abstract class BlockBehaviour implements FeatureElement { return this.getBlock().builtInRegistryHolder().is(key); } @@ -52,7 +52,7 @@ index c7b6377aafd32f67eb8ba4dedd7cce5841b2d58d..e57e3a26b0fb856e1ab693df5783fe8b } diff --git a/src/main/java/net/minecraft/world/level/material/FluidState.java b/src/main/java/net/minecraft/world/level/material/FluidState.java -index 3e8619f536a5cc4b8c9c10cf8454e38abdb7b721..f20398eab05797d1b23b71cf74076d6382022657 100644 +index 42370e5e6628ebf8216c01521af859706b08834b..14bb12d2a0066e8b020f2e0e670a7a5c74633623 100644 --- a/src/main/java/net/minecraft/world/level/material/FluidState.java +++ b/src/main/java/net/minecraft/world/level/material/FluidState.java @@ -25,9 +25,11 @@ public final class FluidState extends StateHolder { @@ -61,8 +61,8 @@ index 3e8619f536a5cc4b8c9c10cf8454e38abdb7b721..f20398eab05797d1b23b71cf74076d63 public static final int AMOUNT_FULL = 8; + protected final boolean isEmpty; // Paper - Perf: moved from isEmpty() - public FluidState(Fluid fluid, ImmutableMap, Comparable> propertiesMap, MapCodec codec) { - super(fluid, propertiesMap, codec); + public FluidState(Fluid fluid, Reference2ObjectArrayMap, Comparable> propertyMap, MapCodec codec) { + super(fluid, propertyMap, codec); + this.isEmpty = fluid.isEmpty(); // Paper - Perf: moved from isEmpty() } diff --git a/patches/unapplied/server/0820-fix-MC-252817-green-map-markers-do-not-disappear.patch b/patches/unapplied/server/0820-fix-MC-252817-green-map-markers-do-not-disappear.patch deleted file mode 100644 index 025e7cbcea..0000000000 --- a/patches/unapplied/server/0820-fix-MC-252817-green-map-markers-do-not-disappear.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: braindead -Date: Sat, 5 Nov 2022 17:47:26 -0400 -Subject: [PATCH] fix MC-252817 (green map markers do not disappear). - -this bug is caused by the fact that the itemframe's item is set to empty before the green marker is requested to be removed. this is fixed by getting the mapid from this method's parameter, rather than the air block now stored by the item frame. - -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 bfb9694087821de206fafe867f207e07a4a6a988..e875196824ef9618a52ca3f172f202d5584990df 100644 ---- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java -+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java -@@ -291,7 +291,9 @@ public class ItemFrame extends HangingEntity { - // Paper end - - private void removeFramedMap(ItemStack itemstack) { -- this.getFramedMapId().ifPresent((i) -> { -+ // Paper start - fix MC-252817 (green map markers do not disappear) -+ this.getFramedMapIdFromItem(itemstack).ifPresent((i) -> { -+ // Paper end - fix MC-252817 - MapItemSavedData worldmap = MapItem.getSavedData(i, this.level()); - - if (worldmap != null) { -@@ -309,7 +311,12 @@ public class ItemFrame extends HangingEntity { - - public OptionalInt getFramedMapId() { - ItemStack itemstack = this.getItem(); -+ // Paper start - fix MC-252817 (green map markers do not disappear) -+ return this.getFramedMapIdFromItem(itemstack); -+ } - -+ public OptionalInt getFramedMapIdFromItem(ItemStack itemstack) { -+ // Paper end - fix MC-252817 - if (itemstack.is(Items.FILLED_MAP)) { - Integer integer = MapItem.getMapId(itemstack); - diff --git a/patches/unapplied/server/0815-Track-projectile-source-for-fireworks-from-dispenser.patch b/removed-patches-1-20-5/0815-Track-projectile-source-for-fireworks-from-dispenser.patch similarity index 100% rename from patches/unapplied/server/0815-Track-projectile-source-for-fireworks-from-dispenser.patch rename to removed-patches-1-20-5/0815-Track-projectile-source-for-fireworks-from-dispenser.patch