From 0bc9aeef268b9522e3c97dd5a09b8d3d759a6fb8 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 13 Jun 2024 13:14:13 -0700 Subject: [PATCH] 385 --- patches/server/0009-MC-Utils.patch | 2 +- patches/server/0023-Timings-v2.patch | 2 +- patches/server/0037-Entity-Origin-API.patch | 2 +- ...nfigurable-top-of-nether-void-damage.patch | 2 +- ...oreboards-for-non-players-by-default.patch | 2 +- ...076-Use-a-Shared-Random-for-Entities.patch | 2 +- .../server/0127-Cap-Entity-Collisions.patch | 2 +- .../server/0142-Entity-fromMobSpawner.patch | 2 +- ...95-Add-EntityTeleportEndGatewayEvent.patch | 2 +- .../0203-Add-entity-knockback-events.patch | 2 +- ...-more-information-to-Entity.toString.patch | 2 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 2 +- ...entity-dismount-during-teleportation.patch | 2 +- .../0280-Limit-Client-Sign-length-more.patch} | 4 +- ...ggleEvent-when-whitelist-is-toggled.patch} | 4 +- .../0282-Entity-getEntitySpawnReason.patch} | 24 ++--- .../0283-Fire-event-on-GS4-query.patch} | 0 .../0284-Add-PlayerPostRespawnEvent.patch | 55 +++++++++++ ...for-pickupDelay-breaks-picking-up-i.patch} | 6 +- .../0286-Server-Tick-Events.patch} | 6 +- ...287-PlayerDeathEvent-getItemsToKeep.patch} | 8 +- ...ptimize-Captured-BlockEntity-Lookup.patch} | 4 +- .../0289-Add-Heightmap-API.patch} | 2 +- .../0290-Mob-Spawner-API-Enhancements.patch} | 0 ...-to-changed-postToMainThread-method.patch} | 2 +- ...-item-frames-are-modified-MC-123450.patch} | 4 +- ...0293-Implement-CraftBlockSoundGroup.patch} | 0 ...94-Expose-the-internal-current-tick.patch} | 4 +- ...te-location-if-we-failed-to-read-it.patch} | 0 ...l-Spawned-mobs-towards-natural-spaw.patch} | 0 ...urable-projectile-relative-velocity.patch} | 6 +- .../0298-offset-item-frame-ticking.patch | 19 ++++ ...event-consuming-the-wrong-itemstack.patch} | 10 +- ...0-Dont-send-unnecessary-sign-update.patch} | 0 ...-option-to-disable-pillager-patrols.patch} | 0 ...k-loads-when-villagers-try-to-find-.patch} | 0 ...656-Fix-Follow-Range-Initial-Target.patch} | 0 .../0304-Duplicate-UUID-Resolve-Option.patch} | 25 +++-- ...ayerDeathEvent-shouldDropExperience.patch} | 8 +- ...ading-chunks-checking-hive-position.patch} | 4 +- ...hunks-from-Hoppers-and-other-things.patch} | 0 ...timise-EntityGetter-getPlayerByUUID.patch} | 4 +- ...309-Fix-items-not-falling-correctly.patch} | 4 +- ...ize-call-to-getFluid-for-explosions.patch} | 4 +- ...ializing-mismatching-chunk-coordina.patch} | 11 ++- .../0312-Alternative-item-despawn-rate.patch} | 14 +-- .../0313-Tracking-Range-Improvements.patch} | 4 +- ...et-gravity-in-void.-Fixes-MC-167279.patch} | 4 +- ...15-Improve-Block-breakNaturally-API.patch} | 4 +- ...-getChunkAt-calls-for-loaded-chunks.patch} | 32 +++---- ...0317-Add-debug-for-sync-chunk-loads.patch} | 8 +- .../0318-Improve-java-version-check.patch} | 2 +- .../0319-Add-ThrownEggHatchEvent.patch} | 4 +- .../0320-Entity-Jump-API.patch} | 16 ++-- ...-to-nerf-pigmen-from-nether-portals.patch} | 12 +-- .../0322-Make-the-GUI-graph-fancier.patch} | 0 ...23-add-hand-to-BlockMultiPlaceEvent.patch} | 4 +- ...ipwire-hook-placement-before-update.patch} | 0 ...o-allow-iron-golems-to-spawn-in-air.patch} | 4 +- ...chance-of-villager-zombie-infection.patch} | 4 +- .../0327-Optimise-Chunk-getFluid.patch} | 6 +- ...rbose-world-setting-to-false-by-def.patch} | 0 ...Add-tick-times-API-and-mspt-command.patch} | 12 +-- ...30-Expose-MinecraftServer-isRunning.patch} | 4 +- ...dd-Raw-Byte-ItemStack-Serialization.patch} | 2 +- ...pawn-settings-and-per-player-option.patch} | 4 +- ...nections-shouldn-t-hold-up-shutdown.patch} | 4 +- ...ow-bees-to-load-chunks-for-beehives.patch} | 12 +-- ...PlayerChunkMap-adds-crashing-server.patch} | 10 +- .../0336-Don-t-tick-dead-players.patch} | 4 +- ...-Player-s-shouldn-t-be-able-to-move.patch} | 4 +- ...ove-existing-players-to-world-spawn.patch} | 14 +-- .../0339-Optimize-Pathfinding.patch} | 0 ...0-Reduce-Either-Optional-allocation.patch} | 0 ...uce-memory-footprint-of-CompoundTag.patch} | 0 ...ent-opening-inventories-when-frozen.patch} | 6 +- ...entity-collision-code-if-not-needed.patch} | 4 +- ...Implement-Player-Client-Options-API.patch} | 16 ++-- ...ayer-is-attempted-to-be-removed-fro.patch} | 4 +- ...Event-when-Player-is-actually-ready.patch} | 21 ++--- ...awn-point-if-spawn-in-unloaded-worl.patch} | 8 +- ...layerAttackEntityCooldownResetEvent.patch} | 2 +- ...-fire-BlockFade-on-worldgen-threads.patch} | 0 ...tom-creative-and-insomniac-controls.patch} | 2 +- ...tem-duplication-and-teleport-issues.patch} | 91 ++++++++----------- .../0352-Villager-Restocks-API.patch} | 0 ...ickItem-Packet-and-kick-for-invalid.patch} | 4 +- ...per-thread-native-byte-buffer-cache.patch} | 2 +- .../0355-misc-debugging-dumps.patch} | 28 +++--- ...6-Prevent-teleporting-dead-entities.patch} | 4 +- .../0357-Implement-Mob-Goal-API.patch} | 6 +- .../0358-Add-villager-reputation-API.patch} | 0 ...eOrb-merging-stacking-API-and-fixes.patch} | 26 +++--- ...-Fix-PotionEffect-ignores-icon-flag.patch} | 8 +- .../0361-Potential-bed-API.patch} | 0 ...ait-for-Async-Tasks-during-shutdown.patch} | 8 +- ...er-respects-game-and-entity-rules-f.patch} | 4 +- ...-for-console-having-all-permissions.patch} | 0 ...x-villager-trading-demand-MC-163962.patch} | 0 .../0366-Maps-shouldn-t-load-chunks.patch} | 0 ...okup-for-Treasure-Maps-Fixes-lag-fr.patch} | 0 ...r-runTaskTimerAsynchronously-Plugin.patch} | 0 ...ton-physics-inconsistency-MC-188840.patch} | 0 ...sing-chunks-due-to-integer-overflow.patch} | 0 ...-position-desync-causing-tp-exploit.patch} | 4 +- ...older-method-without-block-snapshot.patch} | 0 ...0373-Add-PlayerRecipeBookClickEvent.patch} | 4 +- ...-Hide-sync-chunk-writes-behind-flag.patch} | 4 +- ...5-Add-permission-for-command-blocks.patch} | 12 +-- ...position-and-AABB-are-never-invalid.patch} | 8 +- ...d-Difficulty-Remembering-Difficulty.patch} | 35 +++---- .../0378-Paper-dumpitem-command.patch} | 0 ...Legacy-Component-serialization-size.patch} | 0 ...Plugin-Tickets-to-API-Chunk-Methods.patch} | 8 +- ...-Add-BlockStateMeta-clearBlockState.patch} | 0 ...vert-legacy-attributes-in-Item-Meta.patch} | 4 +- ...-not-accept-invalid-client-settings.patch} | 4 +- ...e-fix-EntityTargetLivingEntityEvent.patch} | 0 .../0385-Add-entity-liquid-API.patch} | 4 +- .../0286-Add-PlayerPostRespawnEvent.patch | 48 ---------- .../0300-offset-item-frame-ticking.patch | 19 ---- .../0366-Ensure-safe-gateway-teleport.patch | 20 ---- 122 files changed, 402 insertions(+), 448 deletions(-) rename patches/{unapplied/server/0282-Limit-Client-Sign-length-more.patch => server/0280-Limit-Client-Sign-length-more.patch} (94%) rename patches/{unapplied/server/0283-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch => server/0281-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch} (83%) rename patches/{unapplied/server/0284-Entity-getEntitySpawnReason.patch => server/0282-Entity-getEntitySpawnReason.patch} (90%) rename patches/{unapplied/server/0285-Fire-event-on-GS4-query.patch => server/0283-Fire-event-on-GS4-query.patch} (100%) create mode 100644 patches/server/0284-Add-PlayerPostRespawnEvent.patch rename patches/{unapplied/server/0287-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch => server/0285-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch} (86%) rename patches/{unapplied/server/0288-Server-Tick-Events.patch => server/0286-Server-Tick-Events.patch} (86%) rename patches/{unapplied/server/0289-PlayerDeathEvent-getItemsToKeep.patch => server/0287-PlayerDeathEvent-getItemsToKeep.patch} (89%) rename patches/{unapplied/server/0290-Optimize-Captured-BlockEntity-Lookup.patch => server/0288-Optimize-Captured-BlockEntity-Lookup.patch} (90%) rename patches/{unapplied/server/0291-Add-Heightmap-API.patch => server/0289-Add-Heightmap-API.patch} (95%) rename patches/{unapplied/server/0292-Mob-Spawner-API-Enhancements.patch => server/0290-Mob-Spawner-API-Enhancements.patch} (100%) rename patches/{unapplied/server/0293-Fix-CB-call-to-changed-postToMainThread-method.patch => server/0291-Fix-CB-call-to-changed-postToMainThread-method.patch} (91%) rename patches/{unapplied/server/0294-Fix-sounds-when-item-frames-are-modified-MC-123450.patch => server/0292-Fix-sounds-when-item-frames-are-modified-MC-123450.patch} (85%) rename patches/{unapplied/server/0295-Implement-CraftBlockSoundGroup.patch => server/0293-Implement-CraftBlockSoundGroup.patch} (100%) rename patches/{unapplied/server/0296-Expose-the-internal-current-tick.patch => server/0294-Expose-the-internal-current-tick.patch} (82%) rename patches/{unapplied/server/0297-Show-blockstate-location-if-we-failed-to-read-it.patch => server/0295-Show-blockstate-location-if-we-failed-to-read-it.patch} (100%) rename patches/{unapplied/server/0298-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch => server/0296-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch} (100%) rename patches/{unapplied/server/0299-Configurable-projectile-relative-velocity.patch => server/0297-Configurable-projectile-relative-velocity.patch} (91%) create mode 100644 patches/server/0298-offset-item-frame-ticking.patch rename patches/{unapplied/server/0301-Prevent-consuming-the-wrong-itemstack.patch => server/0299-Prevent-consuming-the-wrong-itemstack.patch} (85%) rename patches/{unapplied/server/0302-Dont-send-unnecessary-sign-update.patch => server/0300-Dont-send-unnecessary-sign-update.patch} (100%) rename patches/{unapplied/server/0303-Add-option-to-disable-pillager-patrols.patch => server/0301-Add-option-to-disable-pillager-patrols.patch} (100%) rename patches/{unapplied/server/0304-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch => server/0302-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch} (100%) rename patches/{unapplied/server/0305-MC-145656-Fix-Follow-Range-Initial-Target.patch => server/0303-MC-145656-Fix-Follow-Range-Initial-Target.patch} (100%) rename patches/{unapplied/server/0306-Duplicate-UUID-Resolve-Option.patch => server/0304-Duplicate-UUID-Resolve-Option.patch} (80%) rename patches/{unapplied/server/0307-PlayerDeathEvent-shouldDropExperience.patch => server/0305-PlayerDeathEvent-shouldDropExperience.patch} (69%) rename patches/{unapplied/server/0308-Prevent-bees-loading-chunks-checking-hive-position.patch => server/0306-Prevent-bees-loading-chunks-checking-hive-position.patch} (86%) rename patches/{unapplied/server/0309-Don-t-load-Chunks-from-Hoppers-and-other-things.patch => server/0307-Don-t-load-Chunks-from-Hoppers-and-other-things.patch} (100%) rename patches/{unapplied/server/0310-Optimise-EntityGetter-getPlayerByUUID.patch => server/0308-Optimise-EntityGetter-getPlayerByUUID.patch} (91%) rename patches/{unapplied/server/0311-Fix-items-not-falling-correctly.patch => server/0309-Fix-items-not-falling-correctly.patch} (93%) rename patches/{unapplied/server/0312-Optimize-call-to-getFluid-for-explosions.patch => server/0310-Optimize-call-to-getFluid-for-explosions.patch} (88%) rename patches/{unapplied/server/0313-Guard-against-serializing-mismatching-chunk-coordina.patch => server/0311-Guard-against-serializing-mismatching-chunk-coordina.patch} (89%) rename patches/{unapplied/server/0314-Alternative-item-despawn-rate.patch => server/0312-Alternative-item-despawn-rate.patch} (87%) rename patches/{unapplied/server/0315-Tracking-Range-Improvements.patch => server/0313-Tracking-Range-Improvements.patch} (95%) rename patches/{unapplied/server/0316-Bees-get-gravity-in-void.-Fixes-MC-167279.patch => server/0314-Bees-get-gravity-in-void.-Fixes-MC-167279.patch} (90%) rename patches/{unapplied/server/0317-Improve-Block-breakNaturally-API.patch => server/0315-Improve-Block-breakNaturally-API.patch} (96%) rename patches/{unapplied/server/0318-Optimise-getChunkAt-calls-for-loaded-chunks.patch => server/0316-Optimise-getChunkAt-calls-for-loaded-chunks.patch} (67%) rename patches/{unapplied/server/0319-Add-debug-for-sync-chunk-loads.patch => server/0317-Add-debug-for-sync-chunk-loads.patch} (97%) rename patches/{unapplied/server/0320-Improve-java-version-check.patch => server/0318-Improve-java-version-check.patch} (96%) rename patches/{unapplied/server/0321-Add-ThrownEggHatchEvent.patch => server/0319-Add-ThrownEggHatchEvent.patch} (90%) rename patches/{unapplied/server/0322-Entity-Jump-API.patch => server/0320-Entity-Jump-API.patch} (85%) rename patches/{unapplied/server/0323-Add-option-to-nerf-pigmen-from-nether-portals.patch => server/0321-Add-option-to-nerf-pigmen-from-nether-portals.patch} (84%) rename patches/{unapplied/server/0324-Make-the-GUI-graph-fancier.patch => server/0322-Make-the-GUI-graph-fancier.patch} (100%) rename patches/{unapplied/server/0325-add-hand-to-BlockMultiPlaceEvent.patch => server/0323-add-hand-to-BlockMultiPlaceEvent.patch} (89%) rename patches/{unapplied/server/0326-Validate-tripwire-hook-placement-before-update.patch => server/0324-Validate-tripwire-hook-placement-before-update.patch} (100%) rename patches/{unapplied/server/0327-Add-option-to-allow-iron-golems-to-spawn-in-air.patch => server/0325-Add-option-to-allow-iron-golems-to-spawn-in-air.patch} (86%) rename patches/{unapplied/server/0328-Configurable-chance-of-villager-zombie-infection.patch => server/0326-Configurable-chance-of-villager-zombie-infection.patch} (91%) rename patches/{unapplied/server/0329-Optimise-Chunk-getFluid.patch => server/0327-Optimise-Chunk-getFluid.patch} (92%) rename patches/{unapplied/server/0330-Set-spigots-verbose-world-setting-to-false-by-def.patch => server/0328-Set-spigots-verbose-world-setting-to-false-by-def.patch} (100%) rename patches/{unapplied/server/0331-Add-tick-times-API-and-mspt-command.patch => server/0329-Add-tick-times-API-and-mspt-command.patch} (94%) rename patches/{unapplied/server/0332-Expose-MinecraftServer-isRunning.patch => server/0330-Expose-MinecraftServer-isRunning.patch} (83%) rename patches/{unapplied/server/0333-Add-Raw-Byte-ItemStack-Serialization.patch => server/0331-Add-Raw-Byte-ItemStack-Serialization.patch} (97%) rename patches/{unapplied/server/0334-Pillager-patrol-spawn-settings-and-per-player-option.patch => server/0332-Pillager-patrol-spawn-settings-and-per-player-option.patch} (96%) rename patches/{unapplied/server/0335-Remote-Connections-shouldn-t-hold-up-shutdown.patch => server/0333-Remote-Connections-shouldn-t-hold-up-shutdown.patch} (92%) rename patches/{unapplied/server/0336-Do-not-allow-bees-to-load-chunks-for-beehives.patch => server/0334-Do-not-allow-bees-to-load-chunks-for-beehives.patch} (88%) rename patches/{unapplied/server/0337-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch => server/0335-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch} (88%) rename patches/{unapplied/server/0338-Don-t-tick-dead-players.patch => server/0336-Don-t-tick-dead-players.patch} (82%) rename patches/{unapplied/server/0339-Dead-Player-s-shouldn-t-be-able-to-move.patch => server/0337-Dead-Player-s-shouldn-t-be-able-to-move.patch} (84%) rename patches/{unapplied/server/0340-Don-t-move-existing-players-to-world-spawn.patch => server/0338-Don-t-move-existing-players-to-world-spawn.patch} (72%) rename patches/{unapplied/server/0341-Optimize-Pathfinding.patch => server/0339-Optimize-Pathfinding.patch} (100%) rename patches/{unapplied/server/0342-Reduce-Either-Optional-allocation.patch => server/0340-Reduce-Either-Optional-allocation.patch} (100%) rename patches/{unapplied/server/0343-Reduce-memory-footprint-of-CompoundTag.patch => server/0341-Reduce-memory-footprint-of-CompoundTag.patch} (100%) rename patches/{unapplied/server/0344-Prevent-opening-inventories-when-frozen.patch => server/0342-Prevent-opening-inventories-when-frozen.patch} (93%) rename patches/{unapplied/server/0345-Don-t-run-entity-collision-code-if-not-needed.patch => server/0343-Don-t-run-entity-collision-code-if-not-needed.patch} (93%) rename patches/{unapplied/server/0346-Implement-Player-Client-Options-API.patch => server/0344-Implement-Player-Client-Options-API.patch} (92%) rename patches/{unapplied/server/0347-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch => server/0345-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch} (88%) rename patches/{unapplied/server/0348-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch => server/0346-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch} (88%) rename patches/{unapplied/server/0349-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch => server/0347-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch} (94%) rename patches/{unapplied/server/0350-Add-PlayerAttackEntityCooldownResetEvent.patch => server/0348-Add-PlayerAttackEntityCooldownResetEvent.patch} (95%) rename patches/{unapplied/server/0351-Don-t-fire-BlockFade-on-worldgen-threads.patch => server/0349-Don-t-fire-BlockFade-on-worldgen-threads.patch} (100%) rename patches/{unapplied/server/0352-Add-phantom-creative-and-insomniac-controls.patch => server/0350-Add-phantom-creative-and-insomniac-controls.patch} (97%) rename patches/{unapplied/server/0353-Fix-item-duplication-and-teleport-issues.patch => server/0351-Fix-item-duplication-and-teleport-issues.patch} (73%) rename patches/{unapplied/server/0354-Villager-Restocks-API.patch => server/0352-Villager-Restocks-API.patch} (100%) rename patches/{unapplied/server/0355-Validate-PickItem-Packet-and-kick-for-invalid.patch => server/0353-Validate-PickItem-Packet-and-kick-for-invalid.patch} (91%) rename patches/{unapplied/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch => server/0354-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch} (93%) rename patches/{unapplied/server/0357-misc-debugging-dumps.patch => server/0355-misc-debugging-dumps.patch} (85%) rename patches/{unapplied/server/0358-Prevent-teleporting-dead-entities.patch => server/0356-Prevent-teleporting-dead-entities.patch} (88%) rename patches/{unapplied/server/0359-Implement-Mob-Goal-API.patch => server/0357-Implement-Mob-Goal-API.patch} (99%) rename patches/{unapplied/server/0360-Add-villager-reputation-API.patch => server/0358-Add-villager-reputation-API.patch} (100%) rename patches/{unapplied/server/0361-ExperienceOrb-merging-stacking-API-and-fixes.patch => server/0359-ExperienceOrb-merging-stacking-API-and-fixes.patch} (85%) rename patches/{unapplied/server/0362-Fix-PotionEffect-ignores-icon-flag.patch => server/0360-Fix-PotionEffect-ignores-icon-flag.patch} (92%) rename patches/{unapplied/server/0363-Potential-bed-API.patch => server/0361-Potential-bed-API.patch} (100%) rename patches/{unapplied/server/0364-Wait-for-Async-Tasks-during-shutdown.patch => server/0362-Wait-for-Async-Tasks-during-shutdown.patch} (90%) rename patches/{unapplied/server/0365-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch => server/0363-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch} (87%) rename patches/{unapplied/server/0367-Add-option-for-console-having-all-permissions.patch => server/0364-Add-option-for-console-having-all-permissions.patch} (100%) rename patches/{unapplied/server/0368-Fix-villager-trading-demand-MC-163962.patch => server/0365-Fix-villager-trading-demand-MC-163962.patch} (100%) rename patches/{unapplied/server/0369-Maps-shouldn-t-load-chunks.patch => server/0366-Maps-shouldn-t-load-chunks.patch} (100%) rename patches/{unapplied/server/0370-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch => server/0367-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch} (100%) rename patches/{unapplied/server/0371-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch => server/0368-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch} (100%) rename patches/{unapplied/server/0372-Fix-piston-physics-inconsistency-MC-188840.patch => server/0369-Fix-piston-physics-inconsistency-MC-188840.patch} (100%) rename patches/{unapplied/server/0373-Fix-missing-chunks-due-to-integer-overflow.patch => server/0370-Fix-missing-chunks-due-to-integer-overflow.patch} (100%) rename patches/{unapplied/server/0374-Prevent-position-desync-causing-tp-exploit.patch => server/0371-Prevent-position-desync-causing-tp-exploit.patch} (91%) rename patches/{unapplied/server/0375-Inventory-getHolder-method-without-block-snapshot.patch => server/0372-Inventory-getHolder-method-without-block-snapshot.patch} (100%) rename patches/{unapplied/server/0376-Add-PlayerRecipeBookClickEvent.patch => server/0373-Add-PlayerRecipeBookClickEvent.patch} (95%) rename patches/{unapplied/server/0377-Hide-sync-chunk-writes-behind-flag.patch => server/0374-Hide-sync-chunk-writes-behind-flag.patch} (89%) rename patches/{unapplied/server/0378-Add-permission-for-command-blocks.patch => server/0375-Add-permission-for-command-blocks.patch} (93%) rename patches/{unapplied/server/0379-Ensure-Entity-position-and-AABB-are-never-invalid.patch => server/0376-Ensure-Entity-position-and-AABB-are-never-invalid.patch} (91%) rename patches/{unapplied/server/0380-Fix-Per-World-Difficulty-Remembering-Difficulty.patch => server/0377-Fix-Per-World-Difficulty-Remembering-Difficulty.patch} (78%) rename patches/{unapplied/server/0381-Paper-dumpitem-command.patch => server/0378-Paper-dumpitem-command.patch} (100%) rename patches/{unapplied/server/0382-Improve-Legacy-Component-serialization-size.patch => server/0379-Improve-Legacy-Component-serialization-size.patch} (100%) rename patches/{unapplied/server/0383-Add-Plugin-Tickets-to-API-Chunk-Methods.patch => server/0380-Add-Plugin-Tickets-to-API-Chunk-Methods.patch} (94%) rename patches/{unapplied/server/0384-Add-BlockStateMeta-clearBlockState.patch => server/0381-Add-BlockStateMeta-clearBlockState.patch} (100%) rename patches/{unapplied/server/0385-Convert-legacy-attributes-in-Item-Meta.patch => server/0382-Convert-legacy-attributes-in-Item-Meta.patch} (95%) rename patches/{unapplied/server/0386-Do-not-accept-invalid-client-settings.patch => server/0383-Do-not-accept-invalid-client-settings.patch} (90%) rename patches/{unapplied/server/0387-Improve-fix-EntityTargetLivingEntityEvent.patch => server/0384-Improve-fix-EntityTargetLivingEntityEvent.patch} (100%) rename patches/{unapplied/server/0388-Add-entity-liquid-API.patch => server/0385-Add-entity-liquid-API.patch} (90%) delete mode 100644 patches/unapplied/server/0286-Add-PlayerPostRespawnEvent.patch delete mode 100644 patches/unapplied/server/0300-offset-item-frame-ticking.patch delete mode 100644 patches/unapplied/server/0366-Ensure-safe-gateway-teleport.patch 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 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 Co-authored-by: Jake Potrebic 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 similarity index 94% rename from patches/unapplied/server/0282-Limit-Client-Sign-length-more.patch rename to 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 similarity index 83% rename from patches/unapplied/server/0283-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to 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 similarity index 90% rename from patches/unapplied/server/0284-Entity-getEntitySpawnReason.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0285-Fire-event-on-GS4-query.patch rename to 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 +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 similarity index 86% rename from patches/unapplied/server/0287-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to 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 similarity index 86% rename from patches/unapplied/server/0288-Server-Tick-Events.patch rename to 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 +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 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 similarity index 85% rename from patches/unapplied/server/0301-Prevent-consuming-the-wrong-itemstack.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0302-Dont-send-unnecessary-sign-update.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0303-Add-option-to-disable-pillager-patrols.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0304-Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0305-MC-145656-Fix-Follow-Range-Initial-Target.patch rename to 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 similarity index 80% rename from patches/unapplied/server/0306-Duplicate-UUID-Resolve-Option.patch rename to 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> prepareTickingChunk(ChunkHolder holder) { - CompletableFuture>> 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 similarity index 69% rename from patches/unapplied/server/0307-PlayerDeathEvent-shouldDropExperience.patch rename to 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 similarity index 86% rename from patches/unapplied/server/0308-Prevent-bees-loading-chunks-checking-hive-position.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0309-Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to 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 similarity index 91% rename from patches/unapplied/server/0310-Optimise-EntityGetter-getPlayerByUUID.patch rename to 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 similarity index 93% rename from patches/unapplied/server/0311-Fix-items-not-falling-correctly.patch rename to 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 similarity index 88% rename from patches/unapplied/server/0312-Optimize-call-to-getFluid-for-explosions.patch rename to 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 similarity index 89% rename from patches/unapplied/server/0313-Guard-against-serializing-mismatching-chunk-coordina.patch rename to 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 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 similarity index 87% rename from patches/unapplied/server/0314-Alternative-item-despawn-rate.patch rename to 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 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 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 similarity index 95% rename from patches/unapplied/server/0315-Tracking-Range-Improvements.patch rename to 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 similarity index 90% rename from patches/unapplied/server/0316-Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to 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 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 similarity index 96% rename from patches/unapplied/server/0317-Improve-Block-breakNaturally-API.patch rename to 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 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 similarity index 67% rename from patches/unapplied/server/0318-Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to 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 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 similarity index 97% rename from patches/unapplied/server/0319-Add-debug-for-sync-chunk-loads.patch rename to 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 similarity index 96% rename from patches/unapplied/server/0320-Improve-java-version-check.patch rename to 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 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 similarity index 90% rename from patches/unapplied/server/0321-Add-ThrownEggHatchEvent.patch rename to 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 similarity index 85% rename from patches/unapplied/server/0322-Entity-Jump-API.patch rename to 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 similarity index 84% rename from patches/unapplied/server/0323-Add-option-to-nerf-pigmen-from-nether-portals.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0324-Make-the-GUI-graph-fancier.patch rename to 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 similarity index 89% rename from patches/unapplied/server/0325-add-hand-to-BlockMultiPlaceEvent.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0326-Validate-tripwire-hook-placement-before-update.patch rename to 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 similarity index 86% rename from patches/unapplied/server/0327-Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to 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 similarity index 91% rename from patches/unapplied/server/0328-Configurable-chance-of-villager-zombie-infection.patch rename to 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 similarity index 92% rename from patches/unapplied/server/0329-Optimise-Chunk-getFluid.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0330-Set-spigots-verbose-world-setting-to-false-by-def.patch rename to 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 similarity index 94% rename from patches/unapplied/server/0331-Add-tick-times-API-and-mspt-command.patch rename to 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 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 similarity index 82% rename from patches/unapplied/server/0338-Don-t-tick-dead-players.patch rename to 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 similarity index 84% rename from patches/unapplied/server/0339-Dead-Player-s-shouldn-t-be-able-to-move.patch rename to 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 similarity index 72% rename from patches/unapplied/server/0340-Don-t-move-existing-players-to-world-spawn.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0341-Optimize-Pathfinding.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0342-Reduce-Either-Optional-allocation.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0343-Reduce-memory-footprint-of-CompoundTag.patch rename to 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 similarity index 93% rename from patches/unapplied/server/0344-Prevent-opening-inventories-when-frozen.patch rename to 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 similarity index 93% rename from patches/unapplied/server/0345-Don-t-run-entity-collision-code-if-not-needed.patch rename to 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 <23108066+Owen1212055@users.noreply.github.com> 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 similarity index 92% rename from patches/unapplied/server/0346-Implement-Player-Client-Options-API.patch rename to 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 similarity index 88% rename from patches/unapplied/server/0347-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to 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 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 similarity index 88% rename from patches/unapplied/server/0348-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch rename to 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 similarity index 94% rename from patches/unapplied/server/0349-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to 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 Co-authored-by: Jake Potrebic 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 similarity index 95% rename from patches/unapplied/server/0350-Add-PlayerAttackEntityCooldownResetEvent.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0351-Don-t-fire-BlockFade-on-worldgen-threads.patch rename to 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 similarity index 97% rename from patches/unapplied/server/0352-Add-phantom-creative-and-insomniac-controls.patch rename to 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 similarity index 73% rename from patches/unapplied/server/0353-Fix-item-duplication-and-teleport-issues.patch rename to 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 + if (world instanceof ServerLevel worldserver) { + if (!this.isRemoved()) { + // CraftBukkit start +@@ -3379,6 +3386,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - 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 - } - -@@ -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 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 similarity index 100% rename from patches/unapplied/server/0354-Villager-Restocks-API.patch rename to 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 similarity index 91% rename from patches/unapplied/server/0355-Validate-PickItem-Packet-and-kick-for-invalid.patch rename to 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 similarity index 93% rename from patches/unapplied/server/0356-Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to 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 similarity index 85% rename from patches/unapplied/server/0357-misc-debugging-dumps.patch rename to 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 set) { // Paper diff --git a/patches/unapplied/server/0359-Implement-Mob-Goal-API.patch b/patches/server/0357-Implement-Mob-Goal-API.patch similarity index 99% rename from patches/unapplied/server/0359-Implement-Mob-Goal-API.patch rename to 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 similarity index 100% rename from patches/unapplied/server/0360-Add-villager-reputation-API.patch rename to 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 similarity index 85% rename from patches/unapplied/server/0361-ExperienceOrb-merging-stacking-API-and-fixes.patch rename to 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 Co-authored-by: Jake Potrebic 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 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 similarity index 92% rename from patches/unapplied/server/0362-Fix-PotionEffect-ignores-icon-flag.patch rename to 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 <70228790+notTamion@users.noreply.github.com> 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 getActivePotionEffects() { List effects = new ArrayList(); 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 similarity index 100% rename from patches/unapplied/server/0363-Potential-bed-API.patch rename to 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 similarity index 90% rename from patches/unapplied/server/0364-Wait-for-Async-Tasks-during-shutdown.patch rename to 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 { 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 similarity index 93% rename from patches/unapplied/server/0378-Add-permission-for-command-blocks.patch rename to 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 similarity index 91% rename from patches/unapplied/server/0379-Ensure-Entity-position-and-AABB-are-never-invalid.patch rename to 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 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 similarity index 78% rename from patches/unapplied/server/0380-Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to 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 -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 -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 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 -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; -