aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBjarne Koll <[email protected]>2024-06-14 10:17:11 +0200
committerBjarne Koll <[email protected]>2024-06-14 10:17:11 +0200
commit14c03366ed8ee21705a4dc95a61ab5b417626a08 (patch)
treeb5f38b54e464ec304ea770e44d959c487ba16bd5
parent33b36cde3163b2edd1cf378099b8cc6b0f74c2a9 (diff)
downloadPaper-14c03366ed8ee21705a4dc95a61ab5b417626a08.tar.gz
Paper-14c03366ed8ee21705a4dc95a61ab5b417626a08.zip
922
-rw-r--r--patches/server/0818-Prevent-causing-expired-keys-from-impacting-new-join.patch (renamed from patches/unapplied/server/0828-Prevent-causing-expired-keys-from-impacting-new-join.patch)6
-rw-r--r--patches/server/0819-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch (renamed from patches/unapplied/server/0829-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch)4
-rw-r--r--patches/server/0820-Use-array-for-gamerule-storage.patch (renamed from patches/unapplied/server/0830-Use-array-for-gamerule-storage.patch)0
-rw-r--r--patches/server/0821-Fix-a-couple-of-upstream-bed-issues.patch (renamed from patches/unapplied/server/0831-Fix-a-couple-of-upstream-bed-issues.patch)0
-rw-r--r--patches/server/0822-Fix-demo-flag-not-enabling-demo-mode.patch (renamed from patches/unapplied/server/0832-Fix-demo-flag-not-enabling-demo-mode.patch)0
-rw-r--r--patches/server/0823-Add-Mob-Experience-reward-API.patch (renamed from patches/unapplied/server/0833-Add-Mob-Experience-reward-API.patch)0
-rw-r--r--patches/server/0824-Break-redstone-on-top-of-trap-doors-early.patch (renamed from patches/unapplied/server/0834-Break-redstone-on-top-of-trap-doors-early.patch)2
-rw-r--r--patches/server/0825-Avoid-Lazy-Initialization-for-Enum-Fields.patch (renamed from patches/unapplied/server/0835-Avoid-Lazy-Initialization-for-Enum-Fields.patch)0
-rw-r--r--patches/server/0826-More-accurate-isInOpenWater-impl.patch (renamed from patches/unapplied/server/0836-More-accurate-isInOpenWater-impl.patch)0
-rw-r--r--patches/server/0827-Expand-PlayerItemMendEvent.patch (renamed from patches/unapplied/server/0837-Expand-PlayerItemMendEvent.patch)50
-rw-r--r--patches/server/0828-Refresh-ProjectileSource-for-projectiles.patch (renamed from patches/unapplied/server/0838-Refresh-ProjectileSource-for-projectiles.patch)10
-rw-r--r--patches/server/0829-Add-transient-modifier-API.patch (renamed from patches/unapplied/server/0839-Add-transient-modifier-API.patch)4
-rw-r--r--patches/server/0830-Fix-block-place-logic.patch (renamed from patches/unapplied/server/0840-Fix-block-place-logic.patch)23
-rw-r--r--patches/server/0831-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch (renamed from patches/unapplied/server/0841-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch)4
-rw-r--r--patches/server/0832-Call-BlockGrowEvent-for-missing-blocks.patch (renamed from patches/unapplied/server/0842-Call-BlockGrowEvent-for-missing-blocks.patch)0
-rw-r--r--patches/server/0833-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch (renamed from patches/unapplied/server/0843-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch)4
-rw-r--r--patches/server/0834-fix-MapLike-spam-for-missing-key-selector.patch (renamed from patches/unapplied/server/0844-fix-MapLike-spam-for-missing-key-selector.patch)0
-rw-r--r--patches/server/0835-Fix-sniffer-removeExploredLocation.patch (renamed from patches/unapplied/server/0845-Fix-sniffer-removeExploredLocation.patch)0
-rw-r--r--patches/server/0836-Add-method-to-remove-all-active-potion-effects.patch (renamed from patches/unapplied/server/0846-Add-method-to-remove-all-active-potion-effects.patch)4
-rw-r--r--patches/server/0837-Fix-incorrect-crafting-result-amount-for-fireworks.patch (renamed from patches/unapplied/server/0847-Fix-incorrect-crafting-result-amount-for-fireworks.patch)4
-rw-r--r--patches/server/0838-Add-event-for-player-editing-sign.patch (renamed from patches/unapplied/server/0848-Add-event-for-player-editing-sign.patch)10
-rw-r--r--patches/server/0839-Only-tick-item-frames-if-players-can-see-it.patch (renamed from patches/unapplied/server/0849-Only-tick-item-frames-if-players-can-see-it.patch)4
-rw-r--r--patches/server/0840-Fix-cmd-permission-levels-for-command-blocks.patch (renamed from patches/unapplied/server/0850-Fix-cmd-permission-levels-for-command-blocks.patch)4
-rw-r--r--patches/server/0841-Add-option-to-disable-block-updates.patch (renamed from patches/unapplied/server/0851-Add-option-to-disable-block-updates.patch)0
-rw-r--r--patches/server/0842-Call-missing-BlockDispenseEvent.patch (renamed from patches/unapplied/server/0852-Call-missing-BlockDispenseEvent.patch)12
-rw-r--r--patches/server/0843-Don-t-load-chunks-for-supporting-block-checks.patch (renamed from patches/unapplied/server/0853-Don-t-load-chunks-for-supporting-block-checks.patch)4
-rw-r--r--patches/server/0844-Optimize-player-lookups-for-beacons.patch (renamed from patches/unapplied/server/0854-Optimize-player-lookups-for-beacons.patch)2
-rw-r--r--patches/server/0845-Add-Sign-getInteractableSideFor.patch (renamed from patches/unapplied/server/0855-Add-Sign-getInteractableSideFor.patch)0
-rw-r--r--patches/server/0846-fix-item-meta-for-tadpole-buckets.patch (renamed from patches/unapplied/server/0856-fix-item-meta-for-tadpole-buckets.patch)6
-rw-r--r--patches/server/0847-Fix-BanList-API.patch (renamed from patches/unapplied/server/0857-Fix-BanList-API.patch)6
-rw-r--r--patches/server/0848-Determine-lava-and-water-fluid-explosion-resistance-.patch (renamed from patches/unapplied/server/0858-Determine-lava-and-water-fluid-explosion-resistance-.patch)0
-rw-r--r--patches/server/0849-Fix-possible-NPE-on-painting-creation.patch (renamed from patches/unapplied/server/0859-Fix-possible-NPE-on-painting-creation.patch)10
-rw-r--r--patches/server/0850-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch (renamed from patches/unapplied/server/0860-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch)2
-rw-r--r--patches/server/0851-ExperienceOrb-should-call-EntitySpawnEvent.patch (renamed from patches/unapplied/server/0861-ExperienceOrb-should-call-EntitySpawnEvent.patch)4
-rw-r--r--patches/server/0852-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch (renamed from patches/unapplied/server/0862-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch)0
-rw-r--r--patches/server/0853-Add-whitelist-events.patch (renamed from patches/unapplied/server/0863-Add-whitelist-events.patch)0
-rw-r--r--patches/server/0854-Implement-PlayerFailMoveEvent.patch (renamed from patches/unapplied/server/0864-Implement-PlayerFailMoveEvent.patch)12
-rw-r--r--patches/server/0855-Folia-scheduler-and-owned-region-API.patch (renamed from patches/unapplied/server/0865-Folia-scheduler-and-owned-region-API.patch)26
-rw-r--r--patches/server/0856-Only-erase-allay-memory-on-non-item-targets.patch (renamed from patches/unapplied/server/0866-Only-erase-allay-memory-on-non-item-targets.patch)0
-rw-r--r--patches/server/0857-API-for-updating-recipes-on-clients.patch (renamed from patches/unapplied/server/0867-API-for-updating-recipes-on-clients.patch)16
-rw-r--r--patches/server/0858-Fix-rotation-when-spawning-display-entities.patch (renamed from patches/unapplied/server/0868-Fix-rotation-when-spawning-display-entities.patch)10
-rw-r--r--patches/server/0859-Only-capture-actual-tree-growth.patch (renamed from patches/unapplied/server/0869-Only-capture-actual-tree-growth.patch)12
-rw-r--r--patches/server/0860-Use-correct-source-for-mushroom-block-spread-event.patch (renamed from patches/unapplied/server/0870-Use-correct-source-for-mushroom-block-spread-event.patch)0
-rw-r--r--patches/server/0861-Respect-randomizeData-on-more-entities-when-spawning.patch (renamed from patches/unapplied/server/0871-Respect-randomizeData-on-more-entities-when-spawning.patch)10
-rw-r--r--patches/server/0862-Use-correct-seed-on-api-world-load.patch (renamed from patches/unapplied/server/0872-Use-correct-seed-on-api-world-load.patch)4
-rw-r--r--patches/server/0863-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch (renamed from patches/unapplied/server/0873-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch)0
-rw-r--r--patches/server/0864-Cache-map-ids-on-item-frames.patch (renamed from patches/unapplied/server/0874-Cache-map-ids-on-item-frames.patch)12
-rw-r--r--patches/server/0865-Fix-custom-statistic-criteria-creation.patch (renamed from patches/unapplied/server/0875-Fix-custom-statistic-criteria-creation.patch)2
-rw-r--r--patches/server/0866-Bandaid-fix-for-Effect.patch (renamed from patches/unapplied/server/0876-Bandaid-fix-for-Effect.patch)6
-rw-r--r--patches/server/0867-SculkCatalyst-bloom-API.patch (renamed from patches/unapplied/server/0877-SculkCatalyst-bloom-API.patch)0
-rw-r--r--patches/server/0868-API-for-an-entity-s-scoreboard-name.patch (renamed from patches/unapplied/server/0878-API-for-an-entity-s-scoreboard-name.patch)4
-rw-r--r--patches/server/0869-Deprecate-and-replace-methods-with-old-StructureType.patch (renamed from patches/unapplied/server/0879-Deprecate-and-replace-methods-with-old-StructureType.patch)6
-rw-r--r--patches/server/0870-Don-t-tab-complete-namespaced-commands-if-send-names.patch (renamed from patches/unapplied/server/0880-Don-t-tab-complete-namespaced-commands-if-send-names.patch)4
-rw-r--r--patches/server/0871-Properly-handle-BlockBreakEvent-isDropItems.patch (renamed from patches/unapplied/server/0881-Properly-handle-BlockBreakEvent-isDropItems.patch)14
-rw-r--r--patches/server/0872-Fire-entity-death-event-for-ender-dragon.patch (renamed from patches/unapplied/server/0882-Fire-entity-death-event-for-ender-dragon.patch)4
-rw-r--r--patches/server/0873-Configurable-entity-tracking-range-by-Y-coordinate.patch (renamed from patches/unapplied/server/0883-Configurable-entity-tracking-range-by-Y-coordinate.patch)4
-rw-r--r--patches/server/0874-Add-Listing-API-for-Player.patch (renamed from patches/unapplied/server/0884-Add-Listing-API-for-Player.patch)10
-rw-r--r--patches/server/0875-Configurable-Region-Compression-Format.patch (renamed from patches/unapplied/server/0885-Configurable-Region-Compression-Format.patch)0
-rw-r--r--patches/server/0876-Add-BlockFace-to-BlockDamageEvent.patch (renamed from patches/unapplied/server/0886-Add-BlockFace-to-BlockDamageEvent.patch)8
-rw-r--r--patches/server/0877-Fix-NPE-on-Boat-getStatus.patch (renamed from patches/unapplied/server/0887-Fix-NPE-on-Boat-getStatus.patch)0
-rw-r--r--patches/server/0878-Expand-Pose-API.patch (renamed from patches/unapplied/server/0888-Expand-Pose-API.patch)10
-rw-r--r--patches/server/0879-More-DragonBattle-API.patch (renamed from patches/unapplied/server/0889-More-DragonBattle-API.patch)0
-rw-r--r--patches/server/0880-Add-PlayerPickItemEvent.patch (renamed from patches/unapplied/server/0890-Add-PlayerPickItemEvent.patch)6
-rw-r--r--patches/server/0881-Allow-trident-custom-damage.patch (renamed from patches/unapplied/server/0891-Allow-trident-custom-damage.patch)16
-rw-r--r--patches/server/0882-Expose-hand-in-BlockCanBuildEvent.patch (renamed from patches/unapplied/server/0892-Expose-hand-in-BlockCanBuildEvent.patch)0
-rw-r--r--patches/server/0883-Optimize-nearest-structure-border-iteration.patch (renamed from patches/unapplied/server/0893-Optimize-nearest-structure-border-iteration.patch)4
-rw-r--r--patches/server/0884-Implement-OfflinePlayer-isConnected.patch (renamed from patches/unapplied/server/0894-Implement-OfflinePlayer-isConnected.patch)4
-rw-r--r--patches/server/0885-Fix-inventory-desync.patch (renamed from patches/unapplied/server/0895-Fix-inventory-desync.patch)19
-rw-r--r--patches/server/0886-Add-titleOverride-to-InventoryOpenEvent.patch (renamed from patches/unapplied/server/0896-Add-titleOverride-to-InventoryOpenEvent.patch)14
-rw-r--r--patches/server/0887-Configure-sniffer-egg-hatch-time.patch (renamed from patches/unapplied/server/0897-Configure-sniffer-egg-hatch-time.patch)0
-rw-r--r--patches/server/0888-Do-crystal-portal-proximity-check-before-entity-look.patch (renamed from patches/unapplied/server/0898-Do-crystal-portal-proximity-check-before-entity-look.patch)0
-rw-r--r--patches/server/0889-Skip-POI-finding-if-stuck-in-vehicle.patch (renamed from patches/unapplied/server/0899-Skip-POI-finding-if-stuck-in-vehicle.patch)0
-rw-r--r--patches/server/0890-Add-slot-sanity-checks-in-container-clicks.patch (renamed from patches/unapplied/server/0900-Add-slot-sanity-checks-in-container-clicks.patch)17
-rw-r--r--patches/server/0891-Call-BlockRedstoneEvents-for-lecterns.patch (renamed from patches/unapplied/server/0901-Call-BlockRedstoneEvents-for-lecterns.patch)4
-rw-r--r--patches/server/0892-Allow-proper-checking-of-empty-item-stacks.patch (renamed from patches/unapplied/server/0902-Allow-proper-checking-of-empty-item-stacks.patch)2
-rw-r--r--patches/server/0893-Fix-silent-equipment-change-for-mobs.patch (renamed from patches/unapplied/server/0903-Fix-silent-equipment-change-for-mobs.patch)12
-rw-r--r--patches/server/0894-Fix-spigot-s-Forced-Stats.patch (renamed from patches/unapplied/server/0904-Fix-spigot-s-Forced-Stats.patch)2
-rw-r--r--patches/server/0895-Add-missing-InventoryHolders-to-inventories.patch (renamed from patches/unapplied/server/0905-Add-missing-InventoryHolders-to-inventories.patch)16
-rw-r--r--patches/server/0896-Do-not-read-tile-entities-in-chunks-that-are-positio.patch (renamed from patches/unapplied/server/0906-Do-not-read-tile-entities-in-chunks-that-are-positio.patch)6
-rw-r--r--patches/server/0897-Add-missing-logs-for-log-ips-config-option.patch (renamed from patches/unapplied/server/0907-Add-missing-logs-for-log-ips-config-option.patch)0
-rw-r--r--patches/server/0898-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch (renamed from patches/unapplied/server/0908-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch)0
-rw-r--r--patches/server/0899-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch (renamed from patches/unapplied/server/0909-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch)0
-rw-r--r--patches/server/0900-Fix-team-sidebar-objectives-not-being-cleared.patch (renamed from patches/unapplied/server/0910-Fix-team-sidebar-objectives-not-being-cleared.patch)0
-rw-r--r--patches/server/0901-Fix-missing-map-initialize-event-call.patch (renamed from patches/unapplied/server/0911-Fix-missing-map-initialize-event-call.patch)4
-rw-r--r--patches/server/0902-Update-entity-data-when-attaching-firework-to-entity.patch (renamed from patches/unapplied/server/0912-Update-entity-data-when-attaching-firework-to-entity.patch)0
-rw-r--r--patches/server/0903-Fix-UnsafeValues-loadAdvancement.patch (renamed from patches/unapplied/server/0913-Fix-UnsafeValues-loadAdvancement.patch)2
-rw-r--r--patches/server/0904-Add-player-idle-duration-API.patch (renamed from patches/unapplied/server/0914-Add-player-idle-duration-API.patch)4
-rw-r--r--patches/server/0905-Don-t-check-if-we-can-see-non-visible-entities.patch (renamed from patches/unapplied/server/0915-Don-t-check-if-we-can-see-non-visible-entities.patch)4
-rw-r--r--patches/server/0906-Fix-NPE-in-SculkBloomEvent-world-access.patch (renamed from patches/unapplied/server/0916-Fix-NPE-in-SculkBloomEvent-world-access.patch)6
-rw-r--r--patches/server/0907-Allow-null-itemstack-for-Player-sendEquipmentChange.patch (renamed from patches/unapplied/server/0917-Allow-null-itemstack-for-Player-sendEquipmentChange.patch)4
-rw-r--r--patches/server/0908-Optimize-VarInts.patch (renamed from patches/unapplied/server/0918-Optimize-VarInts.patch)0
-rw-r--r--patches/server/0909-Add-API-to-get-the-collision-shape-of-a-block-before.patch (renamed from patches/unapplied/server/0919-Add-API-to-get-the-collision-shape-of-a-block-before.patch)0
-rw-r--r--patches/server/0910-Add-predicate-for-blocks-when-raytracing.patch (renamed from patches/unapplied/server/0920-Add-predicate-for-blocks-when-raytracing.patch)2
-rw-r--r--patches/server/0911-Broadcast-take-item-packets-with-collector-as-source.patch (renamed from patches/unapplied/server/0921-Broadcast-take-item-packets-with-collector-as-source.patch)4
-rw-r--r--patches/server/0912-Expand-LingeringPotion-API.patch (renamed from patches/unapplied/server/0922-Expand-LingeringPotion-API.patch)4
-rw-r--r--patches/server/0913-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch (renamed from patches/unapplied/server/0923-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch)2
-rw-r--r--patches/server/0914-Add-hand-to-fish-event-for-all-player-interactions.patch (renamed from patches/unapplied/server/0924-Add-hand-to-fish-event-for-all-player-interactions.patch)20
-rw-r--r--patches/server/0915-Fix-several-issues-with-EntityBreedEvent.patch (renamed from patches/unapplied/server/0925-Fix-several-issues-with-EntityBreedEvent.patch)24
-rw-r--r--patches/server/0916-Add-UUID-attribute-modifier-API.patch (renamed from patches/unapplied/server/0926-Add-UUID-attribute-modifier-API.patch)4
-rw-r--r--patches/server/0917-Fix-missing-event-call-for-entity-teleport-API.patch (renamed from patches/unapplied/server/0927-Fix-missing-event-call-for-entity-teleport-API.patch)4
-rw-r--r--patches/server/0918-Lazily-create-LootContext-for-criterions.patch (renamed from patches/unapplied/server/0928-Lazily-create-LootContext-for-criterions.patch)0
-rw-r--r--patches/server/0919-Don-t-fire-sync-events-during-worldgen.patch (renamed from patches/unapplied/server/0929-Don-t-fire-sync-events-during-worldgen.patch)20
-rw-r--r--patches/server/0920-Add-Structure-check-API.patch (renamed from patches/unapplied/server/0930-Add-Structure-check-API.patch)2
-rw-r--r--patches/server/0921-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch (renamed from patches/unapplied/server/0931-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch)8
-rw-r--r--patches/server/0922-Restore-vanilla-entity-drops-behavior.patch (renamed from patches/unapplied/server/0932-Restore-vanilla-entity-drops-behavior.patch)56
-rw-r--r--patches/unapplied/server/0827-remove-duplicate-animate-packet-for-records.patch19
106 files changed, 302 insertions, 366 deletions
diff --git a/patches/unapplied/server/0828-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0818-Prevent-causing-expired-keys-from-impacting-new-join.patch
index d71981b357..0bedbfee25 100644
--- a/patches/unapplied/server/0828-Prevent-causing-expired-keys-from-impacting-new-join.patch
+++ b/patches/server/0818-Prevent-causing-expired-keys-from-impacting-new-join.patch
@@ -26,7 +26,7 @@ index 68c062cbaa030d62d97c9c003651f8fc17a00a6b..6247a21c9c391abf1f6db3482c659593
UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())),
UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())),
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 665ef268a0936a52b979c6cca680e237ae7aa74c..a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0 100644
+index 67b756ec3cc955d3d9c23defc63bd0df29af3d10..e56d73fffaa0da4813aaa0fa08554cfbb0f72279 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -38,7 +38,7 @@ index 665ef268a0936a52b979c6cca680e237ae7aa74c..a2ce3d3423a8cb3b851c2d811678ccb9
private final LastSeenMessagesValidator lastSeenMessages = new LastSeenMessagesValidator(20);
private final MessageSignatureCache messageSignatureCache = MessageSignatureCache.createDefault();
@@ -402,6 +403,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- this.disconnect(Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
+ this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"), org.bukkit.event.player.PlayerKickEvent.Cause.IDLING); // Paper - kick event cause
}
+ // Paper start - Prevent causing expired keys from impacting new joins
@@ -51,7 +51,7 @@ index 665ef268a0936a52b979c6cca680e237ae7aa74c..a2ce3d3423a8cb3b851c2d811678ccb9
}
private int getMaximumFlyingTicks(Entity vehicle) {
-@@ -3419,6 +3427,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3436,6 +3444,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void resetPlayerChatState(RemoteChatSession session) {
this.chatSession = session;
diff --git a/patches/unapplied/server/0829-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0819-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch
index e2e9fd9b35..9f9f6c26b3 100644
--- a/patches/unapplied/server/0829-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch
+++ b/patches/server/0819-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 1e122d5b49aa7f6a626e781e53de53be18afc346..055fcf3d51852ca466c7189f36382e0b0d0d86d2 100644
+index b9d3a98824fc146128f35244f5f15bba97948674..6e9a3b6a1595a1731ca8187d2610c840337a12ed 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1374,6 +1374,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1372,6 +1372,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@Override
public void gameEvent(Holder<GameEvent> event, Vec3 emitterPos, GameEvent.Context emitter) {
diff --git a/patches/unapplied/server/0830-Use-array-for-gamerule-storage.patch b/patches/server/0820-Use-array-for-gamerule-storage.patch
index 194ff8f15b..194ff8f15b 100644
--- a/patches/unapplied/server/0830-Use-array-for-gamerule-storage.patch
+++ b/patches/server/0820-Use-array-for-gamerule-storage.patch
diff --git a/patches/unapplied/server/0831-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0821-Fix-a-couple-of-upstream-bed-issues.patch
index 665db524c5..665db524c5 100644
--- a/patches/unapplied/server/0831-Fix-a-couple-of-upstream-bed-issues.patch
+++ b/patches/server/0821-Fix-a-couple-of-upstream-bed-issues.patch
diff --git a/patches/unapplied/server/0832-Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/0822-Fix-demo-flag-not-enabling-demo-mode.patch
index d64dd23e37..d64dd23e37 100644
--- a/patches/unapplied/server/0832-Fix-demo-flag-not-enabling-demo-mode.patch
+++ b/patches/server/0822-Fix-demo-flag-not-enabling-demo-mode.patch
diff --git a/patches/unapplied/server/0833-Add-Mob-Experience-reward-API.patch b/patches/server/0823-Add-Mob-Experience-reward-API.patch
index 487fe9e567..487fe9e567 100644
--- a/patches/unapplied/server/0833-Add-Mob-Experience-reward-API.patch
+++ b/patches/server/0823-Add-Mob-Experience-reward-API.patch
diff --git a/patches/unapplied/server/0834-Break-redstone-on-top-of-trap-doors-early.patch b/patches/server/0824-Break-redstone-on-top-of-trap-doors-early.patch
index 2f89b7d780..11c427e808 100644
--- a/patches/unapplied/server/0834-Break-redstone-on-top-of-trap-doors-early.patch
+++ b/patches/server/0824-Break-redstone-on-top-of-trap-doors-early.patch
@@ -7,7 +7,7 @@ This logic hooks into the neighbour update which should be invoked
as a result of redstone powering the trap door.
diff --git a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
-index 26096c28f654118b0d541f33c659fbc43b34509b..2b5fdcb12dcd8730df24113b9a6d295f000dd9f6 100644
+index 82e38b01446d35aa9745be6ff3c7647b46379682..336fcf4af0ffb416b5595a9e65172f36cc36aaa3 100644
--- a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java
@@ -153,7 +153,26 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW
diff --git a/patches/unapplied/server/0835-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0825-Avoid-Lazy-Initialization-for-Enum-Fields.patch
index becde16ce8..becde16ce8 100644
--- a/patches/unapplied/server/0835-Avoid-Lazy-Initialization-for-Enum-Fields.patch
+++ b/patches/server/0825-Avoid-Lazy-Initialization-for-Enum-Fields.patch
diff --git a/patches/unapplied/server/0836-More-accurate-isInOpenWater-impl.patch b/patches/server/0826-More-accurate-isInOpenWater-impl.patch
index 6e110094dd..6e110094dd 100644
--- a/patches/unapplied/server/0836-More-accurate-isInOpenWater-impl.patch
+++ b/patches/server/0826-More-accurate-isInOpenWater-impl.patch
diff --git a/patches/unapplied/server/0837-Expand-PlayerItemMendEvent.patch b/patches/server/0827-Expand-PlayerItemMendEvent.patch
index 6d3b0124bb..1e05090989 100644
--- a/patches/unapplied/server/0837-Expand-PlayerItemMendEvent.patch
+++ b/patches/server/0827-Expand-PlayerItemMendEvent.patch
@@ -5,43 +5,45 @@ Subject: [PATCH] Expand PlayerItemMendEvent
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index a933061d4f0c45a34b5678c2b317b670f20b8a45..46d8bcad1545953757659870901cbbdf3340bc15 100644
+index a758b2456acac23095fe4619ae10300a034cb460..8eacfbc45f68fb01926c3e6363641dfbfd3eb16f 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -350,7 +350,7 @@ public class ExperienceOrb extends Entity {
- ItemStack itemstack = (ItemStack) entry.getValue();
- int j = Math.min(this.xpToDurability(amount), itemstack.getDamageValue());
+@@ -351,19 +351,19 @@ public class ExperienceOrb extends Entity {
+
+ if (optional.isPresent()) {
+ ItemStack itemstack = ((EnchantedItemInUse) optional.get()).itemStack();
+- int j = EnchantmentHelper.modifyDurabilityToRepairFromXp(player.serverLevel(), itemstack, amount);
+- int k = Math.min(j, itemstack.getDamageValue());
++ int j = EnchantmentHelper.modifyDurabilityToRepairFromXp(player.serverLevel(), itemstack, amount);; int xpTranslatedToDurability = j; // Paper - mending event - obfhelper
++ int k = Math.min(j, itemstack.getDamageValue()); int durabilityToAddBack = k; // Paper - mending event - obfhelper
// CraftBukkit start
-- org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, entry.getKey(), j);
-+ org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, entry.getKey(), j, this::durabilityToXp); // Paper - Expand PlayerItemMendEvent
- j = event.getRepairAmount();
+- org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), k);
+- k = event.getRepairAmount();
++ org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), durabilityToAddBack, d -> d * amount / xpTranslatedToDurability); // Paper - Expand PlayerItemMendEvent
++ durabilityToAddBack = event.getRepairAmount(); // Paper - mending event - obfhelper
if (event.isCancelled()) {
return amount;
-@@ -358,8 +358,13 @@ public class ExperienceOrb extends Entity {
+ }
// CraftBukkit end
- itemstack.setDamageValue(itemstack.getDamageValue() - j);
-- int k = amount - this.durabilityToXp(j);
-+ int k = amount - event.getDurabilityToXpOperation().applyAsInt(j); // Paper - Expand PlayerItemMendEvent
- // this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account
-+ // Paper start - Expand PlayerItemMendEvent
-+ if (j == 0 && amount == k) { // if repair amount is 0 and no xp was removed, don't do recursion; treat as cancelled
-+ return k;
-+ }
-+ // Paper end - Expand PlayerItemMendEvent
+- itemstack.setDamageValue(itemstack.getDamageValue() - k);
++ itemstack.setDamageValue(itemstack.getDamageValue() - durabilityToAddBack); // Paper - mending event - obfhelper
+ if (k > 0) {
+- int l = amount - k * amount / j;
++ int l = amount - event.getDurabilityToXpOperation().applyAsInt(durabilityToAddBack); // Paper - mending event - obfhelper
- return k > 0 ? this.repairPlayerItems(player, k) : 0;
- } else {
+ if (l > 0) {
+ // this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 952728c30f8871f8ed1f27800feba7db038ad420..1b9e1038f729582117dc93736f9a089bf6481cff 100644
+index 512137a80e6cdcf52c1bde11c86a28663d5b3609..5163c979f086dac9111419d7bb3b624b0faa3a5b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -1835,11 +1835,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1848,11 +1848,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ());
int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());
- org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.getKey(), i);
-+ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.getKey(), i, orb::durabilityToXp); // Paper - Expand PlayerItemMendEvent
++ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.get().inSlot(), i, orb::durabilityToXp); // Paper - Expand PlayerItemMendEvent
i = event.getRepairAmount();
orb.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN);
if (!event.isCancelled()) {
@@ -51,10 +53,10 @@ index 952728c30f8871f8ed1f27800feba7db038ad420..1b9e1038f729582117dc93736f9a089b
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index cbf2cd3c7005fb4148c15966079922a8b18ece91..f4ca35e044e41b3fd1b83c482a5c19d188ea0bae 100644
+index 7fa64d9081ce54d91eb7631c7d8623ed11d9954b..c59bb1811dba49571bbb82b17a75ab2363531996 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1264,10 +1264,10 @@ public class CraftEventFactory {
+@@ -1265,10 +1265,10 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/unapplied/server/0838-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0828-Refresh-ProjectileSource-for-projectiles.patch
index 1f88e9728f..4762f3cc7b 100644
--- a/patches/unapplied/server/0838-Refresh-ProjectileSource-for-projectiles.patch
+++ b/patches/server/0828-Refresh-ProjectileSource-for-projectiles.patch
@@ -14,10 +14,10 @@ clearing the owner.
Co-authored-by: Warrior <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index c15a08c6d9277dd1d6d63a25dacce0c43b8dad05..73831000101765845c0881bba217b2ca54eb39dd 100644
+index c6d356fc0b94255299299eade9fb4b77bae8cc03..ce648d328ceb7d98fc523398c52915f7e7b5e23e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -385,6 +385,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -391,6 +391,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public boolean inWorld = false;
public boolean generation;
public int maxAirTicks = this.getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
@@ -26,10 +26,10 @@ index c15a08c6d9277dd1d6d63a25dacce0c43b8dad05..73831000101765845c0881bba217b2ca
public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
public boolean persistentInvisibility = false;
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 4c6fbf19d6bb01e67c6141aea757fae434ee8233..74c596264d4da551437bd2a23e1c70022cfc73fc 100644
+index d147f3cc1af28c384005c1c20e37bb588588c88d..5f7d152f41eb85f17bcded4bc8099b998e5a338b 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
-@@ -51,14 +51,31 @@ public abstract class Projectile extends Entity implements TraceableEntity {
+@@ -57,14 +57,31 @@ public abstract class Projectile extends Entity implements TraceableEntity {
this.ownerUUID = entity.getUUID();
this.cachedOwner = entity;
}
@@ -63,7 +63,7 @@ index 4c6fbf19d6bb01e67c6141aea757fae434ee8233..74c596264d4da551437bd2a23e1c7002
return this.cachedOwner;
} else {
if (this.ownerUUID != null) {
-@@ -68,6 +85,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
+@@ -74,6 +91,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
ServerLevel worldserver = (ServerLevel) world;
this.cachedOwner = worldserver.getEntity(this.ownerUUID);
diff --git a/patches/unapplied/server/0839-Add-transient-modifier-API.patch b/patches/server/0829-Add-transient-modifier-API.patch
index d0da33ee19..36cc0a030a 100644
--- a/patches/unapplied/server/0839-Add-transient-modifier-API.patch
+++ b/patches/server/0829-Add-transient-modifier-API.patch
@@ -21,10 +21,10 @@ index 12135ffeacd648f6bc4d7d327059ea1a7e8c79c4..52439f4b959c74027eb191a3af960c70
public void removeModifier(AttributeModifier modifier) {
throw new UnsupportedOperationException("Cannot modify default attributes");
diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
-index 0a18983151d17b8e1460b82326b0380087e13795..7d16545665f74ce619f7b18e568226642c84ceee 100644
+index 3b171a08bd0bedfe224905feb5838d2540199bce..cd6a492f56b3dee5985c068e20009b6c833e143b 100644
--- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
+++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
-@@ -50,6 +50,14 @@ public class CraftAttributeInstance implements AttributeInstance {
+@@ -51,6 +51,14 @@ public class CraftAttributeInstance implements AttributeInstance {
this.handle.addPermanentModifier(CraftAttributeInstance.convert(modifier));
}
diff --git a/patches/unapplied/server/0840-Fix-block-place-logic.patch b/patches/server/0830-Fix-block-place-logic.patch
index 2b6ced0aad..de31264ab7 100644
--- a/patches/unapplied/server/0840-Fix-block-place-logic.patch
+++ b/patches/server/0830-Fix-block-place-logic.patch
@@ -21,30 +21,11 @@ index 7d76cdc59984b156628273c8357485eb10046007..7180996027f70aef7afe32fb2adfce64
world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.Context.of(entityhuman, iblockdata1));
itemstack.consume(1, entityhuman);
return InteractionResult.sidedSuccess(world.isClientSide);
-diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index a158642471ab037ea3b99cac09ba5f3bf282e2a7..7450c53f3d43e401e5219d5ff01868a28ee2c05f 100644
---- a/src/main/java/net/minecraft/world/item/ItemStack.java
-+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
-@@ -515,13 +515,7 @@ public final class ItemStack implements DataComponentHolder {
- if (tileentity instanceof JukeboxBlockEntity) {
- JukeboxBlockEntity tileentityjukebox = (JukeboxBlockEntity) tileentity;
-
-- // There can only be one
-- ItemStack record = this.copy();
-- if (!record.isEmpty()) {
-- record.setCount(1);
-- }
--
-- tileentityjukebox.setTheItem(record);
-+ tileentityjukebox.setTheItem(this.copy()); // Paper - Fix block place logic; sync this with record item, jukebox has now an inventory
- world.gameEvent(GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entityhuman, world.getBlockState(blockposition)));
- }
-
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 0fb975d74b8e91617de91dacb206699ff572a38a..61fc08cac437bd5dd6f3ff7561fab3d4c108388d 100644
+index b97427789d6162e16b9c3a56b89b2dd08a04297f..b8d8041aecc2ff008247449cba8d9f192cf51073 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -553,17 +553,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -554,17 +554,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
CraftWorld world = ((ServerLevel) this).getWorld();
diff --git a/patches/unapplied/server/0841-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0831-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
index 5c09743836..ba85bd867f 100644
--- a/patches/unapplied/server/0841-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
+++ b/patches/server/0831-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 7450c53f3d43e401e5219d5ff01868a28ee2c05f..2038c6b5758d50216058d9e04398c42f658aba4a 100644
+index 96a7e80e3efab1bf626fb7aff61e095ca09789d4..f0b166a7fbeb222b97b5f2770c20d98df5d9bcc8 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
-@@ -566,7 +566,11 @@ public final class ItemStack implements DataComponentHolder {
+@@ -571,7 +571,11 @@ public final class ItemStack implements DataComponentHolder {
// SPIGOT-1288 - play sound stripped from ItemBlock
if (this.item instanceof BlockItem) {
diff --git a/patches/unapplied/server/0842-Call-BlockGrowEvent-for-missing-blocks.patch b/patches/server/0832-Call-BlockGrowEvent-for-missing-blocks.patch
index 895a528de8..895a528de8 100644
--- a/patches/unapplied/server/0842-Call-BlockGrowEvent-for-missing-blocks.patch
+++ b/patches/server/0832-Call-BlockGrowEvent-for-missing-blocks.patch
diff --git a/patches/unapplied/server/0843-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0833-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch
index 9f3a1d78d1..7d7b13d23b 100644
--- a/patches/unapplied/server/0843-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch
+++ b/patches/server/0833-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index e135d634f4336a23e90fd94b4e4c261bfc0cffe9..c2dc4a7194c83cb01724fc04ea4971b34b2f8235 100644
+index 0aebc39477e4302c2660786011633164b6e7cc9d..571b569b6ce8c29c038a1af6429eced5c0b64ff7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -352,7 +352,11 @@ public final class CraftServer implements Server {
+@@ -355,7 +355,11 @@ public final class CraftServer implements Server {
}
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
this.commandsConfiguration.options().copyDefaults(true);
diff --git a/patches/unapplied/server/0844-fix-MapLike-spam-for-missing-key-selector.patch b/patches/server/0834-fix-MapLike-spam-for-missing-key-selector.patch
index 2bd3b889f1..2bd3b889f1 100644
--- a/patches/unapplied/server/0844-fix-MapLike-spam-for-missing-key-selector.patch
+++ b/patches/server/0834-fix-MapLike-spam-for-missing-key-selector.patch
diff --git a/patches/unapplied/server/0845-Fix-sniffer-removeExploredLocation.patch b/patches/server/0835-Fix-sniffer-removeExploredLocation.patch
index e8b1703090..e8b1703090 100644
--- a/patches/unapplied/server/0845-Fix-sniffer-removeExploredLocation.patch
+++ b/patches/server/0835-Fix-sniffer-removeExploredLocation.patch
diff --git a/patches/unapplied/server/0846-Add-method-to-remove-all-active-potion-effects.patch b/patches/server/0836-Add-method-to-remove-all-active-potion-effects.patch
index cb276dcd2a..674f07239a 100644
--- a/patches/unapplied/server/0846-Add-method-to-remove-all-active-potion-effects.patch
+++ b/patches/server/0836-Add-method-to-remove-all-active-potion-effects.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 37b62a45bbe2db725f24330f1f03e8cf09ab208c..0196a49a5822e257b0e065e2383ec92b1bc27bba 100644
+index 28fe6c8a4a73caa39c8a265814d050b74e8b9715..0adeb3d7d2e322137f343f380a8efbcceaf55730 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -562,6 +562,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -563,6 +563,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return effects;
}
diff --git a/patches/unapplied/server/0847-Fix-incorrect-crafting-result-amount-for-fireworks.patch b/patches/server/0837-Fix-incorrect-crafting-result-amount-for-fireworks.patch
index 702619dd05..ed5525cfda 100644
--- a/patches/unapplied/server/0847-Fix-incorrect-crafting-result-amount-for-fireworks.patch
+++ b/patches/server/0837-Fix-incorrect-crafting-result-amount-for-fireworks.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix incorrect crafting result amount for fireworks
Although vanilla does not specifically call this method anywhere, this fixes a bug where the result using the Bukkit API returns the wrong amount.
diff --git a/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java b/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
-index da924bb34354b1a8b3db3ad63b5705253d942514..56c8900c8771919d5e0e62b4d165ae6f00042872 100644
+index e2a3a4fc2fff21b926a74ed11389333165180fe7..93c2268ea1be1727c2939d5730427e24d4e03e2f 100644
--- a/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
+++ b/src/main/java/net/minecraft/world/item/crafting/FireworkRocketRecipe.java
-@@ -78,7 +78,7 @@ public class FireworkRocketRecipe extends CustomRecipe {
+@@ -77,7 +77,7 @@ public class FireworkRocketRecipe extends CustomRecipe {
@Override
public ItemStack getResultItem(HolderLookup.Provider registriesLookup) {
diff --git a/patches/unapplied/server/0848-Add-event-for-player-editing-sign.patch b/patches/server/0838-Add-event-for-player-editing-sign.patch
index 277ce6259c..a7fbf6addc 100644
--- a/patches/unapplied/server/0848-Add-event-for-player-editing-sign.patch
+++ b/patches/server/0838-Add-event-for-player-editing-sign.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add event for player editing sign
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 2038c6b5758d50216058d9e04398c42f658aba4a..c27ef32a3fc3edf5a4dd91d7cba93a78a5e762fa 100644
+index f0b166a7fbeb222b97b5f2770c20d98df5d9bcc8..92be749721f26e9385e592a985db58cf05c67801 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
-@@ -545,7 +545,7 @@ public final class ItemStack implements DataComponentHolder {
+@@ -550,7 +550,7 @@ public final class ItemStack implements DataComponentHolder {
try {
if (world.getBlockEntity(SignItem.openSign) instanceof SignBlockEntity tileentitysign) {
if (world.getBlockState(SignItem.openSign).getBlock() instanceof SignBlock blocksign) {
@@ -18,10 +18,10 @@ index 2038c6b5758d50216058d9e04398c42f658aba4a..c27ef32a3fc3edf5a4dd91d7cba93a78
}
} finally {
diff --git a/src/main/java/net/minecraft/world/level/block/SignBlock.java b/src/main/java/net/minecraft/world/level/block/SignBlock.java
-index e602c58bc14036d78a00ad548a821650b92e29df..f7bae8060d993176799ff3ff4653d760a137faba 100644
+index e00bfb839a2512f018d874976d6f9607877fc2af..73874cd18a5b335e895ea0b2fefbd521209afe08 100644
--- a/src/main/java/net/minecraft/world/level/block/SignBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SignBlock.java
-@@ -142,7 +142,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
+@@ -139,7 +139,7 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
} else if (flag1) {
return InteractionResult.SUCCESS;
} else if (!this.otherPlayerIsEditingSign(player, tileentitysign) && player.mayBuild() && this.hasEditableText(player, tileentitysign, flag)) {
@@ -30,7 +30,7 @@ index e602c58bc14036d78a00ad548a821650b92e29df..f7bae8060d993176799ff3ff4653d760
return InteractionResult.SUCCESS;
} else {
return InteractionResult.PASS;
-@@ -187,16 +187,33 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
+@@ -184,16 +184,33 @@ public abstract class SignBlock extends BaseEntityBlock implements SimpleWaterlo
return blockpropertywood;
}
diff --git a/patches/unapplied/server/0849-Only-tick-item-frames-if-players-can-see-it.patch b/patches/server/0839-Only-tick-item-frames-if-players-can-see-it.patch
index dbf1486052..bf73ba4a5c 100644
--- a/patches/unapplied/server/0849-Only-tick-item-frames-if-players-can-see-it.patch
+++ b/patches/server/0839-Only-tick-item-frames-if-players-can-see-it.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Only tick item frames if players can see it
In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up.
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
-index f355dd986bf861da3edb90d7e05f901e19686fef..979571cc12f81e09df8570f7deb32f4c604188bd 100644
+index f3f93710846ce0f6d53845e0b49331646a4e8332..f010be9605d7458add7e5693ff473fabf679c938 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
-@@ -113,7 +113,7 @@ public class ServerEntity {
+@@ -112,7 +112,7 @@ public class ServerEntity {
Entity entity = this.entity;
diff --git a/patches/unapplied/server/0850-Fix-cmd-permission-levels-for-command-blocks.patch b/patches/server/0840-Fix-cmd-permission-levels-for-command-blocks.patch
index 1f86b6a789..0c24048293 100644
--- a/patches/unapplied/server/0850-Fix-cmd-permission-levels-for-command-blocks.patch
+++ b/patches/server/0840-Fix-cmd-permission-levels-for-command-blocks.patch
@@ -41,10 +41,10 @@ index f3c83bb20a73b489f1fb6bacb69388902b1b6fe7..3c0d2332207ba638faaaa4280bce18c3
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
-index 3d6e19c2078a87983a849e6d627cba0609a556cc..e1aa1e1f23512fc7d2267ff8e75358b67cb419a3 100644
+index ec8ea29a71e74255660e3c084c3a708cf241d0c9..df794ef564882a76fde18014403e97cc22f0905d 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
-@@ -297,16 +297,7 @@ public class Commands {
+@@ -295,16 +295,7 @@ public class Commands {
String[] args = command.split(" ");
if (args.length == 0) return; // Paper - empty commands shall not be dispatched
diff --git a/patches/unapplied/server/0851-Add-option-to-disable-block-updates.patch b/patches/server/0841-Add-option-to-disable-block-updates.patch
index 8fe599472e..8fe599472e 100644
--- a/patches/unapplied/server/0851-Add-option-to-disable-block-updates.patch
+++ b/patches/server/0841-Add-option-to-disable-block-updates.patch
diff --git a/patches/unapplied/server/0852-Call-missing-BlockDispenseEvent.patch b/patches/server/0842-Call-missing-BlockDispenseEvent.patch
index 357cee20f1..da4b09af57 100644
--- a/patches/unapplied/server/0852-Call-missing-BlockDispenseEvent.patch
+++ b/patches/server/0842-Call-missing-BlockDispenseEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Call missing BlockDispenseEvent
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
-index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0c06a367a 100644
+index 96db0b1041a4c0f054d4f3f2bdced960b119664e..78951f50188528718cdb3dbbaabe3f9f2760ffe3 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
-@@ -898,6 +898,13 @@ public interface DispenseItemBehavior {
+@@ -867,6 +867,13 @@ public interface DispenseItemBehavior {
this.setSuccess(true);
if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
if ((Integer) iblockdata.getValue(RespawnAnchorBlock.CHARGE) != 4) {
@@ -22,7 +22,7 @@ index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0
RespawnAnchorBlock.charge((Entity) null, worldserver, blockposition, iblockdata);
stack.shrink(1);
} else {
-@@ -977,6 +984,13 @@ public interface DispenseItemBehavior {
+@@ -944,6 +951,13 @@ public interface DispenseItemBehavior {
Optional<BlockState> optional = HoneycombItem.getWaxed(iblockdata);
if (optional.isPresent()) {
@@ -36,7 +36,7 @@ index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0
worldserver.setBlockAndUpdate(blockposition, (BlockState) optional.get());
worldserver.levelEvent(3003, blockposition, 0);
stack.shrink(1);
-@@ -1004,6 +1018,12 @@ public interface DispenseItemBehavior {
+@@ -971,6 +985,12 @@ public interface DispenseItemBehavior {
if (!worldserver.getBlockState(blockposition1).is(BlockTags.CONVERTABLE_TO_MUD)) {
return this.defaultDispenseItemBehavior.dispense(pointer, stack);
} else {
@@ -50,10 +50,10 @@ index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0
for (int k = 0; k < 5; ++k) {
worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index f4ca35e044e41b3fd1b83c482a5c19d188ea0bae..16f183c8e81b8c22ca51387e9e35282ed20d651c 100644
+index c59bb1811dba49571bbb82b17a75ab2363531996..30aa65060a8039d9b2f52c776bab27304dc97f8e 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -2121,6 +2121,32 @@ public class CraftEventFactory {
+@@ -2127,6 +2127,32 @@ public class CraftEventFactory {
}
// Paper end
diff --git a/patches/unapplied/server/0853-Don-t-load-chunks-for-supporting-block-checks.patch b/patches/server/0843-Don-t-load-chunks-for-supporting-block-checks.patch
index 936d1935f2..f674b02e68 100644
--- a/patches/unapplied/server/0853-Don-t-load-chunks-for-supporting-block-checks.patch
+++ b/patches/server/0843-Don-t-load-chunks-for-supporting-block-checks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't load chunks for supporting block checks
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 73831000101765845c0881bba217b2ca54eb39dd..9119bf1eac38f9b40d035f702150a7939095266c 100644
+index ce648d328ceb7d98fc523398c52915f7e7b5e23e..880546f6727b90ebb021bb0939283739adaa93f6 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1210,7 +1210,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -1186,7 +1186,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
protected BlockPos getOnPos(float offset) {
diff --git a/patches/unapplied/server/0854-Optimize-player-lookups-for-beacons.patch b/patches/server/0844-Optimize-player-lookups-for-beacons.patch
index c6e0cae5ab..1c203c23a6 100644
--- a/patches/unapplied/server/0854-Optimize-player-lookups-for-beacons.patch
+++ b/patches/server/0844-Optimize-player-lookups-for-beacons.patch
@@ -7,7 +7,7 @@ For larger ranges, it's better to iterate over the player list
than the entity slices.
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 62b9b5f508462dd2257094cb48ce6123e29cb64d..a6ffbbc1b5021564864e42c0756342352c2b8290 100644
+index b6633ca1ee73ef0f8a220992a2e0424e67dd9758..814e70f558d7a6186233da0ff86c94c95d390e09 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
@@ -333,7 +333,22 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
diff --git a/patches/unapplied/server/0855-Add-Sign-getInteractableSideFor.patch b/patches/server/0845-Add-Sign-getInteractableSideFor.patch
index 2833829ce4..2833829ce4 100644
--- a/patches/unapplied/server/0855-Add-Sign-getInteractableSideFor.patch
+++ b/patches/server/0845-Add-Sign-getInteractableSideFor.patch
diff --git a/patches/unapplied/server/0856-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0846-fix-item-meta-for-tadpole-buckets.patch
index d65caa853d..cb7401f59f 100644
--- a/patches/unapplied/server/0856-fix-item-meta-for-tadpole-buckets.patch
+++ b/patches/server/0846-fix-item-meta-for-tadpole-buckets.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] fix item meta for tadpole buckets
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
-index b0d73a9412421d86bd244757806d58fd99687163..a83f726bd10cc25565098e485c337783ba6dbd69 100644
+index e1605d97bbcdbb8903d78848c7b98b44fec34705..5f8dd54596aa90e45ed430be699b1d41ebf8827e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
-@@ -367,6 +367,7 @@ public final class CraftItemFactory implements ItemFactory {
+@@ -376,6 +376,7 @@ public final class CraftItemFactory implements ItemFactory {
case COD_BUCKET:
case PUFFERFISH_BUCKET:
case SALMON_BUCKET:
@@ -17,7 +17,7 @@ index b0d73a9412421d86bd244757806d58fd99687163..a83f726bd10cc25565098e485c337783
case GLOW_ITEM_FRAME:
case PAINTING:
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
-index fa223d2381986cb260c79f074fb7b123396f1f86..7c510d673253e53c1cebbe7af2aacbcaa59cb9de 100644
+index 1abef66189f3340e6dba7f73b9517044ae9be6e6..099b5364aa16afb4fb30ffca3e1bea8f52185150 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -604,6 +604,7 @@ public final class CraftItemStack extends ItemStack {
diff --git a/patches/unapplied/server/0857-Fix-BanList-API.patch b/patches/server/0847-Fix-BanList-API.patch
index 3250071e25..a790d500c1 100644
--- a/patches/unapplied/server/0857-Fix-BanList-API.patch
+++ b/patches/server/0847-Fix-BanList-API.patch
@@ -208,10 +208,10 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 1b9e1038f729582117dc93736f9a089bf6481cff..b41646469bcbde02a1c2254247748bbcbbabddad 100644
+index 5163c979f086dac9111419d7bb3b624b0faa3a5b..f4ccaa880177c73b64df65db6b0b40e968629152 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -1733,23 +1733,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1746,23 +1746,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override
@@ -240,7 +240,7 @@ index 1b9e1038f729582117dc93736f9a089bf6481cff..b41646469bcbde02a1c2254247748bbc
if (kickPlayer) {
this.kickPlayer(reason);
}
-@@ -1757,12 +1757,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1770,12 +1770,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
@Override
diff --git a/patches/unapplied/server/0858-Determine-lava-and-water-fluid-explosion-resistance-.patch b/patches/server/0848-Determine-lava-and-water-fluid-explosion-resistance-.patch
index 5f51eb317c..5f51eb317c 100644
--- a/patches/unapplied/server/0858-Determine-lava-and-water-fluid-explosion-resistance-.patch
+++ b/patches/server/0848-Determine-lava-and-water-fluid-explosion-resistance-.patch
diff --git a/patches/unapplied/server/0859-Fix-possible-NPE-on-painting-creation.patch b/patches/server/0849-Fix-possible-NPE-on-painting-creation.patch
index 7806a724f0..dc3838be94 100644
--- a/patches/unapplied/server/0859-Fix-possible-NPE-on-painting-creation.patch
+++ b/patches/server/0849-Fix-possible-NPE-on-painting-creation.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix possible NPE on painting creation
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
-index 907904da7f89e8e5e5cfab80977f04af3fdf17c7..2ab13259d2f3ecef4d9195c8b99775281aeaf12a 100644
+index 46a4f31e2b6eee6f8dc5f8fccd7de4c48a698b61..577ed3656480271a491bcd3d346c63854fd840e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
-@@ -325,8 +325,13 @@ public final class CraftEntityTypes {
+@@ -326,8 +326,13 @@ public final class CraftEntityTypes {
// Hanging
register(new EntityTypeData<>(EntityType.PAINTING, Painting.class, CraftPainting::new, createHanging(Painting.class, (spawnData, hangingData) -> {
if (spawnData.normalWorld && hangingData.randomize()) {
@@ -24,10 +24,10 @@ index 907904da7f89e8e5e5cfab80977f04af3fdf17c7..2ab13259d2f3ecef4d9195c8b9977528
net.minecraft.world.entity.decoration.Painting entity = new net.minecraft.world.entity.decoration.Painting(net.minecraft.world.entity.EntityType.PAINTING, spawnData.minecraftWorld());
entity.absMoveTo(spawnData.x(), spawnData.y(), spawnData.z(), spawnData.yaw(), spawnData.pitch());
entity.setDirection(hangingData.direction());
-@@ -465,6 +470,7 @@ public final class CraftEntityTypes {
+@@ -466,6 +471,7 @@ public final class CraftEntityTypes {
AABB bb = (ItemFrame.class.isAssignableFrom(clazz))
- ? net.minecraft.world.entity.decoration.ItemFrame.calculateBoundingBox(null, pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height)
- : HangingEntity.calculateBoundingBox(null, pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height);
+ ? net.minecraft.world.entity.decoration.ItemFrame.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite())
+ : net.minecraft.world.entity.decoration.Painting.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height);
+ if (!spawnData.world.noCollision(bb)) continue; // Paper - add collision check
List<net.minecraft.world.entity.Entity> list = spawnData.world().getEntities(null, bb);
for (Iterator<net.minecraft.world.entity.Entity> it = list.iterator(); !taken && it.hasNext(); ) {
diff --git a/patches/unapplied/server/0860-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0850-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
index 32b71969c8..6785f755ab 100644
--- a/patches/unapplied/server/0860-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
+++ b/patches/server/0850-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-index 63189d6325173a42b619907b44a426848fbc6988..0854e9b7ee2e6b23b6c1ee6a324a5a253c9d4679 100644
+index 856a93324f5ac411713851ccfb38dba52fb0af5e..0af34e0f9c9696fbcb11b12fb27472ef17ad532a 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
@@ -68,7 +68,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
diff --git a/patches/unapplied/server/0861-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0851-ExperienceOrb-should-call-EntitySpawnEvent.patch
index 636b845e45..000f4cb95b 100644
--- a/patches/unapplied/server/0861-ExperienceOrb-should-call-EntitySpawnEvent.patch
+++ b/patches/server/0851-ExperienceOrb-should-call-EntitySpawnEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] ExperienceOrb should call EntitySpawnEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 16f183c8e81b8c22ca51387e9e35282ed20d651c..97ce8663744041bd57bbb1000f77a05e01156a6c 100644
+index 30aa65060a8039d9b2f52c776bab27304dc97f8e..2f2b09b2b9bd8730b83ade4d7da996b3b6696e0a 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -735,7 +735,8 @@ public class CraftEventFactory {
+@@ -736,7 +736,8 @@ public class CraftEventFactory {
// Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above)
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
double radius = world.spigotConfig.expMerge;
diff --git a/patches/unapplied/server/0862-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch b/patches/server/0852-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch
index 301b345fb9..301b345fb9 100644
--- a/patches/unapplied/server/0862-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch
+++ b/patches/server/0852-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch
diff --git a/patches/unapplied/server/0863-Add-whitelist-events.patch b/patches/server/0853-Add-whitelist-events.patch
index 96884032fb..96884032fb 100644
--- a/patches/unapplied/server/0863-Add-whitelist-events.patch
+++ b/patches/server/0853-Add-whitelist-events.patch
diff --git a/patches/unapplied/server/0864-Implement-PlayerFailMoveEvent.patch b/patches/server/0854-Implement-PlayerFailMoveEvent.patch
index 9a127a050d..5087b57ce5 100644
--- a/patches/unapplied/server/0864-Implement-PlayerFailMoveEvent.patch
+++ b/patches/server/0854-Implement-PlayerFailMoveEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba10d39c47 100644
+index e56d73fffaa0da4813aaa0fa08554cfbb0f72279..1502f080e65a942b36fb16c87a409d9e1a53edfe 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -1266,8 +1266,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1261,8 +1261,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d0 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX(this.player.getX())); final double toX = d0; // Paper - OBFHELPER
double d1 = ServerGamePacketListenerImpl.clampVertical(packet.getY(this.player.getY())); final double toY = d1; // Paper - OBFHELPER
double d2 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ(this.player.getZ())); final double toZ = d2; // Paper - OBFHELPER
@@ -19,7 +19,7 @@ index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba
if (this.player.isPassenger()) {
this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
-@@ -1334,8 +1334,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1329,8 +1329,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
// Paper start - Prevent moving into unloaded chunks
if (this.player.level().paperConfig().chunks.preventMovingIntoUnloadedChunks && (this.player.getX() != toX || this.player.getZ() != toZ) && !worldserver.areChunksLoadedForMove(this.player.getBoundingBox().expandTowards(new Vec3(toX, toY, toZ).subtract(this.player.position())))) {
@@ -36,7 +36,7 @@ index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba
}
// Paper end - Prevent moving into unloaded chunks
-@@ -1344,9 +1350,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1339,9 +1345,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (d10 - d9 > Math.max(f2, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
// CraftBukkit end
@@ -56,7 +56,7 @@ index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba
}
}
}
-@@ -1408,14 +1421,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1403,14 +1416,31 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
d8 = d2 - this.player.getZ();
d10 = d6 * d6 + d7 * d7 + d8 * d8;
@@ -91,7 +91,7 @@ index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
} else {
-@@ -3450,4 +3480,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3467,4 +3497,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
}
diff --git a/patches/unapplied/server/0865-Folia-scheduler-and-owned-region-API.patch b/patches/server/0855-Folia-scheduler-and-owned-region-API.patch
index 0aeb7975f2..36d68815f5 100644
--- a/patches/unapplied/server/0865-Folia-scheduler-and-owned-region-API.patch
+++ b/patches/server/0855-Folia-scheduler-and-owned-region-API.patch
@@ -1148,10 +1148,10 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 9ba2a71e5bedbf8e65f9dd1652639afd397439c7..2a92268dfc8ee264e4ee6ffc56b40a87e334acc8 100644
+index fcf450f9fefda8cf2391dcb61075cbd855475d6c..b7254c342501f2d7fbbe8959a6e88a5d1f6e076e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1551,6 +1551,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1579,6 +1579,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
@@ -1173,10 +1173,10 @@ index 9ba2a71e5bedbf8e65f9dd1652639afd397439c7..2a92268dfc8ee264e4ee6ffc56b40a87
this.profiler.push("commandFunctions");
MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 942af999a4a3aa03cb7ef5f0b9d377c78677fd0e..0246db4a1f6eb168fa88260282311fee2ebb6014 100644
+index f730d441e5e577b354d507a175690fe3246107d5..c6316960e9765239fbf117702b3c81c542839643 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -646,6 +646,7 @@ public abstract class PlayerList {
+@@ -640,6 +640,7 @@ public abstract class PlayerList {
entityplayer.unRide();
worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
@@ -1185,10 +1185,10 @@ index 942af999a4a3aa03cb7ef5f0b9d377c78677fd0e..0246db4a1f6eb168fa88260282311fee
this.players.remove(entityplayer);
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 9119bf1eac38f9b40d035f702150a7939095266c..27d736d34c91c08782fa8fd60742e296580e08f2 100644
+index 880546f6727b90ebb021bb0939283739adaa93f6..94c5dcfdf1dae1f4764c3c7287e4b51928a35a4c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -249,11 +249,23 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -255,11 +255,23 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public @org.jetbrains.annotations.Nullable net.minecraft.server.level.ChunkMap.TrackedEntity tracker; // Paper
public CraftEntity getBukkitEntity() {
if (this.bukkitEntity == null) {
@@ -1213,7 +1213,7 @@ index 9119bf1eac38f9b40d035f702150a7939095266c..27d736d34c91c08782fa8fd60742e296
@Override
public CommandSender getBukkitSender(CommandSourceStack wrapper) {
return this.getBukkitEntity();
-@@ -4477,6 +4489,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -4496,6 +4508,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
CraftEventFactory.callEntityRemoveEvent(this, cause);
// CraftBukkit end
@@ -1221,7 +1221,7 @@ index 9119bf1eac38f9b40d035f702150a7939095266c..27d736d34c91c08782fa8fd60742e296
if (this.removalReason == null) {
this.removalReason = entity_removalreason;
}
-@@ -4487,12 +4500,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -4506,12 +4519,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.getPassengers().forEach(Entity::stopRiding);
this.levelCallback.onRemove(entity_removalreason);
@@ -1251,10 +1251,10 @@ index 9119bf1eac38f9b40d035f702150a7939095266c..27d736d34c91c08782fa8fd60742e296
public void setLevelCallback(EntityInLevelCallback changeListener) {
this.levelCallback = changeListener;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index c2dc4a7194c83cb01724fc04ea4971b34b2f8235..e61e1f4621ca29cab1afdf26b013b7b89b1ac358 100644
+index 571b569b6ce8c29c038a1af6429eced5c0b64ff7..70f1e1cf83c99b2c3cea8d02c744ce68f8335c8b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -308,6 +308,76 @@ public final class CraftServer implements Server {
+@@ -310,6 +310,76 @@ public final class CraftServer implements Server {
private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper
private final io.papermc.paper.potion.PaperPotionBrewer potionBrewer; // Paper - Custom Potion Mixes
@@ -1332,10 +1332,10 @@ index c2dc4a7194c83cb01724fc04ea4971b34b2f8235..e61e1f4621ca29cab1afdf26b013b7b8
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 991b94ff1186b1071a94b2662873dc071255e2e6..36c97ac40d7e1127d95eeca396570b1d50b69a5c 100644
+index d8b1cdc78eb234023a42d740599009737201e70e..bc37a3fc38e1966af3722ed16b3f940c2a8387a9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -68,6 +68,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -70,6 +70,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
private EntityDamageEvent lastDamageEvent;
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
@@ -1351,7 +1351,7 @@ index 991b94ff1186b1071a94b2662873dc071255e2e6..36c97ac40d7e1127d95eeca396570b1d
public CraftEntity(final CraftServer server, final Entity entity) {
this.server = server;
-@@ -484,6 +493,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -486,6 +495,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.entity;
}
diff --git a/patches/unapplied/server/0866-Only-erase-allay-memory-on-non-item-targets.patch b/patches/server/0856-Only-erase-allay-memory-on-non-item-targets.patch
index 4afac36fc3..4afac36fc3 100644
--- a/patches/unapplied/server/0866-Only-erase-allay-memory-on-non-item-targets.patch
+++ b/patches/server/0856-Only-erase-allay-memory-on-non-item-targets.patch
diff --git a/patches/unapplied/server/0867-API-for-updating-recipes-on-clients.patch b/patches/server/0857-API-for-updating-recipes-on-clients.patch
index 7442ef89be..741557aad1 100644
--- a/patches/unapplied/server/0867-API-for-updating-recipes-on-clients.patch
+++ b/patches/server/0857-API-for-updating-recipes-on-clients.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] API for updating recipes on clients
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 0246db4a1f6eb168fa88260282311fee2ebb6014..ea04eb049e16d1027d15f9863d1fcd16f090c464 100644
+index c6316960e9765239fbf117702b3c81c542839643..b2fab1e6a83b2603aeb8565b25022f9e99a61029 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1530,6 +1530,13 @@ public abstract class PlayerList {
+@@ -1484,6 +1484,13 @@ public abstract class PlayerList {
}
public void reloadResources() {
@@ -22,7 +22,7 @@ index 0246db4a1f6eb168fa88260282311fee2ebb6014..ea04eb049e16d1027d15f9863d1fcd16
// CraftBukkit start
/*Iterator iterator = this.advancements.values().iterator();
-@@ -1545,7 +1552,15 @@ public abstract class PlayerList {
+@@ -1499,7 +1506,15 @@ public abstract class PlayerList {
}
// CraftBukkit end
@@ -39,10 +39,10 @@ index 0246db4a1f6eb168fa88260282311fee2ebb6014..ea04eb049e16d1027d15f9863d1fcd16
Iterator iterator1 = this.players.iterator();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index e61e1f4621ca29cab1afdf26b013b7b89b1ac358..f5a4ddf217fc114daf7faf345dd6c2e9294cba52 100644
+index 70f1e1cf83c99b2c3cea8d02c744ce68f8335c8b..b4ae7630d5cdbe97d6050f6a2c6c679b26e6ddc7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1162,6 +1162,18 @@ public final class CraftServer implements Server {
+@@ -1165,6 +1165,18 @@ public final class CraftServer implements Server {
ReloadCommand.reload(this.console);
}
@@ -61,7 +61,7 @@ index e61e1f4621ca29cab1afdf26b013b7b89b1ac358..f5a4ddf217fc114daf7faf345dd6c2e9
private void loadIcon() {
this.icon = new CraftIconCache(null);
try {
-@@ -1541,6 +1553,13 @@ public final class CraftServer implements Server {
+@@ -1544,6 +1556,13 @@ public final class CraftServer implements Server {
@Override
public boolean addRecipe(Recipe recipe) {
@@ -75,7 +75,7 @@ index e61e1f4621ca29cab1afdf26b013b7b89b1ac358..f5a4ddf217fc114daf7faf345dd6c2e9
CraftRecipe toAdd;
if (recipe instanceof CraftRecipe) {
toAdd = (CraftRecipe) recipe;
-@@ -1570,6 +1589,11 @@ public final class CraftServer implements Server {
+@@ -1573,6 +1592,11 @@ public final class CraftServer implements Server {
}
}
toAdd.addToCraftingManager();
@@ -87,7 +87,7 @@ index e61e1f4621ca29cab1afdf26b013b7b89b1ac358..f5a4ddf217fc114daf7faf345dd6c2e9
return true;
}
-@@ -1750,10 +1774,23 @@ public final class CraftServer implements Server {
+@@ -1753,10 +1777,23 @@ public final class CraftServer implements Server {
@Override
public boolean removeRecipe(NamespacedKey recipeKey) {
diff --git a/patches/unapplied/server/0868-Fix-rotation-when-spawning-display-entities.patch b/patches/server/0858-Fix-rotation-when-spawning-display-entities.patch
index 61dcfe34f7..7491ff60fe 100644
--- a/patches/unapplied/server/0868-Fix-rotation-when-spawning-display-entities.patch
+++ b/patches/server/0858-Fix-rotation-when-spawning-display-entities.patch
@@ -5,18 +5,18 @@ Subject: [PATCH] Fix rotation when spawning display entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
-index 2ab13259d2f3ecef4d9195c8b99775281aeaf12a..d9881f5f9b36e215afc98ce84c83b3a5443d1d39 100644
+index 577ed3656480271a491bcd3d346c63854fd840e4..39aa116193f313f53540b0135d2ab26acb7f1469 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
-@@ -220,6 +220,7 @@ public final class CraftEntityTypes {
- Vector direction = spawnData.location().getDirection().multiply(10);
- entity.assignPower(direction.getX(), direction.getY(), direction.getZ());
+@@ -221,6 +221,7 @@ public final class CraftEntityTypes {
+ Vector direction = spawnData.location().getDirection();
+ entity.assignDirectionalMovement(new Vec3(direction.getX(), direction.getY(), direction.getZ()), 1.0);
};
+ private static final BiConsumer<SpawnData, net.minecraft.world.entity.Entity> ROT = (spawnData, entity) -> entity.setRot(spawnData.yaw(), spawnData.pitch()); // Paper
private static final Map<Class<?>, EntityTypeData<?, ?>> CLASS_TYPE_DATA = new HashMap<>();
private static final Map<EntityType, EntityTypeData<?, ?>> ENTITY_TYPE_DATA = new HashMap<>();
-@@ -360,10 +361,10 @@ public final class CraftEntityTypes {
+@@ -361,10 +362,10 @@ public final class CraftEntityTypes {
// Set pos
register(new EntityTypeData<>(EntityType.MARKER, Marker.class, CraftMarker::new, createAndSetPos(net.minecraft.world.entity.EntityType.MARKER)));
diff --git a/patches/unapplied/server/0869-Only-capture-actual-tree-growth.patch b/patches/server/0859-Only-capture-actual-tree-growth.patch
index 5c41527169..1cba6ddee8 100644
--- a/patches/unapplied/server/0869-Only-capture-actual-tree-growth.patch
+++ b/patches/server/0859-Only-capture-actual-tree-growth.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Only capture actual tree growth
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
-index 5bbadc890a72f1cb22c6881ebcc163b0c06a367a..4fa838bf97ede6e1c893ba64f53aa7af5db0405a 100644
+index 78951f50188528718cdb3dbbaabe3f9f2760ffe3..7826e2a52da47914aca39fef958b8f398a2ff937 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
-@@ -654,6 +654,7 @@ public interface DispenseItemBehavior {
+@@ -634,6 +634,7 @@ public interface DispenseItemBehavior {
if (!fertilizeEvent.isCancelled()) {
for (org.bukkit.block.BlockState blockstate : blocks) {
blockstate.update(true);
@@ -17,10 +17,10 @@ index 5bbadc890a72f1cb22c6881ebcc163b0c06a367a..4fa838bf97ede6e1c893ba64f53aa7af
}
}
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index c27ef32a3fc3edf5a4dd91d7cba93a78a5e762fa..4485199c90e3efbce3e6a18a75703e86a9bdde3c 100644
+index 92be749721f26e9385e592a985db58cf05c67801..1f2e6f57ffb827ef9bf3623bfdde07db21edf6ee 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
-@@ -445,6 +445,7 @@ public final class ItemStack implements DataComponentHolder {
+@@ -466,6 +466,7 @@ public final class ItemStack implements DataComponentHolder {
for (CraftBlockState blockstate : blocks) {
// SPIGOT-7572 - Move fix for SPIGOT-7248 to CapturedBlockState, to allow bees in bee nest
CapturedBlockState.setBlockState(blockstate);
@@ -29,10 +29,10 @@ index c27ef32a3fc3edf5a4dd91d7cba93a78a5e762fa..4485199c90e3efbce3e6a18a75703e86
entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 61fc08cac437bd5dd6f3ff7561fab3d4c108388d..2f018922fb12dc4c3c9c28c7b0597a2b97d1cb02 100644
+index b8d8041aecc2ff008247449cba8d9f192cf51073..ffaf6e65a7314479a129fed41f58bf2d75ea5dae 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -1365,4 +1365,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -1380,4 +1380,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return range <= 0 ? 64.0 * 64.0 : range * range; // 64 is taken from default in ServerLevel#levelEvent
}
// Paper end - respect global sound events gamerule
diff --git a/patches/unapplied/server/0870-Use-correct-source-for-mushroom-block-spread-event.patch b/patches/server/0860-Use-correct-source-for-mushroom-block-spread-event.patch
index a295e29bcb..a295e29bcb 100644
--- a/patches/unapplied/server/0870-Use-correct-source-for-mushroom-block-spread-event.patch
+++ b/patches/server/0860-Use-correct-source-for-mushroom-block-spread-event.patch
diff --git a/patches/unapplied/server/0871-Respect-randomizeData-on-more-entities-when-spawning.patch b/patches/server/0861-Respect-randomizeData-on-more-entities-when-spawning.patch
index a51b206d8a..d04e8bf4f6 100644
--- a/patches/unapplied/server/0871-Respect-randomizeData-on-more-entities-when-spawning.patch
+++ b/patches/server/0861-Respect-randomizeData-on-more-entities-when-spawning.patch
@@ -9,11 +9,11 @@ Subject: [PATCH] Respect randomizeData on more entities when spawning
* ExperienceOrb
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
-index d9881f5f9b36e215afc98ce84c83b3a5443d1d39..d65d538a216fc3a1ed048cf78a8937abe3c0bc1b 100644
+index 39aa116193f313f53540b0135d2ab26acb7f1469..afc75ef3fb0fac40673fdfb684bd1f0d0edeb6ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
-@@ -221,6 +221,13 @@ public final class CraftEntityTypes {
- entity.assignPower(direction.getX(), direction.getY(), direction.getZ());
+@@ -222,6 +222,13 @@ public final class CraftEntityTypes {
+ entity.assignDirectionalMovement(new Vec3(direction.getX(), direction.getY(), direction.getZ()), 1.0);
};
private static final BiConsumer<SpawnData, net.minecraft.world.entity.Entity> ROT = (spawnData, entity) -> entity.setRot(spawnData.yaw(), spawnData.pitch()); // Paper
+ // Paper start - respect randomizeData
@@ -26,7 +26,7 @@ index d9881f5f9b36e215afc98ce84c83b3a5443d1d39..d65d538a216fc3a1ed048cf78a8937ab
private static final Map<Class<?>, EntityTypeData<?, ?>> CLASS_TYPE_DATA = new HashMap<>();
private static final Map<EntityType, EntityTypeData<?, ?>> ENTITY_TYPE_DATA = new HashMap<>();
-@@ -373,11 +380,12 @@ public final class CraftEntityTypes {
+@@ -374,11 +381,12 @@ public final class CraftEntityTypes {
net.minecraft.world.item.ItemStack itemStack = new net.minecraft.world.item.ItemStack(Items.STONE);
ItemEntity item = new ItemEntity(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), itemStack);
item.setPickUpDelay(10);
@@ -40,7 +40,7 @@ index d9881f5f9b36e215afc98ce84c83b3a5443d1d39..d65d538a216fc3a1ed048cf78a8937ab
));
register(new EntityTypeData<>(EntityType.AREA_EFFECT_CLOUD, AreaEffectCloud.class, CraftAreaEffectCloud::new, createAndMove(net.minecraft.world.entity.EntityType.AREA_EFFECT_CLOUD))); // Paper - set area effect cloud rotation
register(new EntityTypeData<>(EntityType.EGG, Egg.class, CraftEgg::new, spawnData -> new ThrownEgg(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));
-@@ -389,12 +397,23 @@ public final class CraftEntityTypes {
+@@ -390,12 +398,23 @@ public final class CraftEntityTypes {
entity.setItem(CraftItemStack.asNMSCopy(new ItemStack(Material.SPLASH_POTION, 1)));
return entity;
}));
diff --git a/patches/unapplied/server/0872-Use-correct-seed-on-api-world-load.patch b/patches/server/0862-Use-correct-seed-on-api-world-load.patch
index 780caba2e7..77e1f061bd 100644
--- a/patches/unapplied/server/0872-Use-correct-seed-on-api-world-load.patch
+++ b/patches/server/0862-Use-correct-seed-on-api-world-load.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Use correct seed on api world load
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index f5a4ddf217fc114daf7faf345dd6c2e9294cba52..79aa2d308c079205b50abae38fa88d69b51063e3 100644
+index b4ae7630d5cdbe97d6050f6a2c6c679b26e6ddc7..9a8d64e43264605737c43e2a3512e9addc770db4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1384,7 +1384,7 @@ public final class CraftServer implements Server {
+@@ -1387,7 +1387,7 @@ public final class CraftServer implements Server {
net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), this.console.options.has("eraseCache"), () -> true, iregistrycustom_dimension, this.console.options.has("recreateRegionFiles"));
}
diff --git a/patches/unapplied/server/0873-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch b/patches/server/0863-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch
index 2f19c9d94a..2f19c9d94a 100644
--- a/patches/unapplied/server/0873-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch
+++ b/patches/server/0863-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch
diff --git a/patches/unapplied/server/0874-Cache-map-ids-on-item-frames.patch b/patches/server/0864-Cache-map-ids-on-item-frames.patch
index 4294f88d3c..65e3e3499f 100644
--- a/patches/unapplied/server/0874-Cache-map-ids-on-item-frames.patch
+++ b/patches/server/0864-Cache-map-ids-on-item-frames.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Cache map ids on item frames
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
-index 979571cc12f81e09df8570f7deb32f4c604188bd..0373b2de2b992b648f346d6df3960a3586a54567 100644
+index f010be9605d7458add7e5693ff473fabf679c938..a2fbbbd7a66d4e7b1063638f8467e8887a417282 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
-@@ -118,7 +118,7 @@ public class ServerEntity {
+@@ -117,7 +117,7 @@ public class ServerEntity {
ItemStack itemstack = entityitemframe.getItem();
if (this.level.paperConfig().maps.itemFrameCursorUpdateInterval > 0 && this.tickCount % this.level.paperConfig().maps.itemFrameCursorUpdateInterval == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks // Paper - Make item frame map cursor update interval configurable
@@ -18,18 +18,18 @@ index 979571cc12f81e09df8570f7deb32f4c604188bd..0373b2de2b992b648f346d6df3960a35
if (worldmap != null) {
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 6bf89686ce5cf700ac06ec1e38f53af745098fa3..da0d1c9a1c4ae081bff9ca4230c9a1503885c354 100644
+index ba4e0ad7c7c2731d61ec7f60f19d7e9ec31a28ba..5b7245cd99593ee90e17c97e0104f3aba9ae05ea 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
-@@ -49,6 +49,7 @@ public class ItemFrame extends HangingEntity {
- public static final int NUM_ROTATIONS = 8;
+@@ -50,6 +50,7 @@ public class ItemFrame extends HangingEntity {
+ private static final float HEIGHT = 0.75F;
public float dropChance;
public boolean fixed;
+ public @Nullable MapId cachedMapId; // Paper - Perf: Cache map ids on item frames
public ItemFrame(EntityType<? extends ItemFrame> type, Level world) {
super(type, world);
-@@ -364,6 +365,7 @@ public class ItemFrame extends HangingEntity {
+@@ -322,6 +323,7 @@ public class ItemFrame extends HangingEntity {
}
private void onItemChanged(ItemStack stack) {
diff --git a/patches/unapplied/server/0875-Fix-custom-statistic-criteria-creation.patch b/patches/server/0865-Fix-custom-statistic-criteria-creation.patch
index 567ab16451..f399187f50 100644
--- a/patches/unapplied/server/0875-Fix-custom-statistic-criteria-creation.patch
+++ b/patches/server/0865-Fix-custom-statistic-criteria-creation.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix custom statistic criteria creation
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index ff2c6a7b4b8ae2f7e9e1c84e1a3bd04e0484d075..256fdd08a7653d1dc93cd13a976cd114253aa945 100644
+index 7272f154644366c3c467b265aadc59b879a7b7bd..a98fcfcf71b2a072d60120046d9aac9ad4546196 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -610,6 +610,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/unapplied/server/0876-Bandaid-fix-for-Effect.patch b/patches/server/0866-Bandaid-fix-for-Effect.patch
index 737163e091..8b0cbf2228 100644
--- a/patches/unapplied/server/0876-Bandaid-fix-for-Effect.patch
+++ b/patches/server/0866-Bandaid-fix-for-Effect.patch
@@ -68,7 +68,7 @@ index 71733f918ed84b9879ac1b142ef6205c5e768a9c..c856384019eff2f2d0bb831ebe1ccb0f
break;
case BONE_MEAL_USE:
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 606797b07bb5eb0ce8fa9d01eaa74e0d6c10b56b..f371e76215a789f84eb5086a3d08bcf6e4e02dd8 100644
+index 9391259ffbee1da5c92ad4a253d99617aa57871a..8708f0df623e82074ecf858c8d1389b33ded07a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1427,7 +1427,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -81,10 +81,10 @@ index 606797b07bb5eb0ce8fa9d01eaa74e0d6c10b56b..f371e76215a789f84eb5086a3d08bcf6
// Special case: the axis is optional for ELECTRIC_SPARK
Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index b41646469bcbde02a1c2254247748bbcbbabddad..a06145c8ba3cd88c827bcc354e7dc2dafa3eda32 100644
+index f4ccaa880177c73b64df65db6b0b40e968629152..9a2e626c280e3dcdb1ef950afa5829daf2d0f073 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -915,7 +915,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -917,7 +917,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(effect != null, "Effect cannot be null");
if (data != null) {
Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect);
diff --git a/patches/unapplied/server/0877-SculkCatalyst-bloom-API.patch b/patches/server/0867-SculkCatalyst-bloom-API.patch
index ba050f6086..ba050f6086 100644
--- a/patches/unapplied/server/0877-SculkCatalyst-bloom-API.patch
+++ b/patches/server/0867-SculkCatalyst-bloom-API.patch
diff --git a/patches/unapplied/server/0878-API-for-an-entity-s-scoreboard-name.patch b/patches/server/0868-API-for-an-entity-s-scoreboard-name.patch
index c44b023d7d..a7d3664dd4 100644
--- a/patches/unapplied/server/0878-API-for-an-entity-s-scoreboard-name.patch
+++ b/patches/server/0868-API-for-an-entity-s-scoreboard-name.patch
@@ -7,10 +7,10 @@ Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 36c97ac40d7e1127d95eeca396570b1d50b69a5c..96448895a0a18e6f819d0a2a629c04abd331fa85 100644
+index bc37a3fc38e1966af3722ed16b3f940c2a8387a9..b5622c5bcc97ff9241d236a35018918db5b2103a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1244,4 +1244,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1261,4 +1261,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return !this.getHandle().level().noCollision(this.getHandle(), aabb);
}
// Paper end - Collision API
diff --git a/patches/unapplied/server/0879-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/0869-Deprecate-and-replace-methods-with-old-StructureType.patch
index 8e771ec00e..79caac1a3a 100644
--- a/patches/unapplied/server/0879-Deprecate-and-replace-methods-with-old-StructureType.patch
+++ b/patches/server/0869-Deprecate-and-replace-methods-with-old-StructureType.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 79aa2d308c079205b50abae38fa88d69b51063e3..cce628673b6173f17ac81bce5469a7dbd8a2c648 100644
+index 9a8d64e43264605737c43e2a3512e9addc770db4..4aa8c742411fe9ae1312f3663859eb107fcf68ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1989,6 +1989,11 @@ public final class CraftServer implements Server {
+@@ -1992,6 +1992,11 @@ public final class CraftServer implements Server {
ServerLevel worldServer = ((CraftWorld) world).getHandle();
Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored);
@@ -20,7 +20,7 @@ index 79aa2d308c079205b50abae38fa88d69b51063e3..cce628673b6173f17ac81bce5469a7db
BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation);
// Create map with trackPlayer = true, unlimitedTracking = true
-@@ -1999,6 +2004,31 @@ public final class CraftServer implements Server {
+@@ -2002,6 +2007,31 @@ public final class CraftServer implements Server {
return CraftItemStack.asBukkitCopy(stack);
}
diff --git a/patches/unapplied/server/0880-Don-t-tab-complete-namespaced-commands-if-send-names.patch b/patches/server/0870-Don-t-tab-complete-namespaced-commands-if-send-names.patch
index 83a253acb9..1a7da29ef8 100644
--- a/patches/unapplied/server/0880-Don-t-tab-complete-namespaced-commands-if-send-names.patch
+++ b/patches/server/0870-Don-t-tab-complete-namespaced-commands-if-send-names.patch
@@ -11,10 +11,10 @@ This patch prevents server from sending namespaced commands when player
requests tab-complete only commands.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 38e19bd86bdef97dbea5ae2a4e7692ba10d39c47..5c9d3ce9c84fd86209023306ad15a9bcb1725b0d 100644
+index 1502f080e65a942b36fb16c87a409d9e1a53edfe..9206806204862e7b50f5c520660a07bdd7604480 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -817,6 +817,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -820,6 +820,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
diff --git a/patches/unapplied/server/0881-Properly-handle-BlockBreakEvent-isDropItems.patch b/patches/server/0871-Properly-handle-BlockBreakEvent-isDropItems.patch
index fb7b92cfbd..75a746ca81 100644
--- a/patches/unapplied/server/0881-Properly-handle-BlockBreakEvent-isDropItems.patch
+++ b/patches/server/0871-Properly-handle-BlockBreakEvent-isDropItems.patch
@@ -9,10 +9,10 @@ food consumption, turtle egg count decreases, ice to water
conversions and beehive releases
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
-index af4ee7e936dad42c458488b128d733a34b08afb5..266fd2874293091f7bf49dcb8c9295250ac7286c 100644
+index 717d015dd4637dd9d568b751be1dc1046b0a0560..c680f081ba548f84f07a968a46811090c53e57e3 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
-@@ -434,8 +434,8 @@ public class ServerPlayerGameMode {
+@@ -439,8 +439,8 @@ public class ServerPlayerGameMode {
isCorrectTool = flag1; // Paper - Trigger bee_nest_destroyed trigger in the correct place
itemstack.mineBlock(this.level, iblockdata1, pos, this.player);
@@ -24,7 +24,7 @@ index af4ee7e936dad42c458488b128d733a34b08afb5..266fd2874293091f7bf49dcb8c929525
// return true; // CraftBukkit
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
-index 21a7f9414e27c73b58fd75fbe68cf889f52a5d01..f6bed27ddbc47c894e315fc59c2721923b486ef8 100644
+index c75227b2ea165dcd65c203e60157ac7cdebd4bc6..4669b1877be5eecf6738eefd81a35bde531759d6 100644
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
@@ -86,8 +86,8 @@ public class BeehiveBlock extends BaseEntityBlock {
@@ -36,13 +36,13 @@ index 21a7f9414e27c73b58fd75fbe68cf889f52a5d01..f6bed27ddbc47c894e315fc59c272192
+ public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool, boolean includeDrops, boolean dropExp) { // Paper - fix drops not preventing stats/food exhaustion
+ super.playerDestroy(world, player, pos, state, blockEntity, tool, includeDrops, dropExp); // Paper - fix drops not preventing stats/food exhaustion
if (!world.isClientSide && blockEntity instanceof BeehiveBlockEntity tileentitybeehive) {
- if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) == 0) {
+ if (!EnchantmentHelper.hasTag(tool, EnchantmentTags.PREVENTS_BEE_SPAWNS_WHEN_MINING)) {
tileentitybeehive.emptyAllLivingFromHive(player, state, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY);
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index c09851136944bd58d82b3a9d19719b0354802824..a757a45d423e1729c9374391df4186ae0522e1ac 100644
+index 232e6216dc36aa698047fc0badf78c347414b3a5..c083dc8b2a69c3747b250d13f1a28ad22b5e6119 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -403,10 +403,18 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -402,10 +402,18 @@ public class Block extends BlockBehaviour implements ItemLike {
return this.defaultBlockState();
}
@@ -77,7 +77,7 @@ index 7fdf744a2be55313cc75c1322f6534f55cf463f5..f446c40c4d90307c568faa2866800f53
protected static void preventDropFromBottomPart(Level world, BlockPos pos, BlockState state, Player player) {
diff --git a/src/main/java/net/minecraft/world/level/block/IceBlock.java b/src/main/java/net/minecraft/world/level/block/IceBlock.java
-index 4bfe53e3a231a7bec461759e78c7a6cbcb8bb625..013302623d3ca3ff88f242d740af935dcf4844a6 100644
+index e862814c1e54776f11050623b52476accc2f1f79..ac775afb265430ac202cfa3900a036d11a308b1e 100644
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
@@ -33,8 +33,8 @@ public class IceBlock extends HalfTransparentBlock {
diff --git a/patches/unapplied/server/0882-Fire-entity-death-event-for-ender-dragon.patch b/patches/server/0872-Fire-entity-death-event-for-ender-dragon.patch
index 28897505d4..7f6054281d 100644
--- a/patches/unapplied/server/0882-Fire-entity-death-event-for-ender-dragon.patch
+++ b/patches/server/0872-Fire-entity-death-event-for-ender-dragon.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fire entity death event for ender dragon
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
-index e8be7ddbef12b27ed5c5fcfa8b726d5a85058aa9..0e797e2714a2fd103cbd51548764577fd9b6412d 100644
+index 45673a7630977e833df84e29e2f0b0012a3ab049..4d2fbade3a01ca26ff107f1323ae23db6dad8ef8 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
-@@ -641,6 +641,15 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -658,6 +658,15 @@ public class EnderDragon extends Mob implements Enemy {
@Override
public void kill() {
diff --git a/patches/unapplied/server/0883-Configurable-entity-tracking-range-by-Y-coordinate.patch b/patches/server/0873-Configurable-entity-tracking-range-by-Y-coordinate.patch
index 1cf3f3d9a6..3c28b2c60f 100644
--- a/patches/unapplied/server/0883-Configurable-entity-tracking-range-by-Y-coordinate.patch
+++ b/patches/server/0873-Configurable-entity-tracking-range-by-Y-coordinate.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Configurable entity tracking range by Y coordinate
Options to configure entity tracking by Y coordinate, also for each entity category.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index bff776f07bcc7841acc5757c1f53bde1812756c8..e7994d0f45b186938dd5606284290f56f110d7ed 100644
+index 8eae75993ad60226a86456487f3b3a59999ab423..38df456d3646c384d17ae9aec60c18fcd0651b4b 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1754,6 +1754,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1593,6 +1593,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
double d1 = vec3d.x * vec3d.x + vec3d.z * vec3d.z;
double d2 = d0 * d0;
boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
diff --git a/patches/unapplied/server/0884-Add-Listing-API-for-Player.patch b/patches/server/0874-Add-Listing-API-for-Player.patch
index 7e9ecaa392..97bb4bc855 100644
--- a/patches/unapplied/server/0884-Add-Listing-API-for-Player.patch
+++ b/patches/server/0874-Add-Listing-API-for-Player.patch
@@ -82,7 +82,7 @@ index 6247a21c9c391abf1f6db3482c659593e4f29355..9ccca41bf23efadba5329cc584bbcdca
static class EntryBuilder {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index ea04eb049e16d1027d15f9863d1fcd16f090c464..0aa28caa1254137c0bae8e213bd08c9a654f5335 100644
+index b2fab1e6a83b2603aeb8565b25022f9e99a61029..8ba99f6ef2b50ceb8e279ed559a375ada6877576 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -359,14 +359,22 @@ public abstract class PlayerList {
@@ -119,10 +119,10 @@ index ea04eb049e16d1027d15f9863d1fcd16f090c464..0aa28caa1254137c0bae8e213bd08c9a
// Paper end - Use single player info update packet on join
player.sentListPacket = true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index a06145c8ba3cd88c827bcc354e7dc2dafa3eda32..89268fc4a0570da27c53ad5f5a36cfbc1615c3fb 100644
+index 9a2e626c280e3dcdb1ef950afa5829daf2d0f073..42c35d628744db8e715cf72c17803e2e1a94697b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -199,6 +199,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -201,6 +201,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
private final ConversationTracker conversationTracker = new ConversationTracker();
private final Set<String> channels = new HashSet<String>();
private final Map<UUID, Set<WeakReference<Plugin>>> invertedVisibilityEntities = new HashMap<>();
@@ -130,7 +130,7 @@ index a06145c8ba3cd88c827bcc354e7dc2dafa3eda32..89268fc4a0570da27c53ad5f5a36cfbc
private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>();
private int hash = 0;
private double health = 20;
-@@ -2073,7 +2074,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -2086,7 +2087,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
otherPlayer.setUUID(uuidOverride);
}
// Paper end
@@ -139,7 +139,7 @@ index a06145c8ba3cd88c827bcc354e7dc2dafa3eda32..89268fc4a0570da27c53ad5f5a36cfbc
if (original != null) otherPlayer.setUUID(original); // Paper - uuid override
}
-@@ -2177,6 +2178,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -2190,6 +2191,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it
}
diff --git a/patches/unapplied/server/0885-Configurable-Region-Compression-Format.patch b/patches/server/0875-Configurable-Region-Compression-Format.patch
index 64a52a4ea2..64a52a4ea2 100644
--- a/patches/unapplied/server/0885-Configurable-Region-Compression-Format.patch
+++ b/patches/server/0875-Configurable-Region-Compression-Format.patch
diff --git a/patches/unapplied/server/0886-Add-BlockFace-to-BlockDamageEvent.patch b/patches/server/0876-Add-BlockFace-to-BlockDamageEvent.patch
index 888a2dd187..efbc14f784 100644
--- a/patches/unapplied/server/0886-Add-BlockFace-to-BlockDamageEvent.patch
+++ b/patches/server/0876-Add-BlockFace-to-BlockDamageEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockFace to BlockDamageEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
-index 266fd2874293091f7bf49dcb8c9295250ac7286c..dd78a1685bd841577aa9d5010fffda1468901baf 100644
+index c680f081ba548f84f07a968a46811090c53e57e3..d839f8df658c894f144ba4637d290ffbed77e132 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
-@@ -256,7 +256,7 @@ public class ServerPlayerGameMode {
+@@ -261,7 +261,7 @@ public class ServerPlayerGameMode {
}
return;
}
@@ -18,10 +18,10 @@ index 266fd2874293091f7bf49dcb8c9295250ac7286c..dd78a1685bd841577aa9d5010fffda14
if (blockEvent.isCancelled()) {
// Let the client know the block still exists
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 97ce8663744041bd57bbb1000f77a05e01156a6c..cdb5fd2642e7c5325f11633de8d58a5a8cdc2c77 100644
+index 2f2b09b2b9bd8730b83ade4d7da996b3b6696e0a..69e191d4394e1b22fdf4ba817cb2ec0ae3805414 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -650,13 +650,13 @@ public class CraftEventFactory {
+@@ -651,13 +651,13 @@ public class CraftEventFactory {
/**
* BlockDamageEvent
*/
diff --git a/patches/unapplied/server/0887-Fix-NPE-on-Boat-getStatus.patch b/patches/server/0877-Fix-NPE-on-Boat-getStatus.patch
index 70323a4352..70323a4352 100644
--- a/patches/unapplied/server/0887-Fix-NPE-on-Boat-getStatus.patch
+++ b/patches/server/0877-Fix-NPE-on-Boat-getStatus.patch
diff --git a/patches/unapplied/server/0888-Expand-Pose-API.patch b/patches/server/0878-Expand-Pose-API.patch
index de1b0ed67e..59a2bc1a09 100644
--- a/patches/unapplied/server/0888-Expand-Pose-API.patch
+++ b/patches/server/0878-Expand-Pose-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expand Pose API
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 27d736d34c91c08782fa8fd60742e296580e08f2..73669ce44d3b62183f983365df5a46c10e1458bf 100644
+index 94c5dcfdf1dae1f4764c3c7287e4b51928a35a4c..84d735d358e2b58df0fccc8ffc5ef3346e62071d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -420,6 +420,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -426,6 +426,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@javax.annotation.Nullable
private UUID originWorld;
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
@@ -16,7 +16,7 @@ index 27d736d34c91c08782fa8fd60742e296580e08f2..73669ce44d3b62183f983365df5a46c1
public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
-@@ -643,6 +644,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -619,6 +620,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void onClientRemoval() {}
public void setPose(net.minecraft.world.entity.Pose pose) {
@@ -25,10 +25,10 @@ index 27d736d34c91c08782fa8fd60742e296580e08f2..73669ce44d3b62183f983365df5a46c1
if (pose == this.getPose()) {
return;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 96448895a0a18e6f819d0a2a629c04abd331fa85..d52b7c5739b8ea51cb91c45ddcad6237b9ce5a5e 100644
+index b5622c5bcc97ff9241d236a35018918db5b2103a..a8b9b50991361160880b9fc0a94cad30c319e62e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -897,6 +897,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -899,6 +899,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isSneaking() {
return this.getHandle().isShiftKeyDown();
}
diff --git a/patches/unapplied/server/0889-More-DragonBattle-API.patch b/patches/server/0879-More-DragonBattle-API.patch
index a6e0c111c0..a6e0c111c0 100644
--- a/patches/unapplied/server/0889-More-DragonBattle-API.patch
+++ b/patches/server/0879-More-DragonBattle-API.patch
diff --git a/patches/unapplied/server/0890-Add-PlayerPickItemEvent.patch b/patches/server/0880-Add-PlayerPickItemEvent.patch
index 010e85d01a..c8a0647018 100644
--- a/patches/unapplied/server/0890-Add-PlayerPickItemEvent.patch
+++ b/patches/server/0880-Add-PlayerPickItemEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerPickItemEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 5c9d3ce9c84fd86209023306ad15a9bcb1725b0d..30e0563ba54021bf8f2896bee8060e723ad84d48 100644
+index 9206806204862e7b50f5c520660a07bdd7604480..122244a37872a21fe0df5f6ab8f4cad941b59479 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -932,8 +932,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -935,8 +935,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.disconnect("Invalid hotbar selection (Hacking?)", org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause
return;
}
@@ -28,7 +28,7 @@ index 5c9d3ce9c84fd86209023306ad15a9bcb1725b0d..30e0563ba54021bf8f2896bee8060e72
this.player.connection.send(new ClientboundContainerSetSlotPacket(-2, 0, packet.getSlot(), this.player.getInventory().getItem(packet.getSlot())));
this.player.connection.send(new ClientboundSetCarriedItemPacket(this.player.getInventory().selected));
diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java
-index 2c20441cce1e07239a65aadfb85004fcdf3672c8..1e77482a98869e464c1f0a873cff8febf7924c8c 100644
+index 688ed0c32b05b0135b94ec05738cdc6ff8dcb677..a62e7354bf67a66bdf9cd7c8f5d2e8f6bcacc74f 100644
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
@@ -171,7 +171,13 @@ public class Inventory implements Container, Nameable {
diff --git a/patches/unapplied/server/0891-Allow-trident-custom-damage.patch b/patches/server/0881-Allow-trident-custom-damage.patch
index eaa126da9c..75570ca360 100644
--- a/patches/unapplied/server/0891-Allow-trident-custom-damage.patch
+++ b/patches/server/0881-Allow-trident-custom-damage.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Allow trident custom damage
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
-index c75ac52f302e8e29e0bdea32c85ccf6713257a9b..3ff06cc6ad35567bcb1f29115db63c11a8e79dbb 100644
+index e45c3a9805d9fac1fabe6d891c817743acd9969e..cb71f468e90f076caf2c0dcc5f2ba2745c737c22 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
-@@ -35,10 +35,12 @@ public class ThrownTrident extends AbstractArrow {
+@@ -36,10 +36,12 @@ public class ThrownTrident extends AbstractArrow {
public ThrownTrident(EntityType<? extends ThrownTrident> type, Level world) {
super(type, world);
@@ -16,17 +16,17 @@ index c75ac52f302e8e29e0bdea32c85ccf6713257a9b..3ff06cc6ad35567bcb1f29115db63c11
}
public ThrownTrident(Level world, LivingEntity owner, ItemStack stack) {
- super(EntityType.TRIDENT, owner, world, stack);
+ super(EntityType.TRIDENT, owner, world, stack, (ItemStack) null);
+ this.setBaseDamage(net.minecraft.world.item.TridentItem.BASE_DAMAGE); // Paper - Allow trident custom damage
- this.entityData.set(ThrownTrident.ID_LOYALTY, (byte) EnchantmentHelper.getLoyalty(stack));
+ this.entityData.set(ThrownTrident.ID_LOYALTY, this.getLoyaltyFromItem(stack));
this.entityData.set(ThrownTrident.ID_FOIL, stack.hasFoil());
}
-@@ -128,7 +130,7 @@ public class ThrownTrident extends AbstractArrow {
+@@ -129,7 +131,7 @@ public class ThrownTrident extends AbstractArrow {
@Override
protected void onHitEntity(EntityHitResult entityHitResult) {
Entity entity = entityHitResult.getEntity();
- float f = 8.0F;
+ float f = (float) this.getBaseDamage(); // Paper - Allow trident custom damage
-
- if (entity instanceof LivingEntity entityliving) {
- f += EnchantmentHelper.getDamageBonus(this.getPickupItemStackOrigin(), entityliving.getType());
+ Entity entity1 = this.getOwner();
+ DamageSource damagesource = this.damageSources().trident(this, (Entity) (entity1 == null ? this : entity1));
+ Level world = this.level();
diff --git a/patches/unapplied/server/0892-Expose-hand-in-BlockCanBuildEvent.patch b/patches/server/0882-Expose-hand-in-BlockCanBuildEvent.patch
index 4abc7e9fc5..4abc7e9fc5 100644
--- a/patches/unapplied/server/0892-Expose-hand-in-BlockCanBuildEvent.patch
+++ b/patches/server/0882-Expose-hand-in-BlockCanBuildEvent.patch
diff --git a/patches/unapplied/server/0893-Optimize-nearest-structure-border-iteration.patch b/patches/server/0883-Optimize-nearest-structure-border-iteration.patch
index 805af0f26c..df5f60c52c 100644
--- a/patches/unapplied/server/0893-Optimize-nearest-structure-border-iteration.patch
+++ b/patches/server/0883-Optimize-nearest-structure-border-iteration.patch
@@ -14,10 +14,10 @@ ensure that the returned found structure (which may for example be a buried
treasure that will be marked on a treasure map) is the same as in vanilla.
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
-index c4972e5767488878f7929226258c41c1cc30a47f..c9cd18ce79a6ee7297a8fd14f4dbe712570b3ced 100644
+index 102de569415ef011dacdca9a6ea8134d0ef62454..29697fad32dad3377eebc82d280ba48d3c1ad516 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
-@@ -266,12 +266,15 @@ public abstract class ChunkGenerator {
+@@ -265,12 +265,15 @@ public abstract class ChunkGenerator {
int i1 = placement.spacing();
for (int j1 = -radius; j1 <= radius; ++j1) {
diff --git a/patches/unapplied/server/0894-Implement-OfflinePlayer-isConnected.patch b/patches/server/0884-Implement-OfflinePlayer-isConnected.patch
index 5c57b374ff..471869e451 100644
--- a/patches/unapplied/server/0894-Implement-OfflinePlayer-isConnected.patch
+++ b/patches/server/0884-Implement-OfflinePlayer-isConnected.patch
@@ -23,10 +23,10 @@ index 4d654c4f0b6210a9841427789ba70ce5d1d308be..9d93130f23addb18b97d7f5ec013faef
public String getName() {
Player player = this.getPlayer();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 89268fc4a0570da27c53ad5f5a36cfbc1615c3fb..357255d58c2ec1e20828a544e5ae9f0927485cef 100644
+index 42c35d628744db8e715cf72c17803e2e1a94697b..de031ff4b976db173eae55294f598cad9c052df7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -254,6 +254,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -256,6 +256,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return this.server.getPlayer(this.getUniqueId()) != null;
}
diff --git a/patches/unapplied/server/0895-Fix-inventory-desync.patch b/patches/server/0885-Fix-inventory-desync.patch
index 27d0fc0515..9c73c10742 100644
--- a/patches/unapplied/server/0895-Fix-inventory-desync.patch
+++ b/patches/server/0885-Fix-inventory-desync.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix inventory desync
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index a79023c9e3265221e55cae1879f9c0052dafbef6..88ea8ed1b81ece6315bc8dcde04b5fa1bb6a7d04 100644
+index e16474c6c4a371070a81324037a441e6bafbb78e..d52b6fcaf59a798925c32076fc6ecd8ba822bf48 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -397,6 +397,7 @@ public class ServerPlayer extends Player {
+@@ -402,6 +402,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
// Use method to resend items in hands in case of client desync, because the item use got cancelled.
// For example, when cancelling the leash event
@@ -16,21 +16,6 @@ index a79023c9e3265221e55cae1879f9c0052dafbef6..88ea8ed1b81ece6315bc8dcde04b5fa1
public void resendItemInHands() {
this.containerMenu.findSlot(this.getInventory(), this.getInventory().selected).ifPresent(s -> {
this.containerSynchronizer.sendSlotChange(this.containerMenu, s, this.getMainHandItem());
-diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 5b169de9c2a34044dcf46c613291ae56a83ad5d2..80f0831fbd78ece360fe5ea850146a61dbe8c23c 100644
---- a/src/main/java/net/minecraft/world/entity/Mob.java
-+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -1466,8 +1466,9 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
- if (itemstack.is(Items.LEAD) && this.canBeLeashed(player)) {
- // CraftBukkit start - fire PlayerLeashEntityEvent
- if (CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) {
-- ((ServerPlayer) player).resendItemInHands(); // SPIGOT-7615: Resend to fix client desync with used item
-+ // ((ServerPlayer) player).resendItemInHands(); // SPIGOT-7615: Resend to fix client desync with used item // Paper - handled below
- ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(this, this.getLeashHolder()));
-+ player.containerMenu.sendAllDataToRemote(); // Paper - Fix inventory desync
- return InteractionResult.PASS;
- }
- // CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/animal/Cow.java b/src/main/java/net/minecraft/world/entity/animal/Cow.java
index 5a7b1be351834a6b8889b1380cede1be025cb302..e336934f37075a827843e4b1bb2b6b660d2c60c9 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Cow.java
diff --git a/patches/unapplied/server/0896-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0886-Add-titleOverride-to-InventoryOpenEvent.patch
index 9965aa3045..27263030ca 100644
--- a/patches/unapplied/server/0896-Add-titleOverride-to-InventoryOpenEvent.patch
+++ b/patches/server/0886-Add-titleOverride-to-InventoryOpenEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add titleOverride to InventoryOpenEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 88ea8ed1b81ece6315bc8dcde04b5fa1bb6a7d04..9179434d490bc8546ba3a35434998b9fc916e6b2 100644
+index d52b6fcaf59a798925c32076fc6ecd8ba822bf48..82906acbaa7e34de7519f15559bf40772f0f6ff2 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -1618,12 +1618,17 @@ public class ServerPlayer extends Player {
+@@ -1659,12 +1659,17 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.nextContainerCounter();
AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this);
@@ -27,7 +27,7 @@ index 88ea8ed1b81ece6315bc8dcde04b5fa1bb6a7d04..9179434d490bc8546ba3a35434998b9f
if (container == null && !cancelled) { // Let pre-cancelled events fall through
// SPIGOT-5263 - close chest if cancelled
if (factory instanceof Container) {
-@@ -1645,7 +1650,7 @@ public class ServerPlayer extends Player {
+@@ -1686,7 +1691,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
} else {
// CraftBukkit start
this.containerMenu = container;
@@ -79,10 +79,10 @@ index 3d36d79a4e7f16f6face3465cdf54656984f3ebc..41f3cdec7deabf34358b8087df77169f
if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen
player.containerMenu = container;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index cdb5fd2642e7c5325f11633de8d58a5a8cdc2c77..64d4246b9d13e6fe8b638c4a6b664f87fc0e66a0 100644
+index 69e191d4394e1b22fdf4ba817cb2ec0ae3805414..70f5a07206453124e7069bb013184038b4def654 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1381,10 +1381,21 @@ public class CraftEventFactory {
+@@ -1382,10 +1382,21 @@ public class CraftEventFactory {
}
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) {
@@ -105,7 +105,7 @@ index cdb5fd2642e7c5325f11633de8d58a5a8cdc2c77..64d4246b9d13e6fe8b638c4a6b664f87
if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason
}
-@@ -1399,10 +1410,10 @@ public class CraftEventFactory {
+@@ -1400,10 +1411,10 @@ public class CraftEventFactory {
if (event.isCancelled()) {
container.transferTo(player.containerMenu, craftPlayer);
@@ -117,4 +117,4 @@ index cdb5fd2642e7c5325f11633de8d58a5a8cdc2c77..64d4246b9d13e6fe8b638c4a6b664f87
+ return com.mojang.datafixers.util.Pair.of(event.titleOverride(), container); // Paper - Add titleOverride to InventoryOpenEvent
}
- public static ItemStack callPreCraftEvent(Container matrix, Container resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
+ public static ItemStack callPreCraftEvent(CraftingContainer matrix, Container resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
diff --git a/patches/unapplied/server/0897-Configure-sniffer-egg-hatch-time.patch b/patches/server/0887-Configure-sniffer-egg-hatch-time.patch
index 7def55b1f7..7def55b1f7 100644
--- a/patches/unapplied/server/0897-Configure-sniffer-egg-hatch-time.patch
+++ b/patches/server/0887-Configure-sniffer-egg-hatch-time.patch
diff --git a/patches/unapplied/server/0898-Do-crystal-portal-proximity-check-before-entity-look.patch b/patches/server/0888-Do-crystal-portal-proximity-check-before-entity-look.patch
index 67d506a715..67d506a715 100644
--- a/patches/unapplied/server/0898-Do-crystal-portal-proximity-check-before-entity-look.patch
+++ b/patches/server/0888-Do-crystal-portal-proximity-check-before-entity-look.patch
diff --git a/patches/unapplied/server/0899-Skip-POI-finding-if-stuck-in-vehicle.patch b/patches/server/0889-Skip-POI-finding-if-stuck-in-vehicle.patch
index a4dcac44ac..a4dcac44ac 100644
--- a/patches/unapplied/server/0899-Skip-POI-finding-if-stuck-in-vehicle.patch
+++ b/patches/server/0889-Skip-POI-finding-if-stuck-in-vehicle.patch
diff --git a/patches/unapplied/server/0900-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/0890-Add-slot-sanity-checks-in-container-clicks.patch
index b049da07fe..a1b9d2a84c 100644
--- a/patches/unapplied/server/0900-Add-slot-sanity-checks-in-container-clicks.patch
+++ b/patches/server/0890-Add-slot-sanity-checks-in-container-clicks.patch
@@ -4,24 +4,11 @@ Date: Mon, 11 Sep 2023 12:01:57 +1000
Subject: [PATCH] Add slot sanity checks in container clicks
-diff --git a/src/main/java/net/minecraft/core/component/DataComponentPatch.java b/src/main/java/net/minecraft/core/component/DataComponentPatch.java
-index 2a00a2c8102a4a88edcfc8c680c3711efeb75b4a..33340e8ebe23a1a9ce587be34551fb929c41d0fd 100644
---- a/src/main/java/net/minecraft/core/component/DataComponentPatch.java
-+++ b/src/main/java/net/minecraft/core/component/DataComponentPatch.java
-@@ -71,7 +71,7 @@ public final class DataComponentPatch {
- if (i == 0 && j == 0) {
- return DataComponentPatch.EMPTY;
- } else {
-- Reference2ObjectMap<DataComponentType<?>, Optional<?>> reference2objectmap = new Reference2ObjectArrayMap(i + j);
-+ Reference2ObjectMap<DataComponentType<?>, Optional<?>> reference2objectmap = new Reference2ObjectArrayMap(Math.min(i + j, 256)); // Paper - sensible initial size limit
-
- DataComponentType datacomponenttype;
- int k;
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 30e0563ba54021bf8f2896bee8060e723ad84d48..e13097ceba283fdf165d7e6327fe78590252fe94 100644
+index 122244a37872a21fe0df5f6ab8f4cad941b59479..9e57d0b1222b7dd4b9dd1d9f82b4c2f7fc7bcc3c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2970,6 +2970,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2987,6 +2987,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
break;
case SWAP:
if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) {
diff --git a/patches/unapplied/server/0901-Call-BlockRedstoneEvents-for-lecterns.patch b/patches/server/0891-Call-BlockRedstoneEvents-for-lecterns.patch
index bafd87afad..b2cf0ce209 100644
--- a/patches/unapplied/server/0901-Call-BlockRedstoneEvents-for-lecterns.patch
+++ b/patches/server/0891-Call-BlockRedstoneEvents-for-lecterns.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Call BlockRedstoneEvents for lecterns
diff --git a/src/main/java/net/minecraft/world/level/block/LecternBlock.java b/src/main/java/net/minecraft/world/level/block/LecternBlock.java
-index e2d411fe3f8b00c18c2cfb8d11cd9b46e461fb1a..203f4dd2255cffdab468fe1ec869ce9b989cace1 100644
+index 5ff1e755301336a4e6ec6757510d0c595eacd7a6..f420989056c5c86c94333361f1733fd4b7488283 100644
--- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java
-@@ -178,6 +178,16 @@ public class LecternBlock extends BaseEntityBlock {
+@@ -179,6 +179,16 @@ public class LecternBlock extends BaseEntityBlock {
}
private static void changePowered(Level world, BlockPos pos, BlockState state, boolean powered) {
diff --git a/patches/unapplied/server/0902-Allow-proper-checking-of-empty-item-stacks.patch b/patches/server/0892-Allow-proper-checking-of-empty-item-stacks.patch
index 4a7f6baa7b..e92d0f41f5 100644
--- a/patches/unapplied/server/0902-Allow-proper-checking-of-empty-item-stacks.patch
+++ b/patches/server/0892-Allow-proper-checking-of-empty-item-stacks.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Allow proper checking of empty item stacks
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
-index 7c510d673253e53c1cebbe7af2aacbcaa59cb9de..776437ae42865baccab4fb5d3f2715c8f0519b8a 100644
+index 099b5364aa16afb4fb30ffca3e1bea8f52185150..0774711e3797c10526c65b7e5824a739c04597e7 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -36,12 +36,19 @@ public final class CraftItemStack extends ItemStack {
diff --git a/patches/unapplied/server/0903-Fix-silent-equipment-change-for-mobs.patch b/patches/server/0893-Fix-silent-equipment-change-for-mobs.patch
index 08e06c8e45..edc3ea39f0 100644
--- a/patches/unapplied/server/0903-Fix-silent-equipment-change-for-mobs.patch
+++ b/patches/server/0893-Fix-silent-equipment-change-for-mobs.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix silent equipment change for mobs
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 80f0831fbd78ece360fe5ea850146a61dbe8c23c..5581fd6656fc13ea1d036d6caab2aba39c5320ac 100644
+index 3988782c51b9d517ec003185c7b64605249206e2..56873752ae1ae0d2a36cb171d2de6884e15c01a5 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -1153,19 +1153,26 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
+@@ -1104,19 +1104,26 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab
@Override
public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
@@ -25,11 +25,11 @@ index 80f0831fbd78ece360fe5ea850146a61dbe8c23c..5581fd6656fc13ea1d036d6caab2aba3
- this.onEquipItem(slot, (ItemStack) this.handItems.set(slot.getIndex(), stack), stack);
+ this.onEquipItem(slot, (ItemStack) this.handItems.set(slot.getIndex(), stack), stack, silent); // Paper - Fix silent equipment change
break;
- case ARMOR:
+ case HUMANOID_ARMOR:
- this.onEquipItem(slot, (ItemStack) this.armorItems.set(slot.getIndex(), stack), stack);
+ this.onEquipItem(slot, (ItemStack) this.armorItems.set(slot.getIndex(), stack), stack, silent); // Paper - Fix silent equipment change
break;
- case BODY:
+ case ANIMAL_ARMOR:
ItemStack itemstack1 = this.bodyArmorItem;
this.bodyArmorItem = stack;
@@ -39,10 +39,10 @@ index 80f0831fbd78ece360fe5ea850146a61dbe8c23c..5581fd6656fc13ea1d036d6caab2aba3
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
-index 87ada535362303097862e811d3d573997983064f..0c5fe46d2da113beff3e220843593d616e37d4ca 100644
+index 6627126ab02dbd5e9d1de6b186d75d850ef11280..3b5cf6ffb74d11bea5eb21bd66d679734ff5000c 100644
--- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
+++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java
-@@ -250,8 +250,8 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
+@@ -254,8 +254,8 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo
// Paper end - shouldBurnInDay API
@Override
diff --git a/patches/unapplied/server/0904-Fix-spigot-s-Forced-Stats.patch b/patches/server/0894-Fix-spigot-s-Forced-Stats.patch
index a138a58b79..554f1f8844 100644
--- a/patches/unapplied/server/0904-Fix-spigot-s-Forced-Stats.patch
+++ b/patches/server/0894-Fix-spigot-s-Forced-Stats.patch
@@ -8,7 +8,7 @@ disables saving any forced stats, so it stays at the same value (without enablin
fixes stat initialization to not cause a NullPointerException
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
-index 9501e5f25f5c4d3069e554d4dc82b0e094156682..f890738d3bb9fb5e70a9d323c6cec97f9948f9cf 100644
+index ec437644adff6a6ec1e3fe2dd3a6354edafde1db..fb7342f7a5008a283c3400c6313c637de8210dfa 100644
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
@@ -48,13 +48,6 @@ public class ServerStatsCounter extends StatsCounter {
diff --git a/patches/unapplied/server/0905-Add-missing-InventoryHolders-to-inventories.patch b/patches/server/0895-Add-missing-InventoryHolders-to-inventories.patch
index 7f32a639b2..ae956d4693 100644
--- a/patches/unapplied/server/0905-Add-missing-InventoryHolders-to-inventories.patch
+++ b/patches/server/0895-Add-missing-InventoryHolders-to-inventories.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add missing InventoryHolders to inventories
diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java
-index 39f126347459a68e8bcc59e374a1b9fe507b7497..f402dbbfe3a443e6bc51f88b85abe937852b52f0 100644
+index db41ffbd24adccd78edf3368ba1f7a3ab9f6072c..5db5ba026462ca642dcee718af732f80fadabef5 100644
--- a/src/main/java/net/minecraft/world/Container.java
+++ b/src/main/java/net/minecraft/world/Container.java
@@ -103,7 +103,7 @@ public interface Container extends Clearable {
@@ -148,10 +148,10 @@ index 85e336637db8643fc5aca1dba724c9b341cbf46f..12b466ccb7c36021cf807c4f3fd2bcb0
@Override
public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> getter) {
diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
-index 18612988acaee570038bffd1361aa3ffdc938852..2f62957e061f513e01ec617f22791a7f27d65f02 100644
+index 6f88ce0076460215f5c1a965aa2bd7050071b611..c1b9c3ad2cccfa520e9d73b786142624ac5f3380 100644
--- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java
-@@ -60,7 +60,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
+@@ -66,7 +66,7 @@ public class EnchantmentMenu extends AbstractContainerMenu {
public EnchantmentMenu(int syncId, Inventory playerInventory, ContainerLevelAccess context) {
super(MenuType.ENCHANTMENT, syncId);
@@ -161,10 +161,10 @@ index 18612988acaee570038bffd1361aa3ffdc938852..2f62957e061f513e01ec617f22791a7f
public void setChanged() {
super.setChanged();
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
-index ecf3cdc16d1ea830c4d45b57f69204118af3218a..db9444dda248260372d96ce239a590e88a4c1142 100644
+index 15ec798e149d80aace186f84b9236ddeaba690c3..1678f6c8b2c7db761783e53043169bf12bc2cb29 100644
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
-@@ -59,8 +59,8 @@ public class GrindstoneMenu extends AbstractContainerMenu {
+@@ -60,8 +60,8 @@ public class GrindstoneMenu extends AbstractContainerMenu {
public GrindstoneMenu(int syncId, Inventory playerInventory, final ContainerLevelAccess context) {
super(MenuType.GRINDSTONE, syncId);
@@ -261,10 +261,10 @@ index d4592218d761eb38402e3d95c642e80a708cb333..4c4266a85c38e41e6c7e6144a68624f4
public ResultContainer() {
this.itemStacks = NonNullList.withSize(1, ItemStack.EMPTY);
diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
-index 1a5d8debc053b24e5856de916f1d248b36f645ba..eade15820dd9db38b6af2a5c4314acfb14ca03e9 100644
+index 977ccef3c9fa7685209f3eca894a3b69501ebcc1..5ddae1afab0a68465ea60395c84b0997ee994f88 100644
--- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java
-@@ -68,7 +68,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
+@@ -69,7 +69,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
this.input = ItemStack.EMPTY;
this.slotUpdateListener = () -> {
};
@@ -273,7 +273,7 @@ index 1a5d8debc053b24e5856de916f1d248b36f645ba..eade15820dd9db38b6af2a5c4314acfb
@Override
public void setChanged() {
super.setChanged();
-@@ -83,7 +83,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
+@@ -84,7 +84,7 @@ public class StonecutterMenu extends AbstractContainerMenu {
}
// CraftBukkit end
};
diff --git a/patches/unapplied/server/0906-Do-not-read-tile-entities-in-chunks-that-are-positio.patch b/patches/server/0896-Do-not-read-tile-entities-in-chunks-that-are-positio.patch
index 21515b5dba..ab4d61b97a 100644
--- a/patches/unapplied/server/0906-Do-not-read-tile-entities-in-chunks-that-are-positio.patch
+++ b/patches/server/0896-Do-not-read-tile-entities-in-chunks-that-are-positio.patch
@@ -10,10 +10,10 @@ which would cause a crash on Folia but would appear to function
fine on Paper.
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
-index 2ca1f01ab59000949cbde1766c9811a72dbfb4ff..88f0aca2da0e14ed5ec0513944fa0ba28b73b5d1 100644
+index 5e1a68e3a920aab10a459b9b54f6abd59e7855e0..d42585bccb03f8ee1be5e37cfbe8520af4cc5454 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
-@@ -301,6 +301,13 @@ public class ChunkSerializer {
+@@ -303,6 +303,13 @@ public class ChunkSerializer {
for (int k1 = 0; k1 < nbttaglist3.size(); ++k1) {
CompoundTag nbttagcompound4 = nbttaglist3.getCompound(k1);
@@ -27,7 +27,7 @@ index 2ca1f01ab59000949cbde1766c9811a72dbfb4ff..88f0aca2da0e14ed5ec0513944fa0ba2
((ChunkAccess) object1).setBlockEntityNbt(nbttagcompound4);
}
-@@ -505,10 +512,19 @@ public class ChunkSerializer {
+@@ -507,10 +514,19 @@ public class ChunkSerializer {
CompoundTag nbttagcompound1 = nbttaglist1.getCompound(i);
boolean flag = nbttagcompound1.getBoolean("keepPacked");
diff --git a/patches/unapplied/server/0907-Add-missing-logs-for-log-ips-config-option.patch b/patches/server/0897-Add-missing-logs-for-log-ips-config-option.patch
index 2898d66615..2898d66615 100644
--- a/patches/unapplied/server/0907-Add-missing-logs-for-log-ips-config-option.patch
+++ b/patches/server/0897-Add-missing-logs-for-log-ips-config-option.patch
diff --git a/patches/unapplied/server/0908-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch b/patches/server/0898-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch
index e1f2934daa..e1f2934daa 100644
--- a/patches/unapplied/server/0908-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch
+++ b/patches/server/0898-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch
diff --git a/patches/unapplied/server/0909-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch b/patches/server/0899-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch
index 7ccf4c0f03..7ccf4c0f03 100644
--- a/patches/unapplied/server/0909-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch
+++ b/patches/server/0899-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch
diff --git a/patches/unapplied/server/0910-Fix-team-sidebar-objectives-not-being-cleared.patch b/patches/server/0900-Fix-team-sidebar-objectives-not-being-cleared.patch
index 88a39d0b20..88a39d0b20 100644
--- a/patches/unapplied/server/0910-Fix-team-sidebar-objectives-not-being-cleared.patch
+++ b/patches/server/0900-Fix-team-sidebar-objectives-not-being-cleared.patch
diff --git a/patches/unapplied/server/0911-Fix-missing-map-initialize-event-call.patch b/patches/server/0901-Fix-missing-map-initialize-event-call.patch
index fd2193a41f..214c9bce18 100644
--- a/patches/unapplied/server/0911-Fix-missing-map-initialize-event-call.patch
+++ b/patches/server/0901-Fix-missing-map-initialize-event-call.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Fix missing map initialize event call
public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 055fcf3d51852ca466c7189f36382e0b0d0d86d2..2da315d288efa66f7bff96923ebd5eac5130ba39 100644
+index 6e9a3b6a1595a1731ca8187d2610c840337a12ed..8b5eabea1a0926c22b58ef8761caee3a06aa5ee0 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1664,13 +1664,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1662,13 +1662,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
@Nullable
@Override
public MapItemSavedData getMapData(MapId id) {
diff --git a/patches/unapplied/server/0912-Update-entity-data-when-attaching-firework-to-entity.patch b/patches/server/0902-Update-entity-data-when-attaching-firework-to-entity.patch
index 35494c32ed..35494c32ed 100644
--- a/patches/unapplied/server/0912-Update-entity-data-when-attaching-firework-to-entity.patch
+++ b/patches/server/0902-Update-entity-data-when-attaching-firework-to-entity.patch
diff --git a/patches/unapplied/server/0913-Fix-UnsafeValues-loadAdvancement.patch b/patches/server/0903-Fix-UnsafeValues-loadAdvancement.patch
index aec6e62500..205c42df23 100644
--- a/patches/unapplied/server/0913-Fix-UnsafeValues-loadAdvancement.patch
+++ b/patches/server/0903-Fix-UnsafeValues-loadAdvancement.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix UnsafeValues#loadAdvancement
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 256fdd08a7653d1dc93cd13a976cd114253aa945..b5abf9c7e5e09c670ae2435c23587e0482fbe917 100644
+index a98fcfcf71b2a072d60120046d9aac9ad4546196..17caf21e23aa7f5a5216923e73aae94a59bcac44 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -322,9 +322,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/unapplied/server/0914-Add-player-idle-duration-API.patch b/patches/server/0904-Add-player-idle-duration-API.patch
index 6c7541f90e..1530af67b1 100644
--- a/patches/unapplied/server/0914-Add-player-idle-duration-API.patch
+++ b/patches/server/0904-Add-player-idle-duration-API.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add player idle duration API
Implements API for getting and resetting a player's idle duration.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 357255d58c2ec1e20828a544e5ae9f0927485cef..af14b09630af4a092491e6b9a7b3f418cc82c0de 100644
+index de031ff4b976db173eae55294f598cad9c052df7..1deaaf99d09cd46bcc4d609e6015cc1a288d5029 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -3400,6 +3400,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -3413,6 +3413,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end
diff --git a/patches/unapplied/server/0915-Don-t-check-if-we-can-see-non-visible-entities.patch b/patches/server/0905-Don-t-check-if-we-can-see-non-visible-entities.patch
index a63a8d3cb7..43404ba162 100644
--- a/patches/unapplied/server/0915-Don-t-check-if-we-can-see-non-visible-entities.patch
+++ b/patches/server/0905-Don-t-check-if-we-can-see-non-visible-entities.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't check if we can see non-visible entities
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index e7994d0f45b186938dd5606284290f56f110d7ed..027f2734b0ff226437f4c94430215929b6ea2219 100644
+index 38df456d3646c384d17ae9aec60c18fcd0651b4b..cf4517e57169856acd0782e5ced4eb8c045b8d78 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1765,7 +1765,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1604,7 +1604,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper end - Configurable entity tracking range by Y
// CraftBukkit start - respect vanish API
diff --git a/patches/unapplied/server/0916-Fix-NPE-in-SculkBloomEvent-world-access.patch b/patches/server/0906-Fix-NPE-in-SculkBloomEvent-world-access.patch
index 3f575aef28..5abf7cda2c 100644
--- a/patches/unapplied/server/0916-Fix-NPE-in-SculkBloomEvent-world-access.patch
+++ b/patches/server/0906-Fix-NPE-in-SculkBloomEvent-world-access.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix NPE in SculkBloomEvent world access
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
-index faa708976469263093b673d756ac5570f3680236..81dd0aa6a90fd9dda9e7752f85b9cf4568e3b575 100644
+index 8d95d129cae03af9ded699047742324807186994..a74732902c0494c67e6acf2fc04581ff9c46b832 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
-@@ -34,9 +34,16 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
+@@ -35,9 +35,16 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
public SculkCatalystBlockEntity(BlockPos pos, BlockState state) {
super(BlockEntityType.SCULK_CATALYST, pos, state);
this.catalystListener = new SculkCatalystBlockEntity.CatalystListener(state, new BlockPositionSource(pos));
@@ -26,7 +26,7 @@ index faa708976469263093b673d756ac5570f3680236..81dd0aa6a90fd9dda9e7752f85b9cf45
public static void serverTick(Level world, BlockPos pos, BlockState state, SculkCatalystBlockEntity blockEntity) {
org.bukkit.craftbukkit.event.CraftEventFactory.sourceBlockOverride = blockEntity.getBlockPos(); // CraftBukkit - SPIGOT-7068: Add source block override, not the most elegant way but better than passing down a BlockPosition up to five methods deep.
blockEntity.catalystListener.getSculkSpreader().updateCursors(world, pos, world.getRandom(), true);
-@@ -66,13 +73,12 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
+@@ -67,13 +74,12 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi
final SculkSpreader sculkSpreader;
private final BlockState blockState;
private final PositionSource positionSource;
diff --git a/patches/unapplied/server/0917-Allow-null-itemstack-for-Player-sendEquipmentChange.patch b/patches/server/0907-Allow-null-itemstack-for-Player-sendEquipmentChange.patch
index 5c8534a63f..6750ca6340 100644
--- a/patches/unapplied/server/0917-Allow-null-itemstack-for-Player-sendEquipmentChange.patch
+++ b/patches/server/0907-Allow-null-itemstack-for-Player-sendEquipmentChange.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Allow null itemstack for Player#sendEquipmentChange
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index af14b09630af4a092491e6b9a7b3f418cc82c0de..e9bd24861bca4554898306117bb533d19171cedf 100644
+index 1deaaf99d09cd46bcc4d609e6015cc1a288d5029..0865e088357757a253f73b492b43b6075b237e4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -1125,7 +1125,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -1127,7 +1127,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void sendEquipmentChange(LivingEntity entity, EquipmentSlot slot, ItemStack item) {
diff --git a/patches/unapplied/server/0918-Optimize-VarInts.patch b/patches/server/0908-Optimize-VarInts.patch
index b96957d432..b96957d432 100644
--- a/patches/unapplied/server/0918-Optimize-VarInts.patch
+++ b/patches/server/0908-Optimize-VarInts.patch
diff --git a/patches/unapplied/server/0919-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/server/0909-Add-API-to-get-the-collision-shape-of-a-block-before.patch
index 48e81c5809..48e81c5809 100644
--- a/patches/unapplied/server/0919-Add-API-to-get-the-collision-shape-of-a-block-before.patch
+++ b/patches/server/0909-Add-API-to-get-the-collision-shape-of-a-block-before.patch
diff --git a/patches/unapplied/server/0920-Add-predicate-for-blocks-when-raytracing.patch b/patches/server/0910-Add-predicate-for-blocks-when-raytracing.patch
index 0c5bb24d83..81e484a04f 100644
--- a/patches/unapplied/server/0920-Add-predicate-for-blocks-when-raytracing.patch
+++ b/patches/server/0910-Add-predicate-for-blocks-when-raytracing.patch
@@ -47,7 +47,7 @@ index c978f3b2d42f512e982f289e76c2422e41b7eec6..bb8e962e63c7a2d931f9bd7f7c002aa3
Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo());
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index f371e76215a789f84eb5086a3d08bcf6e4e02dd8..7732d838ef33936b6728042f8d6be49b500e6dd2 100644
+index 8708f0df623e82074ecf858c8d1389b33ded07a1..a9e4b6fb0f93e65b1a309abb5911b1b72d521f23 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1161,9 +1161,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/unapplied/server/0921-Broadcast-take-item-packets-with-collector-as-source.patch b/patches/server/0911-Broadcast-take-item-packets-with-collector-as-source.patch
index 417584532d..c44c689c19 100644
--- a/patches/unapplied/server/0921-Broadcast-take-item-packets-with-collector-as-source.patch
+++ b/patches/server/0911-Broadcast-take-item-packets-with-collector-as-source.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Broadcast take item packets with collector as source
This fixes players (which can't view the collector) seeing item pickups with themselves as the target.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index d314d5f9f66a86376d66cd607e3545c5d95fd12e..844da8d55e43607239b54c7cb823cf26f2b04ed1 100644
+index 54bb93eae61ed223a9287671f5d47d978170824f..a4940a6dccb6937a2461d7b34a9250c2699083e3 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 {
+@@ -3720,7 +3720,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public void take(Entity item, int count) {
if (!item.isRemoved() && !this.level().isClientSide && (item instanceof ItemEntity || item instanceof AbstractArrow || item instanceof ExperienceOrb)) {
diff --git a/patches/unapplied/server/0922-Expand-LingeringPotion-API.patch b/patches/server/0912-Expand-LingeringPotion-API.patch
index b203b03355..fdd0abf668 100644
--- a/patches/unapplied/server/0922-Expand-LingeringPotion-API.patch
+++ b/patches/server/0912-Expand-LingeringPotion-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expand LingeringPotion API
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-index d8ac724d01d81b8c52f8e05451212ac1cd775c0b..c64e0d623124ad9116cb6c5c7c3320fad7cc1aa3 100644
+index 5c6cb752f61c3f3c2960a337173fb7dfe86cc1d3..86c4b593a97431efd062b8c9d86bf92269c00536 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-@@ -272,7 +272,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -274,7 +274,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
boolean noEffects = potioncontents.hasEffects(); // Paper - Fix potions splash events
// CraftBukkit start
org.bukkit.event.entity.LingeringPotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callLingeringPotionSplashEvent(this, position, entityareaeffectcloud);
diff --git a/patches/unapplied/server/0923-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/0913-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
index 8cc5bc9a6f..eaca74543d 100644
--- a/patches/unapplied/server/0923-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
+++ b/patches/server/0913-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
@@ -45,7 +45,7 @@ index 0471d9c85af02133f99cca4e181b83b58a3f1abc..4f701788bd21b61cad251a3a88f9bc41
BlockState iblockdata = BaseFireBlock.getState(this.level(), blockposition);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 7732d838ef33936b6728042f8d6be49b500e6dd2..8b4b4017f9874a153c27a96a7df1a966c5bdf4f3 100644
+index a9e4b6fb0f93e65b1a309abb5911b1b72d521f23..d6cdbe44cfddecc2a28c28892431aaa45f73cb8a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -793,7 +793,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/unapplied/server/0924-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/server/0914-Add-hand-to-fish-event-for-all-player-interactions.patch
index aedb99d8f9..dd3e5bba44 100644
--- a/patches/unapplied/server/0924-Add-hand-to-fish-event-for-all-player-interactions.patch
+++ b/patches/server/0914-Add-hand-to-fish-event-for-all-player-interactions.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add hand to fish event for all player interactions
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f547753a4 100644
+index e70ca1b2e6fbbc1f20e65429298d01b4ebd2dd29..270f4c94912b16c7d4a2d62670847cbb5e011819 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-@@ -481,7 +481,15 @@ public class FishingHook extends Projectile {
+@@ -482,7 +482,15 @@ public class FishingHook extends Projectile {
@Override
public void readAdditionalSaveData(CompoundTag nbt) {}
@@ -24,7 +24,7 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
net.minecraft.world.entity.player.Player entityhuman = this.getPlayerOwner();
if (!this.level().isClientSide && entityhuman != null && !this.shouldStopFishing(entityhuman)) {
-@@ -489,7 +497,7 @@ public class FishingHook extends Projectile {
+@@ -490,7 +498,7 @@ public class FishingHook extends Projectile {
if (this.hookedIn != null) {
// CraftBukkit start
@@ -33,7 +33,7 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
if (playerFishEvent.isCancelled()) {
-@@ -518,7 +526,7 @@ public class FishingHook extends Projectile {
+@@ -519,7 +527,7 @@ public class FishingHook extends Projectile {
}
// Paper end
// CraftBukkit start
@@ -42,7 +42,7 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1);
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
-@@ -552,7 +560,7 @@ public class FishingHook extends Projectile {
+@@ -553,7 +561,7 @@ public class FishingHook extends Projectile {
if (this.onGround()) {
// CraftBukkit start
@@ -51,7 +51,7 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
if (playerFishEvent.isCancelled()) {
-@@ -563,7 +571,7 @@ public class FishingHook extends Projectile {
+@@ -564,7 +572,7 @@ public class FishingHook extends Projectile {
}
// CraftBukkit start
if (i == 0) {
@@ -61,15 +61,15 @@ index e603307871b623ce437f4b1b68ab306fbdd9919d..9962d50ea342cd47428a814519b2d54f
if (playerFishEvent.isCancelled()) {
return 0;
diff --git a/src/main/java/net/minecraft/world/item/FishingRodItem.java b/src/main/java/net/minecraft/world/item/FishingRodItem.java
-index 87e1f74c3d37c9dd23350c9cbc190252e8cb88cd..fd71efd124e54168e6f9b35b1a5ab836141ab2d2 100644
+index 364c3090057405f83130089d275baf1a61d8e0ca..efb21967fdd2c3b4cb35db6faf213d55da5fc30e 100644
--- a/src/main/java/net/minecraft/world/item/FishingRodItem.java
+++ b/src/main/java/net/minecraft/world/item/FishingRodItem.java
@@ -30,7 +30,7 @@ public class FishingRodItem extends Item {
if (user.fishing != null) {
if (!world.isClientSide) {
-- i = user.fishing.retrieve(itemstack);
-+ i = user.fishing.retrieve(hand, itemstack); // Paper - Add hand parameter to PlayerFishEvent
+- int i = user.fishing.retrieve(itemstack);
++ int i = user.fishing.retrieve(hand, itemstack); // Paper - Add hand parameter to PlayerFishEvent
+
itemstack.hurtAndBreak(i, user, LivingEntity.getSlotForHand(hand));
}
-
diff --git a/patches/unapplied/server/0925-Fix-several-issues-with-EntityBreedEvent.patch b/patches/server/0915-Fix-several-issues-with-EntityBreedEvent.patch
index 0db9ed0db3..9e82a901a0 100644
--- a/patches/unapplied/server/0925-Fix-several-issues-with-EntityBreedEvent.patch
+++ b/patches/server/0915-Fix-several-issues-with-EntityBreedEvent.patch
@@ -11,7 +11,7 @@ also changed. Also in several places, the breed item was stored after
it was decreased by one to consume the item.
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
-index 3bd13c9b8c7573726ae7defdc3c0f32876d1cf1f..5193cf1d3c922d750a11e492b7636215e23ad0d6 100644
+index 370c444153d04fe7896952219604d83a19a996e2..e96fca314bebea5fcdb684d3478af1b6dc5f13cf 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
@@ -147,8 +147,9 @@ public abstract class Animal extends AgeableMob {
@@ -54,10 +54,10 @@ index 3bd13c9b8c7573726ae7defdc3c0f32876d1cf1f..5193cf1d3c922d750a11e492b7636215
this.level().broadcastEntityEvent(this, (byte) 18);
}
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 0440fd2d1bb3f87641ad88de6d5ae64617536a6d..db60b91c2b26ca8cdb66e05deab7742ffe212767 100644
+index 293d6891948e99ac9bd741008f7dcbc5fc1a2e3d..e108f876d3f129c6287f13d68427aed2a6f0c5b1 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-@@ -668,8 +668,9 @@ public class Panda extends Animal {
+@@ -673,8 +673,9 @@ public class Panda extends Animal {
this.usePlayerItem(player, hand, itemstack);
this.ageUp((int) ((float) (-this.getAge() / 20) * 0.1F), true);
} else if (!this.level().isClientSide && this.getAge() == 0 && this.canFallInLove()) {
@@ -69,10 +69,10 @@ index 0440fd2d1bb3f87641ad88de6d5ae64617536a6d..db60b91c2b26ca8cdb66e05deab7742f
if (this.level().isClientSide || this.isSitting() || this.isInWater()) {
return InteractionResult.PASS;
diff --git a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
-index 4e38bed2a450e90a416bfc03e4231b95f67133ea..b38281f963377cc82b360e8457da7cad033b8c36 100644
+index 38bb6e627c5500923103c3c9552eddcc63257a1d..792d9039ac0561464c666977ff8308e4c629e5eb 100644
--- a/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+++ b/src/main/java/net/minecraft/world/entity/animal/armadillo/Armadillo.java
-@@ -351,8 +351,8 @@ public class Armadillo extends Animal {
+@@ -348,8 +348,8 @@ public class Armadillo extends Animal {
}
@Override
@@ -84,10 +84,10 @@ index 4e38bed2a450e90a416bfc03e4231b95f67133ea..b38281f963377cc82b360e8457da7cad
}
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 8ebe18a1abbac81094e6aab19ba76edc0255e3b7..4eb26874f21726bbc6e6ad78bfaf4ecd268c7246 100644
+index 71c1bc87ab5942fa07f187fa44089c08b5804e91..147974651d37e81d81ca97bfa31c9df9867492be 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
-@@ -389,7 +389,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
+@@ -390,7 +390,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
boolean flag1 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
if (flag1) {
@@ -97,10 +97,10 @@ index 8ebe18a1abbac81094e6aab19ba76edc0255e3b7..4eb26874f21726bbc6e6ad78bfaf4ecd
boolean flag2 = this.isBaby();
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 8cae4e154ca07493aba9acadd4ff7150d7ae4f67..9357cf0179d19fbdfe76413e909a99b924c85780 100644
+index f1e43254936feedfe0ffbf77071505f3a65e5053..1f5ed236fb7c0c1b0181675747d25d233f534284 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
-@@ -571,7 +571,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
+@@ -572,7 +572,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
b0 = 5;
if (!this.level().isClientSide && this.isTamed() && this.getAge() == 0 && !this.isInLove()) {
flag = true;
@@ -109,7 +109,7 @@ index 8cae4e154ca07493aba9acadd4ff7150d7ae4f67..9357cf0179d19fbdfe76413e909a99b9
}
} else if (item.is(Items.GOLDEN_APPLE) || item.is(Items.ENCHANTED_GOLDEN_APPLE)) {
f = 10.0F;
-@@ -579,7 +579,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
+@@ -580,7 +580,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
b0 = 10;
if (!this.level().isClientSide && this.isTamed() && this.getAge() == 0 && !this.isInLove()) {
flag = true;
@@ -119,10 +119,10 @@ index 8cae4e154ca07493aba9acadd4ff7150d7ae4f67..9357cf0179d19fbdfe76413e909a99b9
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
-index 724c4c8493a4b167911dd526ed8662ab4f9b2b66..36d654073ab4058db54830d9447d7d959a0b25f1 100644
+index 82c57124433cc033c99e609e8ad71e03d340bc5e..cf6a3a63b6f2b96943c0f399e8c82d293fee31ba 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
-@@ -184,7 +184,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
+@@ -179,7 +179,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
f = 10.0F;
if (this.isTamed() && this.getAge() == 0 && this.canFallInLove()) {
flag = true;
diff --git a/patches/unapplied/server/0926-Add-UUID-attribute-modifier-API.patch b/patches/server/0916-Add-UUID-attribute-modifier-API.patch
index d4c5c49b0c..2b4be75ab6 100644
--- a/patches/unapplied/server/0926-Add-UUID-attribute-modifier-API.patch
+++ b/patches/server/0916-Add-UUID-attribute-modifier-API.patch
@@ -29,10 +29,10 @@ index 52439f4b959c74027eb191a3af960c70beb978e8..a2c057d92ea34368c7efc538b6e5b15e
public void addModifier(AttributeModifier modifier) {
throw new UnsupportedOperationException("Cannot modify default attributes");
diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
-index 7d16545665f74ce619f7b18e568226642c84ceee..c8dffec6e4524a6b02dd068429e4b12f256d1741 100644
+index cd6a492f56b3dee5985c068e20009b6c833e143b..64cef8aaecbc96bdcebd461feb72cdd5398492f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
+++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
-@@ -44,6 +44,21 @@ public class CraftAttributeInstance implements AttributeInstance {
+@@ -45,6 +45,21 @@ public class CraftAttributeInstance implements AttributeInstance {
return result;
}
diff --git a/patches/unapplied/server/0927-Fix-missing-event-call-for-entity-teleport-API.patch b/patches/server/0917-Fix-missing-event-call-for-entity-teleport-API.patch
index ac77e45fa2..79cebb8989 100644
--- a/patches/unapplied/server/0927-Fix-missing-event-call-for-entity-teleport-API.patch
+++ b/patches/server/0917-Fix-missing-event-call-for-entity-teleport-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix missing event call for entity teleport API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index d52b7c5739b8ea51cb91c45ddcad6237b9ce5a5e..3ab04c4bdbe26ff7f6f54eb9cdd58376c592fa05 100644
+index a8b9b50991361160880b9fc0a94cad30c319e62e..b8eb9166e44da8745a056bf68f2f9316ce25d7a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -256,6 +256,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -258,6 +258,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return false;
}
diff --git a/patches/unapplied/server/0928-Lazily-create-LootContext-for-criterions.patch b/patches/server/0918-Lazily-create-LootContext-for-criterions.patch
index d1033bf7e7..d1033bf7e7 100644
--- a/patches/unapplied/server/0928-Lazily-create-LootContext-for-criterions.patch
+++ b/patches/server/0918-Lazily-create-LootContext-for-criterions.patch
diff --git a/patches/unapplied/server/0929-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0919-Don-t-fire-sync-events-during-worldgen.patch
index 2ded3acb8e..bf517c0fe1 100644
--- a/patches/unapplied/server/0929-Don-t-fire-sync-events-during-worldgen.patch
+++ b/patches/server/0919-Don-t-fire-sync-events-during-worldgen.patch
@@ -19,10 +19,10 @@ where generation happened directly to a ServerLevel and the
entity still has the flag set.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 2da315d288efa66f7bff96923ebd5eac5130ba39..39cf7ae086108d8077121829368b81605d046fab 100644
+index 8b5eabea1a0926c22b58ef8761caee3a06aa5ee0..53fdf4e104f36a2bd88fdf26d8c68cd3daf61574 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1226,6 +1226,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1224,6 +1224,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// CraftBukkit start
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
@@ -31,10 +31,10 @@ index 2da315d288efa66f7bff96923ebd5eac5130ba39..39cf7ae086108d8077121829368b8160
if (entity.valid) {
MinecraftServer.LOGGER.error("Attempted Double World add on {}", entity, new Throwable());
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 73669ce44d3b62183f983365df5a46c10e1458bf..948d17b13f07ca0b9160770e3b92d903d1b70407 100644
+index 84d735d358e2b58df0fccc8ffc5ef3346e62071d..b425a0b309af4603b5341bff1b6c978121257c64 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -649,7 +649,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -625,7 +625,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (pose == this.getPose()) {
return;
}
@@ -48,7 +48,7 @@ index 73669ce44d3b62183f983365df5a46c10e1458bf..948d17b13f07ca0b9160770e3b92d903
this.entityData.set(Entity.DATA_POSE, pose);
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index d769dc472d3f12bf1e30ddd767a76659b734caac..8c7cc9c5af0b8d8bef9b6e2d3d3e723cd76f3212 100644
+index 5fb3279342506611882b5780cfbee0371919c93c..b98f9246b60daf31460f41ce214dfa7c011f5684 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
@@ -592,9 +592,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@@ -68,10 +68,10 @@ index d769dc472d3f12bf1e30ddd767a76659b734caac..8c7cc9c5af0b8d8bef9b6e2d3d3e723c
}, () -> {
EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id"));
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 844da8d55e43607239b54c7cb823cf26f2b04ed1..d0adf2740fe493af2486f78cf015db8bab47e642 100644
+index a4940a6dccb6937a2461d7b34a9250c2699083e3..ca3d2ce80eb65e732429ead7128d7eba5d2faeee 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1163,6 +1163,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1137,6 +1137,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public boolean addEffect(MobEffectInstance mobeffect, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause) {
@@ -83,7 +83,7 @@ index 844da8d55e43607239b54c7cb823cf26f2b04ed1..d0adf2740fe493af2486f78cf015db8b
// org.spigotmc.AsyncCatcher.catchOp("effect add"); // Spigot // Paper - move to API
if (this.isTickingEffects) {
this.effectsToProcess.add(new ProcessableEffect(mobeffect, cause));
-@@ -1182,10 +1187,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1156,10 +1161,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
override = new MobEffectInstance(mobeffect1).update(mobeffect);
}
@@ -97,7 +97,7 @@ index 844da8d55e43607239b54c7cb823cf26f2b04ed1..d0adf2740fe493af2486f78cf015db8b
// CraftBukkit end
if (mobeffect1 == null) {
-@@ -1194,7 +1202,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1168,7 +1176,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
flag = true;
mobeffect.onEffectAdded(this);
// CraftBukkit start
@@ -120,7 +120,7 @@ index 6006480d9f6d60bb7b5628eabe6740013066cde4..f0127f1b55999aa4a841341ad02cbcde
}
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
-index b5365dce7882c98b5be4f5df877165eee80933dd..9b4e2f96299bb12af7090ef70ac158c825d49d19 100644
+index cf8258e8d46ca7286a66c38fa24af369bd9a279f..0555abfda468c343af8244a122ebe769e70a0292 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
@@ -525,7 +525,7 @@ public class StructureTemplate {
diff --git a/patches/unapplied/server/0930-Add-Structure-check-API.patch b/patches/server/0920-Add-Structure-check-API.patch
index faa75398b6..b32e809785 100644
--- a/patches/unapplied/server/0930-Add-Structure-check-API.patch
+++ b/patches/server/0920-Add-Structure-check-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add Structure check API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 8b4b4017f9874a153c27a96a7df1a966c5bdf4f3..2536a37ab9e5a7aa7373b1880f55cdb8c32a6f53 100644
+index d6cdbe44cfddecc2a28c28892431aaa45f73cb8a..cb0f59def0d5ad6e2f80ebe024f12efad9a8d164 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -237,6 +237,20 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/unapplied/server/0931-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0921-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
index c40f835bff..fd122481de 100644
--- a/patches/unapplied/server/0931-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
+++ b/patches/server/0921-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
@@ -5,15 +5,15 @@ Subject: [PATCH] Fix CraftMetaItem#getAttributeModifier duplication check
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index ce6767537bd0f8eb5c28eef9d50e042c5a9b4b4b..e3ac829ae4f2b39c103e5626180ec9220c2b1f33 100644
+index fab1e47d0faffe83366687e4ec3ae02d4887ff8a..758e01a05f5ca88f72ea3d54a7cdc49bbfadfaf5 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -1321,7 +1321,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1359,7 +1359,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null");
this.checkAttributeList();
for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) {
-- Preconditions.checkArgument(!entry.getValue().getUniqueId().equals(modifier.getUniqueId()), "Cannot register AttributeModifier. Modifier is already applied! %s", modifier);
-+ Preconditions.checkArgument(!(entry.getValue().getUniqueId().equals(modifier.getUniqueId()) && entry.getKey() == attribute), "Cannot register AttributeModifier. Modifier is already applied! %s", modifier); // Paper
+- Preconditions.checkArgument(!entry.getValue().getKey().equals(modifier.getKey()), "Cannot register AttributeModifier. Modifier is already applied! %s", modifier);
++ Preconditions.checkArgument(!entry.getValue().getKey().equals(modifier.getKey()) && entry.getKey() == attribute, "Cannot register AttributeModifier. Modifier is already applied! %s", modifier); // Paper - attribute modifiers with same namespaced key but on different attributes are fine
}
return this.attributeModifiers.put(attribute, modifier);
}
diff --git a/patches/unapplied/server/0932-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0922-Restore-vanilla-entity-drops-behavior.patch
index 8be1eca73e..f2771c2261 100644
--- a/patches/unapplied/server/0932-Restore-vanilla-entity-drops-behavior.patch
+++ b/patches/server/0922-Restore-vanilla-entity-drops-behavior.patch
@@ -9,10 +9,10 @@ on dropping the item instead of generalizing it for all dropped
items like CB does.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 9179434d490bc8546ba3a35434998b9fc916e6b2..b032ce115b98af0e0384fb88ca88075eb4ffac11 100644
+index 82906acbaa7e34de7519f15559bf40772f0f6ff2..586347e0ab845188969adeafec28e73841858564 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -969,22 +969,20 @@ public class ServerPlayer extends Player {
+@@ -978,22 +978,20 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
if (this.isRemoved()) {
return;
}
@@ -22,7 +22,7 @@ index 9179434d490bc8546ba3a35434998b9fc916e6b2..b032ce115b98af0e0384fb88ca88075e
if (!keepInventory) {
for (ItemStack item : this.getInventory().getContents()) {
- if (!item.isEmpty() && !EnchantmentHelper.hasVanishingCurse(item)) {
+ if (!item.isEmpty() && EnchantmentHelper.has(item, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) {
- loot.add(CraftItemStack.asCraftMirror(item));
+ loot.add(new DefaultDrop(item, stack -> this.drop(stack, true, false, false))); // Paper - Restore vanilla drops behavior; drop function taken from Inventory#dropAll (don't fire drop event)
}
@@ -38,7 +38,7 @@ index 9179434d490bc8546ba3a35434998b9fc916e6b2..b032ce115b98af0e0384fb88ca88075e
this.drops.clear(); // SPIGOT-5188: make sure to clear
} // Paper - fix player loottables running when mob loot gamerule is false
-@@ -2482,8 +2480,8 @@ public class ServerPlayer extends Player {
+@@ -2531,8 +2529,8 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
}
@Override
@@ -50,10 +50,10 @@ index 9179434d490bc8546ba3a35434998b9fc916e6b2..b032ce115b98af0e0384fb88ca88075e
if (entityitem == null) {
return null;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 948d17b13f07ca0b9160770e3b92d903d1b70407..d6ec2fe1a4a004a2d2f7d6e5bfd8fd45b27ebb7a 100644
+index b425a0b309af4603b5341bff1b6c978121257c64..44c56b4e48d4d884db4bfed04d1b0f3fc64dc475 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2523,6 +2523,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2564,6 +2564,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@Nullable
public ItemEntity spawnAtLocation(ItemStack stack, float yOffset) {
@@ -79,7 +79,7 @@ index 948d17b13f07ca0b9160770e3b92d903d1b70407..d6ec2fe1a4a004a2d2f7d6e5bfd8fd45
if (stack.isEmpty()) {
return null;
} else if (this.level().isClientSide) {
-@@ -2530,14 +2549,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2571,14 +2590,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@@ -104,29 +104,29 @@ index 948d17b13f07ca0b9160770e3b92d903d1b70407..d6ec2fe1a4a004a2d2f7d6e5bfd8fd45
return this.spawnAtLocation(entityitem);
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index d0adf2740fe493af2486f78cf015db8bab47e642..cb07999629ba2d56602b3ae06ef06e350a8d1fb1 100644
+index ca3d2ce80eb65e732429ead7128d7eba5d2faeee..73a6ceef98f94ec801c14ca6d3c33f801b2ae442 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -266,7 +266,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -278,7 +278,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ protected float appliedScale;
// CraftBukkit start
public int expToDrop;
- public boolean forceDrops;
- public ArrayList<org.bukkit.inventory.ItemStack> drops = new ArrayList<org.bukkit.inventory.ItemStack>();
+ public ArrayList<DefaultDrop> drops = new ArrayList<>(); // Paper - Restore vanilla drops behavior
public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
public boolean collides = true;
public Set<UUID> collidableExemptions = new HashSet<>();
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index aa22829c3d41118664a872540fdc8f716120c407..c23d4ee0a16d1ae7168b2496d97189a14256bdcc 100644
+index 1b49090a466bc74d9e5f2815314955b6dfbb83dc..62271e74399a827a488159da234465ef18e15e6e 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-@@ -537,10 +537,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
+@@ -538,10 +538,9 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@Override
- protected void dropCustomDeathLoot(DamageSource source, int lootingMultiplier, boolean allowDrops) {
- super.dropCustomDeathLoot(source, lootingMultiplier, allowDrops);
+ protected void dropCustomDeathLoot(ServerLevel world, DamageSource source, boolean causedByPlayer) {
+ super.dropCustomDeathLoot(world, source, causedByPlayer);
- ItemEntity entityitem = this.spawnAtLocation((ItemLike) Items.NETHER_STAR);
+-
+ ItemEntity entityitem = this.spawnAtLocation(new net.minecraft.world.item.ItemStack(Items.NETHER_STAR), 0, ItemEntity::setExtendedLifetime); // Paper - Restore vanilla drops behavior; spawnAtLocation returns null so modify the item entity with a consumer
-
if (entityitem != null) {
- entityitem.setExtendedLifetime();
+ entityitem.setExtendedLifetime(); // Paper - diff on change
@@ -134,19 +134,19 @@ index aa22829c3d41118664a872540fdc8f716120c407..c23d4ee0a16d1ae7168b2496d97189a1
}
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-index 767f076c6fad7a1146bc409bf47f1d2fc3caf3ce..095a678e3ff7b2bd713fe5bc8542b35ac91d159c 100644
+index 5bcb9a53ebebeef4bd6ec2458df4b63002ebd804..2f398750bfee5758ad8b1367b6fc14364e4de776 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -614,7 +614,7 @@ public class ArmorStand extends LivingEntity {
+@@ -621,7 +621,7 @@ public class ArmorStand extends LivingEntity {
ItemStack itemstack = new ItemStack(Items.ARMOR_STAND);
itemstack.set(DataComponents.CUSTOM_NAME, this.getCustomName());
- this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
+ this.drops.add(new DefaultDrop(itemstack, stack -> Block.popResource(this.level(), this.blockPosition(), stack))); // CraftBukkit - add to drops // Paper - Restore vanilla drops behavior
- return this.brokenByAnything(damageSource); // Paper
+ return this.brokenByAnything(world, damageSource); // Paper
}
-@@ -628,7 +628,7 @@ public class ArmorStand extends LivingEntity {
+@@ -635,7 +635,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.handItems.size(); ++i) {
itemstack = (ItemStack) this.handItems.get(i);
if (!itemstack.isEmpty()) {
@@ -155,7 +155,7 @@ index 767f076c6fad7a1146bc409bf47f1d2fc3caf3ce..095a678e3ff7b2bd713fe5bc8542b35a
this.handItems.set(i, ItemStack.EMPTY);
}
}
-@@ -636,7 +636,7 @@ public class ArmorStand extends LivingEntity {
+@@ -643,7 +643,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.armorItems.size(); ++i) {
itemstack = (ItemStack) this.armorItems.get(i);
if (!itemstack.isEmpty()) {
@@ -165,10 +165,10 @@ index 767f076c6fad7a1146bc409bf47f1d2fc3caf3ce..095a678e3ff7b2bd713fe5bc8542b35a
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 64d4246b9d13e6fe8b638c4a6b664f87fc0e66a0..8b322ade83e8e571af7c2e91a3c0d0784a7b9fad 100644
+index 70f5a07206453124e7069bb013184038b4def654..54c9c19d773df01b0004da6587f7c7a388e61c21 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -964,18 +964,24 @@ public class CraftEventFactory {
+@@ -965,18 +965,24 @@ public class CraftEventFactory {
}
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource) {
@@ -192,12 +192,12 @@ index 64d4246b9d13e6fe8b638c4a6b664f87fc0e66a0..8b322ade83e8e571af7c2e91a3c0d078
// Paper end
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
-- EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward());
-+ EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward()); // Paper - Restore vanilla drops behavior
+- EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
++ EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward(damageSource.getEntity())); // Paper - Restore vanilla drops behavior
populateFields(victim, event); // Paper - make cancellable
CraftWorld world = (CraftWorld) entity.getWorld();
Bukkit.getServer().getPluginManager().callEvent(event);
-@@ -989,20 +995,24 @@ public class CraftEventFactory {
+@@ -990,20 +996,24 @@ public class CraftEventFactory {
victim.expToDrop = event.getDroppedExp();
lootCheck.run(); // Paper - advancement triggers before destroying items
@@ -221,12 +221,12 @@ index 64d4246b9d13e6fe8b638c4a6b664f87fc0e66a0..8b322ade83e8e571af7c2e91a3c0d078
+ public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List<Entity.DefaultDrop> drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure & Restore vanilla drops behavior
CraftPlayer entity = victim.getBukkitEntity();
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
-- PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(), 0, deathMessage);
-+ PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward(), 0, deathMessage); // Paper - Restore vanilla drops behavior
+- PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()), 0, deathMessage);
++ PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward(damageSource.getEntity()), 0, deathMessage); // Paper - Restore vanilla drops behavior
event.setKeepInventory(keepInventory);
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
populateFields(victim, event); // Paper - make cancellable
-@@ -1021,10 +1031,14 @@ public class CraftEventFactory {
+@@ -1022,10 +1032,14 @@ public class CraftEventFactory {
victim.expToDrop = event.getDroppedExp();
victim.newExp = event.getNewExp();
diff --git a/patches/unapplied/server/0827-remove-duplicate-animate-packet-for-records.patch b/patches/unapplied/server/0827-remove-duplicate-animate-packet-for-records.patch
deleted file mode 100644
index 47fc3e8c30..0000000000
--- a/patches/unapplied/server/0827-remove-duplicate-animate-packet-for-records.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <[email protected]>
-Date: Thu, 1 Dec 2022 12:42:18 -0800
-Subject: [PATCH] remove duplicate animate packet for records
-
-
-diff --git a/src/main/java/net/minecraft/world/item/RecordItem.java b/src/main/java/net/minecraft/world/item/RecordItem.java
-index 115ac21ea743d30fe8ba62b206da4f5a1bd56cc4..815220924753e87a8f485c2c928222561c726855 100644
---- a/src/main/java/net/minecraft/world/item/RecordItem.java
-+++ b/src/main/java/net/minecraft/world/item/RecordItem.java
-@@ -47,7 +47,7 @@ public class RecordItem extends Item {
- ItemStack itemstack = context.getItemInHand();
-
- if (!world.isClientSide) {
-- if (true) return InteractionResult.SUCCESS; // CraftBukkit - handled in ItemStack
-+ if (true) return InteractionResult.sidedSuccess(world.isClientSide); // CraftBukkit - handled in ItemStack // Paper - fix duplicate animate packet
- Player entityhuman = context.getPlayer();
- BlockEntity tileentity = world.getBlockEntity(blockposition);
-