aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2024-06-13 13:14:13 -0700
committerJake Potrebic <[email protected]>2024-06-13 13:14:13 -0700
commit0bc9aeef268b9522e3c97dd5a09b8d3d759a6fb8 (patch)
tree22319df1aaf54a732398b7148288609d92d00332
parentec05cb8b38e5af408e4f46071ebbcad351be4d88 (diff)
downloadPaper-0bc9aeef268b9522e3c97dd5a09b8d3d759a6fb8.tar.gz
Paper-0bc9aeef268b9522e3c97dd5a09b8d3d759a6fb8.zip
385
-rw-r--r--patches/server/0009-MC-Utils.patch2
-rw-r--r--patches/server/0023-Timings-v2.patch2
-rw-r--r--patches/server/0037-Entity-Origin-API.patch2
-rw-r--r--patches/server/0039-Configurable-top-of-nether-void-damage.patch2
-rw-r--r--patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch2
-rw-r--r--patches/server/0076-Use-a-Shared-Random-for-Entities.patch2
-rw-r--r--patches/server/0127-Cap-Entity-Collisions.patch2
-rw-r--r--patches/server/0142-Entity-fromMobSpawner.patch2
-rw-r--r--patches/server/0195-Add-EntityTeleportEndGatewayEvent.patch2
-rw-r--r--patches/server/0203-Add-entity-knockback-events.patch2
-rw-r--r--patches/server/0212-add-more-information-to-Entity.toString.patch2
-rw-r--r--patches/server/0227-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch2
-rw-r--r--patches/server/0269-force-entity-dismount-during-teleportation.patch2
-rw-r--r--patches/server/0280-Limit-Client-Sign-length-more.patch (renamed from patches/unapplied/server/0282-Limit-Client-Sign-length-more.patch)4
-rw-r--r--patches/server/0281-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch (renamed from patches/unapplied/server/0283-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch)4
-rw-r--r--patches/server/0282-Entity-getEntitySpawnReason.patch (renamed from patches/unapplied/server/0284-Entity-getEntitySpawnReason.patch)24
-rw-r--r--patches/server/0283-Fire-event-on-GS4-query.patch (renamed from patches/unapplied/server/0285-Fire-event-on-GS4-query.patch)0
-rw-r--r--patches/server/0284-Add-PlayerPostRespawnEvent.patch55
-rw-r--r--patches/server/0285-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch (renamed from patches/unapplied/server/0287-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch)6
-rw-r--r--patches/server/0286-Server-Tick-Events.patch (renamed from patches/unapplied/server/0288-Server-Tick-Events.patch)6
-rw-r--r--patches/server/0287-PlayerDeathEvent-getItemsToKeep.patch (renamed from patches/unapplied/server/0289-PlayerDeathEvent-getItemsToKeep.patch)8
-rw-r--r--patches/server/0288-Optimize-Captured-BlockEntity-Lookup.patch (renamed from patches/unapplied/server/0290-Optimize-Captured-BlockEntity-Lookup.patch)4
-rw-r--r--patches/server/0289-Add-Heightmap-API.patch (renamed from patches/unapplied/server/0291-Add-Heightmap-API.patch)2
-rw-r--r--patches/server/0290-Mob-Spawner-API-Enhancements.patch (renamed from patches/unapplied/server/0292-Mob-Spawner-API-Enhancements.patch)0
-rw-r--r--patches/server/0291-Fix-CB-call-to-changed-postToMainThread-method.patch (renamed from patches/unapplied/server/0293-Fix-CB-call-to-changed-postToMainThread-method.patch)2
-rw-r--r--patches/server/0292-Fix-sounds-when-item-frames-are-modified-MC-123450.patch (renamed from patches/unapplied/server/0294-Fix-sounds-when-item-frames-are-modified-MC-123450.patch)4
-rw-r--r--patches/server/0293-Implement-CraftBlockSoundGroup.patch (renamed from patches/unapplied/server/0295-Implement-CraftBlockSoundGroup.patch)0
-rw-r--r--patches/server/0294-Expose-the-internal-current-tick.patch (renamed from patches/unapplied/server/0296-Expose-the-internal-current-tick.patch)4
-rw-r--r--patches/server/0295-Show-blockstate-location-if-we-failed-to-read-it.patch (renamed from patches/unapplied/server/0297-Show-blockstate-location-if-we-failed-to-read-it.patch)0
-rw-r--r--patches/server/0296-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch (renamed from patches/unapplied/server/0298-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch)0
-rw-r--r--patches/server/0297-Configurable-projectile-relative-velocity.patch (renamed from patches/unapplied/server/0299-Configurable-projectile-relative-velocity.patch)6
-rw-r--r--patches/server/0298-offset-item-frame-ticking.patch19
-rw-r--r--patches/server/0299-Prevent-consuming-the-wrong-itemstack.patch (renamed from patches/unapplied/server/0301-Prevent-consuming-the-wrong-itemstack.patch)10
-rw-r--r--patches/server/0300-Dont-send-unnecessary-sign-update.patch (renamed from patches/unapplied/server/0302-Dont-send-unnecessary-sign-update.patch)0
-rw-r--r--patches/server/0301-Add-option-to-disable-pillager-patrols.patch (renamed from patches/unapplied/server/0303-Add-option-to-disable-pillager-patrols.patch)0
-rw-r--r--patches/server/0302-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch (renamed from patches/unapplied/server/0304-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch)0
-rw-r--r--patches/server/0303-MC-145656-Fix-Follow-Range-Initial-Target.patch (renamed from patches/unapplied/server/0305-MC-145656-Fix-Follow-Range-Initial-Target.patch)0
-rw-r--r--patches/server/0304-Duplicate-UUID-Resolve-Option.patch (renamed from patches/unapplied/server/0306-Duplicate-UUID-Resolve-Option.patch)25
-rw-r--r--patches/server/0305-PlayerDeathEvent-shouldDropExperience.patch (renamed from patches/unapplied/server/0307-PlayerDeathEvent-shouldDropExperience.patch)8
-rw-r--r--patches/server/0306-Prevent-bees-loading-chunks-checking-hive-position.patch (renamed from patches/unapplied/server/0308-Prevent-bees-loading-chunks-checking-hive-position.patch)4
-rw-r--r--patches/server/0307-Don-t-load-Chunks-from-Hoppers-and-other-things.patch (renamed from patches/unapplied/server/0309-Don-t-load-Chunks-from-Hoppers-and-other-things.patch)0
-rw-r--r--patches/server/0308-Optimise-EntityGetter-getPlayerByUUID.patch (renamed from patches/unapplied/server/0310-Optimise-EntityGetter-getPlayerByUUID.patch)4
-rw-r--r--patches/server/0309-Fix-items-not-falling-correctly.patch (renamed from patches/unapplied/server/0311-Fix-items-not-falling-correctly.patch)4
-rw-r--r--patches/server/0310-Optimize-call-to-getFluid-for-explosions.patch (renamed from patches/unapplied/server/0312-Optimize-call-to-getFluid-for-explosions.patch)4
-rw-r--r--patches/server/0311-Guard-against-serializing-mismatching-chunk-coordina.patch (renamed from patches/unapplied/server/0313-Guard-against-serializing-mismatching-chunk-coordina.patch)11
-rw-r--r--patches/server/0312-Alternative-item-despawn-rate.patch (renamed from patches/unapplied/server/0314-Alternative-item-despawn-rate.patch)14
-rw-r--r--patches/server/0313-Tracking-Range-Improvements.patch (renamed from patches/unapplied/server/0315-Tracking-Range-Improvements.patch)4
-rw-r--r--patches/server/0314-Bees-get-gravity-in-void.-Fixes-MC-167279.patch (renamed from patches/unapplied/server/0316-Bees-get-gravity-in-void.-Fixes-MC-167279.patch)4
-rw-r--r--patches/server/0315-Improve-Block-breakNaturally-API.patch (renamed from patches/unapplied/server/0317-Improve-Block-breakNaturally-API.patch)4
-rw-r--r--patches/server/0316-Optimise-getChunkAt-calls-for-loaded-chunks.patch (renamed from patches/unapplied/server/0318-Optimise-getChunkAt-calls-for-loaded-chunks.patch)32
-rw-r--r--patches/server/0317-Add-debug-for-sync-chunk-loads.patch (renamed from patches/unapplied/server/0319-Add-debug-for-sync-chunk-loads.patch)8
-rw-r--r--patches/server/0318-Improve-java-version-check.patch (renamed from patches/unapplied/server/0320-Improve-java-version-check.patch)2
-rw-r--r--patches/server/0319-Add-ThrownEggHatchEvent.patch (renamed from patches/unapplied/server/0321-Add-ThrownEggHatchEvent.patch)4
-rw-r--r--patches/server/0320-Entity-Jump-API.patch (renamed from patches/unapplied/server/0322-Entity-Jump-API.patch)16
-rw-r--r--patches/server/0321-Add-option-to-nerf-pigmen-from-nether-portals.patch (renamed from patches/unapplied/server/0323-Add-option-to-nerf-pigmen-from-nether-portals.patch)12
-rw-r--r--patches/server/0322-Make-the-GUI-graph-fancier.patch (renamed from patches/unapplied/server/0324-Make-the-GUI-graph-fancier.patch)0
-rw-r--r--patches/server/0323-add-hand-to-BlockMultiPlaceEvent.patch (renamed from patches/unapplied/server/0325-add-hand-to-BlockMultiPlaceEvent.patch)4
-rw-r--r--patches/server/0324-Validate-tripwire-hook-placement-before-update.patch (renamed from patches/unapplied/server/0326-Validate-tripwire-hook-placement-before-update.patch)0
-rw-r--r--patches/server/0325-Add-option-to-allow-iron-golems-to-spawn-in-air.patch (renamed from patches/unapplied/server/0327-Add-option-to-allow-iron-golems-to-spawn-in-air.patch)4
-rw-r--r--patches/server/0326-Configurable-chance-of-villager-zombie-infection.patch (renamed from patches/unapplied/server/0328-Configurable-chance-of-villager-zombie-infection.patch)4
-rw-r--r--patches/server/0327-Optimise-Chunk-getFluid.patch (renamed from patches/unapplied/server/0329-Optimise-Chunk-getFluid.patch)6
-rw-r--r--patches/server/0328-Set-spigots-verbose-world-setting-to-false-by-def.patch (renamed from patches/unapplied/server/0330-Set-spigots-verbose-world-setting-to-false-by-def.patch)0
-rw-r--r--patches/server/0329-Add-tick-times-API-and-mspt-command.patch (renamed from patches/unapplied/server/0331-Add-tick-times-API-and-mspt-command.patch)12
-rw-r--r--patches/server/0330-Expose-MinecraftServer-isRunning.patch (renamed from patches/unapplied/server/0332-Expose-MinecraftServer-isRunning.patch)4
-rw-r--r--patches/server/0331-Add-Raw-Byte-ItemStack-Serialization.patch (renamed from patches/unapplied/server/0333-Add-Raw-Byte-ItemStack-Serialization.patch)2
-rw-r--r--patches/server/0332-Pillager-patrol-spawn-settings-and-per-player-option.patch (renamed from patches/unapplied/server/0334-Pillager-patrol-spawn-settings-and-per-player-option.patch)4
-rw-r--r--patches/server/0333-Remote-Connections-shouldn-t-hold-up-shutdown.patch (renamed from patches/unapplied/server/0335-Remote-Connections-shouldn-t-hold-up-shutdown.patch)4
-rw-r--r--patches/server/0334-Do-not-allow-bees-to-load-chunks-for-beehives.patch (renamed from patches/unapplied/server/0336-Do-not-allow-bees-to-load-chunks-for-beehives.patch)12
-rw-r--r--patches/server/0335-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch (renamed from patches/unapplied/server/0337-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch)10
-rw-r--r--patches/server/0336-Don-t-tick-dead-players.patch (renamed from patches/unapplied/server/0338-Don-t-tick-dead-players.patch)4
-rw-r--r--patches/server/0337-Dead-Player-s-shouldn-t-be-able-to-move.patch (renamed from patches/unapplied/server/0339-Dead-Player-s-shouldn-t-be-able-to-move.patch)4
-rw-r--r--patches/server/0338-Don-t-move-existing-players-to-world-spawn.patch (renamed from patches/unapplied/server/0340-Don-t-move-existing-players-to-world-spawn.patch)14
-rw-r--r--patches/server/0339-Optimize-Pathfinding.patch (renamed from patches/unapplied/server/0341-Optimize-Pathfinding.patch)0
-rw-r--r--patches/server/0340-Reduce-Either-Optional-allocation.patch (renamed from patches/unapplied/server/0342-Reduce-Either-Optional-allocation.patch)0
-rw-r--r--patches/server/0341-Reduce-memory-footprint-of-CompoundTag.patch (renamed from patches/unapplied/server/0343-Reduce-memory-footprint-of-CompoundTag.patch)0
-rw-r--r--patches/server/0342-Prevent-opening-inventories-when-frozen.patch (renamed from patches/unapplied/server/0344-Prevent-opening-inventories-when-frozen.patch)6
-rw-r--r--patches/server/0343-Don-t-run-entity-collision-code-if-not-needed.patch (renamed from patches/unapplied/server/0345-Don-t-run-entity-collision-code-if-not-needed.patch)4
-rw-r--r--patches/server/0344-Implement-Player-Client-Options-API.patch (renamed from patches/unapplied/server/0346-Implement-Player-Client-Options-API.patch)16
-rw-r--r--patches/server/0345-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch (renamed from patches/unapplied/server/0347-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch)4
-rw-r--r--patches/server/0346-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch (renamed from patches/unapplied/server/0348-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch)21
-rw-r--r--patches/server/0347-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch (renamed from patches/unapplied/server/0349-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch)8
-rw-r--r--patches/server/0348-Add-PlayerAttackEntityCooldownResetEvent.patch (renamed from patches/unapplied/server/0350-Add-PlayerAttackEntityCooldownResetEvent.patch)2
-rw-r--r--patches/server/0349-Don-t-fire-BlockFade-on-worldgen-threads.patch (renamed from patches/unapplied/server/0351-Don-t-fire-BlockFade-on-worldgen-threads.patch)0
-rw-r--r--patches/server/0350-Add-phantom-creative-and-insomniac-controls.patch (renamed from patches/unapplied/server/0352-Add-phantom-creative-and-insomniac-controls.patch)2
-rw-r--r--patches/server/0351-Fix-item-duplication-and-teleport-issues.patch (renamed from patches/unapplied/server/0353-Fix-item-duplication-and-teleport-issues.patch)91
-rw-r--r--patches/server/0352-Villager-Restocks-API.patch (renamed from patches/unapplied/server/0354-Villager-Restocks-API.patch)0
-rw-r--r--patches/server/0353-Validate-PickItem-Packet-and-kick-for-invalid.patch (renamed from patches/unapplied/server/0355-Validate-PickItem-Packet-and-kick-for-invalid.patch)4
-rw-r--r--patches/server/0354-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch (renamed from patches/unapplied/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch)2
-rw-r--r--patches/server/0355-misc-debugging-dumps.patch (renamed from patches/unapplied/server/0357-misc-debugging-dumps.patch)28
-rw-r--r--patches/server/0356-Prevent-teleporting-dead-entities.patch (renamed from patches/unapplied/server/0358-Prevent-teleporting-dead-entities.patch)4
-rw-r--r--patches/server/0357-Implement-Mob-Goal-API.patch (renamed from patches/unapplied/server/0359-Implement-Mob-Goal-API.patch)6
-rw-r--r--patches/server/0358-Add-villager-reputation-API.patch (renamed from patches/unapplied/server/0360-Add-villager-reputation-API.patch)0
-rw-r--r--patches/server/0359-ExperienceOrb-merging-stacking-API-and-fixes.patch (renamed from patches/unapplied/server/0361-ExperienceOrb-merging-stacking-API-and-fixes.patch)26
-rw-r--r--patches/server/0360-Fix-PotionEffect-ignores-icon-flag.patch (renamed from patches/unapplied/server/0362-Fix-PotionEffect-ignores-icon-flag.patch)8
-rw-r--r--patches/server/0361-Potential-bed-API.patch (renamed from patches/unapplied/server/0363-Potential-bed-API.patch)0
-rw-r--r--patches/server/0362-Wait-for-Async-Tasks-during-shutdown.patch (renamed from patches/unapplied/server/0364-Wait-for-Async-Tasks-during-shutdown.patch)8
-rw-r--r--patches/server/0363-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch (renamed from patches/unapplied/server/0365-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch)4
-rw-r--r--patches/server/0364-Add-option-for-console-having-all-permissions.patch (renamed from patches/unapplied/server/0367-Add-option-for-console-having-all-permissions.patch)0
-rw-r--r--patches/server/0365-Fix-villager-trading-demand-MC-163962.patch (renamed from patches/unapplied/server/0368-Fix-villager-trading-demand-MC-163962.patch)0
-rw-r--r--patches/server/0366-Maps-shouldn-t-load-chunks.patch (renamed from patches/unapplied/server/0369-Maps-shouldn-t-load-chunks.patch)0
-rw-r--r--patches/server/0367-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch (renamed from patches/unapplied/server/0370-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch)0
-rw-r--r--patches/server/0368-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch (renamed from patches/unapplied/server/0371-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch)0
-rw-r--r--patches/server/0369-Fix-piston-physics-inconsistency-MC-188840.patch (renamed from patches/unapplied/server/0372-Fix-piston-physics-inconsistency-MC-188840.patch)0
-rw-r--r--patches/server/0370-Fix-missing-chunks-due-to-integer-overflow.patch (renamed from patches/unapplied/server/0373-Fix-missing-chunks-due-to-integer-overflow.patch)0
-rw-r--r--patches/server/0371-Prevent-position-desync-causing-tp-exploit.patch (renamed from patches/unapplied/server/0374-Prevent-position-desync-causing-tp-exploit.patch)4
-rw-r--r--patches/server/0372-Inventory-getHolder-method-without-block-snapshot.patch (renamed from patches/unapplied/server/0375-Inventory-getHolder-method-without-block-snapshot.patch)0
-rw-r--r--patches/server/0373-Add-PlayerRecipeBookClickEvent.patch (renamed from patches/unapplied/server/0376-Add-PlayerRecipeBookClickEvent.patch)4
-rw-r--r--patches/server/0374-Hide-sync-chunk-writes-behind-flag.patch (renamed from patches/unapplied/server/0377-Hide-sync-chunk-writes-behind-flag.patch)4
-rw-r--r--patches/server/0375-Add-permission-for-command-blocks.patch (renamed from patches/unapplied/server/0378-Add-permission-for-command-blocks.patch)12
-rw-r--r--patches/server/0376-Ensure-Entity-position-and-AABB-are-never-invalid.patch (renamed from patches/unapplied/server/0379-Ensure-Entity-position-and-AABB-are-never-invalid.patch)8
-rw-r--r--patches/server/0377-Fix-Per-World-Difficulty-Remembering-Difficulty.patch (renamed from patches/unapplied/server/0380-Fix-Per-World-Difficulty-Remembering-Difficulty.patch)35
-rw-r--r--patches/server/0378-Paper-dumpitem-command.patch (renamed from patches/unapplied/server/0381-Paper-dumpitem-command.patch)0
-rw-r--r--patches/server/0379-Improve-Legacy-Component-serialization-size.patch (renamed from patches/unapplied/server/0382-Improve-Legacy-Component-serialization-size.patch)0
-rw-r--r--patches/server/0380-Add-Plugin-Tickets-to-API-Chunk-Methods.patch (renamed from patches/unapplied/server/0383-Add-Plugin-Tickets-to-API-Chunk-Methods.patch)8
-rw-r--r--patches/server/0381-Add-BlockStateMeta-clearBlockState.patch (renamed from patches/unapplied/server/0384-Add-BlockStateMeta-clearBlockState.patch)0
-rw-r--r--patches/server/0382-Convert-legacy-attributes-in-Item-Meta.patch (renamed from patches/unapplied/server/0385-Convert-legacy-attributes-in-Item-Meta.patch)4
-rw-r--r--patches/server/0383-Do-not-accept-invalid-client-settings.patch (renamed from patches/unapplied/server/0386-Do-not-accept-invalid-client-settings.patch)4
-rw-r--r--patches/server/0384-Improve-fix-EntityTargetLivingEntityEvent.patch (renamed from patches/unapplied/server/0387-Improve-fix-EntityTargetLivingEntityEvent.patch)0
-rw-r--r--patches/server/0385-Add-entity-liquid-API.patch (renamed from patches/unapplied/server/0388-Add-entity-liquid-API.patch)4
-rw-r--r--patches/unapplied/server/0286-Add-PlayerPostRespawnEvent.patch48
-rw-r--r--patches/unapplied/server/0300-offset-item-frame-ticking.patch19
-rw-r--r--patches/unapplied/server/0366-Ensure-safe-gateway-teleport.patch20
122 files changed, 402 insertions, 448 deletions
diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch
index d437efd43b..f3c8e4cada 100644
--- a/patches/server/0009-MC-Utils.patch
+++ b/patches/server/0009-MC-Utils.patch
@@ -7022,7 +7022,7 @@ index aede9b65e799a1f123f71f9390fb05acddda676b..2510589400b3012b827efcab477c6483
@Override
public void tell(R runnable) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 687c0683ee5b3366d936a178fb4bf9faffc2a556..6041033b3ea201bde1a73ce4e429e8b80e05e2eb 100644
+index 586acbb52b0fcb09cda195b49b6c737a29a4e35e..b0843917caedc32f800c50cc54706ace9523f64f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -339,6 +339,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch
index 74a61a6b4a..1e8501da78 100644
--- a/patches/server/0023-Timings-v2.patch
+++ b/patches/server/0023-Timings-v2.patch
@@ -1301,7 +1301,7 @@ index 9807c5b2b248a62a476bfe3ae023d57d35811049..62174dae20bd9ff092238f1437f7e2b0
public UserWhiteList getWhiteList() {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 6041033b3ea201bde1a73ce4e429e8b80e05e2eb..4f321f13352636999c3abc5332e50c747fb45cc9 100644
+index b0843917caedc32f800c50cc54706ace9523f64f..63f45a77c8511e05954030cf117c5e4cda0a518f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -140,7 +140,6 @@ import org.bukkit.command.CommandSender;
diff --git a/patches/server/0037-Entity-Origin-API.patch b/patches/server/0037-Entity-Origin-API.patch
index eeca12666e..794f99dd69 100644
--- a/patches/server/0037-Entity-Origin-API.patch
+++ b/patches/server/0037-Entity-Origin-API.patch
@@ -25,7 +25,7 @@ index 9675d91e4e7ed46147c3f7a11dd65122fe998dc2..711318ddc706e72dbd8cea1c541058c8
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 4f321f13352636999c3abc5332e50c747fb45cc9..c355e8d71b4941b2ad43740763209927a3279336 100644
+index 63f45a77c8511e05954030cf117c5e4cda0a518f..dbe5239b1a1769ef9f2ef66c32b1a68cd684428e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -328,7 +328,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0039-Configurable-top-of-nether-void-damage.patch b/patches/server/0039-Configurable-top-of-nether-void-damage.patch
index e3e87945ee..8a30b0f3c3 100644
--- a/patches/server/0039-Configurable-top-of-nether-void-damage.patch
+++ b/patches/server/0039-Configurable-top-of-nether-void-damage.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Configurable top of nether void damage
Co-authored-by: Jake Potrebic <[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 c355e8d71b4941b2ad43740763209927a3279336..fafccc1c98cbc630dc71db623184a62f08618b03 100644
+index dbe5239b1a1769ef9f2ef66c32b1a68cd684428e..d5f5864b7c1ad4c30f37b360b317b63c129e3a3f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -706,7 +706,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch
index f5ec7c80b1..ccfdea7f04 100644
--- a/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch
+++ b/patches/server/0064-Disable-Scoreboards-for-non-players-by-default.patch
@@ -11,7 +11,7 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index fafccc1c98cbc630dc71db623184a62f08618b03..b5c03b3495f5eb5ac6b054d4ca986a6a597c713c 100644
+index d5f5864b7c1ad4c30f37b360b317b63c129e3a3f..82e57978b79b5275b98a1fa7731c6a23ee861a2f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2934,6 +2934,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0076-Use-a-Shared-Random-for-Entities.patch b/patches/server/0076-Use-a-Shared-Random-for-Entities.patch
index 7dc5fb2538..0dc711a42b 100644
--- a/patches/server/0076-Use-a-Shared-Random-for-Entities.patch
+++ b/patches/server/0076-Use-a-Shared-Random-for-Entities.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index b5c03b3495f5eb5ac6b054d4ca986a6a597c713c..ea25e9ab6c1d54e834a05951d2369d6e2e3a3fb3 100644
+index 82e57978b79b5275b98a1fa7731c6a23ee861a2f..bd17157631a74f80e3b5ce50bb1f681abe1dd6a7 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -175,6 +175,79 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0127-Cap-Entity-Collisions.patch b/patches/server/0127-Cap-Entity-Collisions.patch
index 3b6b618ab0..5e1b93cb75 100644
--- a/patches/server/0127-Cap-Entity-Collisions.patch
+++ b/patches/server/0127-Cap-Entity-Collisions.patch
@@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
You can set this to 0 to disable collisions.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index ea25e9ab6c1d54e834a05951d2369d6e2e3a3fb3..78cb145f72efaaf535b6f933b3ca990a3f909608 100644
+index bd17157631a74f80e3b5ce50bb1f681abe1dd6a7..46a21ed2408a42aafd16647e17e556730e799cbd 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -401,6 +401,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0142-Entity-fromMobSpawner.patch b/patches/server/0142-Entity-fromMobSpawner.patch
index b820f72bdc..0f1ce9369a 100644
--- a/patches/server/0142-Entity-fromMobSpawner.patch
+++ b/patches/server/0142-Entity-fromMobSpawner.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 78cb145f72efaaf535b6f933b3ca990a3f909608..439e8b4f52ba88456fb8ae5ab960d715f5c0d131 100644
+index 46a21ed2408a42aafd16647e17e556730e799cbd..946f289e0e681524c6fde696921965dbdedda372 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -402,6 +402,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0195-Add-EntityTeleportEndGatewayEvent.patch b/patches/server/0195-Add-EntityTeleportEndGatewayEvent.patch
index 223298011a..56df3551ea 100644
--- a/patches/server/0195-Add-EntityTeleportEndGatewayEvent.patch
+++ b/patches/server/0195-Add-EntityTeleportEndGatewayEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityTeleportEndGatewayEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 439e8b4f52ba88456fb8ae5ab960d715f5c0d131..d790aec175e61bd9dd9c14cbbbd4c3c354bf867a 100644
+index 946f289e0e681524c6fde696921965dbdedda372..d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3301,8 +3301,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0203-Add-entity-knockback-events.patch b/patches/server/0203-Add-entity-knockback-events.patch
index 2e80b8c273..ef96719c3a 100644
--- a/patches/server/0203-Add-entity-knockback-events.patch
+++ b/patches/server/0203-Add-entity-knockback-events.patch
@@ -11,7 +11,7 @@ Co-authored-by: aerulion <[email protected]>
Co-authored-by: Jake Potrebic <[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 d790aec175e61bd9dd9c14cbbbd4c3c354bf867a..35edebe672c72849e9f8a9a38f86354f2e987271 100644
+index d6017d9d71fb4b3a3df6eaa44da0ebda54c83da4..5e7cf17779685355011bb0f684c110807a7736c7 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1962,6 +1962,21 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0212-add-more-information-to-Entity.toString.patch b/patches/server/0212-add-more-information-to-Entity.toString.patch
index f350d1f1c6..6265b4599f 100644
--- a/patches/server/0212-add-more-information-to-Entity.toString.patch
+++ b/patches/server/0212-add-more-information-to-Entity.toString.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 35edebe672c72849e9f8a9a38f86354f2e987271..0355f2d1deb9fcb85efa015249d5ba81c0f27302 100644
+index 5e7cf17779685355011bb0f684c110807a7736c7..4ba77d4b109bc33d47130519c1fac704434d393d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3280,7 +3280,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0227-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0227-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
index 59f182e8d9..a6502e83fc 100644
--- a/patches/server/0227-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
+++ b/patches/server/0227-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
@@ -43,7 +43,7 @@ index ce6be7aed7b392c3e0c851f3f6e1e216bccceaf5..b151506b96a51c74ba408cb555a4d385
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 0355f2d1deb9fcb85efa015249d5ba81c0f27302..8368342ea699851f3f2926414a49b9dd3d8be327 100644
+index 4ba77d4b109bc33d47130519c1fac704434d393d..3830440b913bd2693f2922483e57419c76117315 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -250,6 +250,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/server/0269-force-entity-dismount-during-teleportation.patch b/patches/server/0269-force-entity-dismount-during-teleportation.patch
index fc7394b640..6b84363655 100644
--- a/patches/server/0269-force-entity-dismount-during-teleportation.patch
+++ b/patches/server/0269-force-entity-dismount-during-teleportation.patch
@@ -41,7 +41,7 @@ index 8de0b92285fe2413a4e2fb52fc7bc7a13dad5e90..fcbb0b64feb8d5624de3805d4db6d489
Iterator iterator = entityliving.getActiveEffects().iterator();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 8368342ea699851f3f2926414a49b9dd3d8be327..ab69b0a0c85009e8857aff85a46b1aab9cec14af 100644
+index 3830440b913bd2693f2922483e57419c76117315..5b3de422b07f680e6639ee84f076bffb3c901d0e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2706,17 +2706,28 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
diff --git a/patches/unapplied/server/0282-Limit-Client-Sign-length-more.patch b/patches/server/0280-Limit-Client-Sign-length-more.patch
index 68d596c6cf..833f505b24 100644
--- a/patches/unapplied/server/0282-Limit-Client-Sign-length-more.patch
+++ b/patches/server/0280-Limit-Client-Sign-length-more.patch
@@ -22,7 +22,7 @@ it only impacts data sent from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 04a9c48b9a9895ffe6ec0721bdfafb1b524bf386..e728b9f317d12c3c452db70ba7d1e930c84e345d 100644
+index 26228dbf1830134c185e884b22487e3e40ccf3aa..528c902b5434875b111812ff3a8099f945404d3c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -33,7 +33,7 @@ index 04a9c48b9a9895ffe6ec0721bdfafb1b524bf386..e728b9f317d12c3c452db70ba7d1e930
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
super(server, connection, clientData, player); // CraftBukkit
-@@ -3134,7 +3135,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3151,7 +3152,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
diff --git a/patches/unapplied/server/0283-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/0281-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
index 17ab7a0e08..e5983ba805 100644
--- a/patches/unapplied/server/0283-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
+++ b/patches/server/0281-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index f472d6eb337de1274424dabe39d4e8a094710165..f91e145a748dc524e1e95ee3afe00aa74a1aee9a 100644
+index 92e81514ce85f32303506d6ffc501946c0320c83..f82728bece2723a8f676ebc5b09885c7833174e4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1157,6 +1157,7 @@ public abstract class PlayerList {
+@@ -1126,6 +1126,7 @@ public abstract class PlayerList {
}
public void setUsingWhiteList(boolean whitelistEnabled) {
diff --git a/patches/unapplied/server/0284-Entity-getEntitySpawnReason.patch b/patches/server/0282-Entity-getEntitySpawnReason.patch
index a19143741d..df07a434a3 100644
--- a/patches/unapplied/server/0284-Entity-getEntitySpawnReason.patch
+++ b/patches/server/0282-Entity-getEntitySpawnReason.patch
@@ -22,10 +22,10 @@ index bf72cf288ade52ee8cc41ca978f368b3ad575951..798999be50d26be357ef3c6d5b9383ce
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 42dd9ab70c07e92258da70ad29b51c7780401a5d..2b524c41daa4fe1605a40c151a90de101d96e8af 100644
+index b151506b96a51c74ba408cb555a4d38507b2f8c1..bbcee9d8dbf17085b11bb5e38eb37271c51219ba 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1209,6 +1209,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1207,6 +1207,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
return true;
}
// Paper end - extra debug info
@@ -34,7 +34,7 @@ index 42dd9ab70c07e92258da70ad29b51c7780401a5d..2b524c41daa4fe1605a40c151a90de10
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index f91e145a748dc524e1e95ee3afe00aa74a1aee9a..e3ce13685499e2adea5b776ec4abbdd978b6af58 100644
+index f82728bece2723a8f676ebc5b09885c7833174e4..f9794c0eaced71d242cb04b0815bad322ed7165d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -223,6 +223,11 @@ public abstract class PlayerList {
@@ -49,7 +49,7 @@ index f91e145a748dc524e1e95ee3afe00aa74a1aee9a..e3ce13685499e2adea5b776ec4abbdd9
player.setServerLevel(worldserver1);
String s1 = connection.getLoggableAddress(this.server.logIPs());
-@@ -355,7 +360,7 @@ public abstract class PlayerList {
+@@ -348,7 +353,7 @@ public abstract class PlayerList {
CompoundTag nbttagcompound = ((CompoundTag) optional.get()).getCompound("RootVehicle");
ServerLevel finalWorldServer = worldserver1; // CraftBukkit - decompile error
Entity entity = EntityType.loadEntityRecursive(nbttagcompound.getCompound("Entity"), worldserver1, (entity1) -> {
@@ -59,10 +59,10 @@ index f91e145a748dc524e1e95ee3afe00aa74a1aee9a..e3ce13685499e2adea5b776ec4abbdd9
if (entity != null) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index ea8abc813809360b51cd67072d12efa03f4b4f20..7544a013111a830618371b9b929c950d8f791bd8 100644
+index 5b3de422b07f680e6639ee84f076bffb3c901d0e..631f2d70b5fd6dabc06062e3c77802d2b61398ae 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -241,6 +241,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -247,6 +247,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
}
// Paper end - Share random for entities to make them more random
@@ -70,7 +70,7 @@ index ea8abc813809360b51cd67072d12efa03f4b4f20..7544a013111a830618371b9b929c950d
private CraftEntity bukkitEntity;
-@@ -2205,6 +2206,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2276,6 +2277,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@@ -80,7 +80,7 @@ index ea8abc813809360b51cd67072d12efa03f4b4f20..7544a013111a830618371b9b929c950d
// Save entity's from mob spawner status
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
-@@ -2351,6 +2355,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2422,6 +2426,26 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@@ -120,10 +120,10 @@ index ee897b8c9462dbb3d7be9a2994753155065ce205..1d0964a7f544735a0213d5c7832c71f5
// CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
-index 570957f00ad4817d5631c72060e85f85af634619..baa876db3a58a3c756a72ef1ad081964b358f58e 100644
+index dbc0b69603dcffbf3d41d79719aa0f2b7da4a131..dd86f5ec5b2051aeea4e19ff97146362b1e8d019 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java
-@@ -183,7 +183,7 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
+@@ -189,7 +189,7 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi
private boolean trySummonWarden(ServerLevel world) {
return this.warningLevel >= 4
@@ -133,10 +133,10 @@ index 570957f00ad4817d5631c72060e85f85af634619..baa876db3a58a3c756a72ef1ad081964
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 621970006f21d219784dc58d7aa8d6062c4620f1..571b8352de4070622cdc47a50643beada0b16c36 100644
+index bddf98bdf60473eb1d2e533cf533ed7eee797aaa..ce70c8fddbe63d0af2b1f988ce9a2b40c5d48066 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1001,4 +1001,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1018,4 +1018,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.getHandle().spawnedViaMobSpawner;
}
// Paper end - Entity#fromMobSpawner
diff --git a/patches/unapplied/server/0285-Fire-event-on-GS4-query.patch b/patches/server/0283-Fire-event-on-GS4-query.patch
index 6468ff12c1..6468ff12c1 100644
--- a/patches/unapplied/server/0285-Fire-event-on-GS4-query.patch
+++ b/patches/server/0283-Fire-event-on-GS4-query.patch
diff --git a/patches/server/0284-Add-PlayerPostRespawnEvent.patch b/patches/server/0284-Add-PlayerPostRespawnEvent.patch
new file mode 100644
index 0000000000..a20ec67bd9
--- /dev/null
+++ b/patches/server/0284-Add-PlayerPostRespawnEvent.patch
@@ -0,0 +1,55 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: MisterVector <[email protected]>
+Date: Fri, 26 Oct 2018 21:31:00 -0700
+Subject: [PATCH] Add PlayerPostRespawnEvent
+
+
+diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
+index f9794c0eaced71d242cb04b0815bad322ed7165d..7fa13f1fe02a1bdfa93c76e9c2eefc81c9bded50 100644
+--- a/src/main/java/net/minecraft/server/players/PlayerList.java
++++ b/src/main/java/net/minecraft/server/players/PlayerList.java
+@@ -738,6 +738,10 @@ public abstract class PlayerList {
+
+ entityplayer1.addTag(s);
+ }
++ // Paper start - Add PlayerPostRespawnEvent
++ boolean isBedSpawn = false;
++ boolean isRespawn = false;
++ // Paper end - Add PlayerPostRespawnEvent
+
+ // CraftBukkit start - fire PlayerRespawnEvent
+ DimensionTransition dimensiontransition;
+@@ -745,6 +749,7 @@ public abstract class PlayerList {
+ dimensiontransition = entityplayer.findRespawnPositionAndUseSpawnBlock(flag, DimensionTransition.DO_NOTHING, reason);
+
+ if (!flag) entityplayer.reset(); // SPIGOT-4785
++ isRespawn = true; // Paper - Add PlayerPostRespawnEvent
+ } else {
+ dimensiontransition = new DimensionTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3.ZERO, location.getYaw(), location.getPitch(), DimensionTransition.DO_NOTHING);
+ }
+@@ -795,6 +800,11 @@ public abstract class PlayerList {
+ if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
+ entityplayer1.connection.send(new ClientboundSoundPacket(SoundEvents.RESPAWN_ANCHOR_DEPLETE, SoundSource.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F, worldserver.getRandom().nextLong()));
+ }
++ // Paper start - Add PlayerPostRespawnEvent
++ if (iblockdata.is(net.minecraft.tags.BlockTags.BEDS) && !dimensiontransition.missingRespawnBlock()) {
++ isBedSpawn = true;
++ }
++ // Paper end - Add PlayerPostRespawnEvent
+ }
+ // Added from changeDimension
+ this.sendAllPlayerInfo(entityplayer); // Update health, etc...
+@@ -816,6 +826,13 @@ public abstract class PlayerList {
+ if (entityplayer.connection.isDisconnected()) {
+ this.save(entityplayer);
+ }
++
++ // Paper start - Add PlayerPostRespawnEvent
++ if (isRespawn) {
++ cserver.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerPostRespawnEvent(entityplayer.getBukkitEntity(), location, isBedSpawn));
++ }
++ // Paper end - Add PlayerPostRespawnEvent
++
+ // CraftBukkit end
+
+ return entityplayer1;
diff --git a/patches/unapplied/server/0287-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/patches/server/0285-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
index f94771a112..f6592c8703 100644
--- a/patches/unapplied/server/0287-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
+++ b/patches/server/0285-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
vanilla checks for == 0
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index d97e12a2dca072ae102b029fb67472dacc2c5b40..f0e6375236d61f32235ed23c3bae49db1545d1a2 100644
+index f9dfd6e7b610cfee75524a525ab0e72bed5522da..6dfa43036afeba75a7ecc5a82637f081624d5c69 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -148,6 +148,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -149,6 +149,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
@@ -17,7 +17,7 @@ index d97e12a2dca072ae102b029fb67472dacc2c5b40..f0e6375236d61f32235ed23c3bae49db
if (this.age != -32768) this.age += elapsedTicks;
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
-@@ -233,6 +234,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -234,6 +235,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
diff --git a/patches/unapplied/server/0288-Server-Tick-Events.patch b/patches/server/0286-Server-Tick-Events.patch
index e065974024..df7f3cf156 100644
--- a/patches/unapplied/server/0288-Server-Tick-Events.patch
+++ b/patches/server/0286-Server-Tick-Events.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
Fires event at start and end of a server tick
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 8cf548656f7ec76c1663cd16b83d94bf3582d020..3b6517cb569a6c702dabb60e8f98cd5f9c367e5b 100644
+index 6494b92c6a6444a66ea0e5f8f2890c47f334c938..12f530044d918ddc1ba4b2376419f9ed72283b98 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1407,6 +1407,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1435,6 +1435,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
// Paper end
@@ -17,7 +17,7 @@ index 8cf548656f7ec76c1663cd16b83d94bf3582d020..3b6517cb569a6c702dabb60e8f98cd5f
++this.tickCount;
this.tickRateManager.tick();
-@@ -1433,6 +1434,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1461,6 +1462,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.runAllTasks();
}
// Paper end
diff --git a/patches/unapplied/server/0289-PlayerDeathEvent-getItemsToKeep.patch b/patches/server/0287-PlayerDeathEvent-getItemsToKeep.patch
index f9c4014113..3ed594ff6e 100644
--- a/patches/unapplied/server/0289-PlayerDeathEvent-getItemsToKeep.patch
+++ b/patches/server/0287-PlayerDeathEvent-getItemsToKeep.patch
@@ -11,10 +11,10 @@ Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
public net.minecraft.world.entity.player.Inventory compartments
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 3354c929142b56a992348ff1a6f262b36d24d3a5..d15fed8770c672b1d387f6cd3b11577ba54ebedb 100644
+index dfa3542035924ed53a1fafb032334b0bffbe0282..187cbb9e3c39204f1fb53e85788c954059dc7efc 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -890,6 +890,46 @@ public class ServerPlayer extends Player {
+@@ -899,6 +899,46 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
});
}
@@ -61,8 +61,8 @@ index 3354c929142b56a992348ff1a6f262b36d24d3a5..d15fed8770c672b1d387f6cd3b11577b
@Override
public void die(DamageSource damageSource) {
// this.gameEvent(GameEvent.ENTITY_DIE); // Paper - move below event cancellation check
-@@ -974,7 +1014,12 @@ public class ServerPlayer extends Player {
- this.dropExperience();
+@@ -983,7 +1023,12 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
+ this.dropExperience(damageSource.getEntity());
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
if (!event.getKeepInventory()) {
- this.getInventory().clearContent();
diff --git a/patches/unapplied/server/0290-Optimize-Captured-BlockEntity-Lookup.patch b/patches/server/0288-Optimize-Captured-BlockEntity-Lookup.patch
index ca3803242c..24aead6840 100644
--- a/patches/unapplied/server/0290-Optimize-Captured-BlockEntity-Lookup.patch
+++ b/patches/server/0288-Optimize-Captured-BlockEntity-Lookup.patch
@@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 30ceb1e2765217e284abcb786b2c1f7b60f9c3dc..895c263570acf0f8ac2e8d680a6187bc189a205e 100644
+index 8e2acb3c6f815b5b1d3237a2f4e0b5f3683d2c60..5a3a89c568d42a2adbc2b6e2631fd4b70e54f0bf 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -907,9 +907,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -912,9 +912,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Nullable
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {
diff --git a/patches/unapplied/server/0291-Add-Heightmap-API.patch b/patches/server/0289-Add-Heightmap-API.patch
index 5387674728..c719a3fd80 100644
--- a/patches/unapplied/server/0291-Add-Heightmap-API.patch
+++ b/patches/server/0289-Add-Heightmap-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add Heightmap API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index f3d52650e9dd338396d325c9fb7a46e3927d3b36..77395861f528b0443db84bf882351c7f5ccfd3ba 100644
+index eafb186d158c6cf26b97b1982597bde377396172..deb9685b1279e734e4789ba7a2113b0d71ab1cc6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -229,6 +229,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/unapplied/server/0292-Mob-Spawner-API-Enhancements.patch b/patches/server/0290-Mob-Spawner-API-Enhancements.patch
index dc419af692..dc419af692 100644
--- a/patches/unapplied/server/0292-Mob-Spawner-API-Enhancements.patch
+++ b/patches/server/0290-Mob-Spawner-API-Enhancements.patch
diff --git a/patches/unapplied/server/0293-Fix-CB-call-to-changed-postToMainThread-method.patch b/patches/server/0291-Fix-CB-call-to-changed-postToMainThread-method.patch
index a09231712f..d174f5594c 100644
--- a/patches/unapplied/server/0293-Fix-CB-call-to-changed-postToMainThread-method.patch
+++ b/patches/server/0291-Fix-CB-call-to-changed-postToMainThread-method.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix CB call to changed postToMainThread method
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
-index a0dc17702fb6c8c96f262bc917624a46a40920fa..289a74e35836717bd20c777e9fc8c17722e90411 100644
+index e2a07d4e006d90132102a6449d57dd9e9642e6af..adf953994d2c7e8f1e15075722ee2b9213e4bf94 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -366,7 +366,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
diff --git a/patches/unapplied/server/0294-Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/patches/server/0292-Fix-sounds-when-item-frames-are-modified-MC-123450.patch
index 8e45f027aa..83a7d7d541 100644
--- a/patches/unapplied/server/0294-Fix-sounds-when-item-frames-are-modified-MC-123450.patch
+++ b/patches/server/0292-Fix-sounds-when-item-frames-are-modified-MC-123450.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
This also fixes the adding sound playing when the item frame direction is changed.
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 d4f498789ae1d93533f058b0ce4981eed1ce8ea2..5a0658932cc45c49c9285b1419d574dd83041732 100644
+index 84dcd662981b1eeb03128e7717f6af44c2b9cff6..fdb6898519acfb27baf25d8bbad2013956c1361f 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
-@@ -313,7 +313,7 @@ public class ItemFrame extends HangingEntity {
+@@ -278,7 +278,7 @@ public class ItemFrame extends HangingEntity {
this.onItemChanged(itemstack);
this.getEntityData().set(ItemFrame.DATA_ITEM, itemstack);
diff --git a/patches/unapplied/server/0295-Implement-CraftBlockSoundGroup.patch b/patches/server/0293-Implement-CraftBlockSoundGroup.patch
index 9bf16806b3..9bf16806b3 100644
--- a/patches/unapplied/server/0295-Implement-CraftBlockSoundGroup.patch
+++ b/patches/server/0293-Implement-CraftBlockSoundGroup.patch
diff --git a/patches/unapplied/server/0296-Expose-the-internal-current-tick.patch b/patches/server/0294-Expose-the-internal-current-tick.patch
index 3c20b18da6..ba742dfb40 100644
--- a/patches/unapplied/server/0296-Expose-the-internal-current-tick.patch
+++ b/patches/server/0294-Expose-the-internal-current-tick.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index eb1b151560ef77cd8208f44880c860626caf8d3b..10b638183a06702ce97159e634b18a9c8b55d049 100644
+index 006cc9b7817e0413a332c21839549b127ad67cb4..264b5781a472f706f525cb07d4ccebac17d4a5d3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2902,5 +2902,10 @@ public final class CraftServer implements Server {
+@@ -2910,5 +2910,10 @@ public final class CraftServer implements Server {
profile.getGameProfile().getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
return profile;
}
diff --git a/patches/unapplied/server/0297-Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/0295-Show-blockstate-location-if-we-failed-to-read-it.patch
index 35f4f6c443..35f4f6c443 100644
--- a/patches/unapplied/server/0297-Show-blockstate-location-if-we-failed-to-read-it.patch
+++ b/patches/server/0295-Show-blockstate-location-if-we-failed-to-read-it.patch
diff --git a/patches/unapplied/server/0298-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0296-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
index cb2e502f71..cb2e502f71 100644
--- a/patches/unapplied/server/0298-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
+++ b/patches/server/0296-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
diff --git a/patches/unapplied/server/0299-Configurable-projectile-relative-velocity.patch b/patches/server/0297-Configurable-projectile-relative-velocity.patch
index c96f031ef6..9406e01b81 100644
--- a/patches/unapplied/server/0299-Configurable-projectile-relative-velocity.patch
+++ b/patches/server/0297-Configurable-projectile-relative-velocity.patch
@@ -25,12 +25,12 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this
server-internal fix makes this change future-proof.
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 516999dc425d23c570dabfe4f3c829650a6d205d..40348e45b02be9a0b397a883940a476fb6738ef4 100644
+index 30eb86b52f00cfa61af4f93aca50ffc3547c95e8..7863625d49baa13ea87f2ee295b16706071fb960 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
-@@ -176,7 +176,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
+@@ -183,7 +183,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
- Vec3 vec3d = shooter.getDeltaMovement();
+ Vec3 vec3d = shooter.getKnownMovement();
- this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z));
+ if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity) this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity
diff --git a/patches/server/0298-offset-item-frame-ticking.patch b/patches/server/0298-offset-item-frame-ticking.patch
new file mode 100644
index 0000000000..3db1ffe305
--- /dev/null
+++ b/patches/server/0298-offset-item-frame-ticking.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: kickash32 <[email protected]>
+Date: Tue, 30 Jul 2019 03:17:16 +0500
+Subject: [PATCH] offset item frame ticking
+
+
+diff --git a/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java b/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java
+index e4eece7bbd14514ec60da26a8744672baa8956f9..7bc612890f941177da11da0ce047d5a74d8ebb33 100644
+--- a/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java
++++ b/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java
+@@ -26,7 +26,7 @@ import org.bukkit.event.hanging.HangingBreakEvent;
+ public abstract class BlockAttachedEntity extends Entity {
+
+ private static final Logger LOGGER = LogUtils.getLogger();
+- private int checkInterval;
++ private int checkInterval; { this.checkInterval = this.getId() % this.level().spigotConfig.hangingTickFrequency; } // Paper - Perf: offset item frame ticking
+ protected BlockPos pos;
+
+ protected BlockAttachedEntity(EntityType<? extends BlockAttachedEntity> type, Level world) {
diff --git a/patches/unapplied/server/0301-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0299-Prevent-consuming-the-wrong-itemstack.patch
index bb9605ca50..9f11859765 100644
--- a/patches/unapplied/server/0301-Prevent-consuming-the-wrong-itemstack.patch
+++ b/patches/server/0299-Prevent-consuming-the-wrong-itemstack.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 7a9e6671ac38a3473d5562b0eb1de9eecc95c6c5..73738ef71f2698a6116cd5371f80c26a97c0a77c 100644
+index 6bac6b338302ff0e0e93d5b66d2fd3ea0e666114..3a9c823193e939a6bbf6a43cd440d3fae129a252 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3805,9 +3805,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3827,9 +3827,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void startUsingItem(InteractionHand hand) {
@@ -22,9 +22,9 @@ index 7a9e6671ac38a3473d5562b0eb1de9eecc95c6c5..73738ef71f2698a6116cd5371f80c26a
- if (!itemstack.isEmpty() && !this.isUsingItem()) {
+ if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper - Prevent consuming the wrong itemstack
this.useItem = itemstack;
- this.useItemRemaining = itemstack.getUseDuration();
+ this.useItemRemaining = itemstack.getUseDuration(this);
if (!this.level().isClientSide) {
-@@ -3887,6 +3892,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3914,6 +3919,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@@ -32,7 +32,7 @@ index 7a9e6671ac38a3473d5562b0eb1de9eecc95c6c5..73738ef71f2698a6116cd5371f80c26a
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
-@@ -3921,8 +3927,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3948,8 +3954,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();
diff --git a/patches/unapplied/server/0302-Dont-send-unnecessary-sign-update.patch b/patches/server/0300-Dont-send-unnecessary-sign-update.patch
index afca8562db..afca8562db 100644
--- a/patches/unapplied/server/0302-Dont-send-unnecessary-sign-update.patch
+++ b/patches/server/0300-Dont-send-unnecessary-sign-update.patch
diff --git a/patches/unapplied/server/0303-Add-option-to-disable-pillager-patrols.patch b/patches/server/0301-Add-option-to-disable-pillager-patrols.patch
index 3021a1f6c8..3021a1f6c8 100644
--- a/patches/unapplied/server/0303-Add-option-to-disable-pillager-patrols.patch
+++ b/patches/server/0301-Add-option-to-disable-pillager-patrols.patch
diff --git a/patches/unapplied/server/0304-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/0302-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch
index 82277a287f..82277a287f 100644
--- a/patches/unapplied/server/0304-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch
+++ b/patches/server/0302-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch
diff --git a/patches/unapplied/server/0305-MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/0303-MC-145656-Fix-Follow-Range-Initial-Target.patch
index 528cf153ea..528cf153ea 100644
--- a/patches/unapplied/server/0305-MC-145656-Fix-Follow-Range-Initial-Target.patch
+++ b/patches/server/0303-MC-145656-Fix-Follow-Range-Initial-Target.patch
diff --git a/patches/unapplied/server/0306-Duplicate-UUID-Resolve-Option.patch b/patches/server/0304-Duplicate-UUID-Resolve-Option.patch
index a8fd0cc85e..4bf70db8bd 100644
--- a/patches/unapplied/server/0306-Duplicate-UUID-Resolve-Option.patch
+++ b/patches/server/0304-Duplicate-UUID-Resolve-Option.patch
@@ -32,11 +32,11 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
-diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 1c508d1f122d287cd8dc0a905de96436c343327a..6fa52a83d343ff151667cd9ade0ec60f026ce66d 100644
---- a/src/main/java/net/minecraft/server/level/ChunkMap.java
-+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -906,6 +906,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+diff --git a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
+index e2b72817857a7a203aae4c9de4e01ba1396dc95b..8fa2dec0e4827421d41a9d14e19cf3ac3579bf1c 100644
+--- a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
++++ b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
+@@ -189,10 +189,51 @@ public class ChunkStatusTasks {
entity.discard(null); // CraftBukkit - add Bukkit remove cause
needsRemoval = true;
}
@@ -44,20 +44,20 @@ index 1c508d1f122d287cd8dc0a905de96436c343327a..6fa52a83d343ff151667cd9ade0ec60f
return !needsRemoval;
}));
// CraftBukkit end
-@@ -948,6 +949,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- });
- }
+ }
+ }
++
+ // Paper start - duplicate uuid resolving
+ // rets true if to prevent the entity from being added
-+ public static boolean checkDupeUUID(ServerLevel level, Entity entity) {
++ public static boolean checkDupeUUID(ServerLevel level, net.minecraft.world.entity.Entity entity) {
+ io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode mode = level.paperConfig().entities.spawning.duplicateUuid.mode;
+ if (mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.WARN
+ && mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.DELETE
+ && mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.SAFE_REGEN) {
+ return false;
+ }
-+ Entity other = level.getEntity(entity.getUUID());
++ net.minecraft.world.entity.Entity other = level.getEntity(entity.getUUID());
+
+ if (other == null || other == entity) {
+ return false;
@@ -87,7 +87,4 @@ index 1c508d1f122d287cd8dc0a905de96436c343327a..6fa52a83d343ff151667cd9ade0ec60f
+ return false;
+ }
+ // Paper end - duplicate uuid resolving
-+
- public CompletableFuture<ChunkResult<LevelChunk>> prepareTickingChunk(ChunkHolder holder) {
- CompletableFuture<ChunkResult<List<ChunkAccess>>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> {
- return ChunkStatus.FULL;
+ }
diff --git a/patches/unapplied/server/0307-PlayerDeathEvent-shouldDropExperience.patch b/patches/server/0305-PlayerDeathEvent-shouldDropExperience.patch
index 1639cf4beb..dc8963aeea 100644
--- a/patches/unapplied/server/0307-PlayerDeathEvent-shouldDropExperience.patch
+++ b/patches/server/0305-PlayerDeathEvent-shouldDropExperience.patch
@@ -5,15 +5,15 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index d15fed8770c672b1d387f6cd3b11577ba54ebedb..932b68089c55c8f1b84a15272378d4322a0a5a91 100644
+index 187cbb9e3c39204f1fb53e85788c954059dc7efc..f77edea8a82ef0b77ebe22ec1ee0fc22f94f67a5 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -1011,7 +1011,7 @@ public class ServerPlayer extends Player {
+@@ -1020,7 +1020,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.tellNeutralMobsThatIDied();
}
// SPIGOT-5478 must be called manually now
-- this.dropExperience();
-+ if (event.shouldDropExperience()) this.dropExperience(); // Paper - tie to event
+- this.dropExperience(damageSource.getEntity());
++ if (event.shouldDropExperience()) this.dropExperience(damageSource.getEntity()); // Paper - tie to event
// we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
if (!event.getKeepInventory()) {
// Paper start - PlayerDeathEvent#getItemsToKeep
diff --git a/patches/unapplied/server/0308-Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/0306-Prevent-bees-loading-chunks-checking-hive-position.patch
index 9e8924d226..e933516d42 100644
--- a/patches/unapplied/server/0308-Prevent-bees-loading-chunks-checking-hive-position.patch
+++ b/patches/server/0306-Prevent-bees-loading-chunks-checking-hive-position.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent bees loading chunks checking hive position
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-index 8b0d13513656752a0b40e25c5041d41491b9eef0..5ecf8a87a31a0243c281e2a69823f5f79be69ca5 100644
+index 048d03c8ef3ef865641b2276477cf84e8d4397a1..58536ee8707c5ad0625cae2f26a58cf03b3f85d7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-@@ -499,6 +499,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -510,6 +510,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
} else if (this.isTooFarAway(this.hivePos)) {
return false;
} else {
diff --git a/patches/unapplied/server/0309-Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/0307-Don-t-load-Chunks-from-Hoppers-and-other-things.patch
index 3b189be4e4..3b189be4e4 100644
--- a/patches/unapplied/server/0309-Don-t-load-Chunks-from-Hoppers-and-other-things.patch
+++ b/patches/server/0307-Don-t-load-Chunks-from-Hoppers-and-other-things.patch
diff --git a/patches/unapplied/server/0310-Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/0308-Optimise-EntityGetter-getPlayerByUUID.patch
index 0428d89897..ad34491f92 100644
--- a/patches/unapplied/server/0310-Optimise-EntityGetter-getPlayerByUUID.patch
+++ b/patches/server/0308-Optimise-EntityGetter-getPlayerByUUID.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
Use the PlayerList map instead of iterating over all players
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 2b524c41daa4fe1605a40c151a90de101d96e8af..51644c24900600d95c3f6df073769b68be702b2d 100644
+index bbcee9d8dbf17085b11bb5e38eb37271c51219ba..ccb72d13cce7db74a6754498bab41a017a469418 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -329,6 +329,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -330,6 +330,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
// Paper end
diff --git a/patches/unapplied/server/0311-Fix-items-not-falling-correctly.patch b/patches/server/0309-Fix-items-not-falling-correctly.patch
index a9746d7d4e..aaff528185 100644
--- a/patches/unapplied/server/0311-Fix-items-not-falling-correctly.patch
+++ b/patches/server/0309-Fix-items-not-falling-correctly.patch
@@ -15,10 +15,10 @@ This patch resolves the conflict by offsetting checking Spigot's entity
activation range check from an item's move method.
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index f0e6375236d61f32235ed23c3bae49db1545d1a2..5782033cbe408f60340833ddb49dbca3623aaa83 100644
+index 6dfa43036afeba75a7ecc5a82637f081624d5c69..8351e46f667a8f8dd96d97ec15c0165261a2fab4 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -175,7 +175,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -176,7 +176,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
}
}
diff --git a/patches/unapplied/server/0312-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0310-Optimize-call-to-getFluid-for-explosions.patch
index 4017f12a32..7c2fe736a6 100644
--- a/patches/unapplied/server/0312-Optimize-call-to-getFluid-for-explosions.patch
+++ b/patches/server/0310-Optimize-call-to-getFluid-for-explosions.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimize call to getFluid for explosions
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index d15f216193613504c456d63a1c358973afad3ed1..03c25fec51562f652a8060cde4aabfe9e8bbcfe0 100644
+index 512d79b66fed3d1bef645c3ecb59bda032c81d15..1350c8df69b4ffcf9daa73549e496627db8bc6f7 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
-@@ -192,7 +192,7 @@ public class Explosion {
+@@ -193,7 +193,7 @@ public class Explosion {
for (float f1 = 0.3F; f > 0.0F; f -= 0.22500001F) {
BlockPos blockposition = BlockPos.containing(d4, d5, d6);
BlockState iblockdata = this.level.getBlockState(blockposition);
diff --git a/patches/unapplied/server/0313-Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/0311-Guard-against-serializing-mismatching-chunk-coordina.patch
index 98e6fa59a3..6752b44617 100644
--- a/patches/unapplied/server/0313-Guard-against-serializing-mismatching-chunk-coordina.patch
+++ b/patches/server/0311-Guard-against-serializing-mismatching-chunk-coordina.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Guard against serializing mismatching chunk coordinate
Should help if something dumb happens
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 b0518725a2e145d29bd5bc0aa7e6998a47dcb511..b3f8df13e97cbde7dd914b42004d186f90b78646 100644
+index 47f5f3d58bb3bf85cf35f9baae77df7fab5c844f..0dd6f1bce4913cb84ba21a20df5573bab3a64645 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
-@@ -88,8 +88,20 @@ public class ChunkSerializer {
+@@ -88,8 +88,21 @@ public class ChunkSerializer {
public ChunkSerializer() {}
@@ -25,17 +25,18 @@ index b0518725a2e145d29bd5bc0aa7e6998a47dcb511..b3f8df13e97cbde7dd914b42004d186f
+ }
+ }
+ // Paper end - guard against serializing mismatching coordinates
- public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, ChunkPos chunkPos, CompoundTag nbt) {
++
+ public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, RegionStorageInfo key, ChunkPos chunkPos, CompoundTag nbt) {
- ChunkPos chunkcoordintpair1 = new ChunkPos(nbt.getInt("xPos"), nbt.getInt("zPos"));
+ ChunkPos chunkcoordintpair1 = new ChunkPos(nbt.getInt("xPos"), nbt.getInt("zPos")); // Paper - guard against serializing mismatching coordinates; diff on change, see ChunkSerializer#getChunkCoordinate
if (!Objects.equals(chunkPos, chunkcoordintpair1)) {
ChunkSerializer.LOGGER.error("Chunk file at {} is in the wrong location; relocating. (Expected {}, got {})", new Object[]{chunkPos, chunkPos, chunkcoordintpair1});
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
-index 5ed1b824978c3805e91aeed8e172206ada9fb720..09a73383867d1ffadababd24428ee7a61ab98959 100644
+index 3e194944e50f8395074d68d4abe4c084c3fadcc1..9aa9ab894080a5819fc45698771afd034906d36a 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
-@@ -168,6 +168,13 @@ public class ChunkStorage implements AutoCloseable {
+@@ -172,6 +172,13 @@ public class ChunkStorage implements AutoCloseable {
}
public CompletableFuture<Void> write(ChunkPos chunkPos, CompoundTag nbt) {
diff --git a/patches/unapplied/server/0314-Alternative-item-despawn-rate.patch b/patches/server/0312-Alternative-item-despawn-rate.patch
index a3a719c954..5f9a648f99 100644
--- a/patches/unapplied/server/0314-Alternative-item-despawn-rate.patch
+++ b/patches/server/0312-Alternative-item-despawn-rate.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Alternative item-despawn-rate
Co-authored-by: Noah van der Aa <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a1619238cff94c 100644
+index 8351e46f667a8f8dd96d97ec15c0165261a2fab4..2e550c7db6cebc941590c35337fd47416407a5aa 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -61,6 +61,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -62,6 +62,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public final float bobOffs;
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
public boolean canMobPickup = true; // Paper - Item#canEntityPickup
@@ -17,7 +17,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
super(type, world);
-@@ -215,7 +216,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -216,7 +217,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
}
}
@@ -26,7 +26,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
// CraftBukkit start - fire ItemDespawnEvent
if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
this.age = 0;
-@@ -239,7 +240,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -240,7 +241,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
@@ -35,7 +35,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
// CraftBukkit start - fire ItemDespawnEvent
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
this.age = 0;
-@@ -295,7 +296,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -296,7 +297,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
private boolean isMergable() {
ItemStack itemstack = this.getItem();
@@ -44,7 +44,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
}
private void tryToMerge(ItemEntity other) {
-@@ -543,6 +544,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -544,6 +545,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public void setItem(ItemStack stack) {
this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
@@ -52,7 +52,7 @@ index 5782033cbe408f60340833ddb49dbca3623aaa83..a6dc7c7aab40a9b21c7debd0f9a16192
}
@Override
-@@ -597,7 +599,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -598,7 +600,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public void makeFakeItem() {
this.setNeverPickUp();
diff --git a/patches/unapplied/server/0315-Tracking-Range-Improvements.patch b/patches/server/0313-Tracking-Range-Improvements.patch
index 0c63932883..ce3b2f8004 100644
--- a/patches/unapplied/server/0315-Tracking-Range-Improvements.patch
+++ b/patches/server/0313-Tracking-Range-Improvements.patch
@@ -8,10 +8,10 @@ Sets tracking range of watermobs to animals instead of misc and simplifies code
Also ignores Enderdragon, defaulting it to Mojang's setting
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 6fa52a83d343ff151667cd9ade0ec60f026ce66d..f13f8119cf43711b96b4dc5834fceaa0282d632d 100644
+index e2f176d34443f0d1b00649efa45c65138042a015..3784fbe3548727ab5ad8cfefef2d8d594a76123f 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1774,6 +1774,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1613,6 +1613,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
while (iterator.hasNext()) {
Entity entity = (Entity) iterator.next();
int j = entity.getType().clientTrackingRange() * 16;
diff --git a/patches/unapplied/server/0316-Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/0314-Bees-get-gravity-in-void.-Fixes-MC-167279.patch
index 19d4ba5fa9..9ea731b674 100644
--- a/patches/unapplied/server/0316-Bees-get-gravity-in-void.-Fixes-MC-167279.patch
+++ b/patches/server/0314-Bees-get-gravity-in-void.-Fixes-MC-167279.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Bees get gravity in void. Fixes MC-167279
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-index 5ecf8a87a31a0243c281e2a69823f5f79be69ca5..210e65919082205ea9227520e9cccc064cd94369 100644
+index 58536ee8707c5ad0625cae2f26a58cf03b3f85d7..4134ee48909110f8c338f5d553d4cc1e9e31aaba 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-@@ -143,7 +143,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -144,7 +144,22 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
public Bee(EntityType<? extends Bee> type, Level world) {
super(type, world);
this.remainingCooldownBeforeLocatingNewFlower = Mth.nextInt(this.random, 20, 60);
diff --git a/patches/unapplied/server/0317-Improve-Block-breakNaturally-API.patch b/patches/server/0315-Improve-Block-breakNaturally-API.patch
index 59270e660a..b478ee5bb4 100644
--- a/patches/unapplied/server/0317-Improve-Block-breakNaturally-API.patch
+++ b/patches/server/0315-Improve-Block-breakNaturally-API.patch
@@ -18,7 +18,7 @@ public net.minecraft.world.level.block.TurtleEggBlock decreaseEggs(Lnet/minecraf
Co-authored-by: William Blake Galbreath <[email protected]>
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 46ee66d06c727a3ad6638f09ac97cd0f07676a7b..4bfe53e3a231a7bec461759e78c7a6cbcb8bb625 100644
+index 363dd6ab9c7b650913795ef350374d5c4e7e4925..e862814c1e54776f11050623b52476accc2f1f79 100644
--- a/src/main/java/net/minecraft/world/level/block/IceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/IceBlock.java
@@ -35,6 +35,11 @@ public class IceBlock extends HalfTransparentBlock {
@@ -30,7 +30,7 @@ index 46ee66d06c727a3ad6638f09ac97cd0f07676a7b..4bfe53e3a231a7bec461759e78c7a6cb
+ }
+ public void afterDestroy(Level world, BlockPos pos, ItemStack tool) {
+ // Paper end - Improve Block#breakNaturally API
- if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) == 0) {
+ if (!EnchantmentHelper.hasTag(tool, EnchantmentTags.PREVENTS_ICE_MELTING)) {
if (world.dimensionType().ultraWarm()) {
world.removeBlock(pos, false);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
diff --git a/patches/unapplied/server/0318-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0316-Optimise-getChunkAt-calls-for-loaded-chunks.patch
index 2be0284195..41af749576 100644
--- a/patches/unapplied/server/0318-Optimise-getChunkAt-calls-for-loaded-chunks.patch
+++ b/patches/server/0316-Optimise-getChunkAt-calls-for-loaded-chunks.patch
@@ -7,10 +7,10 @@ bypass the need to get a player chunk, then get the either,
then unwrap it...
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index fe0521ad6f0601ebdf7a616c0500479ecb34cabb..fa2df210b05529d228c5ee208f125dcf5288dfec 100644
+index 6032cdc1b169c8ed0890091bce5066fbbb73ae30..86453364a0433a0196099a8cd271fa2bc7924fbb 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -252,6 +252,12 @@ public class ServerChunkCache extends ChunkSource {
+@@ -253,6 +253,12 @@ public class ServerChunkCache extends ChunkSource {
return this.getChunk(x, z, leastStatus, create);
}, this.mainThreadProcessor).join();
} else {
@@ -23,17 +23,18 @@ index fe0521ad6f0601ebdf7a616c0500479ecb34cabb..fa2df210b05529d228c5ee208f125dcf
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
gameprofilerfiller.incrementCounter("getChunk");
-@@ -295,39 +301,7 @@ public class ServerChunkCache extends ChunkSource {
+@@ -296,33 +302,7 @@ public class ServerChunkCache extends ChunkSource {
if (Thread.currentThread() != this.mainThread) {
return null;
} else {
- this.level.getProfiler().incrementCounter("getChunkNow");
- long k = ChunkPos.asLong(chunkX, chunkZ);
-
+- ChunkAccess ichunkaccess;
+-
- for (int l = 0; l < 4; ++l) {
- if (k == this.lastChunkPos[l] && this.lastChunkStatus[l] == ChunkStatus.FULL) {
-- ChunkAccess ichunkaccess = this.lastChunk[l];
--
+- ichunkaccess = this.lastChunk[l];
- return ichunkaccess instanceof LevelChunk ? (LevelChunk) ichunkaccess : null;
- }
- }
@@ -43,22 +44,15 @@ index fe0521ad6f0601ebdf7a616c0500479ecb34cabb..fa2df210b05529d228c5ee208f125dcf
- if (playerchunk == null) {
- return null;
- } else {
-- ChunkResult<ChunkAccess> chunkresult = (ChunkResult) playerchunk.getFutureIfPresent(ChunkStatus.FULL).getNow(null); // CraftBukkit - decompile error
--
-- if (chunkresult == null) {
-- return null;
-- } else {
-- ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
--
-- if (ichunkaccess1 != null) {
-- this.storeInCache(k, ichunkaccess1, ChunkStatus.FULL);
-- if (ichunkaccess1 instanceof LevelChunk) {
-- return (LevelChunk) ichunkaccess1;
-- }
+- ichunkaccess = playerchunk.getChunkIfPresent(ChunkStatus.FULL);
+- if (ichunkaccess != null) {
+- this.storeInCache(k, ichunkaccess, ChunkStatus.FULL);
+- if (ichunkaccess instanceof LevelChunk) {
+- return (LevelChunk) ichunkaccess;
- }
--
-- return null;
- }
+-
+- return null;
- }
+ return this.getChunkAtIfLoadedMainThread(chunkX, chunkZ); // Paper - Perf: Optimise getChunkAt calls for loaded chunks
}
diff --git a/patches/unapplied/server/0319-Add-debug-for-sync-chunk-loads.patch b/patches/server/0317-Add-debug-for-sync-chunk-loads.patch
index fc4bd9b073..5e771c8656 100644
--- a/patches/unapplied/server/0319-Add-debug-for-sync-chunk-loads.patch
+++ b/patches/server/0317-Add-debug-for-sync-chunk-loads.patch
@@ -300,10 +300,10 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index fa2df210b05529d228c5ee208f125dcf5288dfec..0e89cf0742b9443f5256081987242554de24d893 100644
+index 86453364a0433a0196099a8cd271fa2bc7924fbb..7b85cf6aba07cb64f58b913dda5da9124146bddd 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -279,6 +279,7 @@ public class ServerChunkCache extends ChunkSource {
+@@ -280,6 +280,7 @@ public class ServerChunkCache extends ChunkSource {
Objects.requireNonNull(completablefuture);
if (!completablefuture.isDone()) { // Paper
@@ -312,10 +312,10 @@ index fa2df210b05529d228c5ee208f125dcf5288dfec..0e89cf0742b9443f5256081987242554
chunkproviderserver_b.managedBlock(completablefuture::isDone);
this.level.timings.syncChunkLoad.stopTiming(); // Paper
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 51644c24900600d95c3f6df073769b68be702b2d..1170a0031368ede2e45d24720506f6519cbd55da 100644
+index ccb72d13cce7db74a6754498bab41a017a469418..33cb58e7298e7900dbcd37dbdb21de83bfca6a26 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -421,6 +421,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -422,6 +422,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
}
diff --git a/patches/unapplied/server/0320-Improve-java-version-check.patch b/patches/server/0318-Improve-java-version-check.patch
index d3e2336adf..df50b64ab2 100644
--- a/patches/unapplied/server/0320-Improve-java-version-check.patch
+++ b/patches/server/0318-Improve-java-version-check.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Improve java version check
Co-Authored-By: MiniDigger <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 1f62158072d7503f0148a9af4e9fbebab30e6fd7..6048e80241246cabf0390e11d217cd8c291d31b6 100644
+index faa228698c7dd60bde0f3767cc27957ece04b8be..f3bce016e729d553aaa6185470bbf4317f94352b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -203,23 +203,27 @@ public class Main {
diff --git a/patches/unapplied/server/0321-Add-ThrownEggHatchEvent.patch b/patches/server/0319-Add-ThrownEggHatchEvent.patch
index acec0a7669..21fd12f380 100644
--- a/patches/unapplied/server/0321-Add-ThrownEggHatchEvent.patch
+++ b/patches/server/0319-Add-ThrownEggHatchEvent.patch
@@ -7,10 +7,10 @@ Adds a new event similar to PlayerEggThrowEvent, but without the Player requirem
(dispensers can throw eggs to hatch them, too).
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
-index 02da4d1ff3c72e8adad2f4cee449ad21dec34e02..82bb8004635865f5202578d5a6f520048e7269d5 100644
+index 62850e899955732afdd255ea1e55fc84b7c6c96b..dbd60cc8c39f5d2d4c77e2de4f2567e7fa456cd2 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
-@@ -83,6 +83,13 @@ public class ThrownEgg extends ThrowableItemProjectile {
+@@ -86,6 +86,13 @@ public class ThrownEgg extends ThrowableItemProjectile {
}
}
// CraftBukkit end
diff --git a/patches/unapplied/server/0322-Entity-Jump-API.patch b/patches/server/0320-Entity-Jump-API.patch
index 84c5b56ab1..8c02ea8f2b 100644
--- a/patches/unapplied/server/0322-Entity-Jump-API.patch
+++ b/patches/server/0320-Entity-Jump-API.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API
public net.minecraft.world.entity.LivingEntity jumping
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 73738ef71f2698a6116cd5371f80c26a97c0a77c..639357aa6335b96da3723973a754db763ecbc0f8 100644
+index 3a9c823193e939a6bbf6a43cd440d3fae129a252..191ec36c917f377246e3379c410c9aa2d930cebc 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3385,8 +3385,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3405,8 +3405,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
this.jumpInLiquid(FluidTags.LAVA);
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
@@ -22,10 +22,10 @@ index 73738ef71f2698a6116cd5371f80c26a97c0a77c..639357aa6335b96da3723973a754db76
} else {
this.noJumpDelay = 0;
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 4a1b25bb8a3d342400cb657781e9eab68decd479..fb4c7220c4edad54813036d62db7e3eefeda92a3 100644
+index 228cfb77e12ed5979e422dc5dbb5e8dcf363b509..8df42121aa22ec9f95a1b8627b64b0ff71e36314 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-@@ -536,7 +536,9 @@ public class Panda extends Animal {
+@@ -541,7 +541,9 @@ public class Panda extends Animal {
Panda entitypanda = (Panda) iterator.next();
if (!entitypanda.isBaby() && entitypanda.onGround() && !entitypanda.isInWater() && entitypanda.canPerformAction()) {
@@ -36,10 +36,10 @@ index 4a1b25bb8a3d342400cb657781e9eab68decd479..fb4c7220c4edad54813036d62db7e3ee
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
-index 1264fb03d2dcab088fc4a7c2788c9f9df53cba5d..cec801ba14bed8b043b2375f1bf9e7811a63e995 100644
+index 4d91bc4b90a208fec789325dbcec8cc56d1a2a8b..aa4111eef22546f8aa630228c51ef5761c9b373b 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
-@@ -159,7 +159,9 @@ public class Ravager extends Raider {
+@@ -160,7 +160,9 @@ public class Ravager extends Raider {
}
if (!flag && this.onGround()) {
@@ -50,10 +50,10 @@ index 1264fb03d2dcab088fc4a7c2788c9f9df53cba5d..cec801ba14bed8b043b2375f1bf9e781
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index b2172a8c70ab77ba7c98b6b2b27595765d7eba11..539280a0265a4746ebc9ede6667df3699dfb8125 100644
+index 5de2da8f473b6ee59be1b49c5002a0161981136c..ccb779066fb5f3ebf9e4bdabdffc9c18c1a75cbb 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -961,4 +961,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -963,4 +963,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(this.getHandle().getUsedItemHand());
}
// Paper end - active item API
diff --git a/patches/unapplied/server/0323-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0321-Add-option-to-nerf-pigmen-from-nether-portals.patch
index 02b1a1e50a..c77757f945 100644
--- a/patches/unapplied/server/0323-Add-option-to-nerf-pigmen-from-nether-portals.patch
+++ b/patches/server/0321-Add-option-to-nerf-pigmen-from-nether-portals.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 7544a013111a830618371b9b929c950d8f791bd8..102f32c0724b6042412c010cffa02e5b454ab757 100644
+index 631f2d70b5fd6dabc06062e3c77802d2b61398ae..d890331b9bd8c7b29efb21454af34a0b246b1674 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -398,6 +398,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -404,6 +404,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void inactiveTick() { }
// Spigot end
protected int numCollisions = 0; // Paper - Cap entity collisions
@@ -16,7 +16,7 @@ index 7544a013111a830618371b9b929c950d8f791bd8..102f32c0724b6042412c010cffa02e5b
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
// Paper start - Entity origin API
@javax.annotation.Nullable
-@@ -2213,6 +2214,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2284,6 +2285,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
}
@@ -26,7 +26,7 @@ index 7544a013111a830618371b9b929c950d8f791bd8..102f32c0724b6042412c010cffa02e5b
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
-@@ -2355,6 +2359,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2426,6 +2430,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@@ -35,10 +35,10 @@ index 7544a013111a830618371b9b929c950d8f791bd8..102f32c0724b6042412c010cffa02e5b
String spawnReasonName = nbt.getString("Paper.SpawnReason");
try {
diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
-index f0d4c16fffe7af7e913f4bb300c72f7bdf91e0e8..d3f2c0e3107a781b462a2b67c10cd1e5f05feefb 100644
+index 19c813ab9e71eed150ae569f903287e9283d9292..ab1cbcf5ef1ebffd39373bacb2b0983d2c8fa15a 100644
--- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java
-@@ -71,6 +71,8 @@ public class NetherPortalBlock extends Block {
+@@ -88,6 +88,8 @@ public class NetherPortalBlock extends Block implements Portal {
if (entity != null) {
entity.setPortalCooldown();
diff --git a/patches/unapplied/server/0324-Make-the-GUI-graph-fancier.patch b/patches/server/0322-Make-the-GUI-graph-fancier.patch
index 9e79ca7b91..9e79ca7b91 100644
--- a/patches/unapplied/server/0324-Make-the-GUI-graph-fancier.patch
+++ b/patches/server/0322-Make-the-GUI-graph-fancier.patch
diff --git a/patches/unapplied/server/0325-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0323-add-hand-to-BlockMultiPlaceEvent.patch
index e422639556..8936160004 100644
--- a/patches/unapplied/server/0325-add-hand-to-BlockMultiPlaceEvent.patch
+++ b/patches/server/0323-add-hand-to-BlockMultiPlaceEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 3d8c4cc4d1bdd8c5ceea65fc2189070098410849..c0f0627d3c303e625be584c6eba5865f5622490f 100644
+index 3405d27c360cde4e735aef1d5a01a53bbd00b0e0..a073dd7a0d8440aa00f0f02dc02187b4ff48bc7f 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -401,13 +401,18 @@ public class CraftEventFactory {
+@@ -402,13 +402,18 @@ public class CraftEventFactory {
}
org.bukkit.inventory.ItemStack item;
diff --git a/patches/unapplied/server/0326-Validate-tripwire-hook-placement-before-update.patch b/patches/server/0324-Validate-tripwire-hook-placement-before-update.patch
index bc1125b169..bc1125b169 100644
--- a/patches/unapplied/server/0326-Validate-tripwire-hook-placement-before-update.patch
+++ b/patches/server/0324-Validate-tripwire-hook-placement-before-update.patch
diff --git a/patches/unapplied/server/0327-Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/0325-Add-option-to-allow-iron-golems-to-spawn-in-air.patch
index e09ab64290..75d1d9c02b 100644
--- a/patches/unapplied/server/0327-Add-option-to-allow-iron-golems-to-spawn-in-air.patch
+++ b/patches/server/0325-Add-option-to-allow-iron-golems-to-spawn-in-air.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add option to allow iron golems to spawn in air
diff --git a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
-index 3a51d3722ef8dba0e4b3ebcff0de8cede3bf3371..932fae98c551052cadba4c6fc6e575fc30a25d58 100644
+index 615be0b85fb3d28a044c6bae6a0fe93ec4fca061..1807da10d07d1f6e4ddbc0fa1b8da34a688d67c3 100644
--- a/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
+++ b/src/main/java/net/minecraft/world/entity/animal/IronGolem.java
-@@ -317,7 +317,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
+@@ -325,7 +325,7 @@ public class IronGolem extends AbstractGolem implements NeutralMob {
BlockPos blockposition1 = blockposition.below();
BlockState iblockdata = world.getBlockState(blockposition1);
diff --git a/patches/unapplied/server/0328-Configurable-chance-of-villager-zombie-infection.patch b/patches/server/0326-Configurable-chance-of-villager-zombie-infection.patch
index ecb3c72bd4..217787cdc9 100644
--- a/patches/unapplied/server/0328-Configurable-chance-of-villager-zombie-infection.patch
+++ b/patches/server/0326-Configurable-chance-of-villager-zombie-infection.patch
@@ -8,10 +8,10 @@ This allows you to solve an issue in vanilla behavior where:
* On normal difficulty they will have a 50% of getting infected or dying.
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
-index 2d6cf6ea1717b28871c40de69120336c59a4d347..66fa70762ba3387aa200caa4d8a4e557498cfff1 100644
+index d981f8679149669f6ca4ea950d744149974532b2..e2a3978899497b6622829d6577cfaa723092da9d 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
-@@ -443,10 +443,8 @@ public class Zombie extends Monster {
+@@ -454,10 +454,8 @@ public class Zombie extends Monster {
public boolean killedEntity(ServerLevel world, LivingEntity other) {
boolean flag = super.killedEntity(world, other);
diff --git a/patches/unapplied/server/0329-Optimise-Chunk-getFluid.patch b/patches/server/0327-Optimise-Chunk-getFluid.patch
index 211f2b345f..751bc009c7 100644
--- a/patches/unapplied/server/0329-Optimise-Chunk-getFluid.patch
+++ b/patches/server/0327-Optimise-Chunk-getFluid.patch
@@ -8,10 +8,10 @@ faster on its own, however removing the try catch makes it
easier to inline due to code size
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 963d86e7505e4d9c3854d35d9b59aed3369e8a57..744db9eec4f7bdeb32f83300960a7fce63b393d8 100644
+index 00f6ef5ffe33d6d45b5356e215324cbe0eadfda4..cda4413901fb465a855396e42356adaadefd4195 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -370,18 +370,20 @@ public class LevelChunk extends ChunkAccess {
+@@ -369,18 +369,20 @@ public class LevelChunk extends ChunkAccess {
}
public FluidState getFluidState(int x, int y, int z) {
@@ -38,7 +38,7 @@ index 963d86e7505e4d9c3854d35d9b59aed3369e8a57..744db9eec4f7bdeb32f83300960a7fce
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Getting fluid state");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Block being got");
-@@ -391,6 +393,7 @@ public class LevelChunk extends ChunkAccess {
+@@ -390,6 +392,7 @@ public class LevelChunk extends ChunkAccess {
});
throw new ReportedException(crashreport);
}
diff --git a/patches/unapplied/server/0330-Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/0328-Set-spigots-verbose-world-setting-to-false-by-def.patch
index e97303c0a9..e97303c0a9 100644
--- a/patches/unapplied/server/0330-Set-spigots-verbose-world-setting-to-false-by-def.patch
+++ b/patches/server/0328-Set-spigots-verbose-world-setting-to-false-by-def.patch
diff --git a/patches/unapplied/server/0331-Add-tick-times-API-and-mspt-command.patch b/patches/server/0329-Add-tick-times-API-and-mspt-command.patch
index b75c7ef54c..06d5d06807 100644
--- a/patches/unapplied/server/0331-Add-tick-times-API-and-mspt-command.patch
+++ b/patches/server/0329-Add-tick-times-API-and-mspt-command.patch
@@ -125,10 +125,10 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7
public static void registerCommands(final MinecraftServer server) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 3b6517cb569a6c702dabb60e8f98cd5f9c367e5b..6e31678d1b49584208b7c0ed1f6cfd394f597362 100644
+index 12f530044d918ddc1ba4b2376419f9ed72283b98..2a2b5205692573c9886a2696f376958809b899ac 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -258,6 +258,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private int playerIdleTimeout;
private final long[] tickTimesNanos;
private long aggregatedTickTimesNanos;
@@ -140,7 +140,7 @@ index 3b6517cb569a6c702dabb60e8f98cd5f9c367e5b..6e31678d1b49584208b7c0ed1f6cfd39
@Nullable
private KeyPair keyPair;
@Nullable
-@@ -1447,6 +1452,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1475,6 +1480,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.aggregatedTickTimesNanos += j;
this.tickTimesNanos[k] = j;
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) j / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
@@ -152,7 +152,7 @@ index 3b6517cb569a6c702dabb60e8f98cd5f9c367e5b..6e31678d1b49584208b7c0ed1f6cfd39
this.logTickMethodTime(i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
-@@ -2787,4 +2797,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2863,4 +2873,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
}
@@ -184,10 +184,10 @@ index 3b6517cb569a6c702dabb60e8f98cd5f9c367e5b..6e31678d1b49584208b7c0ed1f6cfd39
+ // Paper end - Add tick times API and /mspt command
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 10b638183a06702ce97159e634b18a9c8b55d049..428a2738008c14f7e0179c15026494eda44fa14f 100644
+index 264b5781a472f706f525cb07d4ccebac17d4a5d3..edf6921ed70ea3281cf870dfb779e908ea3d1905 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2673,6 +2673,16 @@ public final class CraftServer implements Server {
+@@ -2681,6 +2681,16 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}
diff --git a/patches/unapplied/server/0332-Expose-MinecraftServer-isRunning.patch b/patches/server/0330-Expose-MinecraftServer-isRunning.patch
index 7a3621d478..03228c7907 100644
--- a/patches/unapplied/server/0332-Expose-MinecraftServer-isRunning.patch
+++ b/patches/server/0330-Expose-MinecraftServer-isRunning.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 428a2738008c14f7e0179c15026494eda44fa14f..af99292c4461819c4c7d304134f3f3ffb88c175d 100644
+index edf6921ed70ea3281cf870dfb779e908ea3d1905..cb6f6762b41ca78ff7c13a65690ce0be1bdac292 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2917,5 +2917,10 @@ public final class CraftServer implements Server {
+@@ -2925,5 +2925,10 @@ public final class CraftServer implements Server {
public int getCurrentTick() {
return net.minecraft.server.MinecraftServer.currentTick;
}
diff --git a/patches/unapplied/server/0333-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0331-Add-Raw-Byte-ItemStack-Serialization.patch
index 7a4944bac8..5862ff1c75 100644
--- a/patches/unapplied/server/0333-Add-Raw-Byte-ItemStack-Serialization.patch
+++ b/patches/server/0331-Add-Raw-Byte-ItemStack-Serialization.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 9730a3fe6b1e2734d897936dc8bff7c06edb3687..3fc189cd1e54f91c1713315214da9b6af2923074 100644
+index 7800e0a5aa381181d6a19d55f90490154de05c04..890beb473c240c084c4dd12c5dd792895117358e 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -483,6 +483,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/unapplied/server/0334-Pillager-patrol-spawn-settings-and-per-player-option.patch b/patches/server/0332-Pillager-patrol-spawn-settings-and-per-player-option.patch
index c1c57ebd98..792ceab91f 100644
--- a/patches/unapplied/server/0334-Pillager-patrol-spawn-settings-and-per-player-option.patch
+++ b/patches/server/0332-Pillager-patrol-spawn-settings-and-per-player-option.patch
@@ -10,10 +10,10 @@ When not per player it will use the Vanilla mechanic of one delay per
world and the world age for the start day.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 932b68089c55c8f1b84a15272378d4322a0a5a91..10369280138e3baf563cd1099af5eb878cd2a39b 100644
+index f77edea8a82ef0b77ebe22ec1ee0fc22f94f67a5..f47f95f44252a1be48efbbec284a8dbcd494c760 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -265,6 +265,7 @@ public class ServerPlayer extends Player {
+@@ -269,6 +269,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public boolean wonGame;
private int containerUpdateDelay; // Paper - Configurable container update tick rate
public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed
diff --git a/patches/unapplied/server/0335-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/patches/server/0333-Remote-Connections-shouldn-t-hold-up-shutdown.patch
index d4ff9e5867..fb2f7c6706 100644
--- a/patches/unapplied/server/0335-Remote-Connections-shouldn-t-hold-up-shutdown.patch
+++ b/patches/server/0333-Remote-Connections-shouldn-t-hold-up-shutdown.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 3736fdd1dba4fc86012c687c5525a52cb8094f47..539a8ddfcf660bf824325516c88cf91f4a32a746 100644
+index b15cee6f21ff300b596922a8eed35a5f8a89fe22..d6dc8c983d26ce89f17a990be4284fdc78ad164b 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -412,11 +412,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -416,11 +416,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
if (this.rconThread != null) {
diff --git a/patches/unapplied/server/0336-Do-not-allow-bees-to-load-chunks-for-beehives.patch b/patches/server/0334-Do-not-allow-bees-to-load-chunks-for-beehives.patch
index 80606e638c..f361af6e50 100644
--- a/patches/unapplied/server/0336-Do-not-allow-bees-to-load-chunks-for-beehives.patch
+++ b/patches/server/0334-Do-not-allow-bees-to-load-chunks-for-beehives.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Do not allow bees to load chunks for beehives
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd499ab39b68 100644
+index 4134ee48909110f8c338f5d553d4cc1e9e31aaba..615b57fac9def18d9dcaefcfe397c74c11cac627 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
-@@ -410,6 +410,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -421,6 +421,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
if (this.hivePos == null) {
return false;
} else {
@@ -16,7 +16,7 @@ index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd49
BlockEntity tileentity = this.level().getBlockEntity(this.hivePos);
return tileentity instanceof BeehiveBlockEntity && ((BeehiveBlockEntity) tileentity).isFireNearby();
-@@ -443,6 +444,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -454,6 +455,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
}
private boolean doesHiveHaveSpace(BlockPos pos) {
@@ -24,7 +24,7 @@ index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd49
BlockEntity tileentity = this.level().getBlockEntity(pos);
return tileentity instanceof BeehiveBlockEntity ? !((BeehiveBlockEntity) tileentity).isFull() : false;
-@@ -913,6 +915,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -924,6 +926,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@Override
public boolean canBeeUse() {
if (Bee.this.hasHive() && Bee.this.wantsToEnterHive() && Bee.this.hivePos.closerToCenterThan(Bee.this.position(), 2.0D)) {
@@ -32,7 +32,7 @@ index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd49
BlockEntity tileentity = Bee.this.level().getBlockEntity(Bee.this.hivePos);
if (tileentity instanceof BeehiveBlockEntity) {
-@@ -936,6 +939,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+@@ -947,6 +950,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
@Override
public void start() {
@@ -41,7 +41,7 @@ index 210e65919082205ea9227520e9cccc064cd94369..d4389172c3c006ebec5d9cd8213cdd49
if (tileentity instanceof BeehiveBlockEntity tileentitybeehive) {
diff --git a/src/main/java/net/minecraft/world/entity/monster/Vex.java b/src/main/java/net/minecraft/world/entity/monster/Vex.java
-index 970cd8e02464c69087756f9d1deee197c9c092af..fd3b37dde54623ba38186efb2a64d364c86b81d2 100644
+index d6f73c719d58970c6d13340f78c3303916b46546..2985296a9a034e535157f55e322fc8c107827752 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Vex.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Vex.java
@@ -356,7 +356,10 @@ public class Vex extends Monster implements TraceableEntity {
diff --git a/patches/unapplied/server/0337-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0335-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
index 8403fc132e..580844dd61 100644
--- a/patches/unapplied/server/0337-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
+++ b/patches/server/0335-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
@@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
Stack will identify any causer of this and warn instead of crashing.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index f13f8119cf43711b96b4dc5834fceaa0282d632d..66936834a80ef6b645ab44f3439defcb90237bfa 100644
+index 3784fbe3548727ab5ad8cfefef2d8d594a76123f..5732aded2e4dbeea84dbe6ebac71c2ad5ce4729a 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1469,6 +1469,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1308,6 +1308,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void addEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
@@ -25,10 +25,10 @@ index f13f8119cf43711b96b4dc5834fceaa0282d632d..66936834a80ef6b645ab44f3439defcb
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 1170a0031368ede2e45d24720506f6519cbd55da..df623f10def1ecf071971119f449a773063b3ce1 100644
+index 33cb58e7298e7900dbcd37dbdb21de83bfca6a26..a87782c3cb0a751f532feda0b827d7c7eac163e1 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2181,7 +2181,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2149,7 +2149,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTrackingStart(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
@@ -37,7 +37,7 @@ index 1170a0031368ede2e45d24720506f6519cbd55da..df623f10def1ecf071971119f449a773
if (entity instanceof ServerPlayer entityplayer) {
ServerLevel.this.players.add(entityplayer);
ServerLevel.this.updateSleepingPlayerList();
-@@ -2211,6 +2211,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2179,6 +2179,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit
diff --git a/patches/unapplied/server/0338-Don-t-tick-dead-players.patch b/patches/server/0336-Don-t-tick-dead-players.patch
index 5b34e6f194..ab7318137c 100644
--- a/patches/unapplied/server/0338-Don-t-tick-dead-players.patch
+++ b/patches/server/0336-Don-t-tick-dead-players.patch
@@ -7,10 +7,10 @@ Causes sync chunk loads and who knows what all else.
This is safe because Spectators are skipped in unloaded chunks too in vanilla.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 10369280138e3baf563cd1099af5eb878cd2a39b..5d42a20c2b908858c3b61a8100addec5100b33a0 100644
+index f47f95f44252a1be48efbbec284a8dbcd494c760..d2f5ff035d4d496c035b8ae0c04c67e3de78fd4b 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -758,7 +758,7 @@ public class ServerPlayer extends Player {
+@@ -767,7 +767,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public void doTick() {
try {
diff --git a/patches/unapplied/server/0339-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0337-Dead-Player-s-shouldn-t-be-able-to-move.patch
index de7bd84221..bcbd0c7040 100644
--- a/patches/unapplied/server/0339-Dead-Player-s-shouldn-t-be-able-to-move.patch
+++ b/patches/server/0337-Dead-Player-s-shouldn-t-be-able-to-move.patch
@@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
due to 1.15's new queue but processed while dead.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index e60385c2b84ca0807ed5fc710017a1de09aa3c4e..37190eb2d7a8f81989908f58aa13de1ba964e43a 100644
+index e8fb36582430332e511c2d7ac1e604763f4052e3..1d8aa3b3c3deba7d04dd115d1f0b70b078111f1e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1162,7 +1162,7 @@ public abstract class Player extends LivingEntity {
+@@ -1172,7 +1172,7 @@ public abstract class Player extends LivingEntity {
@Override
protected boolean isImmobile() {
diff --git a/patches/unapplied/server/0340-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0338-Don-t-move-existing-players-to-world-spawn.patch
index 3c566159a3..ec997ec997 100644
--- a/patches/unapplied/server/0340-Don-t-move-existing-players-to-world-spawn.patch
+++ b/patches/server/0338-Don-t-move-existing-players-to-world-spawn.patch
@@ -13,19 +13,19 @@ By skipping this, we avoid potential for a large spike on server start.
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 5d42a20c2b908858c3b61a8100addec5100b33a0..1856f0692f1894614a9366378b3209a87a1253ec 100644
+index d2f5ff035d4d496c035b8ae0c04c67e3de78fd4b..142bdd74f930a1a2a004c8b6d9435318d1a07b71 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -353,7 +353,7 @@ public class ServerPlayer extends Player {
+@@ -358,7 +358,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.server = server;
this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
-- this.fudgeSpawnLocation(world);
-+ // this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn
+- this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
++ // this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn
this.updateOptions(clientOptions);
this.object = null;
-@@ -621,7 +621,7 @@ public class ServerPlayer extends Player {
+@@ -630,7 +630,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
position = Vec3.atCenterOf(world.getSharedSpawnPos());
}
this.setLevel(world);
@@ -35,14 +35,14 @@ index 5d42a20c2b908858c3b61a8100addec5100b33a0..1856f0692f1894614a9366378b3209a8
this.gameMode.setLevel((ServerLevel) world);
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 8ce2826b1ded161a8220273d1fc5260ed3b6772f..d2f94afe667627a14cff896b463c2b9b51bf6e29 100644
+index 7fa13f1fe02a1bdfa93c76e9c2eefc81c9bded50..5cc92a5f55a9492928c4ba140d4e45dcf75b5431 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -226,6 +226,7 @@ public abstract class PlayerList {
// Paper start - Entity#getEntitySpawnReason
if (optional.isEmpty()) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
-+ player.fudgeSpawnLocation(worldserver1); // Paper - Don't move existing players to world spawn
++ player.moveTo(player.adjustSpawnLocation(worldserver1, worldserver1.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
}
// Paper end - Entity#getEntitySpawnReason
player.setServerLevel(worldserver1);
diff --git a/patches/unapplied/server/0341-Optimize-Pathfinding.patch b/patches/server/0339-Optimize-Pathfinding.patch
index 281988ce37..281988ce37 100644
--- a/patches/unapplied/server/0341-Optimize-Pathfinding.patch
+++ b/patches/server/0339-Optimize-Pathfinding.patch
diff --git a/patches/unapplied/server/0342-Reduce-Either-Optional-allocation.patch b/patches/server/0340-Reduce-Either-Optional-allocation.patch
index d42e0ac184..d42e0ac184 100644
--- a/patches/unapplied/server/0342-Reduce-Either-Optional-allocation.patch
+++ b/patches/server/0340-Reduce-Either-Optional-allocation.patch
diff --git a/patches/unapplied/server/0343-Reduce-memory-footprint-of-CompoundTag.patch b/patches/server/0341-Reduce-memory-footprint-of-CompoundTag.patch
index 55111ab6e8..55111ab6e8 100644
--- a/patches/unapplied/server/0343-Reduce-memory-footprint-of-CompoundTag.patch
+++ b/patches/server/0341-Reduce-memory-footprint-of-CompoundTag.patch
diff --git a/patches/unapplied/server/0344-Prevent-opening-inventories-when-frozen.patch b/patches/server/0342-Prevent-opening-inventories-when-frozen.patch
index 1c3720ee78..1f3b9d6580 100644
--- a/patches/unapplied/server/0344-Prevent-opening-inventories-when-frozen.patch
+++ b/patches/server/0342-Prevent-opening-inventories-when-frozen.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent opening inventories when frozen
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 1856f0692f1894614a9366378b3209a87a1253ec..2720fee3f0e8d1c9a3e2a13c86bf2d60fa9de26c 100644
+index 142bdd74f930a1a2a004c8b6d9435318d1a07b71..9bb7eafb72d5264a5c53a2f53dc60d94ec976431 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -703,7 +703,7 @@ public class ServerPlayer extends Player {
+@@ -712,7 +712,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
}
// Paper end - Configurable container update tick rate
@@ -17,7 +17,7 @@ index 1856f0692f1894614a9366378b3209a87a1253ec..2720fee3f0e8d1c9a3e2a13c86bf2d60
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
this.containerMenu = this.inventoryMenu;
}
-@@ -1602,7 +1602,7 @@ public class ServerPlayer extends Player {
+@@ -1637,7 +1637,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
} else {
// CraftBukkit start
this.containerMenu = container;
diff --git a/patches/unapplied/server/0345-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0343-Don-t-run-entity-collision-code-if-not-needed.patch
index 21bdee9ee5..4f49647a64 100644
--- a/patches/unapplied/server/0345-Don-t-run-entity-collision-code-if-not-needed.patch
+++ b/patches/server/0343-Don-t-run-entity-collision-code-if-not-needed.patch
@@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
Co-authored-by: Owen1212055 <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 639357aa6335b96da3723973a754db763ecbc0f8..2b38a9d88b459674b1b8d667c4e02b93ad7290b4 100644
+index 191ec36c917f377246e3379c410c9aa2d930cebc..c5721045681bcd2db99eec42a1c1455515868af1 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3496,10 +3496,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3516,10 +3516,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.level().isClientSide()) {
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
} else {
diff --git a/patches/unapplied/server/0346-Implement-Player-Client-Options-API.patch b/patches/server/0344-Implement-Player-Client-Options-API.patch
index 2417bf6e0c..a7e823ea46 100644
--- a/patches/unapplied/server/0346-Implement-Player-Client-Options-API.patch
+++ b/patches/server/0344-Implement-Player-Client-Options-API.patch
@@ -87,19 +87,19 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index 2720fee3f0e8d1c9a3e2a13c86bf2d60fa9de26c..f9b2bbda1cbd16f8635d6fff05bb5c0e26a5e6f1 100644
+index 9bb7eafb72d5264a5c53a2f53dc60d94ec976431..df6fb7dd6015ce6e558a97598c822243dcc1c284 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -354,7 +354,7 @@ public class ServerPlayer extends Player {
+@@ -359,7 +359,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.stats = server.getPlayerList().getPlayerStats(this);
this.advancements = server.getPlayerList().getPlayerAdvancements(this);
- // this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn
+ // this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn
- this.updateOptions(clientOptions);
+ this.updateOptionsNoEvents(clientOptions); // Paper - don't call options events on login
this.object = null;
this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper
-@@ -2096,7 +2096,23 @@ public class ServerPlayer extends Player {
+@@ -2149,7 +2149,23 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
}
}
@@ -123,12 +123,12 @@ index 2720fee3f0e8d1c9a3e2a13c86bf2d60fa9de26c..f9b2bbda1cbd16f8635d6fff05bb5c0e
// CraftBukkit start
if (this.getMainArm() != clientOptions.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
-@@ -2108,6 +2124,11 @@ public class ServerPlayer extends Player {
+@@ -2161,6 +2177,11 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper
}
// CraftBukkit end
+ // Paper start - don't call options events on login
-+ updateOptionsNoEvents(clientOptions);
++ this.updateOptionsNoEvents(clientOptions);
+ }
+ public void updateOptionsNoEvents(ClientInformation clientOptions) {
+ // Paper end
@@ -136,10 +136,10 @@ index 2720fee3f0e8d1c9a3e2a13c86bf2d60fa9de26c..f9b2bbda1cbd16f8635d6fff05bb5c0e
this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(this.language), java.util.Locale.US); // Paper
this.requestedViewDistance = clientOptions.viewDistance();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 332f916a5063aa3048675eb906bb3ff5050b37bb..61b9dabaa74ee9e2b357316382ecbdf6c822b916 100644
+index b03813ebc9aa665f670767be9c37cbb84756838e..e837939d35ee168f5640b28fae07675817492cb9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -651,6 +651,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+@@ -653,6 +653,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
connection.disconnect(message == null ? net.kyori.adventure.text.Component.empty() : message);
}
}
diff --git a/patches/unapplied/server/0347-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/0345-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch
index 0859eed952..8ac2ea013d 100644
--- a/patches/unapplied/server/0347-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch
+++ b/patches/server/0345-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from
I suspect it deals with teleporting as it uses players current x/y/z
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
-index e8640bcbc1d4e2965049974385585f5060cb6a44..c473cb1888e9ab0e91ba44f1439b81742758304e 100644
+index 27065ffc5473c518acee3a3096b83fac61eb7860..cbabbfbb9967ddf9a56f3be24a88e0fcd4415aa2 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
-@@ -284,8 +284,8 @@ public abstract class DistanceManager {
+@@ -272,8 +272,8 @@ public abstract class DistanceManager {
ObjectSet<ServerPlayer> objectset = (ObjectSet) this.playersPerChunk.get(i);
if (objectset == null) return; // CraftBukkit - SPIGOT-6208
diff --git a/patches/unapplied/server/0348-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch b/patches/server/0346-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
index db5513d4b1..0f5c5bbc3d 100644
--- a/patches/unapplied/server/0348-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
+++ b/patches/server/0346-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
@@ -31,10 +31,10 @@ delays anymore.
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 66936834a80ef6b645ab44f3439defcb90237bfa..406c78dcb97d954f16f05d379d4dbf74c61c8fd1 100644
+index 5732aded2e4dbeea84dbe6ebac71c2ad5ce4729a..d1247df5c51b0d377a27ea7cc5b5a2d1f1bf9b32 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1476,6 +1476,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1315,6 +1315,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return;
}
// Paper end - ignore and warn about illegal addEntity calls instead of crashing server
@@ -43,10 +43,10 @@ index 66936834a80ef6b645ab44f3439defcb90237bfa..406c78dcb97d954f16f05d379d4dbf74
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index f9b2bbda1cbd16f8635d6fff05bb5c0e26a5e6f1..bf6c81300d29c445a1012d1159866547c202d135 100644
+index df6fb7dd6015ce6e558a97598c822243dcc1c284..b808d9c710d6cd59ac34ea537f603fd4002073d0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -284,6 +284,7 @@ public class ServerPlayer extends Player {
+@@ -288,6 +288,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player {
public double maxHealthCache;
public boolean joining = true;
public boolean sentListPacket = false;
@@ -55,7 +55,7 @@ index f9b2bbda1cbd16f8635d6fff05bb5c0e26a5e6f1..bf6c81300d29c445a1012d1159866547
// CraftBukkit end
public boolean isRealPlayer; // Paper
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index d2f94afe667627a14cff896b463c2b9b51bf6e29..a4db0bcefc92091ff26b146a2ce914c1d36a3c23 100644
+index 5cc92a5f55a9492928c4ba140d4e45dcf75b5431..47392be43dffcb983c29683263227780a3ddee24 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -297,6 +297,12 @@ public abstract class PlayerList {
@@ -80,11 +80,10 @@ index d2f94afe667627a14cff896b463c2b9b51bf6e29..a4db0bcefc92091ff26b146a2ce914c1
// CraftBukkit end
player.refreshEntityData(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
-@@ -356,7 +364,11 @@ public abstract class PlayerList {
-
- playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect, false));
- }
--
+@@ -350,6 +358,11 @@ public abstract class PlayerList {
+ worldserver1 = player.serverLevel(); // CraftBukkit - Update in case join event changed it
+ // CraftBukkit end
+ this.sendActivePlayerEffects(player);
+ // Paper start - Fire PlayerJoinEvent when Player is actually ready; move vehicle into method so it can be called above - short circuit around that code
+ this.onPlayerJoinFinish(player, worldserver1, s1);
+ }
@@ -93,7 +92,7 @@ index d2f94afe667627a14cff896b463c2b9b51bf6e29..a4db0bcefc92091ff26b146a2ce914c1
if (optional.isPresent() && ((CompoundTag) optional.get()).contains("RootVehicle", 10)) {
CompoundTag nbttagcompound = ((CompoundTag) optional.get()).getCompound("RootVehicle");
ServerLevel finalWorldServer = worldserver1; // CraftBukkit - decompile error
-@@ -403,6 +415,10 @@ public abstract class PlayerList {
+@@ -396,6 +409,10 @@ public abstract class PlayerList {
}
}
diff --git a/patches/unapplied/server/0349-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/0347-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
index 161e100760..5ab2b2b01d 100644
--- a/patches/unapplied/server/0349-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
+++ b/patches/server/0347-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
@@ -10,7 +10,7 @@ Co-authored-by: Wyatt Childers <[email protected]>
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index a4db0bcefc92091ff26b146a2ce914c1d36a3c23..935061ed5c22b48e43d27fe0840cc69fb60d5344 100644
+index 47392be43dffcb983c29683263227780a3ddee24..fa35bc76575a3ffe6435ff24db0c7ad78b53e309 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -197,6 +197,7 @@ public abstract class PlayerList {
@@ -80,14 +80,14 @@ index a4db0bcefc92091ff26b146a2ce914c1d36a3c23..935061ed5c22b48e43d27fe0840cc69f
+ }
+ if (optional.isEmpty() || invalidPlayerWorld[0]) {
+ // Paper end - reset to main world spawn if first spawn or invalid world
- player.fudgeSpawnLocation(worldserver1); // Paper - Don't move existing players to world spawn
+ player.moveTo(player.adjustSpawnLocation(worldserver1, worldserver1.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
}
// Paper end - Entity#getEntitySpawnReason
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 102f32c0724b6042412c010cffa02e5b454ab757..33329cb73324ea3e005d59ee3f9ea1225ada7055 100644
+index d890331b9bd8c7b29efb21454af34a0b246b1674..2ce2926f4e3a79a1a329cdd684852970f6f104f2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2316,27 +2316,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2387,27 +2387,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
// CraftBukkit end
diff --git a/patches/unapplied/server/0350-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0348-Add-PlayerAttackEntityCooldownResetEvent.patch
index 1013713e9f..e7c7e02e1a 100644
--- a/patches/unapplied/server/0350-Add-PlayerAttackEntityCooldownResetEvent.patch
+++ b/patches/server/0348-Add-PlayerAttackEntityCooldownResetEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 2b38a9d88b459674b1b8d667c4e02b93ad7290b4..accb574f961114f225596a633b36a91e3009ed87 100644
+index c5721045681bcd2db99eec42a1c1455515868af1..1886cebc32ded9c4e0c7409a4db6f78fcdf847ea 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2248,7 +2248,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
diff --git a/patches/unapplied/server/0351-Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/0349-Don-t-fire-BlockFade-on-worldgen-threads.patch
index 8a262c1f35..8a262c1f35 100644
--- a/patches/unapplied/server/0351-Don-t-fire-BlockFade-on-worldgen-threads.patch
+++ b/patches/server/0349-Don-t-fire-BlockFade-on-worldgen-threads.patch
diff --git a/patches/unapplied/server/0352-Add-phantom-creative-and-insomniac-controls.patch b/patches/server/0350-Add-phantom-creative-and-insomniac-controls.patch
index 8101fc3b6a..9a012509be 100644
--- a/patches/unapplied/server/0352-Add-phantom-creative-and-insomniac-controls.patch
+++ b/patches/server/0350-Add-phantom-creative-and-insomniac-controls.patch
@@ -17,7 +17,7 @@ index 3207166061bf9c4d7bf3f38e5a9f7aff23ccd5c1..ee4495b67c46cf1282cdd6ad15b224b0
private EntitySelector() {}
// Paper start - Affects Spawning API
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
-index 4292a0fbab588a8cd58db36bc279f2991231aeec..ac119e2efff7ba3c32425783ffcf4b3c44156f27 100644
+index 3c3f70d05fb51b530b792adf84c324840bd03c14..4b3bec32921feb1dcf71abf5e8d34fcbbc59baf5 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
@@ -549,6 +549,7 @@ public class Phantom extends FlyingMob implements Enemy {
diff --git a/patches/unapplied/server/0353-Fix-item-duplication-and-teleport-issues.patch b/patches/server/0351-Fix-item-duplication-and-teleport-issues.patch
index 84397e780b..8c3120ae4c 100644
--- a/patches/unapplied/server/0353-Fix-item-duplication-and-teleport-issues.patch
+++ b/patches/server/0351-Fix-item-duplication-and-teleport-issues.patch
@@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
same item twice because the source was destroyed.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 33329cb73324ea3e005d59ee3f9ea1225ada7055..fcdfe37d2135190e44527190976a718b2f9359c5 100644
+index 2ce2926f4e3a79a1a329cdd684852970f6f104f2..b1d870b9a3b414ed49b4674afc2c6088d457ebc1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2446,11 +2446,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -2517,11 +2517,12 @@ 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) {
@@ -34,58 +34,47 @@ index 33329cb73324ea3e005d59ee3f9ea1225ada7055..fcdfe37d2135190e44527190976a718b
entityitem.setDefaultPickUpDelay();
// CraftBukkit start
-@@ -3243,6 +3244,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- @Nullable
- public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
- // CraftBukkit end
+@@ -3337,6 +3338,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ public Entity changeDimension(DimensionTransition teleportTarget) {
+ Level world = this.level();
+
+ // Paper start - Fix item duplication and teleport issues
+ if (!this.isAlive() || !this.valid) {
-+ LOGGER.warn("Illegal Entity Teleport " + this + " to " + worldserver + ":" + location, new Throwable());
++ LOGGER.warn("Illegal Entity Teleport " + this + " to " + teleportTarget.newLevel() + ":" + teleportTarget.pos(), new Throwable());
+ return null;
+ }
+ // Paper end - Fix item duplication and teleport issues
- if (this.level() instanceof ServerLevel && !this.isRemoved()) {
- this.level().getProfiler().push("changeDimension");
- // CraftBukkit start
-@@ -3269,6 +3276,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- // CraftBukkit end
-
- this.level().getProfiler().popPush("reloading");
-+ // Paper start - Fix item duplication and teleport issues
-+ if (this instanceof Mob) {
-+ ((Mob) this).dropLeash(true, true); // Paper drop lead
-+ }
-+ // Paper end - Fix item duplication and teleport issues
- Entity entity = this.getType().create(worldserver);
-
- if (entity != null) {
-@@ -3286,10 +3298,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- // CraftBukkit start - Forward the CraftEntity to the new entity
- this.getBukkitEntity().setHandle(entity);
- entity.bukkitEntity = this.getBukkitEntity();
--
-- if (this instanceof Mob) {
-- ((Mob) this).dropLeash(true, false); // Unleash to prevent duping of leads.
-- }
- // CraftBukkit end
- }
+ if (world instanceof ServerLevel worldserver) {
+ if (!this.isRemoved()) {
+ // CraftBukkit start
+@@ -3379,6 +3386,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
-@@ -3410,7 +3418,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ if (entity2 != null) {
+ if (this != entity2) {
++ // Paper start - Fix item duplication and teleport issues
++ if (this instanceof Mob) {
++ ((Mob) this).dropLeash(true, true); // Paper drop lead
++ }
++ // Paper end - Fix item duplication and teleport issues
+ entity2.restoreFrom(this);
+ this.removeAfterChangingDimensions();
+ // CraftBukkit start - Forward the CraftEntity to the new entity
+@@ -3454,7 +3466,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
- public boolean canChangeDimensions() {
-- return !this.isPassenger() && !this.isVehicle();
-+ return !this.isPassenger() && !this.isVehicle() && isAlive() && valid; // Paper - Fix item duplication and teleport issues
+ public boolean canChangeDimensions(Level from, Level to) {
+- return true;
++ return this.isAlive() && this.valid; // Paper - Fix item duplication and teleport issues
}
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index accb574f961114f225596a633b36a91e3009ed87..a4d5e0ffbdade4e1b15d30de6e60feddda697c24 100644
+index 1886cebc32ded9c4e0c7409a4db6f78fcdf847ea..94c0de0a50e2a076e5aed86a673fe03d9698ba36 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1734,9 +1734,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1717,9 +1717,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start
- org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(worldserver, damageSource);
if (deathEvent == null || !deathEvent.isCancelled()) {
- if (this.deathScore >= 0 && entityliving != null) {
- entityliving.awardKillScore(this, this.deathScore, damageSource);
@@ -96,27 +85,27 @@ index accb574f961114f225596a633b36a91e3009ed87..a4d5e0ffbdade4e1b15d30de6e60fedd
// Paper start - clear equipment if event is not cancelled
if (this instanceof Mob) {
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
-@@ -1837,8 +1837,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
- this.dropCustomDeathLoot(source, i, flag);
+@@ -1811,8 +1811,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ this.dropCustomDeathLoot(world, damageSource, flag);
this.clearEquipmentSlots = prev; // Paper
}
- // CraftBukkit start - Call death event
-- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops); // Paper
+- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops); // Paper
+ // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
-+ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops, () -> {
++ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops, () -> {
+ final LivingEntity entityliving = this.getKillCredit();
+ if (this.deathScore >= 0 && entityliving != null) {
-+ entityliving.awardKillScore(this, this.deathScore, source);
++ entityliving.awardKillScore(this, this.deathScore, damageSource);
+ }
+ }); // Paper end
this.postDeathDropItems(deathEvent); // Paper
this.drops = new ArrayList<>();
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-index 029d5756f424dba57b4a974b09453c2f0cf0e8e2..e1f6853c450a2e6a0d7607f1faec7bc5c82d9621 100644
+index 92bb0c63330ad3a4cb13b2dc655020714e9b1ffd..cc1189c2d7dc57ba8f29aad4ba5d2a07362bcd5b 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -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()) {
@@ -125,7 +114,7 @@ index 029d5756f424dba57b4a974b09453c2f0cf0e8e2..e1f6853c450a2e6a0d7607f1faec7bc5
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()) {
@@ -135,10 +124,10 @@ index 029d5756f424dba57b4a974b09453c2f0cf0e8e2..e1f6853c450a2e6a0d7607f1faec7bc5
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index c0f0627d3c303e625be584c6eba5865f5622490f..18d1e2ff18cae10ec6f1b7adf480bd6bfe738584 100644
+index a073dd7a0d8440aa00f0f02dc02187b4ff48bc7f..4552a77e84d3c957431a918ca78dcf2e06f2e74c 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -894,6 +894,11 @@ public class CraftEventFactory {
+@@ -895,6 +895,11 @@ public class CraftEventFactory {
}
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops) {
@@ -149,8 +138,8 @@ index c0f0627d3c303e625be584c6eba5865f5622490f..18d1e2ff18cae10ec6f1b7adf480bd6b
+ // Paper end
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
- EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward());
-@@ -908,11 +913,13 @@ public class CraftEventFactory {
+ EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity()));
+@@ -909,11 +914,13 @@ public class CraftEventFactory {
playDeathSound(victim, event);
// Paper end
victim.expToDrop = event.getDroppedExp();
diff --git a/patches/unapplied/server/0354-Villager-Restocks-API.patch b/patches/server/0352-Villager-Restocks-API.patch
index 75b7928672..75b7928672 100644
--- a/patches/unapplied/server/0354-Villager-Restocks-API.patch
+++ b/patches/server/0352-Villager-Restocks-API.patch
diff --git a/patches/unapplied/server/0355-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0353-Validate-PickItem-Packet-and-kick-for-invalid.patch
index aa5fcfc6ac..385eee6011 100644
--- a/patches/unapplied/server/0355-Validate-PickItem-Packet-and-kick-for-invalid.patch
+++ b/patches/server/0353-Validate-PickItem-Packet-and-kick-for-invalid.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index e728b9f317d12c3c452db70ba7d1e930c84e345d..7277c9b82c127cd38db2daec3df4d33e8376b8dc 100644
+index 528c902b5434875b111812ff3a8099f945404d3c..0e89021e44a5d9d3fd0169199839dbcc33e283d5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -892,7 +892,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -895,7 +895,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handlePickItem(ServerboundPickItemPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
diff --git a/patches/unapplied/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/0354-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch
index 20c245bbb4..44bd324f68 100644
--- a/patches/unapplied/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch
+++ b/patches/server/0354-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch
@@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
Set system properly at server startup if not set already to help protect from this.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 6048e80241246cabf0390e11d217cd8c291d31b6..8316e0703b6c1ad81d6745f29eb697017e84c65a 100644
+index f3bce016e729d553aaa6185470bbf4317f94352b..02243b69cca7255588b43dab57e1c9ca4c3ca87f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -27,6 +27,7 @@ public class Main {
diff --git a/patches/unapplied/server/0357-misc-debugging-dumps.patch b/patches/server/0355-misc-debugging-dumps.patch
index 4d7f82da81..0d84f146d1 100644
--- a/patches/unapplied/server/0357-misc-debugging-dumps.patch
+++ b/patches/server/0355-misc-debugging-dumps.patch
@@ -36,10 +36,10 @@ index 0000000000000000000000000000000000000000..479bb92d159f33c54c2d9c39d8a63aa9
+ }
+}
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
-index f15c388434a0a501f86868de35cc138756975027..5044a7dc120c8b040ee23365d2bf97e6180e3ee4 100644
+index 2b5235aea933462ca711abb5b59b6715a9af5ecb..52818e877c797ed82f7eecc8e1e1716168422b29 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
-@@ -342,7 +342,7 @@ public class Commands {
+@@ -340,7 +340,7 @@ public class Commands {
} catch (Exception exception) {
MutableComponent ichatmutablecomponent = Component.literal(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
@@ -49,10 +49,10 @@ index f15c388434a0a501f86868de35cc138756975027..5044a7dc120c8b040ee23365d2bf97e6
StackTraceElement[] astacktraceelement = exception.getStackTrace();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 6e31678d1b49584208b7c0ed1f6cfd394f597362..92cb9a0a479f3dc1c78eda42191d020106d059dd 100644
+index 2a2b5205692573c9886a2696f376958809b899ac..15938074ad20133f5ccdab0c8566556d7b807d8f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -909,6 +909,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -916,6 +916,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
@@ -60,7 +60,7 @@ index 6e31678d1b49584208b7c0ed1f6cfd394f597362..92cb9a0a479f3dc1c78eda42191d0201
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (this.stopLock) {
-@@ -923,6 +924,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -930,6 +931,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hasStopped) return;
this.hasStopped = true;
}
@@ -68,7 +68,7 @@ index 6e31678d1b49584208b7c0ed1f6cfd394f597362..92cb9a0a479f3dc1c78eda42191d0201
// CraftBukkit end
if (this.metricsRecorder.isRecording()) {
this.cancelRecordingMetrics();
-@@ -1027,6 +1029,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1034,6 +1036,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
this.isRestarting = isRestarting;
@@ -78,21 +78,21 @@ index 6e31678d1b49584208b7c0ed1f6cfd394f597362..92cb9a0a479f3dc1c78eda42191d0201
this.running = false;
if (waitForShutdown) {
diff --git a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
-index 970d1ddf0a014b47b0ac97440489706137324991..e4086bea596e5f5d71491e0b7ad650d76939b8f9 100644
+index 5457358bc76889153036818fdfd70a043ec4e40f..f0701ff9be510e6bed7767f154832eb80797b565 100644
--- a/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java
-@@ -62,6 +62,10 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
+@@ -70,6 +70,10 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
@Override
- public void onDisconnect(Component reason) {
+ public void onDisconnect(DisconnectionDetails info) {
+ // Paper start - Debugging
+ if (net.minecraft.server.MinecraftServer.getServer().isDebugging()) {
+ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}, while in configuration phase {}", this.gameProfile, reason.getString(), currentTask != null ? currentTask.type().id() : "null");
+ } else // Paper end
- ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}", this.gameProfile, reason.getString());
- super.onDisconnect(reason);
+ ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}", this.gameProfile, info.reason().getString());
+ super.onDisconnect(info);
}
-@@ -149,6 +153,11 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
+@@ -169,6 +173,11 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis
playerlist.placeNewPlayer(this.connection, entityplayer, this.createCookie(this.clientInformation));
} catch (Exception exception) {
ServerConfigurationPacketListenerImpl.LOGGER.error("Couldn't place player in world", exception);
@@ -105,10 +105,10 @@ index 970d1ddf0a014b47b0ac97440489706137324991..e4086bea596e5f5d71491e0b7ad650d7
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index af99292c4461819c4c7d304134f3f3ffb88c175d..9cc6f2ae2f0ae71d550f0da5f81412a434b0bdf7 100644
+index cb6f6762b41ca78ff7c13a65690ce0be1bdac292..093c2159eb9d9603b5e3f0d420769d6b9d872be8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1036,6 +1036,7 @@ public final class CraftServer implements Server {
+@@ -1039,6 +1039,7 @@ public final class CraftServer implements Server {
plugin.getDescription().getFullName(),
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
));
diff --git a/patches/unapplied/server/0358-Prevent-teleporting-dead-entities.patch b/patches/server/0356-Prevent-teleporting-dead-entities.patch
index 034646a8bb..f2d5343c65 100644
--- a/patches/unapplied/server/0358-Prevent-teleporting-dead-entities.patch
+++ b/patches/server/0356-Prevent-teleporting-dead-entities.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 7277c9b82c127cd38db2daec3df4d33e8376b8dc..d0ce184da22352b591f4783918104a4c473cc873 100644
+index 0e89021e44a5d9d3fd0169199839dbcc33e283d5..05033408070a08c7b982a675dc3acb79db392229 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -1540,6 +1540,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1553,6 +1553,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
diff --git a/patches/unapplied/server/0359-Implement-Mob-Goal-API.patch b/patches/server/0357-Implement-Mob-Goal-API.patch
index 896a2b5c3d..28beb5dcae 100644
--- a/patches/unapplied/server/0359-Implement-Mob-Goal-API.patch
+++ b/patches/server/0357-Implement-Mob-Goal-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API
diff --git a/build.gradle.kts b/build.gradle.kts
-index 2caa4c8e250a7925e7d6f9ba00a95956b5328568..69b5d39f57a63130c0b83f6238898bdf68fa1e9a 100644
+index 7b002d28932e21878dbab248abf85066a8a80a9c..2bcb4eacd06c76f2c950b424b2a2c4d53497c538 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -41,6 +41,7 @@ dependencies {
@@ -781,10 +781,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7
LOOK,
JUMP,
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 9cc6f2ae2f0ae71d550f0da5f81412a434b0bdf7..13ef7ed49526b9f0d1ec376ec3242e14f66f0a23 100644
+index 093c2159eb9d9603b5e3f0d420769d6b9d872be8..7eaf0f56cbf0695132a029b0a208f283f43e47b5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2923,5 +2923,11 @@ public final class CraftServer implements Server {
+@@ -2931,5 +2931,11 @@ public final class CraftServer implements Server {
public boolean isStopping() {
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
}
diff --git a/patches/unapplied/server/0360-Add-villager-reputation-API.patch b/patches/server/0358-Add-villager-reputation-API.patch
index 5043e90bdc..5043e90bdc 100644
--- a/patches/unapplied/server/0360-Add-villager-reputation-API.patch
+++ b/patches/server/0358-Add-villager-reputation-API.patch
diff --git a/patches/unapplied/server/0361-ExperienceOrb-merging-stacking-API-and-fixes.patch b/patches/server/0359-ExperienceOrb-merging-stacking-API-and-fixes.patch
index 265e653227..33954bb4a2 100644
--- a/patches/unapplied/server/0361-ExperienceOrb-merging-stacking-API-and-fixes.patch
+++ b/patches/server/0359-ExperienceOrb-merging-stacking-API-and-fixes.patch
@@ -21,10 +21,10 @@ Co-authored-by: Aikar <[email protected]>
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index 8007d323023655052acd0cf1f3a753101e9ee74a..a933061d4f0c45a34b5678c2b317b670f20b8a45 100644
+index 0916e24271d07ad5db51c5bc68791722b0f69c2b..a758b2456acac23095fe4619ae10300a034cb460 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -241,6 +241,7 @@ public class ExperienceOrb extends Entity {
+@@ -244,6 +244,7 @@ public class ExperienceOrb extends Entity {
}
private static boolean tryMergeToExisting(ServerLevel world, Vec3 pos, int amount) {
@@ -32,7 +32,7 @@ index 8007d323023655052acd0cf1f3a753101e9ee74a..a933061d4f0c45a34b5678c2b317b670
AABB axisalignedbb = AABB.ofSize(pos, 1.0D, 1.0D, 1.0D);
int j = world.getRandom().nextInt(40);
List<ExperienceOrb> list = world.getEntities(EntityTypeTest.forClass(ExperienceOrb.class), axisalignedbb, (entityexperienceorb) -> {
-@@ -267,6 +268,11 @@ public class ExperienceOrb extends Entity {
+@@ -270,6 +271,11 @@ public class ExperienceOrb extends Entity {
}
private void merge(ExperienceOrb other) {
@@ -44,15 +44,15 @@ index 8007d323023655052acd0cf1f3a753101e9ee74a..a933061d4f0c45a34b5678c2b317b670
this.count += other.count;
this.age = Math.min(this.age, other.age);
other.discard(EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause
-@@ -353,7 +359,7 @@ public class ExperienceOrb extends Entity {
+@@ -360,7 +366,7 @@ public class ExperienceOrb extends Entity {
+ int l = amount - k * amount / j;
- itemstack.setDamageValue(itemstack.getDamageValue() - j);
- int k = amount - this.durabilityToXp(j);
-- this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls
-+ // 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
-
- return k > 0 ? this.repairPlayerItems(player, k) : 0;
- } else {
+ if (l > 0) {
+- this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls
++ // 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
+ return this.repairPlayerItems(player, l);
+ }
+ }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index 5a7d314ec0562e472f5dc45924a7b24841cff126..650e4a01cecc4cc08e7ff9ebcc4c367084351f21 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@@ -77,10 +77,10 @@ index 5a7d314ec0562e472f5dc45924a7b24841cff126..650e4a01cecc4cc08e7ff9ebcc4c3670
public java.util.UUID getTriggerEntityId() {
return getHandle().triggerEntityId;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 18d1e2ff18cae10ec6f1b7adf480bd6bfe738584..943c452e1d3d1273a2ef304aa2a52f328dfb5d37 100644
+index 4552a77e84d3c957431a918ca78dcf2e06f2e74c..805aec84b57f0a426c1337445dfdd084cb0a0507 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -703,15 +703,29 @@ public class CraftEventFactory {
+@@ -704,15 +704,29 @@ public class CraftEventFactory {
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
double radius = world.spigotConfig.expMerge;
if (radius > 0) {
diff --git a/patches/unapplied/server/0362-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0360-Fix-PotionEffect-ignores-icon-flag.patch
index ecd472e97b..f2f8e45056 100644
--- a/patches/unapplied/server/0362-Fix-PotionEffect-ignores-icon-flag.patch
+++ b/patches/server/0360-Fix-PotionEffect-ignores-icon-flag.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag
Co-authored-by: Tamion <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 539280a0265a4746ebc9ede6667df3699dfb8125..a5026d470b8651ddf4b79fc29cbc598ac55217ff 100644
+index ccb779066fb5f3ebf9e4bdabdffc9c18c1a75cbb..1544242abfbd0f9accf5fe515a95d9ac0db50d4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -483,7 +483,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -484,7 +484,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean addPotionEffect(PotionEffect effect, boolean force) {
@@ -18,7 +18,7 @@ index 539280a0265a4746ebc9ede6667df3699dfb8125..a5026d470b8651ddf4b79fc29cbc598a
return true;
}
-@@ -504,7 +504,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -505,7 +505,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public PotionEffect getPotionEffect(PotionEffectType type) {
MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type));
@@ -27,7 +27,7 @@ index 539280a0265a4746ebc9ede6667df3699dfb8125..a5026d470b8651ddf4b79fc29cbc598a
}
@Override
-@@ -516,7 +516,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -517,7 +517,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public Collection<PotionEffect> getActivePotionEffects() {
List<PotionEffect> effects = new ArrayList<PotionEffect>();
for (MobEffectInstance handle : this.getHandle().activeEffects.values()) {
diff --git a/patches/unapplied/server/0363-Potential-bed-API.patch b/patches/server/0361-Potential-bed-API.patch
index 34470bcfc1..34470bcfc1 100644
--- a/patches/unapplied/server/0363-Potential-bed-API.patch
+++ b/patches/server/0361-Potential-bed-API.patch
diff --git a/patches/unapplied/server/0364-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0362-Wait-for-Async-Tasks-during-shutdown.patch
index 282fda5b52..25e00fd77b 100644
--- a/patches/unapplied/server/0364-Wait-for-Async-Tasks-during-shutdown.patch
+++ b/patches/server/0362-Wait-for-Async-Tasks-during-shutdown.patch
@@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
if any are still running after that delay just as reload does.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 92cb9a0a479f3dc1c78eda42191d020106d059dd..2575129d1647eda4acb1ce4f19619f42257cb6f8 100644
+index 15938074ad20133f5ccdab0c8566556d7b807d8f..095215a5cbf1abeb7836a6ccc87c195019a7f019 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -936,6 +936,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -943,6 +943,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -22,10 +22,10 @@ index 92cb9a0a479f3dc1c78eda42191d020106d059dd..2575129d1647eda4acb1ce4f19619f42
// CraftBukkit end
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.shutdown(); // Paper - Plugin remapping
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 13ef7ed49526b9f0d1ec376ec3242e14f66f0a23..91b8fefc2c97c1f487bde1559d4ccf76795ca954 100644
+index 7eaf0f56cbf0695132a029b0a208f283f43e47b5..118708bd917518333359ce1407e1e26e4ec6a180 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1047,6 +1047,32 @@ public final class CraftServer implements Server {
+@@ -1050,6 +1050,32 @@ public final class CraftServer implements Server {
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
}
diff --git a/patches/unapplied/server/0365-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/0363-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch
index a65b9bbbbc..87cff3afa2 100644
--- a/patches/unapplied/server/0365-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch
+++ b/patches/server/0363-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Ensure EntityRaider respects game and entity rules for
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-index f81d5abedec0f2fa7ae81421edda8b3dfcb7690b..9f54e46b870e78d1d360ea79604708db08276ae3 100644
+index 6fb56c826f0eaf76ab7896f784084b4fb1b3d105..e5dff812dc979ecf71939a85b2213965d15e7954 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-@@ -334,6 +334,7 @@ public abstract class Raider extends PatrollingMonster {
+@@ -292,6 +292,7 @@ public abstract class Raider extends PatrollingMonster {
@Override
public boolean canUse() {
diff --git a/patches/unapplied/server/0367-Add-option-for-console-having-all-permissions.patch b/patches/server/0364-Add-option-for-console-having-all-permissions.patch
index ace91d22dd..ace91d22dd 100644
--- a/patches/unapplied/server/0367-Add-option-for-console-having-all-permissions.patch
+++ b/patches/server/0364-Add-option-for-console-having-all-permissions.patch
diff --git a/patches/unapplied/server/0368-Fix-villager-trading-demand-MC-163962.patch b/patches/server/0365-Fix-villager-trading-demand-MC-163962.patch
index bd7b6c4273..bd7b6c4273 100644
--- a/patches/unapplied/server/0368-Fix-villager-trading-demand-MC-163962.patch
+++ b/patches/server/0365-Fix-villager-trading-demand-MC-163962.patch
diff --git a/patches/unapplied/server/0369-Maps-shouldn-t-load-chunks.patch b/patches/server/0366-Maps-shouldn-t-load-chunks.patch
index 3bc3299f81..3bc3299f81 100644
--- a/patches/unapplied/server/0369-Maps-shouldn-t-load-chunks.patch
+++ b/patches/server/0366-Maps-shouldn-t-load-chunks.patch
diff --git a/patches/unapplied/server/0370-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0367-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch
index 27672e59d7..27672e59d7 100644
--- a/patches/unapplied/server/0370-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch
+++ b/patches/server/0367-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch
diff --git a/patches/unapplied/server/0371-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/0368-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch
index 4175cae3b0..4175cae3b0 100644
--- a/patches/unapplied/server/0371-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch
+++ b/patches/server/0368-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch
diff --git a/patches/unapplied/server/0372-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0369-Fix-piston-physics-inconsistency-MC-188840.patch
index 44f85960c4..44f85960c4 100644
--- a/patches/unapplied/server/0372-Fix-piston-physics-inconsistency-MC-188840.patch
+++ b/patches/server/0369-Fix-piston-physics-inconsistency-MC-188840.patch
diff --git a/patches/unapplied/server/0373-Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/0370-Fix-missing-chunks-due-to-integer-overflow.patch
index e7af97469b..e7af97469b 100644
--- a/patches/unapplied/server/0373-Fix-missing-chunks-due-to-integer-overflow.patch
+++ b/patches/server/0370-Fix-missing-chunks-due-to-integer-overflow.patch
diff --git a/patches/unapplied/server/0374-Prevent-position-desync-causing-tp-exploit.patch b/patches/server/0371-Prevent-position-desync-causing-tp-exploit.patch
index 92eeabe500..07dbf5484e 100644
--- a/patches/unapplied/server/0374-Prevent-position-desync-causing-tp-exploit.patch
+++ b/patches/server/0371-Prevent-position-desync-causing-tp-exploit.patch
@@ -13,10 +13,10 @@ behaviour, we need to move all of this dangerous logic outside
of the move call and into an appropriate place in the tick method.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index d0ce184da22352b591f4783918104a4c473cc873..7fab3281116aa917c96223c1a1caf6280293df65 100644
+index 05033408070a08c7b982a675dc3acb79db392229..c8464b67c0133af18ba750f2b02d5494becbc7b3 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -1355,6 +1355,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -1350,6 +1350,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
diff --git a/patches/unapplied/server/0375-Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/0372-Inventory-getHolder-method-without-block-snapshot.patch
index b30d42bf56..b30d42bf56 100644
--- a/patches/unapplied/server/0375-Inventory-getHolder-method-without-block-snapshot.patch
+++ b/patches/server/0372-Inventory-getHolder-method-without-block-snapshot.patch
diff --git a/patches/unapplied/server/0376-Add-PlayerRecipeBookClickEvent.patch b/patches/server/0373-Add-PlayerRecipeBookClickEvent.patch
index 2f223b4810..c4927d5cab 100644
--- a/patches/unapplied/server/0376-Add-PlayerRecipeBookClickEvent.patch
+++ b/patches/server/0373-Add-PlayerRecipeBookClickEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 7fab3281116aa917c96223c1a1caf6280293df65..591f4f43dd023facf0a8990682069190c388d64b 100644
+index c8464b67c0133af18ba750f2b02d5494becbc7b3..231575a2ed7decdb99b7b4368cad257556328d7d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3041,16 +3041,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3058,16 +3058,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (!this.player.containerMenu.stillValid(this.player)) {
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
} else {
diff --git a/patches/unapplied/server/0377-Hide-sync-chunk-writes-behind-flag.patch b/patches/server/0374-Hide-sync-chunk-writes-behind-flag.patch
index 030a5a1365..e8889b31d8 100644
--- a/patches/unapplied/server/0377-Hide-sync-chunk-writes-behind-flag.patch
+++ b/patches/server/0374-Hide-sync-chunk-writes-behind-flag.patch
@@ -9,10 +9,10 @@ on harddrives.
-DPaper.enable-sync-chunk-writes=true to enable
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
-index 502e5386ec4306de93148266f60810ec52ae5ab2..9d10cdacb3aed2c00dc60aeb6f2cbeb48905e21f 100644
+index eb27ef574445e1311b763d84aa1b37128baa75f7..d6431376184e5650b370cbab204e28bc31f4dac6 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
-@@ -145,7 +145,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
+@@ -146,7 +146,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
this.maxWorldSize = this.get("max-world-size", (integer) -> {
return Mth.clamp(integer, 1, 29999984);
}, 29999984);
diff --git a/patches/unapplied/server/0378-Add-permission-for-command-blocks.patch b/patches/server/0375-Add-permission-for-command-blocks.patch
index 4a04a57ed7..ba14123ba3 100644
--- a/patches/unapplied/server/0378-Add-permission-for-command-blocks.patch
+++ b/patches/server/0375-Add-permission-for-command-blocks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add permission for command blocks
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
-index cbb17ce25cb6218bcf95c2f1c3d0288eeee13a46..84c31fe944fc39109d48b6dc68d0c2b15bef6cf2 100644
+index da9e864520150acd8027545672aa476be414bb4d..d4bd44210d58b30696feeea48e1909472a546702 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
-@@ -400,7 +400,7 @@ public class ServerPlayerGameMode {
+@@ -405,7 +405,7 @@ public class ServerPlayerGameMode {
BlockEntity tileentity = this.level.getBlockEntity(pos);
Block block = iblockdata.getBlock();
@@ -18,10 +18,10 @@ index cbb17ce25cb6218bcf95c2f1c3d0288eeee13a46..84c31fe944fc39109d48b6dc68d0c2b1
return false;
} else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 591f4f43dd023facf0a8990682069190c388d64b..299a2e78f4a83d224038c80287636a5d6b9b7450 100644
+index 231575a2ed7decdb99b7b4368cad257556328d7d..ddaf4cfda6ddd4173e96c79a0f01b42386ffeaf1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -803,7 +803,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -806,7 +806,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (!this.server.isCommandBlockEnabled()) {
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
@@ -30,7 +30,7 @@ index 591f4f43dd023facf0a8990682069190c388d64b..299a2e78f4a83d224038c80287636a5d
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
} else {
BaseCommandBlock commandblocklistenerabstract = null;
-@@ -870,7 +870,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -873,7 +873,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (!this.server.isCommandBlockEnabled()) {
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
@@ -53,7 +53,7 @@ index efd6fcb0528d3c903e720edeb2f704347b34c18d..8c2dcc4134d96351cee75773214f3f47
} else {
if (player.getCommandSenderWorld().isClientSide) {
diff --git a/src/main/java/net/minecraft/world/level/block/CommandBlock.java b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
-index 0530b2a6324ec3ac0b3929aab7c0fa89de8bd9b9..ec1a8c60ccac50e5131f937c4262128fd2768331 100644
+index 72165318bcbd680d8dc69f3467cb78a439c9672e..eb88b8b6d83482ce7144622f32923ebeafd1fb7b 100644
--- a/src/main/java/net/minecraft/world/level/block/CommandBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
@@ -141,7 +141,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock {
diff --git a/patches/unapplied/server/0379-Ensure-Entity-position-and-AABB-are-never-invalid.patch b/patches/server/0376-Ensure-Entity-position-and-AABB-are-never-invalid.patch
index c71aa67e6a..782935a98b 100644
--- a/patches/unapplied/server/0379-Ensure-Entity-position-and-AABB-are-never-invalid.patch
+++ b/patches/server/0376-Ensure-Entity-position-and-AABB-are-never-invalid.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Ensure Entity position and AABB are never invalid
Co-authored-by: Spottedleaf <[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 fcdfe37d2135190e44527190976a718b2f9359c5..084824335dc4c83d331cac2da8fdd5604d650b5d 100644
+index b1d870b9a3b414ed49b4674afc2c6088d457ebc1..f2855de7320dc9532d0b568b84b0b7e5a2064045 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -664,8 +664,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -670,8 +670,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
}
public void setPos(double x, double y, double z) {
@@ -20,7 +20,7 @@ index fcdfe37d2135190e44527190976a718b2f9359c5..084824335dc4c83d331cac2da8fdd560
}
protected AABB makeBoundingBox() {
-@@ -4180,7 +4180,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -4225,7 +4225,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
}
@@ -50,7 +50,7 @@ index fcdfe37d2135190e44527190976a718b2f9359c5..084824335dc4c83d331cac2da8fdd560
if (this.position.x != x || this.position.y != y || this.position.z != z) {
this.position = new Vec3(x, y, z);
int i = Mth.floor(x);
-@@ -4198,6 +4220,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+@@ -4243,6 +4265,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
this.levelCallback.onMove();
}
diff --git a/patches/unapplied/server/0380-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0377-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
index c5602f9f90..e385d192d6 100644
--- a/patches/unapplied/server/0380-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
+++ b/patches/server/0377-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
@@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 2575129d1647eda4acb1ce4f19619f42257cb6f8..f5a2645afc64f3ba9ee21e6442697d6eb2fabb13 100644
+index 095215a5cbf1abeb7836a6ccc87c195019a7f019..1d141c9ee7b8193d46ba47a8586fc334cabb62a1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -830,7 +830,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -837,7 +837,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldloadlistener.stop();
// CraftBukkit start
// this.updateMobSpawningFlags();
@@ -20,7 +20,7 @@ index 2575129d1647eda4acb1ce4f19619f42257cb6f8..f5a2645afc64f3ba9ee21e6442697d6e
this.forceTicks = false;
// CraftBukkit end
-@@ -1826,11 +1826,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1854,11 +1854,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@@ -40,7 +40,7 @@ index 2575129d1647eda4acb1ce4f19619f42257cb6f8..f5a2645afc64f3ba9ee21e6442697d6e
}
}
-@@ -1844,7 +1847,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1872,7 +1875,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
@@ -63,10 +63,10 @@ index 997a96a21440ae72696d68f8031ece4ba487d3ef..3d8584929cee000ae7df10c5bd94f358
return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
}, true);
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 539a8ddfcf660bf824325516c88cf91f4a32a746..1bc8217cf1df95edadd57e18a91885808d31cb93 100644
+index d6dc8c983d26ce89f17a990be4284fdc78ad164b..2b1d7a2360a9ee7bca9d93a2dc8c61d1648a8348 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -346,7 +346,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -350,7 +350,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@Override
public void forceDifficulty() {
@@ -75,24 +75,11 @@ index 539a8ddfcf660bf824325516c88cf91f4a32a746..1bc8217cf1df95edadd57e18a9188580
}
@Override
-diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-index bf6c81300d29c445a1012d1159866547c202d135..e6a24484ef11a1d815a85126aec221547479f7d3 100644
---- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
-+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
-@@ -1238,7 +1238,7 @@ public class ServerPlayer extends Player {
- this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
-
- this.connection.send(new ClientboundRespawnPacket(this.createCommonSpawnInfo(worldserver), (byte) 3));
-- this.connection.send(new ClientboundChangeDifficultyPacket(this.level().getDifficulty(), this.level().getLevelData().isDifficultyLocked()));
-+ this.connection.send(new ClientboundChangeDifficultyPacket(worldserver.getDifficulty(), this.level().getLevelData().isDifficultyLocked())); // Paper - per level difficulty
- PlayerList playerlist = this.server.getPlayerList();
-
- playerlist.sendPlayerPermissionLevel(this);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 299a2e78f4a83d224038c80287636a5d6b9b7450..95d20facdc43a356fd2e82f5d597f52ee61791dc 100644
+index ddaf4cfda6ddd4173e96c79a0f01b42386ffeaf1..8a7aca02181a5c8762fb01c66f66f7d913f56ebe 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3244,7 +3244,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3261,7 +3261,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
@@ -102,10 +89,10 @@ index 299a2e78f4a83d224038c80287636a5d6b9b7450..95d20facdc43a356fd2e82f5d597f52e
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 91b8fefc2c97c1f487bde1559d4ccf76795ca954..3e4cde7825634c4949312e44f19b03cc96c4aaa3 100644
+index 118708bd917518333359ce1407e1e26e4ec6a180..9e8de1efa2fc42a8ffb3c29579be48a4b5b97fca 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -985,8 +985,8 @@ public final class CraftServer implements Server {
+@@ -988,8 +988,8 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
for (ServerLevel world : this.console.getAllLevels()) {
@@ -117,7 +104,7 @@ index 91b8fefc2c97c1f487bde1559d4ccf76795ca954..3e4cde7825634c4949312e44f19b03cc
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 77395861f528b0443db84bf882351c7f5ccfd3ba..680733c3ccf8ff27478d43b3dfab6028cec5c829 100644
+index deb9685b1279e734e4789ba7a2113b0d71ab1cc6..47ab9081ab5839a328b5208ba453f59f973461b1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1188,7 +1188,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/unapplied/server/0381-Paper-dumpitem-command.patch b/patches/server/0378-Paper-dumpitem-command.patch
index cb79e9ddfd..cb79e9ddfd 100644
--- a/patches/unapplied/server/0381-Paper-dumpitem-command.patch
+++ b/patches/server/0378-Paper-dumpitem-command.patch
diff --git a/patches/unapplied/server/0382-Improve-Legacy-Component-serialization-size.patch b/patches/server/0379-Improve-Legacy-Component-serialization-size.patch
index 4ee643286d..4ee643286d 100644
--- a/patches/unapplied/server/0382-Improve-Legacy-Component-serialization-size.patch
+++ b/patches/server/0379-Improve-Legacy-Component-serialization-size.patch
diff --git a/patches/unapplied/server/0383-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0380-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
index fb4d8347e4..d3708d395f 100644
--- a/patches/unapplied/server/0383-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
+++ b/patches/server/0380-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
@@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 3e4cde7825634c4949312e44f19b03cc96c4aaa3..f5079f1bb3f66392e663cac495f555edb6a08a09 100644
+index 9e8de1efa2fc42a8ffb3c29579be48a4b5b97fca..010ab9cdf3dbe9b89b58744f37b33a232167f445 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -377,7 +377,7 @@ public final class CraftServer implements Server {
+@@ -380,7 +380,7 @@ public final class CraftServer implements Server {
this.overrideSpawnLimits();
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
@@ -34,7 +34,7 @@ index 3e4cde7825634c4949312e44f19b03cc96c4aaa3..f5079f1bb3f66392e663cac495f555ed
this.minimumAPI = ApiVersion.getOrCreateVersion(this.configuration.getString("settings.minimum-api"));
this.loadIcon();
this.loadCompatibilities();
-@@ -964,7 +964,7 @@ public final class CraftServer implements Server {
+@@ -967,7 +967,7 @@ public final class CraftServer implements Server {
this.console.setMotd(config.motd);
this.overrideSpawnLimits();
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
@@ -44,7 +44,7 @@ index 3e4cde7825634c4949312e44f19b03cc96c4aaa3..f5079f1bb3f66392e663cac495f555ed
this.printSaveWarning = false;
this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 680733c3ccf8ff27478d43b3dfab6028cec5c829..8db6209b22c838d01b0b8032ad0608713cc8a54c 100644
+index 47ab9081ab5839a328b5208ba453f59f973461b1..78b3e22cd720f204d11d56be3ec272d75f042e31 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -289,7 +289,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/unapplied/server/0384-Add-BlockStateMeta-clearBlockState.patch b/patches/server/0381-Add-BlockStateMeta-clearBlockState.patch
index 88d5b8fb28..88d5b8fb28 100644
--- a/patches/unapplied/server/0384-Add-BlockStateMeta-clearBlockState.patch
+++ b/patches/server/0381-Add-BlockStateMeta-clearBlockState.patch
diff --git a/patches/unapplied/server/0385-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0382-Convert-legacy-attributes-in-Item-Meta.patch
index 3836de6364..1ee422c71c 100644
--- a/patches/unapplied/server/0385-Convert-legacy-attributes-in-Item-Meta.patch
+++ b/patches/server/0382-Convert-legacy-attributes-in-Item-Meta.patch
@@ -30,10 +30,10 @@ index de40e522960469b98f987bd688489740446d9f85..5678d2007d5adf45dec0638c5dd848b6
public CraftAttributeMap(AttributeMap handle) {
this.handle = handle;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index f5689a447bb990d5e2acbb35ce3d02419f4a00e8..ce6767537bd0f8eb5c28eef9d50e042c5a9b4b4b 100644
+index d04af9ea23c2fd62febce4b8d4b3fd49df542095..fab1e47d0faffe83366687e4ec3ae02d4887ff8a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -644,7 +644,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -663,7 +663,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
diff --git a/patches/unapplied/server/0386-Do-not-accept-invalid-client-settings.patch b/patches/server/0383-Do-not-accept-invalid-client-settings.patch
index 0cfa8d4f81..a8178aebb1 100644
--- a/patches/unapplied/server/0386-Do-not-accept-invalid-client-settings.patch
+++ b/patches/server/0383-Do-not-accept-invalid-client-settings.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 95d20facdc43a356fd2e82f5d597f52ee61791dc..bc9c68c4df11ece9a9cba9b8cff1182c1d21551f 100644
+index 8a7aca02181a5c8762fb01c66f66f7d913f56ebe..3387622f107a46efa7fda14d5994f192c6854dc2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3236,6 +3236,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3253,6 +3253,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleClientInformation(ServerboundClientInformationPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
diff --git a/patches/unapplied/server/0387-Improve-fix-EntityTargetLivingEntityEvent.patch b/patches/server/0384-Improve-fix-EntityTargetLivingEntityEvent.patch
index 513faeb27d..513faeb27d 100644
--- a/patches/unapplied/server/0387-Improve-fix-EntityTargetLivingEntityEvent.patch
+++ b/patches/server/0384-Improve-fix-EntityTargetLivingEntityEvent.patch
diff --git a/patches/unapplied/server/0388-Add-entity-liquid-API.patch b/patches/server/0385-Add-entity-liquid-API.patch
index ab34d7ab7a..51765a7f3a 100644
--- a/patches/unapplied/server/0388-Add-entity-liquid-API.patch
+++ b/patches/server/0385-Add-entity-liquid-API.patch
@@ -8,10 +8,10 @@ public net.minecraft.world.entity.Entity isInRain()Z
public net.minecraft.world.entity.Entity isInBubbleColumn()Z
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 571b8352de4070622cdc47a50643beada0b16c36..40e4b8233e27b8ebd94a89bb43b5c14808edaa68 100644
+index ce70c8fddbe63d0af2b1f988ce9a2b40c5d48066..34321f095e12ea0cca34ff1ec00819c6350205a8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1008,4 +1008,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1025,4 +1025,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return getHandle().spawnReason;
}
// Paper end - entity spawn reason API
diff --git a/patches/unapplied/server/0286-Add-PlayerPostRespawnEvent.patch b/patches/unapplied/server/0286-Add-PlayerPostRespawnEvent.patch
deleted file mode 100644
index 0b64cfe5fe..0000000000
--- a/patches/unapplied/server/0286-Add-PlayerPostRespawnEvent.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: MisterVector <[email protected]>
-Date: Fri, 26 Oct 2018 21:31:00 -0700
-Subject: [PATCH] Add PlayerPostRespawnEvent
-
-
-diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index e3ce13685499e2adea5b776ec4abbdd978b6af58..8ce2826b1ded161a8220273d1fc5260ed3b6772f 100644
---- a/src/main/java/net/minecraft/server/players/PlayerList.java
-+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -751,9 +751,14 @@ public abstract class PlayerList {
-
- boolean flag2 = false;
-
-+ // Paper start - Add PlayerPostRespawnEvent
-+ boolean isBedSpawn = false;
-+ boolean isRespawn = false;
-+ // Paper end - Add PlayerPostRespawnEvent
-+
- // CraftBukkit start - fire PlayerRespawnEvent
- if (location == null) {
-- boolean isBedSpawn = false;
-+ // boolean isBedSpawn = false; // Paper - Add PlayerPostRespawnEvent; moved up
- ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension());
- if (worldserver1 != null) {
- Optional optional;
-@@ -805,6 +810,7 @@ public abstract class PlayerList {
-
- location = respawnEvent.getRespawnLocation();
- if (!flag) entityplayer.reset(); // SPIGOT-4785
-+ isRespawn = true; // Paper - Add PlayerPostRespawnEvent
- } else {
- location.setWorld(worldserver.getWorld());
- }
-@@ -863,6 +869,13 @@ public abstract class PlayerList {
- if (entityplayer.connection.isDisconnected()) {
- this.save(entityplayer);
- }
-+
-+ // Paper start - Add PlayerPostRespawnEvent
-+ if (isRespawn) {
-+ cserver.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerPostRespawnEvent(entityplayer.getBukkitEntity(), location, isBedSpawn));
-+ }
-+ // Paper end - Add PlayerPostRespawnEvent
-+
- // CraftBukkit end
- return entityplayer1;
- }
diff --git a/patches/unapplied/server/0300-offset-item-frame-ticking.patch b/patches/unapplied/server/0300-offset-item-frame-ticking.patch
deleted file mode 100644
index e5be0eb235..0000000000
--- a/patches/unapplied/server/0300-offset-item-frame-ticking.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: kickash32 <[email protected]>
-Date: Tue, 30 Jul 2019 03:17:16 +0500
-Subject: [PATCH] offset item frame ticking
-
-
-diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
-index 47a62680279f15ac93eb521f7ec93c3b8d52c602..0ffff5329fa2c7833f9ec71528cb7f951cf78109 100644
---- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
-+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
-@@ -40,7 +40,7 @@ public abstract class HangingEntity extends Entity {
- protected static final Predicate<Entity> HANGING_ENTITY = (entity) -> {
- return entity instanceof HangingEntity;
- };
-- private int checkInterval;
-+ private int checkInterval; { this.checkInterval = this.getId() % this.level().spigotConfig.hangingTickFrequency; } // Paper - Perf: offset item frame ticking
- public BlockPos pos;
- protected Direction direction;
-
diff --git a/patches/unapplied/server/0366-Ensure-safe-gateway-teleport.patch b/patches/unapplied/server/0366-Ensure-safe-gateway-teleport.patch
deleted file mode 100644
index c1867dbc2c..0000000000
--- a/patches/unapplied/server/0366-Ensure-safe-gateway-teleport.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: kickash32 <[email protected]>
-Date: Fri, 15 May 2020 01:10:03 -0400
-Subject: [PATCH] Ensure safe gateway teleport
-
-== AT ==
-public net.minecraft.world.entity.Entity teleportPassengers()V
-
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-index f8053b42fbf144d427cc4ed44b3b735358c58a20..93bd70c1dc2ba8b893a6087730071c81fb1132f4 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-@@ -214,6 +214,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
-
- entity1.setPortalCooldown();
- ((ServerPlayer) entity1).connection.teleport(teleEvent.getTo());
-+ entity1.teleportPassengers(); // Paper - teleport passengers as well, preventing invisible passengers post teleport.
- TheEndGatewayBlockEntity.triggerCooldown(world, pos, state, blockEntity); // CraftBukkit - call at end of method
- return;
-