aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2022-03-13 08:47:54 +0100
committerGitHub <[email protected]>2022-03-13 08:47:54 +0100
commit1358d1e9146ca80d0ff84a644c7796d20b39765c (patch)
treeb387981c9a67bfad7e649813c1f1ea30fecfb4d9 /patches/server
parentab03538fa1af67a941ad0a9de75d367f13046c8d (diff)
downloadPaper-1358d1e9146ca80d0ff84a644c7796d20b39765c.tar.gz
Paper-1358d1e9146ca80d0ff84a644c7796d20b39765c.zip
Updated Upstream (CraftBukkit/Spigot) (#7580)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 881e06e5 PR-725: Add Item Unlimited Lifetime APIs CraftBukkit Changes: 74c08312 SPIGOT-6962: Call EntityChangeBlockEvent when when FallingBlockEntity starts to fall 64db5126 SPIGOT-6959: Make /loot command ignore empty items for spawn 2d760831 Increase outdated build delay 9ed7e4fb SPIGOT-6138, SPIGOT-6415: Don't call CreatureSpawnEvent after cross-dimensional travel fc4ad813 SPIGOT-6895: Trees grown with applyBoneMeal() don't fire the StructureGrowthEvent 59733a2e SPIGOT-6961: Actually return a copy of the ItemMeta Spigot Changes: ffceeae3 SPIGOT-6956: Drop unload queue patch as attempt at fixing stop issue e19ddabd PR-1011: Add Item Unlimited Lifetime APIs 34d40b0e SPIGOT-2942: give command fires PlayerDropItemEvent, cancelling it causes Item Duplication
Diffstat (limited to 'patches/server')
-rw-r--r--patches/server/0003-Build-system-changes.patch6
-rw-r--r--patches/server/0004-Paper-config-files.patch4
-rw-r--r--patches/server/0005-MC-Dev-fixes.patch4
-rw-r--r--patches/server/0007-MC-Utils.patch28
-rw-r--r--patches/server/0012-Timings-v2.patch39
-rw-r--r--patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch4
-rw-r--r--patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch10
-rw-r--r--patches/server/0025-Further-improve-server-tick-loop.patch14
-rw-r--r--patches/server/0027-Entity-Origin-API.patch8
-rw-r--r--patches/server/0034-Optimize-explosions.patch4
-rw-r--r--patches/server/0056-Add-exception-reporting-event.patch4
-rw-r--r--patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch4
-rw-r--r--patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch6
-rw-r--r--patches/server/0084-Configurable-Player-Collision.patch4
-rw-r--r--patches/server/0089-remove-null-possibility-for-getServer-singleton.patch8
-rw-r--r--patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch14
-rw-r--r--patches/server/0094-Optimize-UserCache-Thread-Safe.patch4
-rw-r--r--patches/server/0107-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch4
-rw-r--r--patches/server/0129-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch23
-rw-r--r--patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch8
-rw-r--r--patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch12
-rw-r--r--patches/server/0135-Item-canEntityPickup.patch6
-rw-r--r--patches/server/0140-Shoulder-Entities-Release-API.patch4
-rw-r--r--patches/server/0148-Fix-this-stupid-bullshit.patch4
-rw-r--r--patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch12
-rw-r--r--patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch4
-rw-r--r--patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch6
-rw-r--r--patches/server/0173-Add-ArmorStand-Item-Meta.patch21
-rw-r--r--patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch4
-rw-r--r--patches/server/0178-Implement-extended-PaperServerListPingEvent.patch4
-rw-r--r--patches/server/0188-Configurable-sprint-interruption-on-attack.patch4
-rw-r--r--patches/server/0193-Expand-World.spawnParticle-API-and-add-Builder.patch4
-rw-r--r--patches/server/0208-PlayerReadyArrowEvent.patch6
-rw-r--r--patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch6
-rw-r--r--patches/server/0215-InventoryCloseEvent-Reason-API.patch8
-rw-r--r--patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch10
-rw-r--r--patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch4
-rw-r--r--patches/server/0253-Asynchronous-chunk-IO-and-loading.patch46
-rw-r--r--patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch4
-rw-r--r--patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch4
-rw-r--r--patches/server/0281-Optimize-World-Time-Updates.patch4
-rw-r--r--patches/server/0289-force-entity-dismount-during-teleportation.patch4
-rw-r--r--patches/server/0308-Entity-getEntitySpawnReason.patch4
-rw-r--r--patches/server/0313-Server-Tick-Events.patch6
-rw-r--r--patches/server/0320-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch4
-rw-r--r--patches/server/0322-Implement-CraftBlockSoundGroup.patch4
-rw-r--r--patches/server/0323-Configurable-Keep-Spawn-Loaded-range-per-world.patch10
-rw-r--r--patches/server/0328-Fix-World-isChunkGenerated-calls.patch4
-rw-r--r--patches/server/0341-Duplicate-UUID-Resolve-Option.patch6
-rw-r--r--patches/server/0342-Optimize-Hoppers.patch4
-rw-r--r--patches/server/0352-Add-effect-to-block-break-naturally.patch6
-rw-r--r--patches/server/0354-Increase-Light-Queue-Size.patch4
-rw-r--r--patches/server/0356-Anti-Xray.patch10
-rw-r--r--patches/server/0358-Tracking-Range-Improvements.patch4
-rw-r--r--patches/server/0376-Add-tick-times-API-and-mspt-command.patch8
-rw-r--r--patches/server/0382-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch10
-rw-r--r--patches/server/0384-Dead-Player-s-shouldn-t-be-able-to-move.patch4
-rw-r--r--patches/server/0388-Improved-Watchdog-Support.patch28
-rw-r--r--patches/server/0398-Fix-Chunk-Post-Processing-deadlock-risk.patch4
-rw-r--r--patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch4
-rw-r--r--patches/server/0411-misc-debugging-dumps.patch8
-rw-r--r--patches/server/0421-Wait-for-Async-Tasks-during-shutdown.patch4
-rw-r--r--patches/server/0425-Reduce-allocation-of-Vec3D-by-entity-tracker.patch4
-rw-r--r--patches/server/0428-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch8
-rw-r--r--patches/server/0429-Use-distance-map-to-optimise-entity-tracker.patch12
-rw-r--r--patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch4
-rw-r--r--patches/server/0438-Fix-sand-duping.patch6
-rw-r--r--patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch8
-rw-r--r--patches/server/0452-incremental-chunk-and-player-saving.patch16
-rw-r--r--patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch12
-rw-r--r--patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch4
-rw-r--r--patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch4
-rw-r--r--patches/server/0496-Add-methods-to-get-translation-keys.patch4
-rw-r--r--patches/server/0498-Cache-block-data-strings.patch4
-rw-r--r--patches/server/0502-Extend-block-drop-capture-to-capture-all-items-added.patch9
-rw-r--r--patches/server/0507-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch4
-rw-r--r--patches/server/0511-Optimise-getType-calls.patch4
-rw-r--r--patches/server/0524-Item-no-age-no-player-pickup.patch4
-rw-r--r--patches/server/0531-Add-Destroy-Speed-API.patch4
-rw-r--r--patches/server/0550-Additional-Block-Material-API-s.patch4
-rw-r--r--patches/server/0563-Added-ServerResourcesReloadedEvent.patch6
-rw-r--r--patches/server/0571-Remove-stale-POIs.patch4
-rw-r--r--patches/server/0574-Add-PaperRegistry.patch4
-rw-r--r--patches/server/0575-Add-StructuresLocateEvent.patch4
-rw-r--r--patches/server/0588-EntityMoveEvent.patch4
-rw-r--r--patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch6
-rw-r--r--patches/server/0596-Add-support-for-hex-color-codes-in-console.patch4
-rw-r--r--patches/server/0607-Add-Block-isValidTool.patch4
-rw-r--r--patches/server/0615-forced-whitelist-use-configurable-kick-message.patch4
-rw-r--r--patches/server/0625-Fix-duplicating-give-items-on-item-drop-cancel.patch70
-rw-r--r--patches/server/0625-add-consumeFuel-to-FurnaceBurnEvent.patch (renamed from patches/server/0626-add-consumeFuel-to-FurnaceBurnEvent.patch)0
-rw-r--r--patches/server/0626-add-get-set-drop-chance-to-EntityEquipment.patch (renamed from patches/server/0627-add-get-set-drop-chance-to-EntityEquipment.patch)0
-rw-r--r--patches/server/0627-fix-PigZombieAngerEvent-cancellation.patch (renamed from patches/server/0628-fix-PigZombieAngerEvent-cancellation.patch)0
-rw-r--r--patches/server/0628-Fix-checkReach-check-for-Shulker-boxes.patch (renamed from patches/server/0629-Fix-checkReach-check-for-Shulker-boxes.patch)0
-rw-r--r--patches/server/0629-fix-PlayerItemHeldEvent-firing-twice.patch (renamed from patches/server/0630-fix-PlayerItemHeldEvent-firing-twice.patch)0
-rw-r--r--patches/server/0630-Added-PlayerDeepSleepEvent.patch (renamed from patches/server/0631-Added-PlayerDeepSleepEvent.patch)2
-rw-r--r--patches/server/0631-More-World-API.patch (renamed from patches/server/0632-More-World-API.patch)0
-rw-r--r--patches/server/0632-Added-PlayerBedFailEnterEvent.patch (renamed from patches/server/0633-Added-PlayerBedFailEnterEvent.patch)0
-rw-r--r--patches/server/0633-Implement-methods-to-convert-between-Component-and-B.patch (renamed from patches/server/0634-Implement-methods-to-convert-between-Component-and-B.patch)0
-rw-r--r--patches/server/0634-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch (renamed from patches/server/0635-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch)0
-rw-r--r--patches/server/0635-Introduce-beacon-activation-deactivation-events.patch (renamed from patches/server/0636-Introduce-beacon-activation-deactivation-events.patch)0
-rw-r--r--patches/server/0636-add-RespawnFlags-to-PlayerRespawnEvent.patch (renamed from patches/server/0637-add-RespawnFlags-to-PlayerRespawnEvent.patch)0
-rw-r--r--patches/server/0637-Add-Channel-initialization-listeners.patch (renamed from patches/server/0638-Add-Channel-initialization-listeners.patch)0
-rw-r--r--patches/server/0638-Send-empty-commands-if-tab-completion-is-disabled.patch (renamed from patches/server/0639-Send-empty-commands-if-tab-completion-is-disabled.patch)0
-rw-r--r--patches/server/0639-Add-more-WanderingTrader-API.patch (renamed from patches/server/0640-Add-more-WanderingTrader-API.patch)0
-rw-r--r--patches/server/0640-Add-EntityBlockStorage-clearEntities.patch (renamed from patches/server/0641-Add-EntityBlockStorage-clearEntities.patch)0
-rw-r--r--patches/server/0641-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch (renamed from patches/server/0642-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch)0
-rw-r--r--patches/server/0642-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch (renamed from patches/server/0643-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch)0
-rw-r--r--patches/server/0643-Inventory-close.patch (renamed from patches/server/0644-Inventory-close.patch)0
-rw-r--r--patches/server/0644-call-PortalCreateEvent-players-and-end-platform.patch (renamed from patches/server/0645-call-PortalCreateEvent-players-and-end-platform.patch)0
-rw-r--r--patches/server/0645-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch (renamed from patches/server/0646-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch)0
-rw-r--r--patches/server/0646-Fix-CraftPotionBrewer-cache.patch (renamed from patches/server/0647-Fix-CraftPotionBrewer-cache.patch)0
-rw-r--r--patches/server/0647-Add-basic-Datapack-API.patch (renamed from patches/server/0648-Add-basic-Datapack-API.patch)0
-rw-r--r--patches/server/0648-Add-environment-variable-to-disable-server-gui.patch (renamed from patches/server/0649-Add-environment-variable-to-disable-server-gui.patch)0
-rw-r--r--patches/server/0649-additions-to-PlayerGameModeChangeEvent.patch (renamed from patches/server/0650-additions-to-PlayerGameModeChangeEvent.patch)0
-rw-r--r--patches/server/0650-ItemStack-repair-check-API.patch (renamed from patches/server/0651-ItemStack-repair-check-API.patch)0
-rw-r--r--patches/server/0651-More-Enchantment-API.patch (renamed from patches/server/0652-More-Enchantment-API.patch)0
-rw-r--r--patches/server/0652-Fix-and-optimise-world-force-upgrading.patch (renamed from patches/server/0653-Fix-and-optimise-world-force-upgrading.patch)6
-rw-r--r--patches/server/0653-Add-Mob-lookAt-API.patch (renamed from patches/server/0654-Add-Mob-lookAt-API.patch)0
-rw-r--r--patches/server/0654-Add-Unix-domain-socket-support.patch (renamed from patches/server/0655-Add-Unix-domain-socket-support.patch)0
-rw-r--r--patches/server/0655-Add-EntityInsideBlockEvent.patch (renamed from patches/server/0656-Add-EntityInsideBlockEvent.patch)0
-rw-r--r--patches/server/0656-Attributes-API-for-item-defaults.patch (renamed from patches/server/0657-Attributes-API-for-item-defaults.patch)0
-rw-r--r--patches/server/0657-Add-cause-to-Weather-ThunderChangeEvents.patch (renamed from patches/server/0658-Add-cause-to-Weather-ThunderChangeEvents.patch)0
-rw-r--r--patches/server/0658-More-Lidded-Block-API.patch (renamed from patches/server/0659-More-Lidded-Block-API.patch)0
-rw-r--r--patches/server/0659-Limit-item-frame-cursors-on-maps.patch (renamed from patches/server/0660-Limit-item-frame-cursors-on-maps.patch)0
-rw-r--r--patches/server/0660-Add-PlayerKickEvent-causes.patch (renamed from patches/server/0661-Add-PlayerKickEvent-causes.patch)4
-rw-r--r--patches/server/0661-Add-PufferFishStateChangeEvent.patch (renamed from patches/server/0662-Add-PufferFishStateChangeEvent.patch)0
-rw-r--r--patches/server/0662-Fix-PlayerBucketEmptyEvent-result-itemstack.patch (renamed from patches/server/0663-Fix-PlayerBucketEmptyEvent-result-itemstack.patch)0
-rw-r--r--patches/server/0663-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch (renamed from patches/server/0664-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch)0
-rw-r--r--patches/server/0664-Add-option-to-fix-items-merging-through-walls.patch (renamed from patches/server/0665-Add-option-to-fix-items-merging-through-walls.patch)0
-rw-r--r--patches/server/0665-Add-BellRevealRaiderEvent.patch (renamed from patches/server/0666-Add-BellRevealRaiderEvent.patch)0
-rw-r--r--patches/server/0666-Fix-invulnerable-end-crystals.patch (renamed from patches/server/0667-Fix-invulnerable-end-crystals.patch)0
-rw-r--r--patches/server/0667-Add-ElderGuardianAppearanceEvent.patch (renamed from patches/server/0668-Add-ElderGuardianAppearanceEvent.patch)0
-rw-r--r--patches/server/0668-Fix-dangerous-end-portal-logic.patch (renamed from patches/server/0669-Fix-dangerous-end-portal-logic.patch)0
-rw-r--r--patches/server/0669-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch (renamed from patches/server/0670-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch)0
-rw-r--r--patches/server/0670-Make-item-validations-configurable.patch (renamed from patches/server/0671-Make-item-validations-configurable.patch)0
-rw-r--r--patches/server/0671-Line-Of-Sight-Changes.patch (renamed from patches/server/0672-Line-Of-Sight-Changes.patch)0
-rw-r--r--patches/server/0672-add-per-world-spawn-limits.patch (renamed from patches/server/0673-add-per-world-spawn-limits.patch)0
-rw-r--r--patches/server/0673-Fix-PotionSplashEvent-for-water-splash-potions.patch (renamed from patches/server/0674-Fix-PotionSplashEvent-for-water-splash-potions.patch)0
-rw-r--r--patches/server/0674-Add-more-LimitedRegion-API.patch (renamed from patches/server/0675-Add-more-LimitedRegion-API.patch)0
-rw-r--r--patches/server/0675-Fix-PlayerDropItemEvent-using-wrong-item.patch (renamed from patches/server/0676-Fix-PlayerDropItemEvent-using-wrong-item.patch)10
-rw-r--r--patches/server/0676-Missing-Entity-Behavior-API.patch (renamed from patches/server/0677-Missing-Entity-Behavior-API.patch)0
-rw-r--r--patches/server/0677-Ensure-disconnect-for-book-edit-is-called-on-main.patch (renamed from patches/server/0678-Ensure-disconnect-for-book-edit-is-called-on-main.patch)0
-rw-r--r--patches/server/0678-Fix-return-value-of-Block-applyBoneMeal-always-being.patch19
-rw-r--r--patches/server/0679-Fix-return-value-of-Block-applyBoneMeal-always-being.patch19
-rw-r--r--patches/server/0679-Use-getChunkIfLoadedImmediately-in-places.patch (renamed from patches/server/0680-Use-getChunkIfLoadedImmediately-in-places.patch)0
-rw-r--r--patches/server/0680-Fix-commands-from-signs-not-firing-command-events.patch (renamed from patches/server/0681-Fix-commands-from-signs-not-firing-command-events.patch)0
-rw-r--r--patches/server/0681-Adds-PlayerArmSwingEvent.patch (renamed from patches/server/0682-Adds-PlayerArmSwingEvent.patch)0
-rw-r--r--patches/server/0682-Fixes-kick-event-leave-message-not-being-sent.patch (renamed from patches/server/0683-Fixes-kick-event-leave-message-not-being-sent.patch)0
-rw-r--r--patches/server/0683-Add-config-for-mobs-immune-to-default-effects.patch (renamed from patches/server/0684-Add-config-for-mobs-immune-to-default-effects.patch)0
-rw-r--r--patches/server/0684-Fix-incorrect-message-for-outdated-client.patch (renamed from patches/server/0685-Fix-incorrect-message-for-outdated-client.patch)0
-rw-r--r--patches/server/0685-Don-t-apply-cramming-damage-to-players.patch (renamed from patches/server/0686-Don-t-apply-cramming-damage-to-players.patch)0
-rw-r--r--patches/server/0686-Rate-options-and-timings-for-sensors-and-behaviors.patch (renamed from patches/server/0687-Rate-options-and-timings-for-sensors-and-behaviors.patch)0
-rw-r--r--patches/server/0687-Add-a-bunch-of-missing-forceDrop-toggles.patch (renamed from patches/server/0688-Add-a-bunch-of-missing-forceDrop-toggles.patch)0
-rw-r--r--patches/server/0688-Stinger-API.patch (renamed from patches/server/0689-Stinger-API.patch)0
-rw-r--r--patches/server/0689-Fix-incosistency-issue-with-empty-map-items-in-CB.patch (renamed from patches/server/0690-Fix-incosistency-issue-with-empty-map-items-in-CB.patch)0
-rw-r--r--patches/server/0690-Add-System.out-err-catcher.patch (renamed from patches/server/0691-Add-System.out-err-catcher.patch)0
-rw-r--r--patches/server/0691-Fix-test-not-bootstrapping.patch (renamed from patches/server/0692-Fix-test-not-bootstrapping.patch)0
-rw-r--r--patches/server/0692-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch (renamed from patches/server/0693-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch)0
-rw-r--r--patches/server/0693-Improve-boat-collision-performance.patch (renamed from patches/server/0694-Improve-boat-collision-performance.patch)0
-rw-r--r--patches/server/0694-Prevent-AFK-kick-while-watching-end-credits.patch (renamed from patches/server/0695-Prevent-AFK-kick-while-watching-end-credits.patch)0
-rw-r--r--patches/server/0695-Allow-skipping-writing-of-comments-to-server.propert.patch (renamed from patches/server/0696-Allow-skipping-writing-of-comments-to-server.propert.patch)0
-rw-r--r--patches/server/0696-Add-PlayerSetSpawnEvent.patch (renamed from patches/server/0697-Add-PlayerSetSpawnEvent.patch)0
-rw-r--r--patches/server/0697-Make-hoppers-respect-inventory-max-stack-size.patch (renamed from patches/server/0698-Make-hoppers-respect-inventory-max-stack-size.patch)0
-rw-r--r--patches/server/0698-Optimize-entity-tracker-passenger-checks.patch (renamed from patches/server/0699-Optimize-entity-tracker-passenger-checks.patch)0
-rw-r--r--patches/server/0699-Config-option-for-Piglins-guarding-chests.patch (renamed from patches/server/0700-Config-option-for-Piglins-guarding-chests.patch)0
-rw-r--r--patches/server/0700-Added-EntityDamageItemEvent.patch (renamed from patches/server/0701-Added-EntityDamageItemEvent.patch)0
-rw-r--r--patches/server/0701-Optimize-indirect-passenger-iteration.patch (renamed from patches/server/0702-Optimize-indirect-passenger-iteration.patch)0
-rw-r--r--patches/server/0702-Fix-block-drops-position-losing-precision-millions-o.patch (renamed from patches/server/0703-Fix-block-drops-position-losing-precision-millions-o.patch)0
-rw-r--r--patches/server/0703-Configurable-item-frame-map-cursor-update-interval.patch (renamed from patches/server/0704-Configurable-item-frame-map-cursor-update-interval.patch)0
-rw-r--r--patches/server/0704-Make-EntityUnleashEvent-cancellable.patch (renamed from patches/server/0705-Make-EntityUnleashEvent-cancellable.patch)0
-rw-r--r--patches/server/0705-Clear-bucket-NBT-after-dispense.patch (renamed from patches/server/0706-Clear-bucket-NBT-after-dispense.patch)0
-rw-r--r--patches/server/0706-Respect-despawn-rate-in-item-merge-check.patch (renamed from patches/server/0707-Respect-despawn-rate-in-item-merge-check.patch)0
-rw-r--r--patches/server/0707-Change-EnderEye-target-without-changing-other-things.patch (renamed from patches/server/0708-Change-EnderEye-target-without-changing-other-things.patch)0
-rw-r--r--patches/server/0708-Add-BlockBreakBlockEvent.patch (renamed from patches/server/0709-Add-BlockBreakBlockEvent.patch)0
-rw-r--r--patches/server/0709-Option-to-prevent-NBT-copy-in-smithing-recipes.patch (renamed from patches/server/0710-Option-to-prevent-NBT-copy-in-smithing-recipes.patch)0
-rw-r--r--patches/server/0710-More-CommandBlock-API.patch (renamed from patches/server/0711-More-CommandBlock-API.patch)0
-rw-r--r--patches/server/0711-Add-missing-team-sidebar-display-slots.patch (renamed from patches/server/0712-Add-missing-team-sidebar-display-slots.patch)0
-rw-r--r--patches/server/0712-Add-back-EntityPortalExitEvent.patch (renamed from patches/server/0713-Add-back-EntityPortalExitEvent.patch)0
-rw-r--r--patches/server/0713-Add-methods-to-find-targets-for-lightning-strikes.patch (renamed from patches/server/0714-Add-methods-to-find-targets-for-lightning-strikes.patch)0
-rw-r--r--patches/server/0714-Get-entity-default-attributes.patch (renamed from patches/server/0715-Get-entity-default-attributes.patch)0
-rw-r--r--patches/server/0715-Left-handed-API.patch (renamed from patches/server/0716-Left-handed-API.patch)0
-rw-r--r--patches/server/0716-Add-advancement-display-API.patch (renamed from patches/server/0717-Add-advancement-display-API.patch)0
-rw-r--r--patches/server/0717-Add-ItemFactory-getMonsterEgg-API.patch (renamed from patches/server/0718-Add-ItemFactory-getMonsterEgg-API.patch)0
-rw-r--r--patches/server/0718-Add-critical-damage-API.patch (renamed from patches/server/0719-Add-critical-damage-API.patch)8
-rw-r--r--patches/server/0719-Fix-issues-with-mob-conversion.patch (renamed from patches/server/0720-Fix-issues-with-mob-conversion.patch)0
-rw-r--r--patches/server/0720-Add-isCollidable-methods-to-various-places.patch (renamed from patches/server/0721-Add-isCollidable-methods-to-various-places.patch)4
-rw-r--r--patches/server/0721-Goat-ram-API.patch (renamed from patches/server/0722-Goat-ram-API.patch)0
-rw-r--r--patches/server/0722-Add-API-for-resetting-a-single-score.patch (renamed from patches/server/0723-Add-API-for-resetting-a-single-score.patch)0
-rw-r--r--patches/server/0723-Add-Raw-Byte-Entity-Serialization.patch (renamed from patches/server/0724-Add-Raw-Byte-Entity-Serialization.patch)0
-rw-r--r--patches/server/0724-Vanilla-command-permission-fixes.patch (renamed from patches/server/0725-Vanilla-command-permission-fixes.patch)0
-rw-r--r--patches/server/0725-Make-CallbackExecutor-strict-again.patch (renamed from patches/server/0726-Make-CallbackExecutor-strict-again.patch)2
-rw-r--r--patches/server/0726-Do-not-allow-the-server-to-unload-chunks-at-request-.patch (renamed from patches/server/0727-Do-not-allow-the-server-to-unload-chunks-at-request-.patch)0
-rw-r--r--patches/server/0727-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch (renamed from patches/server/0728-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch)6
-rw-r--r--patches/server/0728-Correctly-handle-recursion-for-chunkholder-updates.patch (renamed from patches/server/0729-Correctly-handle-recursion-for-chunkholder-updates.patch)0
-rw-r--r--patches/server/0729-Separate-lookup-locking-from-state-access-in-UserCac.patch (renamed from patches/server/0730-Separate-lookup-locking-from-state-access-in-UserCac.patch)0
-rw-r--r--patches/server/0730-Fix-chunks-refusing-to-unload-at-low-TPS.patch (renamed from patches/server/0731-Fix-chunks-refusing-to-unload-at-low-TPS.patch)4
-rw-r--r--patches/server/0731-Do-not-allow-ticket-level-changes-while-unloading-pl.patch (renamed from patches/server/0732-Do-not-allow-ticket-level-changes-while-unloading-pl.patch)6
-rw-r--r--patches/server/0732-Do-not-allow-ticket-level-changes-when-updating-chun.patch (renamed from patches/server/0733-Do-not-allow-ticket-level-changes-when-updating-chun.patch)0
-rw-r--r--patches/server/0733-Do-not-submit-profile-lookups-to-worldgen-threads.patch (renamed from patches/server/0734-Do-not-submit-profile-lookups-to-worldgen-threads.patch)0
-rw-r--r--patches/server/0734-Log-when-the-async-catcher-is-tripped.patch (renamed from patches/server/0735-Log-when-the-async-catcher-is-tripped.patch)0
-rw-r--r--patches/server/0735-Add-paper-mobcaps-and-paper-playermobcaps.patch (renamed from patches/server/0736-Add-paper-mobcaps-and-paper-playermobcaps.patch)0
-rw-r--r--patches/server/0736-Prevent-unload-calls-removing-tickets-for-sync-loads.patch (renamed from patches/server/0737-Prevent-unload-calls-removing-tickets-for-sync-loads.patch)0
-rw-r--r--patches/server/0737-Sanitize-ResourceLocation-error-logging.patch (renamed from patches/server/0738-Sanitize-ResourceLocation-error-logging.patch)0
-rw-r--r--patches/server/0738-Optimise-general-POI-access.patch (renamed from patches/server/0739-Optimise-general-POI-access.patch)0
-rw-r--r--patches/server/0739-Allow-controlled-flushing-for-network-manager.patch (renamed from patches/server/0740-Allow-controlled-flushing-for-network-manager.patch)0
-rw-r--r--patches/server/0740-Add-more-async-catchers.patch (renamed from patches/server/0741-Add-more-async-catchers.patch)0
-rw-r--r--patches/server/0741-Rewrite-entity-bounding-box-lookup-calls.patch (renamed from patches/server/0742-Rewrite-entity-bounding-box-lookup-calls.patch)0
-rw-r--r--patches/server/0742-Optimise-chunk-tick-iteration.patch (renamed from patches/server/0743-Optimise-chunk-tick-iteration.patch)2
-rw-r--r--patches/server/0743-Execute-chunk-tasks-mid-tick.patch (renamed from patches/server/0744-Execute-chunk-tasks-mid-tick.patch)6
-rw-r--r--patches/server/0744-Do-not-copy-visible-chunks.patch (renamed from patches/server/0745-Do-not-copy-visible-chunks.patch)19
-rw-r--r--patches/server/0745-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch (renamed from patches/server/0746-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch)0
-rw-r--r--patches/server/0746-Custom-table-implementation-for-blockstate-state-loo.patch (renamed from patches/server/0747-Custom-table-implementation-for-blockstate-state-loo.patch)0
-rw-r--r--patches/server/0747-Detail-more-information-in-watchdog-dumps.patch (renamed from patches/server/0748-Detail-more-information-in-watchdog-dumps.patch)0
-rw-r--r--patches/server/0748-Manually-inline-methods-in-BlockPosition.patch (renamed from patches/server/0749-Manually-inline-methods-in-BlockPosition.patch)0
-rw-r--r--patches/server/0749-Distance-manager-tick-timings.patch (renamed from patches/server/0750-Distance-manager-tick-timings.patch)0
-rw-r--r--patches/server/0750-Name-craft-scheduler-threads-according-to-the-plugin.patch (renamed from patches/server/0751-Name-craft-scheduler-threads-according-to-the-plugin.patch)0
-rw-r--r--patches/server/0751-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch (renamed from patches/server/0752-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch)0
-rw-r--r--patches/server/0752-Add-packet-limiter-config.patch (renamed from patches/server/0753-Add-packet-limiter-config.patch)0
-rw-r--r--patches/server/0753-Lag-compensate-block-breaking.patch (renamed from patches/server/0754-Lag-compensate-block-breaking.patch)0
-rw-r--r--patches/server/0754-Use-correct-LevelStem-registry-when-loading-default-.patch (renamed from patches/server/0755-Use-correct-LevelStem-registry-when-loading-default-.patch)4
-rw-r--r--patches/server/0755-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch (renamed from patches/server/0756-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch)0
-rw-r--r--patches/server/0756-Consolidate-flush-calls-for-entity-tracker-packets.patch (renamed from patches/server/0757-Consolidate-flush-calls-for-entity-tracker-packets.patch)0
-rw-r--r--patches/server/0757-Don-t-lookup-fluid-state-when-raytracing.patch (renamed from patches/server/0758-Don-t-lookup-fluid-state-when-raytracing.patch)0
-rw-r--r--patches/server/0758-Time-scoreboard-search.patch (renamed from patches/server/0759-Time-scoreboard-search.patch)0
-rw-r--r--patches/server/0759-Send-full-pos-packets-for-hard-colliding-entities.patch (renamed from patches/server/0760-Send-full-pos-packets-for-hard-colliding-entities.patch)0
-rw-r--r--patches/server/0760-Do-not-run-raytrace-logic-for-AIR.patch (renamed from patches/server/0761-Do-not-run-raytrace-logic-for-AIR.patch)0
-rw-r--r--patches/server/0761-Oprimise-map-impl-for-tracked-players.patch (renamed from patches/server/0762-Oprimise-map-impl-for-tracked-players.patch)4
-rw-r--r--patches/server/0762-Optimise-BlockSoil-nearby-water-lookup.patch (renamed from patches/server/0763-Optimise-BlockSoil-nearby-water-lookup.patch)0
-rw-r--r--patches/server/0763-Allow-removal-addition-of-entities-to-entity-ticklis.patch (renamed from patches/server/0764-Allow-removal-addition-of-entities-to-entity-ticklis.patch)0
-rw-r--r--patches/server/0764-Optimise-random-block-ticking.patch (renamed from patches/server/0765-Optimise-random-block-ticking.patch)0
-rw-r--r--patches/server/0765-Optimise-non-flush-packet-sending.patch (renamed from patches/server/0766-Optimise-non-flush-packet-sending.patch)0
-rw-r--r--patches/server/0766-Optimise-nearby-player-lookups.patch (renamed from patches/server/0767-Optimise-nearby-player-lookups.patch)2
-rw-r--r--patches/server/0767-Optimise-WorldServer-notify.patch (renamed from patches/server/0768-Optimise-WorldServer-notify.patch)10
-rw-r--r--patches/server/0768-Remove-streams-for-villager-AI.patch (renamed from patches/server/0769-Remove-streams-for-villager-AI.patch)0
-rw-r--r--patches/server/0769-Rewrite-dataconverter-system.patch (renamed from patches/server/0770-Rewrite-dataconverter-system.patch)0
-rw-r--r--patches/server/0770-Use-Velocity-compression-and-cipher-natives.patch (renamed from patches/server/0771-Use-Velocity-compression-and-cipher-natives.patch)0
-rw-r--r--patches/server/0771-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch (renamed from patches/server/0772-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch)0
-rw-r--r--patches/server/0772-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch (renamed from patches/server/0773-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch)0
-rw-r--r--patches/server/0773-Async-catch-modifications-to-critical-entity-state.patch (renamed from patches/server/0774-Async-catch-modifications-to-critical-entity-state.patch)0
-rw-r--r--patches/server/0774-Fix-Bukkit-NamespacedKey-shenanigans.patch (renamed from patches/server/0775-Fix-Bukkit-NamespacedKey-shenanigans.patch)0
-rw-r--r--patches/server/0775-Fix-merchant-inventory-not-closing-on-entity-removal.patch (renamed from patches/server/0776-Fix-merchant-inventory-not-closing-on-entity-removal.patch)4
-rw-r--r--patches/server/0776-Check-requirement-before-suggesting-root-nodes.patch (renamed from patches/server/0777-Check-requirement-before-suggesting-root-nodes.patch)0
-rw-r--r--patches/server/0777-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch (renamed from patches/server/0778-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch)0
-rw-r--r--patches/server/0778-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch (renamed from patches/server/0779-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch)0
-rw-r--r--patches/server/0779-Ensure-valid-vehicle-status.patch (renamed from patches/server/0780-Ensure-valid-vehicle-status.patch)0
-rw-r--r--patches/server/0780-Prevent-softlocked-end-exit-portal-generation.patch (renamed from patches/server/0781-Prevent-softlocked-end-exit-portal-generation.patch)0
-rw-r--r--patches/server/0781-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch (renamed from patches/server/0782-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch)0
-rw-r--r--patches/server/0782-Don-t-log-debug-logging-being-disabled.patch (renamed from patches/server/0783-Don-t-log-debug-logging-being-disabled.patch)0
-rw-r--r--patches/server/0783-Mark-fish-and-axolotls-from-buckets-as-persistent.patch (renamed from patches/server/0784-Mark-fish-and-axolotls-from-buckets-as-persistent.patch)0
-rw-r--r--patches/server/0784-fix-various-menus-with-empty-level-accesses.patch (renamed from patches/server/0785-fix-various-menus-with-empty-level-accesses.patch)0
-rw-r--r--patches/server/0785-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch (renamed from patches/server/0786-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch)2
-rw-r--r--patches/server/0786-Preserve-overstacked-loot.patch (renamed from patches/server/0787-Preserve-overstacked-loot.patch)0
-rw-r--r--patches/server/0787-Update-head-rotation-in-missing-places.patch (renamed from patches/server/0788-Update-head-rotation-in-missing-places.patch)0
-rw-r--r--patches/server/0788-prevent-unintended-light-block-manipulation.patch (renamed from patches/server/0789-prevent-unintended-light-block-manipulation.patch)0
-rw-r--r--patches/server/0789-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch (renamed from patches/server/0790-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch)0
-rw-r--r--patches/server/0790-Fix-CraftCriteria-defaults-map.patch (renamed from patches/server/0791-Fix-CraftCriteria-defaults-map.patch)0
-rw-r--r--patches/server/0791-Fix-upstreams-block-state-factories.patch (renamed from patches/server/0792-Fix-upstreams-block-state-factories.patch)0
-rw-r--r--patches/server/0792-Add-config-option-for-logging-player-ip-addresses.patch (renamed from patches/server/0793-Add-config-option-for-logging-player-ip-addresses.patch)0
-rw-r--r--patches/server/0793-Configurable-feature-seeds.patch (renamed from patches/server/0794-Configurable-feature-seeds.patch)0
-rw-r--r--patches/server/0794-VanillaCommandWrapper-didnt-account-for-entity-sende.patch (renamed from patches/server/0795-VanillaCommandWrapper-didnt-account-for-entity-sende.patch)0
-rw-r--r--patches/server/0795-Add-root-admin-user-detection.patch (renamed from patches/server/0796-Add-root-admin-user-detection.patch)0
-rw-r--r--patches/server/0796-Always-allow-item-changing-in-Fireball.patch (renamed from patches/server/0797-Always-allow-item-changing-in-Fireball.patch)0
-rw-r--r--patches/server/0797-don-t-attempt-to-teleport-dead-entities.patch (renamed from patches/server/0798-don-t-attempt-to-teleport-dead-entities.patch)0
-rw-r--r--patches/server/0798-Fix-anvil-prepare-event-not-working-with-zero-xp.patch (renamed from patches/server/0799-Fix-anvil-prepare-event-not-working-with-zero-xp.patch)0
-rw-r--r--patches/server/0799-Prevent-excessive-velocity-through-repeated-crits.patch (renamed from patches/server/0800-Prevent-excessive-velocity-through-repeated-crits.patch)0
-rw-r--r--patches/server/0800-Remove-client-side-code-using-deprecated-for-removal.patch (renamed from patches/server/0801-Remove-client-side-code-using-deprecated-for-removal.patch)0
-rw-r--r--patches/server/0801-Rewrite-the-light-engine.patch (renamed from patches/server/0802-Rewrite-the-light-engine.patch)2
-rw-r--r--patches/server/0802-Always-parse-protochunk-light-sources-unless-it-is-m.patch (renamed from patches/server/0803-Always-parse-protochunk-light-sources-unless-it-is-m.patch)0
-rw-r--r--patches/server/0803-Fix-removing-recipes-from-RecipeIterator.patch (renamed from patches/server/0804-Fix-removing-recipes-from-RecipeIterator.patch)0
-rw-r--r--patches/server/0804-Prevent-sending-oversized-item-data-in-equipment-and.patch (renamed from patches/server/0805-Prevent-sending-oversized-item-data-in-equipment-and.patch)0
-rw-r--r--patches/server/0805-Hide-unnecessary-itemmeta-from-clients.patch (renamed from patches/server/0806-Hide-unnecessary-itemmeta-from-clients.patch)0
-rw-r--r--patches/server/0806-Fix-kelp-modifier-changing-growth-for-other-crops.patch (renamed from patches/server/0807-Fix-kelp-modifier-changing-growth-for-other-crops.patch)0
-rw-r--r--patches/server/0807-Prevent-ContainerOpenersCounter-openCount-from-going.patch (renamed from patches/server/0808-Prevent-ContainerOpenersCounter-openCount-from-going.patch)0
-rw-r--r--patches/server/0808-Add-PlayerItemFrameChangeEvent.patch (renamed from patches/server/0809-Add-PlayerItemFrameChangeEvent.patch)0
-rw-r--r--patches/server/0809-Add-player-health-update-API.patch (renamed from patches/server/0810-Add-player-health-update-API.patch)0
-rw-r--r--patches/server/0810-Optimize-HashMapPalette.patch (renamed from patches/server/0811-Optimize-HashMapPalette.patch)0
-rw-r--r--patches/server/0811-Allow-delegation-to-vanilla-chunk-gen.patch (renamed from patches/server/0812-Allow-delegation-to-vanilla-chunk-gen.patch)0
-rw-r--r--patches/server/0812-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch (renamed from patches/server/0813-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch)0
-rw-r--r--patches/server/0813-Optimise-collision-checking-in-player-move-packet-ha.patch (renamed from patches/server/0814-Optimise-collision-checking-in-player-move-packet-ha.patch)0
-rw-r--r--patches/server/0814-Actually-unload-POI-data.patch (renamed from patches/server/0815-Actually-unload-POI-data.patch)28
-rw-r--r--patches/server/0815-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch (renamed from patches/server/0816-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch)0
-rw-r--r--patches/server/0816-Update-Log4j.patch (renamed from patches/server/0817-Update-Log4j.patch)0
-rw-r--r--patches/server/0817-Add-more-Campfire-API.patch (renamed from patches/server/0818-Add-more-Campfire-API.patch)0
-rw-r--r--patches/server/0818-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch (renamed from patches/server/0819-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch)0
-rw-r--r--patches/server/0819-Fix-tripwire-state-inconsistency.patch (renamed from patches/server/0820-Fix-tripwire-state-inconsistency.patch)0
-rw-r--r--patches/server/0820-Fix-fluid-logging-on-Block-breakNaturally.patch (renamed from patches/server/0821-Fix-fluid-logging-on-Block-breakNaturally.patch)6
-rw-r--r--patches/server/0821-Forward-CraftEntity-in-teleport-command.patch (renamed from patches/server/0822-Forward-CraftEntity-in-teleport-command.patch)0
-rw-r--r--patches/server/0822-Improve-scoreboard-entries.patch (renamed from patches/server/0823-Improve-scoreboard-entries.patch)0
-rw-r--r--patches/server/0823-Entity-powdered-snow-API.patch (renamed from patches/server/0824-Entity-powdered-snow-API.patch)0
-rw-r--r--patches/server/0824-Add-API-for-item-entity-health.patch (renamed from patches/server/0825-Add-API-for-item-entity-health.patch)4
-rw-r--r--patches/server/0825-Fix-entity-type-tags-suggestions-in-selectors.patch (renamed from patches/server/0826-Fix-entity-type-tags-suggestions-in-selectors.patch)0
-rw-r--r--patches/server/0826-Configurable-max-block-light-for-monster-spawning.patch (renamed from patches/server/0827-Configurable-max-block-light-for-monster-spawning.patch)0
-rw-r--r--patches/server/0827-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch (renamed from patches/server/0828-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch)0
-rw-r--r--patches/server/0828-Load-effect-amplifiers-greater-than-127-correctly.patch (renamed from patches/server/0829-Load-effect-amplifiers-greater-than-127-correctly.patch)0
-rw-r--r--patches/server/0829-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch (renamed from patches/server/0830-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch)0
-rw-r--r--patches/server/0830-Fix-bees-aging-inside-hives.patch (renamed from patches/server/0831-Fix-bees-aging-inside-hives.patch)0
-rw-r--r--patches/server/0831-Bucketable-API.patch (renamed from patches/server/0832-Bucketable-API.patch)0
-rw-r--r--patches/server/0832-Check-player-world-in-endPortalSoundRadius.patch (renamed from patches/server/0833-Check-player-world-in-endPortalSoundRadius.patch)0
-rw-r--r--patches/server/0833-Validate-usernames.patch (renamed from patches/server/0834-Validate-usernames.patch)0
-rw-r--r--patches/server/0834-Fix-saving-configs-with-more-long-comments.patch (renamed from patches/server/0835-Fix-saving-configs-with-more-long-comments.patch)0
-rw-r--r--patches/server/0835-Make-water-animal-spawn-height-configurable.patch (renamed from patches/server/0836-Make-water-animal-spawn-height-configurable.patch)0
-rw-r--r--patches/server/0836-Expose-vanilla-BiomeProvider-from-WorldInfo.patch (renamed from patches/server/0837-Expose-vanilla-BiomeProvider-from-WorldInfo.patch)4
-rw-r--r--patches/server/0837-Add-config-option-for-worlds-affected-by-time-cmd.patch (renamed from patches/server/0838-Add-config-option-for-worlds-affected-by-time-cmd.patch)0
-rw-r--r--patches/server/0838-Add-new-overload-to-PersistentDataContainer-has.patch (renamed from patches/server/0839-Add-new-overload-to-PersistentDataContainer-has.patch)0
-rw-r--r--patches/server/0839-Multiple-Entries-with-Scoreboards.patch (renamed from patches/server/0840-Multiple-Entries-with-Scoreboards.patch)0
-rw-r--r--patches/server/0840-Reset-placed-block-on-exception.patch (renamed from patches/server/0841-Reset-placed-block-on-exception.patch)0
-rw-r--r--patches/server/0841-Add-configurable-height-for-slime-spawn.patch (renamed from patches/server/0842-Add-configurable-height-for-slime-spawn.patch)0
-rw-r--r--patches/server/0842-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch (renamed from patches/server/0843-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch)0
-rw-r--r--patches/server/0843-Fix-xp-reward-for-baby-zombies.patch (renamed from patches/server/0844-Fix-xp-reward-for-baby-zombies.patch)0
-rw-r--r--patches/server/0844-Kick-on-main-for-illegal-chars.patch (renamed from patches/server/0845-Kick-on-main-for-illegal-chars.patch)0
-rw-r--r--patches/server/0845-Multi-Block-Change-API-Implementation.patch (renamed from patches/server/0846-Multi-Block-Change-API-Implementation.patch)0
-rw-r--r--patches/server/0846-Fix-NotePlayEvent.patch (renamed from patches/server/0847-Fix-NotePlayEvent.patch)0
-rw-r--r--patches/server/0847-Freeze-Tick-Lock-API.patch (renamed from patches/server/0848-Freeze-Tick-Lock-API.patch)0
-rw-r--r--patches/server/0848-Dolphin-API.patch (renamed from patches/server/0849-Dolphin-API.patch)0
-rw-r--r--patches/server/0849-More-PotionEffectType-API.patch (renamed from patches/server/0850-More-PotionEffectType-API.patch)0
-rw-r--r--patches/server/0850-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch (renamed from patches/server/0851-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch)0
-rw-r--r--patches/server/0851-API-for-creating-command-sender-which-forwards-feedb.patch (renamed from patches/server/0852-API-for-creating-command-sender-which-forwards-feedb.patch)0
-rw-r--r--patches/server/0852-Add-config-for-stronghold-seed.patch (renamed from patches/server/0853-Add-config-for-stronghold-seed.patch)0
-rw-r--r--patches/server/0853-Implement-regenerateChunk.patch (renamed from patches/server/0854-Implement-regenerateChunk.patch)0
-rw-r--r--patches/server/0854-Log-exceptions-thrown-during-chat-processing.patch (renamed from patches/server/0855-Log-exceptions-thrown-during-chat-processing.patch)0
-rw-r--r--patches/server/0855-Fix-cancelled-powdered-snow-bucket-placement.patch (renamed from patches/server/0856-Fix-cancelled-powdered-snow-bucket-placement.patch)0
-rw-r--r--patches/server/0856-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch (renamed from patches/server/0857-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch)0
-rw-r--r--patches/server/0857-Add-GameEvent-tags.patch (renamed from patches/server/0858-Add-GameEvent-tags.patch)0
-rw-r--r--patches/server/0858-Replace-player-chunk-loader-system.patch (renamed from patches/server/0859-Replace-player-chunk-loader-system.patch)22
-rw-r--r--patches/server/0859-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch (renamed from patches/server/0860-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch)6
-rw-r--r--patches/server/0860-Replace-ticket-level-propagator.patch (renamed from patches/server/0861-Replace-ticket-level-propagator.patch)0
-rw-r--r--patches/server/0861-Furnace-RecipesUsed-API.patch (renamed from patches/server/0862-Furnace-RecipesUsed-API.patch)0
-rw-r--r--patches/server/0862-Configurable-sculk-sensor-listener-range.patch (renamed from patches/server/0863-Configurable-sculk-sensor-listener-range.patch)0
-rw-r--r--patches/server/0863-Add-missing-block-data-mins-and-maxes.patch (renamed from patches/server/0864-Add-missing-block-data-mins-and-maxes.patch)0
-rw-r--r--patches/server/0864-Option-to-have-default-CustomSpawners-in-custom-worl.patch (renamed from patches/server/0865-Option-to-have-default-CustomSpawners-in-custom-worl.patch)4
-rw-r--r--patches/server/0865-Put-world-into-worldlist-before-initing-the-world.patch (renamed from patches/server/0866-Put-world-into-worldlist-before-initing-the-world.patch)4
-rw-r--r--patches/server/0866-Fix-Entity-Position-Desync.patch (renamed from patches/server/0867-Fix-Entity-Position-Desync.patch)0
-rw-r--r--patches/server/0867-Custom-Potion-Mixes.patch (renamed from patches/server/0868-Custom-Potion-Mixes.patch)4
-rw-r--r--patches/server/0868-Fix-Fluid-tags-isTagged-method.patch (renamed from patches/server/0869-Fix-Fluid-tags-isTagged-method.patch)0
-rw-r--r--patches/server/0869-Fix-World-locateNearestStructure.patch (renamed from patches/server/0870-Fix-World-locateNearestStructure.patch)8
-rw-r--r--patches/server/0870-Force-close-world-loading-screen.patch (renamed from patches/server/0871-Force-close-world-loading-screen.patch)0
-rw-r--r--patches/server/0871-Fix-falling-block-spawn-methods.patch (renamed from patches/server/0872-Fix-falling-block-spawn-methods.patch)0
-rw-r--r--patches/server/0872-Expose-furnace-minecart-push-values.patch (renamed from patches/server/0873-Expose-furnace-minecart-push-values.patch)0
-rw-r--r--patches/server/0873-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch (renamed from patches/server/0874-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch)0
-rw-r--r--patches/server/0874-Fix-save-problems-on-shutdown.patch (renamed from patches/server/0875-Fix-save-problems-on-shutdown.patch)8
-rw-r--r--patches/server/0875-More-Projectile-API.patch (renamed from patches/server/0876-More-Projectile-API.patch)0
-rw-r--r--patches/server/0876-Fix-swamp-hut-cat-generation-deadlock.patch (renamed from patches/server/0877-Fix-swamp-hut-cat-generation-deadlock.patch)0
-rw-r--r--patches/server/0877-Fix-CreativeCategory-API.patch (renamed from patches/server/0878-Fix-CreativeCategory-API.patch)0
344 files changed, 443 insertions, 542 deletions
diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch
index 9ca9d1a8d1..20d71f4452 100644
--- a/patches/server/0003-Build-system-changes.patch
+++ b/patches/server/0003-Build-system-changes.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Build system changes
diff --git a/build.gradle.kts b/build.gradle.kts
-index be24f2f1c72ffcb033fe99bd9197af2c0bed4e69..c1f97f5bb806e3c92a2b4633142d3214e11f7074 100644
+index bc894c62618437215e1a7185dc20283e4f9963dd..f08a6a00ad4d4c96166b386b3e79dc1ea021db3a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,10 +13,9 @@ repositories {
@@ -39,7 +39,7 @@ index be24f2f1c72ffcb033fe99bd9197af2c0bed4e69..c1f97f5bb806e3c92a2b4633142d3214
for (tld in setOf("net", "com", "org")) {
attributes("$tld/bukkit", "Sealed" to true)
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 3067833570c62e4d135b11b8637b52b8167ab269..b698d6a8d6b59eefd721639b62bfd8bcffcf5c6f 100644
+index e1963817af4d73c569da068b74ebbb260c5183cc..d20bb61700ba231cc5b58295f2a819ff7e7db705 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -190,7 +190,7 @@ public class Main {
@@ -50,7 +50,7 @@ index 3067833570c62e4d135b11b8637b52b8167ab269..b698d6a8d6b59eefd721639b62bfd8bc
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance();
- deadline.add(Calendar.DAY_OF_YEAR, -3);
+ deadline.add(Calendar.DAY_OF_YEAR, -21);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
diff --git a/patches/server/0004-Paper-config-files.patch b/patches/server/0004-Paper-config-files.patch
index fba78da456..43bda55966 100644
--- a/patches/server/0004-Paper-config-files.patch
+++ b/patches/server/0004-Paper-config-files.patch
@@ -629,10 +629,10 @@ index 9e4cca119722c2edc478fdd1a34af4370649aa5c..b49528d8a2c577def4f74ee694ffd53b
Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 9d38f78ba0db10578cfbcce29059e108272d0034..89522ebf7b11801cf8b9893a1bae50a1ee88ff79 100644
+index 6016216921232bedba84acc1f6a87a3cfbb75850..ef128de5fe17231b39edb12a7014291d03cf79ec 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -603,6 +603,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -601,6 +601,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
this.forceDifficulty();
for (ServerLevel worldserver : this.getAllLevels()) {
diff --git a/patches/server/0005-MC-Dev-fixes.patch b/patches/server/0005-MC-Dev-fixes.patch
index 840be8059c..bb35e30256 100644
--- a/patches/server/0005-MC-Dev-fixes.patch
+++ b/patches/server/0005-MC-Dev-fixes.patch
@@ -183,10 +183,10 @@ index 2a6969baca7c07c52223672de58886dd05c032eb..a620e53021e02da1663b8d8b68d429b2
public void write(FriendlyByteBuf buf) {
buf.writeInt(this.playerId);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 89522ebf7b11801cf8b9893a1bae50a1ee88ff79..a47303382db64d8121c6252d70739d597cfd6231 100644
+index ef128de5fe17231b39edb12a7014291d03cf79ec..868f6799a0e406401eecf18bc939fbdf88f534a2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1774,7 +1774,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1770,7 +1770,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
PackRepository resourcepackrepository = this.packRepository;
Objects.requireNonNull(this.packRepository);
diff --git a/patches/server/0007-MC-Utils.patch b/patches/server/0007-MC-Utils.patch
index 99030fa8f0..d7c02e6e48 100644
--- a/patches/server/0007-MC-Utils.patch
+++ b/patches/server/0007-MC-Utils.patch
@@ -5001,18 +5001,18 @@ index 0000000000000000000000000000000000000000..9f292deee1b793d52b5774304318e940
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index a47303382db64d8121c6252d70739d597cfd6231..9db23400a5538200ae26ef620da7bafb7fe75c37 100644
+index 868f6799a0e406401eecf18bc939fbdf88f534a2..dd8d14a1b128f801a4e1c811de5990d2602feeb2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -296,6 +296,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -294,6 +294,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ private static final int SAMPLE_INTERVAL = 100;
public final double[] recentTps = new double[ 3 ];
- public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
+ public static long currentTickLong = 0L; // Paper
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
-@@ -963,6 +964,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -961,6 +962,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
}
// Spigot start
@@ -5022,7 +5022,7 @@ index a47303382db64d8121c6252d70739d597cfd6231..9db23400a5538200ae26ef620da7bafb
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json");
this.getProfileCache().save();
-@@ -1025,6 +1029,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1023,6 +1027,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.lastOverloadWarning = this.nextTickTime;
}
@@ -5030,7 +5030,7 @@ index a47303382db64d8121c6252d70739d597cfd6231..9db23400a5538200ae26ef620da7bafb
if ( tickCount++ % MinecraftServer.SAMPLE_INTERVAL == 0 )
{
double currentTps = 1E3 / ( curTime - tickSection ) * MinecraftServer.SAMPLE_INTERVAL;
-@@ -1267,7 +1272,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1264,7 +1269,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.debug("Autosave finished");
SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
}
@@ -5039,7 +5039,7 @@ index a47303382db64d8121c6252d70739d597cfd6231..9db23400a5538200ae26ef620da7bafb
this.profiler.push("tallying");
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
-@@ -1330,6 +1335,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1326,6 +1331,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
worldserver.timings.doTick.startTiming(); // Spigot
worldserver.tick(shouldKeepTicking);
@@ -5296,7 +5296,7 @@ index d1a053dbade32fde28784c79659d9b150c90ed93..2b936c67265f3c672d3b623e6aedd81e
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 27592093939d3ee3d0395527eead160ecec9330c..a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2 100644
+index aa9bde92a48ab151145c3b0a77aa8beb6ecc1b5e..d9202f7a5b17d8a5c063c8aba4ce22a53d8f59af 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -62,6 +62,7 @@ import net.minecraft.network.protocol.game.ClientboundSetChunkCacheCenterPacket;
@@ -5402,7 +5402,7 @@ index 27592093939d3ee3d0395527eead160ecec9330c..a5eb77f3d7cdbf656d11e97f4c27054b
}
this.updatingChunkMap.put(pos, holder);
-@@ -547,7 +615,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -535,7 +603,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (completablefuture1 != completablefuture) {
this.scheduleUnload(pos, holder);
} else {
@@ -5417,7 +5417,7 @@ index 27592093939d3ee3d0395527eead160ecec9330c..a5eb77f3d7cdbf656d11e97f4c27054b
if (ichunkaccess instanceof LevelChunk) {
((LevelChunk) ichunkaccess).setLoaded(false);
}
-@@ -563,7 +637,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -551,7 +625,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.lightEngine.tryScheduleUpdate();
this.progressListener.onStatusChange(ichunkaccess.getPos(), (ChunkStatus) null);
this.chunkSaveCooldowns.remove(ichunkaccess.getPos().toLong());
@@ -5429,7 +5429,7 @@ index 27592093939d3ee3d0395527eead160ecec9330c..a5eb77f3d7cdbf656d11e97f4c27054b
}
};
-@@ -1111,6 +1189,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1099,6 +1177,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (!flag1) {
this.distanceManager.addPlayer(SectionPos.of((Entity) player), player);
}
@@ -5437,7 +5437,7 @@ index 27592093939d3ee3d0395527eead160ecec9330c..a5eb77f3d7cdbf656d11e97f4c27054b
} else {
SectionPos sectionposition = player.getLastSectionPos();
-@@ -1118,6 +1197,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1106,6 +1185,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (!flag2) {
this.distanceManager.removePlayer(sectionposition, player);
}
@@ -5445,7 +5445,7 @@ index 27592093939d3ee3d0395527eead160ecec9330c..a5eb77f3d7cdbf656d11e97f4c27054b
}
for (int k = i - this.viewDistance - 1; k <= i + this.viewDistance + 1; ++k) {
-@@ -1230,6 +1310,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1218,6 +1298,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
}
@@ -5454,7 +5454,7 @@ index 27592093939d3ee3d0395527eead160ecec9330c..a5eb77f3d7cdbf656d11e97f4c27054b
}
@Override
-@@ -1433,7 +1515,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1421,7 +1503,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public class ChunkDistanceManager extends DistanceManager {
protected ChunkDistanceManager(Executor workerExecutor, Executor mainThreadExecutor) {
diff --git a/patches/server/0012-Timings-v2.patch b/patches/server/0012-Timings-v2.patch
index d1d307820f..bad5c80a79 100644
--- a/patches/server/0012-Timings-v2.patch
+++ b/patches/server/0012-Timings-v2.patch
@@ -676,7 +676,7 @@ index 0000000000000000000000000000000000000000..0fda52841b5e1643efeda92106124998
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
-index 64511d966043ca5a3c2b8588ef387ea37bf2de93..a0f55d6e1096af6f59e7e7ffdc27cdd29cbac9a6 100644
+index 131f67b5843af8feab16f14045cc496e40f9bc00..11e703e8e78fb49a5f53bdbc20d62422b573ae55 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,12 +14,15 @@ import java.util.concurrent.TimeUnit;
@@ -766,7 +766,7 @@ index 13421daa96b4ba302581f36abcd730952713d8cd..049e64c355d5f064009b1107ad15d28c
} catch (Exception exception) {
if (listener.shouldPropagateHandlingExceptions()) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d88b403dc 100644
+index dd8d14a1b128f801a4e1c811de5990d2602feeb2..f1c94ec44233ce0007a43922d1ca7ba5e71d68bd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -180,7 +180,7 @@ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
@@ -775,10 +775,10 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+import co.aikar.timings.MinecraftTimings; // Paper
- import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
-@@ -895,6 +895,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+
+@@ -893,6 +893,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
@@ -786,7 +786,7 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
-@@ -1137,9 +1138,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1135,9 +1136,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean haveTime() {
// CraftBukkit start
@@ -808,7 +808,7 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d
private void executeModerately() {
this.runAllTasks();
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
-@@ -1147,9 +1160,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1145,9 +1158,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit end
protected void waitUntilNextTick() {
@@ -820,13 +820,12 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d
});
}
-@@ -1235,10 +1248,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1233,9 +1246,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public void onServerExit() {}
public void tickServer(BooleanSupplier shouldKeepTicking) {
- SpigotTimings.serverTickTimer.startTiming(); // Spigot
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
- this.slackActivityAccountant.tickStarted(); // Spigot
long i = Util.getNanos();
+ // Paper start - move oversleep into full server tick
@@ -840,7 +839,7 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d
++this.tickCount;
this.tickChildren(shouldKeepTicking);
if (i - this.lastServerStatus >= 5000000000L) {
-@@ -1264,15 +1285,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1261,15 +1282,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit
@@ -861,10 +860,10 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d
this.profiler.push("tallying");
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
-@@ -1283,30 +1307,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1279,30 +1303,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ this.frameTimer.logFrameDuration(i1 - i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
- this.slackActivityAccountant.tickEnded(l); // Spigot
- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
- org.spigotmc.CustomTimingsHandler.tick(); // Spigot
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
@@ -900,7 +899,7 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d
// Send time updates to everyone, it will get the right time from the world the player is in.
if (this.tickCount % 20 == 0) {
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
-@@ -1314,7 +1337,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1310,7 +1333,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level.getGameTime(), entityplayer.getPlayerTime(), entityplayer.level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
}
}
@@ -909,7 +908,7 @@ index 9db23400a5538200ae26ef620da7bafb7fe75c37..3112f15993972c90d5bb797638a0186d
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
-@@ -1360,24 +1383,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1356,24 +1379,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
this.profiler.popPush("connection");
@@ -1035,7 +1034,7 @@ index ebd94265f56ecc946ff1834ec0d45673e010453e..1c0fefd539ef82d2d1b33a4974d67dc3
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0e748ae44 100644
+index d9202f7a5b17d8a5c063c8aba4ce22a53d8f59af..f9e9e00855627b78e8ff018bf6d52c9787fcffeb 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,8 +1,10 @@
@@ -1049,7 +1048,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
-@@ -693,11 +695,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -681,11 +683,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> scheduleChunkLoad(ChunkPos pos) {
return CompletableFuture.supplyAsync(() -> {
@@ -1067,7 +1066,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0
boolean flag = nbttagcompound.contains("Status", 8);
if (flag) {
-@@ -708,7 +713,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -696,7 +701,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
ChunkMap.LOGGER.error("Chunk file at {} is missing level data, skipping", pos);
@@ -1076,7 +1075,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0
} catch (ReportedException reportedexception) {
Throwable throwable = reportedexception.getCause();
-@@ -825,6 +830,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -813,6 +818,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkStatus chunkstatus = ChunkHolder.getStatus(chunkHolder.getTicketLevel());
return !chunkstatus.isOrAfter(ChunkStatus.FULL) ? ChunkHolder.UNLOADED_CHUNK : either.mapLeft((ichunkaccess) -> {
@@ -1084,7 +1083,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0
ChunkPos chunkcoordintpair = chunkHolder.getPos();
ProtoChunk protochunk = (ProtoChunk) ichunkaccess;
LevelChunk chunk;
-@@ -849,6 +855,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -837,6 +843,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
return chunk;
@@ -1092,7 +1091,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0
});
}, (runnable) -> {
ProcessorHandle mailbox = this.mainThreadMailbox;
-@@ -1396,6 +1403,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1384,6 +1391,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
@@ -1100,7 +1099,7 @@ index a5eb77f3d7cdbf656d11e97f4c27054b1d38b5d2..9aaf392876119cfda46f3e80d02020d0
ChunkMap.TrackedEntity playerchunkmap_entitytracker;
-@@ -1420,14 +1428,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1408,14 +1416,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker.serverEntity.sendChanges();
}
}
diff --git a/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch
index 760b6c69a1..b49d06b344 100644
--- a/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch
+++ b/patches/server/0020-Drop-falling-block-and-tnt-entities-at-the-specified.patch
@@ -25,10 +25,10 @@ index 9b908c5c66dc454faa479430a908dda0745638c8..6dec1bb96d695f28aae6517e4d782491
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-index eb67ba3ce1ea68eb5db62f68bf48853fe5023f12..8e7479afd3579e6b732feca059c1e4df1160e450 100644
+index 690a2a97e10bf1003b49f7e4806aab0bca206d99..6dc1500866e634364ac258956b07a880ecbf6c76 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -130,6 +130,17 @@ public class FallingBlockEntity extends Entity {
+@@ -131,6 +131,17 @@ public class FallingBlockEntity extends Entity {
}
this.move(MoverType.SELF, this.getDeltaMovement());
diff --git a/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
index de4eb13e5c..144fd8d659 100644
--- a/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
+++ b/patches/server/0021-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
@@ -19,10 +19,10 @@ index f092497b6defd28c94393e483a9288d121158a1e..df44790b1c342d0a6ff794bea86319fa
if (outputStream != null) {
try {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 3112f15993972c90d5bb797638a0186d88b403dc..8bacbb2289a9e5203766d71be6ba0a31f48b626e 100644
+index f1c94ec44233ce0007a43922d1ca7ba5e71d68bd..eef07309b24e88820d35517dd868fff25f777262 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1460,7 +1460,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1456,7 +1456,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@@ -32,7 +32,7 @@ index 3112f15993972c90d5bb797638a0186d88b403dc..8bacbb2289a9e5203766d71be6ba0a31
public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ba53a17a8730344882502995245171190b2de5ee..ad70bb6419bdfa75ffc8ce4f42150097ef0ead0f 100644
+index d2c5221f7d0ed3cb04f160a9e77d9aba6ec206a4..bb304601b3795349dd45d94c53f082a3bcc17273 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -245,7 +245,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@@ -45,11 +45,11 @@ index ba53a17a8730344882502995245171190b2de5ee..ad70bb6419bdfa75ffc8ce4f42150097
private final String bukkitVersion = Versioning.getBukkitVersion();
private final Logger logger = Logger.getLogger("Minecraft");
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 7e5fc58f43836edab3696b9644264434c5a95a2f..1ea304aaf85ada7737f62248f7b8cd44c800505e 100644
+index 52b13926ac40d61162b9da818fe6dc2c32cbae06..cd96196c8744596b95fd2a87bbbb9765f27c8be4 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -216,12 +216,25 @@ public class Main {
- deadline.add(Calendar.DAY_OF_YEAR, -3);
+ deadline.add(Calendar.DAY_OF_YEAR, -21);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
diff --git a/patches/server/0025-Further-improve-server-tick-loop.patch b/patches/server/0025-Further-improve-server-tick-loop.patch
index ea92cfe634..7ec5e96468 100644
--- a/patches/server/0025-Further-improve-server-tick-loop.patch
+++ b/patches/server/0025-Further-improve-server-tick-loop.patch
@@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 8bacbb2289a9e5203766d71be6ba0a31f48b626e..18f03367174651b93682d5e5f4350d8c7e6e3b98 100644
+index eef07309b24e88820d35517dd868fff25f777262..e26818bd6fb2216ab9b363affe99e4b6c83cca6a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -283,7 +283,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -282,7 +282,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
public ConsoleReader reader;
@@ -24,16 +24,16 @@ index 8bacbb2289a9e5203766d71be6ba0a31f48b626e..18f03367174651b93682d5e5f4350d8c
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public Commands vanillaCommandDispatcher;
-@@ -292,7 +292,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -291,7 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
public static final int TPS = 20;
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
- private static final int SAMPLE_INTERVAL = 100;
+ private static final int SAMPLE_INTERVAL = 20; // Paper
public final double[] recentTps = new double[ 3 ];
- public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
-@@ -1005,6 +1005,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ public static long currentTickLong = 0L; // Paper
+@@ -1003,6 +1003,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@@ -91,7 +91,7 @@ index 8bacbb2289a9e5203766d71be6ba0a31f48b626e..18f03367174651b93682d5e5f4350d8c
// Spigot End
protected void runServer() {
-@@ -1017,26 +1068,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1015,26 +1066,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( recentTps, 20 );
@@ -133,7 +133,7 @@ index 8bacbb2289a9e5203766d71be6ba0a31f48b626e..18f03367174651b93682d5e5f4350d8c
tickSection = curTime;
}
// Spigot end
-@@ -1046,7 +1104,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1044,7 +1102,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}
diff --git a/patches/server/0027-Entity-Origin-API.patch b/patches/server/0027-Entity-Origin-API.patch
index affd5c5e38..8e66eaa1c1 100644
--- a/patches/server/0027-Entity-Origin-API.patch
+++ b/patches/server/0027-Entity-Origin-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 74571a05f8d69e068c615179782def0902b26a09..54416a9327ecb02627537306678122ae77da1239 100644
+index 0750cf27c1b2cac723d68d0e6c2204cbb5795571..0eb0229125fd027025b6b44dfceddf626fc05399 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2023,6 +2023,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2027,6 +2027,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
entity.valid = true; // CraftBukkit
@@ -94,10 +94,10 @@ index 8a4f4582a6bd69016a36d611f9c4ac2262f7f3ec..a4cd7088113b60fd10e79359e5749fd1
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-index de98cbe9e863a19f71783980417fb32646102c9e..16b029f08d5c9dfd3bc4ad304ab9d339ad20b232 100644
+index 6dc1500866e634364ac258956b07a880ecbf6c76..b8155fb12ab7bb83290502e8313cbfa773ac15a7 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -330,6 +330,14 @@ public class FallingBlockEntity extends Entity {
+@@ -331,6 +331,14 @@ public class FallingBlockEntity extends Entity {
this.blockState = Blocks.SAND.defaultBlockState();
}
diff --git a/patches/server/0034-Optimize-explosions.patch b/patches/server/0034-Optimize-explosions.patch
index 62c851563b..5d241f7a2b 100644
--- a/patches/server/0034-Optimize-explosions.patch
+++ b/patches/server/0034-Optimize-explosions.patch
@@ -25,10 +25,10 @@ index bc35bdd9cbd544ae2ab27ad042d7d1b3166db9a6..2b0a75dc2e292e655ca3300f64bc1211
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 18f03367174651b93682d5e5f4350d8c7e6e3b98..ac88d79685c5f988d02122bce38d5af41fe11445 100644
+index e26818bd6fb2216ab9b363affe99e4b6c83cca6a..400a59336300b189a1b86621b53817940f9a599e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1439,6 +1439,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1435,6 +1435,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profiler.pop();
this.profiler.pop();
diff --git a/patches/server/0056-Add-exception-reporting-event.patch b/patches/server/0056-Add-exception-reporting-event.patch
index 525aa3dc9d..deb9b2f20b 100644
--- a/patches/server/0056-Add-exception-reporting-event.patch
+++ b/patches/server/0056-Add-exception-reporting-event.patch
@@ -49,10 +49,10 @@ index 0000000000000000000000000000000000000000..f699ce18ca044f813e194ef2786b7ea8
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 9aaf392876119cfda46f3e80d02020d0e748ae44..a10848e6899853f447f101675e3a6aba9d3d43f3 100644
+index f9e9e00855627b78e8ff018bf6d52c9787fcffeb..fb8d50dc14e1d23001e184b425bc6ac2f8b0f37e 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -973,6 +973,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -961,6 +961,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return true;
} catch (Exception exception) {
ChunkMap.LOGGER.error("Failed to save chunk {},{}", new Object[]{chunkcoordintpair.x, chunkcoordintpair.z, exception});
diff --git a/patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch
index b9b524fca0..6cbf5d62c4 100644
--- a/patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch
+++ b/patches/server/0073-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
Saves on some object allocation and processing when no plugin listens to this
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index ac88d79685c5f988d02122bce38d5af41fe11445..ba2b8c886d6c4d68b669186724e8049531987979 100644
+index 400a59336300b189a1b86621b53817940f9a599e..16dbd40ab7394450fd97ced74954ae1554c79aa8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1400,6 +1400,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1396,6 +1396,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
diff --git a/patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch
index 5950957dd2..e1a15a5613 100644
--- a/patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch
+++ b/patches/server/0074-Entity-AddTo-RemoveFrom-World-Events.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 06c182e04e1e046d8e5623d5422a2732cbfec78b..0fa1a31c1595d504ac4d78ab4f5047dc8f1a063a 100644
+index 93c967efbcdbc44f3729d7a70e90847212daa647..317ae71b8b9318a8bfe243b7b316f84566b88bf9 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2033,6 +2033,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2037,6 +2037,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
}
// Paper end
@@ -16,7 +16,7 @@ index 06c182e04e1e046d8e5623d5422a2732cbfec78b..0fa1a31c1595d504ac4d78ab4f5047dc
}
public void onTrackingEnd(Entity entity) {
-@@ -2113,6 +2114,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2117,6 +2118,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
// CraftBukkit end
diff --git a/patches/server/0084-Configurable-Player-Collision.patch b/patches/server/0084-Configurable-Player-Collision.patch
index 0c2e3d317d..6f1dfb6005 100644
--- a/patches/server/0084-Configurable-Player-Collision.patch
+++ b/patches/server/0084-Configurable-Player-Collision.patch
@@ -32,7 +32,7 @@ index 8993d8809c109212ab278e15c09cebab9e89342f..005a3058c51a41a39f050b1817e2079b
buf.writeComponent(this.playerPrefix);
buf.writeComponent(this.playerSuffix);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index ba2b8c886d6c4d68b669186724e8049531987979..199401eb1a0722d84700681a0a5cba67953c6bec 100644
+index 16dbd40ab7394450fd97ced74954ae1554c79aa8..66ba45e0a3c4970df9f8b3a0b8b5cfdaf597e40c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -162,6 +162,7 @@ import net.minecraft.world.level.storage.loot.LootTables;
@@ -43,7 +43,7 @@ index ba2b8c886d6c4d68b669186724e8049531987979..199401eb1a0722d84700681a0a5cba67
import org.apache.commons.lang3.Validate;
import org.slf4j.Logger;
-@@ -610,6 +611,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -608,6 +609,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}
diff --git a/patches/server/0089-remove-null-possibility-for-getServer-singleton.patch b/patches/server/0089-remove-null-possibility-for-getServer-singleton.patch
index c0f8aa3bb4..5a2e76c50e 100644
--- a/patches/server/0089-remove-null-possibility-for-getServer-singleton.patch
+++ b/patches/server/0089-remove-null-possibility-for-getServer-singleton.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 199401eb1a0722d84700681a0a5cba67953c6bec..9fb842e86aa6302259a98e5352da5296dbd07054 100644
+index 66ba45e0a3c4970df9f8b3a0b8b5cfdaf597e40c..9e95cb40ce6839de2582e71576b73cdf8787a042 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -186,6 +186,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
+@@ -185,6 +185,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
@@ -17,7 +17,7 @@ index 199401eb1a0722d84700681a0a5cba67953c6bec..9fb842e86aa6302259a98e5352da5296
public static final Logger LOGGER = LogUtils.getLogger();
public static final String VANILLA_BRAND = "vanilla";
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
-@@ -321,6 +322,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -319,6 +320,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, DynamicOps<Tag> registryreadops, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, @Nullable MinecraftSessionService minecraftsessionservice, @Nullable GameProfileRepository gameprofilerepository, @Nullable GameProfileCache usercache, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server");
@@ -25,7 +25,7 @@ index 199401eb1a0722d84700681a0a5cba67953c6bec..9fb842e86aa6302259a98e5352da5296
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
this.profiler = this.metricsRecorder.getProfiler();
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
-@@ -2310,7 +2312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2306,7 +2308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Deprecated
public static MinecraftServer getServer() {
diff --git a/patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
index a79e71b55b..8a73474774 100644
--- a/patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
+++ b/patches/server/0090-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
@@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 0fa1a31c1595d504ac4d78ab4f5047dc8f1a063a..c0ec21a8110ed54489361cfae1e1112fe448150a 100644
+index 317ae71b8b9318a8bfe243b7b316f84566b88bf9..9769977c9db77aa52b99b793ca4f5d0c7b54528f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2053,6 +2053,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2057,6 +2057,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
{
if ( iter.next().player == entity )
{
@@ -25,7 +25,7 @@ index 0fa1a31c1595d504ac4d78ab4f5047dc8f1a063a..c0ec21a8110ed54489361cfae1e1112f
}
}
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 71610fa70cdaf3c5a54250a5814809013a6d228e..cf8b0c50bf44d28dcca6a759e5dc67c0a8d484c4 100644
+index 067513b240db88b818bd26d74c31fb5f8ee80f5d..df753a2d39332464f16207615175bc95d35f61e8 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -88,6 +88,7 @@ import net.minecraft.world.item.ElytraItem;
@@ -44,15 +44,15 @@ index 71610fa70cdaf3c5a54250a5814809013a6d228e..cf8b0c50bf44d28dcca6a759e5dc67c0
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam;
-@@ -740,6 +742,14 @@ public abstract class Player extends LivingEntity {
+@@ -750,6 +752,14 @@ public abstract class Player extends LivingEntity {
return null;
}
// CraftBukkit end
+ // Paper start - remove player from map on drop
-+ if (stack.getItem() == Items.FILLED_MAP) {
-+ MapItemSavedData worldmap = MapItem.getSavedData(stack, this.level);
++ if (itemstack.getItem() == Items.FILLED_MAP) {
++ MapItemSavedData worldmap = MapItem.getSavedData(itemstack, this.level);
+ if (worldmap != null) {
-+ worldmap.tickCarriedBy(this, stack);
++ worldmap.tickCarriedBy(this, itemstack);
+ }
+ }
+ // Paper end
diff --git a/patches/server/0094-Optimize-UserCache-Thread-Safe.patch b/patches/server/0094-Optimize-UserCache-Thread-Safe.patch
index fcfc1b35d7..18234d0ef9 100644
--- a/patches/server/0094-Optimize-UserCache-Thread-Safe.patch
+++ b/patches/server/0094-Optimize-UserCache-Thread-Safe.patch
@@ -12,10 +12,10 @@ the user never changed the default setting for Spigot's save on stop only.
1.17: TODO does this need the synchronized blocks anymore?
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 9fb842e86aa6302259a98e5352da5296dbd07054..d864cd5b511e36c9e0c0773324e7de4849595566 100644
+index 9e95cb40ce6839de2582e71576b73cdf8787a042..49c354fa65e0047a367f0a5410c79b8da8693df9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -987,7 +987,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -985,7 +985,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} catch (java.lang.InterruptedException ignored) {} // Paper
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json");
diff --git a/patches/server/0107-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch b/patches/server/0107-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch
index 0eb4dfb833..75871fada0 100644
--- a/patches/server/0107-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch
+++ b/patches/server/0107-Filter-bad-data-from-ArmorStand-and-SpawnEgg-items.patch
@@ -22,10 +22,10 @@ index d7734fbc6b684b14bc32c94e65947fb41aae126a..7320f07beffee60fe3c49016daf7a986
+ }
}
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-index 16b029f08d5c9dfd3bc4ad304ab9d339ad20b232..2723816204ee61ea3fda9279369df030b8d70a13 100644
+index b8155fb12ab7bb83290502e8313cbfa773ac15a7..f12eafb49c2536f91f4716188c931ad97264c113 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -309,6 +309,18 @@ public class FallingBlockEntity extends Entity {
+@@ -310,6 +310,18 @@ public class FallingBlockEntity extends Entity {
@Override
protected void readAdditionalSaveData(CompoundTag nbt) {
this.blockState = NbtUtils.readBlockState(nbt.getCompound("BlockState"));
diff --git a/patches/server/0129-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch b/patches/server/0129-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch
index a1b0e025ae..99a97de584 100644
--- a/patches/server/0129-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch
+++ b/patches/server/0129-Make-targetSize-more-aggressive-in-the-chunk-unload-.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index a10848e6899853f447f101675e3a6aba9d3d43f3..50b2dc91f4926ebc4511e44e3aa3062eadc40ea0 100644
+index fb8d50dc14e1d23001e184b425bc6ac2f8b0f37e..f5cf71258732aa040443eb82e09ab28f130e4c79 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -226,8 +226,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -18,21 +18,20 @@ index a10848e6899853f447f101675e3a6aba9d3d43f3..50b2dc91f4926ebc4511e44e3aa3062e
Path path = session.getDimensionPath(world.dimension());
this.storageName = path.getFileName().toString();
-@@ -569,7 +569,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- // Spigot start
- org.spigotmc.SlackActivityAccountant activityAccountant = this.level.getServer().slackActivityAccountant;
- activityAccountant.startActivity(0.5);
-- int targetSize = (int) (this.toDrop.size() * ChunkMap.UNLOAD_QUEUE_RESIZE_FACTOR);
-+ int targetSize = Math.min(this.toDrop.size() - 100, (int) (this.toDrop.size() * ChunkMap.UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive
- // Spigot end
- while (longiterator.hasNext()) { // Spigot
+@@ -564,7 +564,6 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+
+ private void processUnloads(BooleanSupplier shouldKeepTicking) {
+ LongIterator longiterator = this.toDrop.iterator();
+-
+ for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) {
long j = longiterator.nextLong();
-@@ -589,7 +589,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+ ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
+@@ -577,7 +576,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+ }
}
- activityAccountant.endActivity(); // Spigot
- int k = Math.max(0, this.unloadQueue.size() - 2000);
-+ int k = Math.max(0, Math.min(100, this.unloadQueue.size() - (int) (this.unloadQueue.size() * UNLOAD_QUEUE_RESIZE_FACTOR))); // Paper - Target this queue as well
++ int k = Math.max(100, this.unloadQueue.size() - 2000); // Paper - Unload more than just up to queue size 2000
Runnable runnable;
diff --git a/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch b/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch
index 933e7082a4..e180c31457 100644
--- a/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch
+++ b/patches/server/0130-Properly-handle-async-calls-to-restart-the-server.patch
@@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index d864cd5b511e36c9e0c0773324e7de4849595566..f17cee5678f912e7118e12c8e0ff907ed49e3acf 100644
+index 49c354fa65e0047a367f0a5410c79b8da8693df9..aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -230,6 +230,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -229,6 +229,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final Map<ResourceKey<Level>, ServerLevel> levels;
private PlayerList playerList;
private volatile boolean running;
@@ -41,7 +41,7 @@ index d864cd5b511e36c9e0c0773324e7de4849595566..f17cee5678f912e7118e12c8e0ff907e
private boolean stopped;
private int tickCount;
protected final Proxy proxy;
-@@ -926,7 +927,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -924,7 +925,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players");
this.playerList.saveAll();
@@ -50,7 +50,7 @@ index d864cd5b511e36c9e0c0773324e7de4849595566..f17cee5678f912e7118e12c8e0ff907e
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
-@@ -1006,6 +1007,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1004,6 +1005,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void halt(boolean flag) {
diff --git a/patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch
index b83942e31a..a04e5151aa 100644
--- a/patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch
+++ b/patches/server/0133-Use-TerminalConsoleAppender-for-console-improvements.patch
@@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index f17cee5678f912e7118e12c8e0ff907ed49e3acf..7adbe2f133e74d566b31098d5c805f5000ee3310 100644
+index aa02ab4ea7890d9a477be55ce6c0be0a2a0d4b52..f846d9163ca97901ac1508ef8a476dabbf6dc454 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -169,7 +169,7 @@ import org.slf4j.Logger;
@@ -124,7 +124,7 @@ index f17cee5678f912e7118e12c8e0ff907ed49e3acf..7adbe2f133e74d566b31098d5c805f50
import joptsimple.OptionSet;
import net.minecraft.server.bossevents.CustomBossEvents;
import net.minecraft.server.dedicated.DedicatedServer;
-@@ -285,7 +285,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public OptionSet options;
public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
@@ -133,7 +133,7 @@ index f17cee5678f912e7118e12c8e0ff907ed49e3acf..7adbe2f133e74d566b31098d5c805f50
public static int currentTick = 0; // Paper - Further improve tick loop
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
-@@ -369,7 +369,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -367,7 +367,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.datapackconfiguration = datapackconfiguration;
this.registryreadops = registryreadops;
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
@@ -143,7 +143,7 @@ index f17cee5678f912e7118e12c8e0ff907ed49e3acf..7adbe2f133e74d566b31098d5c805f50
if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false;
-@@ -390,6 +392,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -388,6 +390,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.warn((String) null, ex);
}
}
@@ -152,7 +152,7 @@ index f17cee5678f912e7118e12c8e0ff907ed49e3acf..7adbe2f133e74d566b31098d5c805f50
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
}
// CraftBukkit end
-@@ -1183,7 +1187,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1181,7 +1185,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings
try {
@@ -161,7 +161,7 @@ index f17cee5678f912e7118e12c8e0ff907ed49e3acf..7adbe2f133e74d566b31098d5c805f50
} catch (Exception ignored) {
}
// CraftBukkit end
-@@ -1599,7 +1603,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1595,7 +1599,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void sendMessage(Component message, UUID sender) {
diff --git a/patches/server/0135-Item-canEntityPickup.patch b/patches/server/0135-Item-canEntityPickup.patch
index 8256bd986b..9ef2b98277 100644
--- a/patches/server/0135-Item-canEntityPickup.patch
+++ b/patches/server/0135-Item-canEntityPickup.patch
@@ -33,11 +33,11 @@ index 1f9e1a7284a02ba7486cf9d1b1498a7799b8d3da..e5c97ffc4ceafcda2939d28fdc7cd729
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
super(type, world);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
-index b9044654d22a47cfa952dcf25754ad0d87fc0844..0d262c99c7e9ef06e297612b1802c493700f64ae 100644
+index 4ca76a7530f8679567d887cdf1491d110e7465ec..30c954efba587d69ff55df509339f03e7d5a476e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
-@@ -49,6 +49,18 @@ public class CraftItem extends CraftEntity implements Item {
- item.age = value;
+@@ -66,6 +66,18 @@ public class CraftItem extends CraftEntity implements Item {
+ }
}
+ // Paper Start
diff --git a/patches/server/0140-Shoulder-Entities-Release-API.patch b/patches/server/0140-Shoulder-Entities-Release-API.patch
index 146b442789..fbdd1baa23 100644
--- a/patches/server/0140-Shoulder-Entities-Release-API.patch
+++ b/patches/server/0140-Shoulder-Entities-Release-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
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 b15fd75ccbe54ea9169593e02631d2952b0d239a..ca9731d4d963f2615721e3e1f7e1a5e13c94cf52 100644
+index fe715c81ea755f83fae0020e66f5e61304c51867..7fc4cd29bd487955886c81e6997d832a3185ec8e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1961,20 +1961,44 @@ public abstract class Player extends LivingEntity {
+@@ -1971,20 +1971,44 @@ public abstract class Player extends LivingEntity {
}
diff --git a/patches/server/0148-Fix-this-stupid-bullshit.patch b/patches/server/0148-Fix-this-stupid-bullshit.patch
index 0e67ea0838..e76bb5784f 100644
--- a/patches/server/0148-Fix-this-stupid-bullshit.patch
+++ b/patches/server/0148-Fix-this-stupid-bullshit.patch
@@ -31,12 +31,12 @@ index 9f23951f6b4c17c2a968fdcb3e8f9f65c296f34a..248b7ca7dbd75d4eab52fb937cace2b2
Bootstrap.isBootstrapped = true;
if (Registry.REGISTRY.keySet().isEmpty()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 1e49bff6e1ccd7cf8405785c73f56caada94e399..08f4ba483a6c61365310de6561b314e428a6b978 100644
+index a168fd9daeca1bc5f390558eebaa3ee1a264f3ca..2695f047a2e3c7acb67487c2b547cfbd6d50c29c 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -234,10 +234,12 @@ public class Main {
Calendar deadline = Calendar.getInstance();
- deadline.add(Calendar.DAY_OF_YEAR, -3);
+ deadline.add(Calendar.DAY_OF_YEAR, -21);
if (buildDate.before(deadline.getTime())) {
- System.err.println("*** Error, this build is outdated ***");
+ // Paper start - This is some stupid bullshit
diff --git a/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch
index 2034d8b6c7..ed1bc704af 100644
--- a/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch
+++ b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
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 ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d62b05265 100644
+index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac826f9e2e 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -31,6 +31,7 @@ import net.minecraft.network.chat.MutableComponent;
@@ -17,7 +17,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData;
-@@ -1191,7 +1192,7 @@ public abstract class Player extends LivingEntity {
+@@ -1201,7 +1202,7 @@ public abstract class Player extends LivingEntity {
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
if (this.isSprinting() && flag) {
@@ -26,7 +26,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d
++i;
flag1 = true;
}
-@@ -1266,7 +1267,7 @@ public abstract class Player extends LivingEntity {
+@@ -1276,7 +1277,7 @@ public abstract class Player extends LivingEntity {
}
}
@@ -35,7 +35,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d
this.sweepAttack();
}
-@@ -1294,15 +1295,15 @@ public abstract class Player extends LivingEntity {
+@@ -1304,15 +1305,15 @@ public abstract class Player extends LivingEntity {
}
if (flag2) {
@@ -54,7 +54,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d
}
}
-@@ -1354,7 +1355,7 @@ public abstract class Player extends LivingEntity {
+@@ -1364,7 +1365,7 @@ public abstract class Player extends LivingEntity {
this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
} else {
@@ -63,7 +63,7 @@ index ca9731d4d963f2615721e3e1f7e1a5e13c94cf52..653dbaafb9247653a6d8f549b57f0a5d
if (flag4) {
target.clearFire();
}
-@@ -1801,6 +1802,14 @@ public abstract class Player extends LivingEntity {
+@@ -1811,6 +1812,14 @@ public abstract class Player extends LivingEntity {
public int getXpNeededForNextLevel() {
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
}
diff --git a/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch
index 6805a47f52..7e608ec44f 100644
--- a/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch
+++ b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch
@@ -51,10 +51,10 @@ index 32a2fbf4a11a84d5a55e02d3ba21e6f4430379c0..a69bbc11b9e003aed1630a6f5cdbca52
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index f967388fa64aa9d4b2a390c86a2c98ac0fdd4523..7ce727c168a4c0fe6d7cd0bbaa8a4121adc96a90 100644
+index 52fc42050d5df0882586c8f4bb4890ef1dbf979e..ba8f9ffed49bf377be8b37532d4f2bdcb8c44d82 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -322,6 +322,13 @@ public class CraftBlock implements Block {
+@@ -329,6 +329,13 @@ public class CraftBlock implements Block {
return CraftBlockStates.getBlockState(this);
}
diff --git a/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch
index 3fb8ab5bf8..d960b570a4 100644
--- a/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch
+++ b/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch
@@ -9,10 +9,10 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 50b2dc91f4926ebc4511e44e3aa3062eadc40ea0..610a1ce766d826f3fdca595dd4135f96ef9280d8 100644
+index f5cf71258732aa040443eb82e09ab28f130e4c79..81eb73e9fde37e3b196bd899ecd4d614897d1a98 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1127,7 +1127,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1114,7 +1114,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
@@ -23,7 +23,7 @@ index 50b2dc91f4926ebc4511e44e3aa3062eadc40ea0..610a1ce766d826f3fdca595dd4135f96
// Spigot end
long i = chunkcoordintpair.toLong();
-@@ -1144,6 +1146,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1131,6 +1133,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
entityplayer = (ServerPlayer) iterator.next();
diff --git a/patches/server/0173-Add-ArmorStand-Item-Meta.patch b/patches/server/0173-Add-ArmorStand-Item-Meta.patch
index e468d79145..4c74f73a6f 100644
--- a/patches/server/0173-Add-ArmorStand-Item-Meta.patch
+++ b/patches/server/0173-Add-ArmorStand-Item-Meta.patch
@@ -13,7 +13,7 @@ starting point for future additions in this area.
Fixes GH-559
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
-index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241c17e103d 100644
+index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af880d679b1f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
@@ -9,9 +9,22 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -54,11 +54,10 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241
this.entityTag = armorStand.entityTag;
}
-@@ -30,11 +50,40 @@ public class CraftMetaArmorStand extends CraftMetaItem {
+@@ -30,11 +50,39 @@ public class CraftMetaArmorStand extends CraftMetaItem {
if (tag.contains(ENTITY_TAG.NBT)) {
- this.entityTag = tag.getCompound(ENTITY_TAG.NBT);
-+
+ this.entityTag = tag.getCompound(ENTITY_TAG.NBT).copy();
+ // Paper start
+ if (entityTag.contains(INVISIBLE.NBT)) {
+ invisible = entityTag.getBoolean(INVISIBLE.NBT);
@@ -95,7 +94,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241
}
@Override
-@@ -57,6 +106,31 @@ public class CraftMetaArmorStand extends CraftMetaItem {
+@@ -57,6 +105,31 @@ public class CraftMetaArmorStand extends CraftMetaItem {
void applyToItem(CompoundTag tag) {
super.applyToItem(tag);
@@ -127,7 +126,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241
if (this.entityTag != null) {
tag.put(ENTITY_TAG.NBT, entityTag);
}
-@@ -78,7 +152,7 @@ public class CraftMetaArmorStand extends CraftMetaItem {
+@@ -78,7 +151,7 @@ public class CraftMetaArmorStand extends CraftMetaItem {
}
boolean isArmorStandEmpty() {
@@ -136,7 +135,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241
}
@Override
-@@ -89,7 +163,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
+@@ -89,7 +162,13 @@ public class CraftMetaArmorStand extends CraftMetaItem {
if (meta instanceof CraftMetaArmorStand) {
CraftMetaArmorStand that = (CraftMetaArmorStand) meta;
@@ -151,7 +150,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241
}
return true;
}
-@@ -104,9 +184,14 @@ public class CraftMetaArmorStand extends CraftMetaItem {
+@@ -104,9 +183,14 @@ public class CraftMetaArmorStand extends CraftMetaItem {
final int original;
int hash = original = super.applyHash();
@@ -169,7 +168,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241
return original != hash ? CraftMetaArmorStand.class.hashCode() ^ hash : hash;
}
-@@ -115,6 +200,28 @@ public class CraftMetaArmorStand extends CraftMetaItem {
+@@ -115,6 +199,28 @@ public class CraftMetaArmorStand extends CraftMetaItem {
Builder<String, Object> serialize(Builder<String, Object> builder) {
super.serialize(builder);
@@ -198,7 +197,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241
return builder;
}
-@@ -128,4 +235,56 @@ public class CraftMetaArmorStand extends CraftMetaItem {
+@@ -128,4 +234,56 @@ public class CraftMetaArmorStand extends CraftMetaItem {
return clone;
}
@@ -256,7 +255,7 @@ index aee796567f11c8b93ac9ec0b8cb8f3a8412b23ce..39b98305632271e7375afe6c7001f241
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index 51d37a8963a2f8f5381bf802e28e5dfcdcc27eaa..2244a3c61f4effd365ed5fc010ecd1a4858b53a8 100644
+index 3f34d3989df1fedf625dc2bd767794067d8a0c06..ba8a8865e72faa826cb5abff3c428b5a2634bb27 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -1445,6 +1445,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
diff --git a/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch
index e0f1b8355f..a541c92642 100644
--- a/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch
+++ b/patches/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch
@@ -21,10 +21,10 @@ index 2c92d3d924fa132937576c24da26e2a8f72f601e..207bef30c34e368066f4058dd28dd12f
private void allChunksAreSlimeChunks() {
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
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 653dbaafb9247653a6d8f549b57f0a5d62b05265..8978f3b53ce478d8aa078ac7a16784985f4a2744 100644
+index de71d57b86d681efe0916dbee53be3ac826f9e2e..66b474304f659efcc7bd1181e3eaee70657013eb 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1199,6 +1199,7 @@ public abstract class Player extends LivingEntity {
+@@ -1209,6 +1209,7 @@ public abstract class Player extends LivingEntity {
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;
diff --git a/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch
index 5011f668c0..a0fdb8ec3d 100644
--- a/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch
+++ b/patches/server/0178-Implement-extended-PaperServerListPingEvent.patch
@@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4
public ClientboundStatusResponsePacket(ServerStatus metadata) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 7adbe2f133e74d566b31098d5c805f5000ee3310..61edb76381a83f36d0ade1c35e9999eaad58abd2 100644
+index f846d9163ca97901ac1508ef8a476dabbf6dc454..4da9491425649b2b930b2304c4aa6692540ff4cb 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2,6 +2,9 @@ package net.minecraft.server;
@@ -203,7 +203,7 @@ index 7adbe2f133e74d566b31098d5c805f5000ee3310..61edb76381a83f36d0ade1c35e9999ea
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
-@@ -1353,7 +1356,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1350,7 +1353,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.lastServerStatus = i;
this.status.setPlayers(new ServerStatus.Players(this.getMaxPlayers(), this.getPlayerCount()));
if (!this.hidesOnlinePlayers()) {
diff --git a/patches/server/0188-Configurable-sprint-interruption-on-attack.patch b/patches/server/0188-Configurable-sprint-interruption-on-attack.patch
index 8a66457998..27f3182bec 100644
--- a/patches/server/0188-Configurable-sprint-interruption-on-attack.patch
+++ b/patches/server/0188-Configurable-sprint-interruption-on-attack.patch
@@ -20,10 +20,10 @@ index 207bef30c34e368066f4058dd28dd12fdbac5d34..ef9f6712046a22a8d0dfcf95d8e2d124
+ }
}
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 8978f3b53ce478d8aa078ac7a16784985f4a2744..f1ee710de043ad8b71c8c385a24ab4b7167f45a3 100644
+index 66b474304f659efcc7bd1181e3eaee70657013eb..7b81d77649997aeb97cd819f380bdfe848702164 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1248,7 +1248,11 @@ public abstract class Player extends LivingEntity {
+@@ -1258,7 +1258,11 @@ public abstract class Player extends LivingEntity {
}
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
diff --git a/patches/server/0193-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0193-Expand-World.spawnParticle-API-and-add-Builder.patch
index e3f03cae84..54e79a491b 100644
--- a/patches/server/0193-Expand-World.spawnParticle-API-and-add-Builder.patch
+++ b/patches/server/0193-Expand-World.spawnParticle-API-and-add-Builder.patch
@@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index c0ec21a8110ed54489361cfae1e1112fe448150a..7c64fbdaa8724fafd0bba6fcab581760ec0e0b0d 100644
+index 9769977c9db77aa52b99b793ca4f5d0c7b54528f..d8b0f6ae1604a158ef1be02701c8c605192e7fe1 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1386,12 +1386,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1390,12 +1390,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {
diff --git a/patches/server/0208-PlayerReadyArrowEvent.patch b/patches/server/0208-PlayerReadyArrowEvent.patch
index 2d3e016e1a..164b5f9475 100644
--- a/patches/server/0208-PlayerReadyArrowEvent.patch
+++ b/patches/server/0208-PlayerReadyArrowEvent.patch
@@ -7,10 +7,10 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
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 f1ee710de043ad8b71c8c385a24ab4b7167f45a3..f0da841cf8e37884c40397bb4032eab35e9eec4f 100644
+index 7b81d77649997aeb97cd819f380bdfe848702164..61fb16c1a2a70d96b3d20708321d1984f7592494 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -2194,6 +2194,17 @@ public abstract class Player extends LivingEntity {
+@@ -2204,6 +2204,17 @@ public abstract class Player extends LivingEntity {
return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING);
}
@@ -28,7 +28,7 @@ index f1ee710de043ad8b71c8c385a24ab4b7167f45a3..f0da841cf8e37884c40397bb4032eab3
@Override
public ItemStack getProjectile(ItemStack stack) {
if (!(stack.getItem() instanceof ProjectileWeaponItem)) {
-@@ -2210,7 +2221,7 @@ public abstract class Player extends LivingEntity {
+@@ -2220,7 +2231,7 @@ public abstract class Player extends LivingEntity {
for (int i = 0; i < this.inventory.getContainerSize(); ++i) {
ItemStack itemstack2 = this.inventory.getItem(i);
diff --git a/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch b/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch
index fb2d62ff7e..e75691b680 100644
--- a/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch
+++ b/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch
@@ -82,10 +82,10 @@ index f6fd39823f04f8071c616d40a838b01e7159c5a1..e1cdf3ce38404d3f40be59e4cd3ad2b9
serverLevel.playSound((Player)null, pathfinderMob, this.getImpactSound.apply(pathfinderMob), SoundSource.HOSTILE, 1.0F, 1.0F);
} else {
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 f0da841cf8e37884c40397bb4032eab35e9eec4f..c522ecc74d2b204986716bccfa555cb54e8bd062 100644
+index 61fb16c1a2a70d96b3d20708321d1984f7592494..1a264c6f18235580bd1fba4e5243554b56503253 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1242,7 +1242,7 @@ public abstract class Player extends LivingEntity {
+@@ -1252,7 +1252,7 @@ public abstract class Player extends LivingEntity {
if (flag5) {
if (i > 0) {
if (target instanceof LivingEntity) {
@@ -94,7 +94,7 @@ index f0da841cf8e37884c40397bb4032eab35e9eec4f..c522ecc74d2b204986716bccfa555cb5
} else {
target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F));
}
-@@ -1266,7 +1266,7 @@ public abstract class Player extends LivingEntity {
+@@ -1276,7 +1276,7 @@ public abstract class Player extends LivingEntity {
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
// CraftBukkit start - Only apply knockback if the damage hits
if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) {
diff --git a/patches/server/0215-InventoryCloseEvent-Reason-API.patch b/patches/server/0215-InventoryCloseEvent-Reason-API.patch
index 33bcecc69c..5e84e2fd40 100644
--- a/patches/server/0215-InventoryCloseEvent-Reason-API.patch
+++ b/patches/server/0215-InventoryCloseEvent-Reason-API.patch
@@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 7c64fbdaa8724fafd0bba6fcab581760ec0e0b0d..d4a09cbaac906c766c55577551e539c9840d8d03 100644
+index d8b0f6ae1604a158ef1be02701c8c605192e7fe1..4d69b6b35f04c904ee9ca9c896baaa9892f8ef9c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1133,7 +1133,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1137,7 +1137,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
if (tileentity instanceof net.minecraft.world.Container) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
@@ -19,7 +19,7 @@ index 7c64fbdaa8724fafd0bba6fcab581760ec0e0b0d..d4a09cbaac906c766c55577551e539c9
}
}
}
-@@ -2070,7 +2070,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2074,7 +2074,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {
@@ -118,7 +118,7 @@ index a1ca0c0c08f6793ce3440733f802a40f99890d85..b2034239e158ce0388c9b09a52d45727
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName())));
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 c522ecc74d2b204986716bccfa555cb54e8bd062..2dcbeaed2e84675e95cde9e831b9d552b2e0b32f 100644
+index 1a264c6f18235580bd1fba4e5243554b56503253..64a887de47b26d2dfa27b0ed3c4d8c0e00db163b 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -263,7 +263,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
index 156e358d93..58f70dd2ea 100644
--- a/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
+++ b/patches/server/0238-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
@@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information
1.17: Needs to be reworked for new entity storage system
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 610a1ce766d826f3fdca595dd4135f96ef9280d8..b64f42b9ca1da5b6d5c290c157e510797e524117 100644
+index 81eb73e9fde37e3b196bd899ecd4d614897d1a98..4206e1c96cdc7b7e324331681215f735688dd558 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1366,6 +1366,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1353,6 +1353,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} else {
ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas());
@@ -19,7 +19,7 @@ index 610a1ce766d826f3fdca595dd4135f96ef9280d8..b64f42b9ca1da5b6d5c290c157e51079
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
playerchunkmap_entitytracker.updatePlayers(this.level.players());
if (entity instanceof ServerPlayer) {
-@@ -1408,7 +1409,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1395,7 +1396,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (playerchunkmap_entitytracker1 != null) {
playerchunkmap_entitytracker1.broadcastRemoved();
}
@@ -29,7 +29,7 @@ index 610a1ce766d826f3fdca595dd4135f96ef9280d8..b64f42b9ca1da5b6d5c290c157e51079
protected void tick() {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index d4a09cbaac906c766c55577551e539c9840d8d03..abff89e99d9f62a82c65a397016ab956f9ef42aa 100644
+index 4d69b6b35f04c904ee9ca9c896baaa9892f8ef9c..5f58aa648a5f0c3e61f6d9d5853583ca003e3620 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -209,6 +209,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -42,7 +42,7 @@ index d4a09cbaac906c766c55577551e539c9840d8d03..abff89e99d9f62a82c65a397016ab956
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
return this.chunkSource.getChunk(x, z, false);
-@@ -1096,7 +1099,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1099,7 +1102,28 @@ public class ServerLevel extends Level implements WorldGenLevel {
// CraftBukkit start
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
diff --git a/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch
index 7a3c2108b2..cd76b55687 100644
--- a/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch
+++ b/patches/server/0239-Add-Early-Warning-Feature-to-WatchDog.patch
@@ -36,10 +36,10 @@ index d654affc5565622cfabde9b838aa2b40e4e122bb..23ddaffadfafc3b23a09fcba2bf708f5
public static int tabSpamLimit = 500;
private static void tabSpamLimiters() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 61edb76381a83f36d0ade1c35e9999eaad58abd2..432f1d6e5989f861e762a8b919a0048b58e77ce7 100644
+index 4da9491425649b2b930b2304c4aa6692540ff4cb..d6e6bc73f9bbcae99126876a9abdd3468d6c2a7f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1098,6 +1098,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1096,6 +1096,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.updateStatusIcon(this.status);
// Spigot start
diff --git a/patches/server/0253-Asynchronous-chunk-IO-and-loading.patch b/patches/server/0253-Asynchronous-chunk-IO-and-loading.patch
index d1864752c5..0ac5e6d6c0 100644
--- a/patches/server/0253-Asynchronous-chunk-IO-and-loading.patch
+++ b/patches/server/0253-Asynchronous-chunk-IO-and-loading.patch
@@ -2318,10 +2318,10 @@ index 8f5784ed4df46f3c7d4c6b4ff76ad839d436be1f..6a006f22d33491be4413fb64649ba9f6
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, config.get(), ops.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), minecraftsessionservice, gameprofilerepository, usercache, LoggerChunkProgressListener::new);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 432f1d6e5989f861e762a8b919a0048b58e77ce7..f347842c224ee565d45f5120b2e3a359a9cade65 100644
+index d6e6bc73f9bbcae99126876a9abdd3468d6c2a7f..785df5ec8a5a4e307149edd5ccf7db75f7edb1fc 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -998,7 +998,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -996,7 +996,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getProfileCache().save(false); // Paper
}
// Spigot end
@@ -2344,7 +2344,7 @@ index 2b936c67265f3c672d3b623e6aedd81eff0e4358..d930162608e1b765ef222eb0fe61d010
ChunkHolder.FullChunkStatus playerchunk_state1 = ChunkHolder.getFullChunkStatus(this.ticketLevel);
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895a50e8083 100644
+index 4206e1c96cdc7b7e324331681215f735688dd558..04b287c91acef5b9f0b73edb71fbefbb1f08eee6 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -502,6 +502,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -2381,31 +2381,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895
}
gameprofilerfiller.pop();
-@@ -562,7 +568,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || !this.updatingChunkMap.isEmpty() || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.queueSorter.hasWork() || this.distanceManager.hasTickets();
- }
-
-- private static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.96; // Spigot
-+ private static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.90; // Spigot // Paper - unload more
-
- private void processUnloads(BooleanSupplier shouldKeepTicking) {
- LongIterator longiterator = this.toDrop.iterator();
-@@ -579,12 +585,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- if (playerchunk != null) {
- this.pendingUnloads.put(j, playerchunk);
- this.modified = true;
-+ this.scheduleUnload(j, playerchunk); // Paper - Move up - don't leak chunks
- // Spigot start
- if (!shouldKeepTicking.getAsBoolean() && this.toDrop.size() <= targetSize && activityAccountant.activityTimeIsExhausted()) {
- break;
- }
- // Spigot end
-- this.scheduleUnload(j, playerchunk);
-+ //this.scheduleUnload(j, playerchunk); // Paper - move up because spigot did a dumb
- }
- }
- activityAccountant.endActivity(); // Spigot
-@@ -628,7 +635,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -615,7 +621,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
((LevelChunk) ichunkaccess).setLoaded(false);
}
@@ -2423,7 +2399,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895
if (this.entitiesInLevel.remove(pos) && ichunkaccess instanceof LevelChunk) {
LevelChunk chunk = (LevelChunk) ichunkaccess;
-@@ -694,20 +710,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -681,20 +696,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
private CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> scheduleChunkLoad(ChunkPos pos) {
@@ -2456,7 +2432,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895
this.markPosition(pos, protochunk.getStatus().getChunkType());
return Either.left(protochunk);
}
-@@ -729,7 +746,32 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -716,7 +732,32 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.markPositionReplaceable(pos);
return Either.left(new ProtoChunk(pos, UpgradeData.EMPTY, this.level, this.level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), (BlendingData) null));
@@ -2490,7 +2466,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895
}
private void markPositionReplaceable(ChunkPos pos) {
-@@ -944,7 +986,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -931,7 +972,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
}
@@ -2539,7 +2515,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895
this.poiManager.flush(chunk.getPos());
if (!chunk.isUnsaved()) {
return false;
-@@ -956,7 +1039,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -943,7 +1025,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkStatus chunkstatus = chunk.getStatus();
if (chunkstatus.getChunkType() != ChunkStatus.ChunkType.LEVELCHUNK) {
@@ -2548,7 +2524,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895
return false;
}
-@@ -966,9 +1049,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -953,9 +1035,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
this.level.getProfiler().incrementCounter("chunkSave");
@@ -2566,7 +2542,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895
this.markPosition(chunkcoordintpair, chunkstatus.getChunkType());
return true;
} catch (Exception exception) {
-@@ -977,6 +1066,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -964,6 +1052,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return false;
}
}
@@ -2574,7 +2550,7 @@ index b64f42b9ca1da5b6d5c290c157e510797e524117..6a7e6cbc188619b0239e97237069c895
}
private boolean isExistingChunkFull(ChunkPos pos) {
-@@ -1110,6 +1200,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1097,6 +1186,35 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
}
diff --git a/patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch
index 62b297eaff..7273f35ce1 100644
--- a/patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch
+++ b/patches/server/0259-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index 2244a3c61f4effd365ed5fc010ecd1a4858b53a8..4b48f4e1b2d69a18be0e9d83d52bc4f58b1f5bd9 100644
+index ba8a8865e72faa826cb5abff3c428b5a2634bb27..200d1cd53b5af8d7368b6c34b1cfb64463f3e782 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -83,6 +83,12 @@ import org.bukkit.persistence.PersistentDataContainer;
@@ -60,7 +60,7 @@ index 2244a3c61f4effd365ed5fc010ecd1a4858b53a8..4b48f4e1b2d69a18be0e9d83d52bc4f5
this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw());
@@ -381,6 +404,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
- this.persistentDataContainer.put(key, compound.get(key));
+ this.persistentDataContainer.put(key, compound.get(key).copy());
}
}
+ // Paper start - Implement an API for CanPlaceOn and CanDestroy NBT values
diff --git a/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch
index e83e2ecb38..8ec3b02a9c 100644
--- a/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch
+++ b/patches/server/0280-Improve-Server-Thread-Pool-and-Thread-Priorities.patch
@@ -58,10 +58,10 @@ index 90d22b75fd33d8355e59b6bab79757c5b436c9d7..a8772417eb54e1a52c490b75b470a502
return executorService;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index f347842c224ee565d45f5120b2e3a359a9cade65..e2150c3a7cb7898adda6e53d9aeed8698d819a30 100644
+index 785df5ec8a5a4e307149edd5ccf7db75f7edb1fc..de10fc8a9d08dbab245292a4291590b54b0aa609 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -320,6 +320,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -318,6 +318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
atomicreference.set(s0);
diff --git a/patches/server/0281-Optimize-World-Time-Updates.patch b/patches/server/0281-Optimize-World-Time-Updates.patch
index 1a47a58905..f74adbcae1 100644
--- a/patches/server/0281-Optimize-World-Time-Updates.patch
+++ b/patches/server/0281-Optimize-World-Time-Updates.patch
@@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index e2150c3a7cb7898adda6e53d9aeed8698d819a30..e8d88e47247afd3f0b4fee61260b0b8baa007d9e 100644
+index de10fc8a9d08dbab245292a4291590b54b0aa609..a241aa163a957f3c56e7764acf46aa8490758d41 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1423,12 +1423,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1419,12 +1419,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in.
diff --git a/patches/server/0289-force-entity-dismount-during-teleportation.patch b/patches/server/0289-force-entity-dismount-during-teleportation.patch
index 860e145bcd..a4411ebc94 100644
--- a/patches/server/0289-force-entity-dismount-during-teleportation.patch
+++ b/patches/server/0289-force-entity-dismount-during-teleportation.patch
@@ -114,10 +114,10 @@ index e5c5bdc83804f335d7163cfefba79b57df97310b..853ce6536557b64de134a098d7ed3dde
this.dismountVehicle(entity);
}
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 2dcbeaed2e84675e95cde9e831b9d552b2e0b32f..a55ee0868fbf85456749ecede30cea7e0c481bb3 100644
+index 64a887de47b26d2dfa27b0ed3c4d8c0e00db163b..8a05690556f8f979d268cd7c6b5c14343ad33579 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1106,7 +1106,13 @@ public abstract class Player extends LivingEntity {
+@@ -1116,7 +1116,13 @@ public abstract class Player extends LivingEntity {
@Override
public void removeVehicle() {
diff --git a/patches/server/0308-Entity-getEntitySpawnReason.patch b/patches/server/0308-Entity-getEntitySpawnReason.patch
index 67405e4977..5f97132644 100644
--- a/patches/server/0308-Entity-getEntitySpawnReason.patch
+++ b/patches/server/0308-Entity-getEntitySpawnReason.patch
@@ -10,10 +10,10 @@ persistenting Living Entity, SPAWNER for spawners,
or DEFAULT since data was not stored.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index d997ab37e49b43f692b30536ffb4d2563eab30f1..ebaa49c99eb797dfefe401731884f70a841904ad 100644
+index 98094546bb2867b20f89a1bc0efe911cdb6c9b79..46e16685dfe3b7721692f96d7d7e0af0a1fb9c22 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1188,6 +1188,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1191,6 +1191,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
return true;
}
// Paper end
diff --git a/patches/server/0313-Server-Tick-Events.patch b/patches/server/0313-Server-Tick-Events.patch
index 38d655d6f4..20e65776b4 100644
--- a/patches/server/0313-Server-Tick-Events.patch
+++ b/patches/server/0313-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 e8d88e47247afd3f0b4fee61260b0b8baa007d9e..9be13843b17fff55cac404bd372581f7fadee4ac 100644
+index a241aa163a957f3c56e7764acf46aa8490758d41..cdf6394401882cb0702be6ed962e9c0683d3f67a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1351,6 +1351,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1348,6 +1348,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
});
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
// Paper end
@@ -17,7 +17,7 @@ index e8d88e47247afd3f0b4fee61260b0b8baa007d9e..9be13843b17fff55cac404bd372581f7
++this.tickCount;
this.tickChildren(shouldKeepTicking);
-@@ -1389,6 +1390,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1386,6 +1387,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.runAllTasks();
}
// Paper end
diff --git a/patches/server/0320-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch b/patches/server/0320-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch
index 876370429d..7c77472742 100644
--- a/patches/server/0320-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch
+++ b/patches/server/0320-Fix-CraftServer-isPrimaryThread-and-MinecraftServer-.patch
@@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled
synchronously when the server gets shut down.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 9be13843b17fff55cac404bd372581f7fadee4ac..6cb94b3b188a43535658dedf00b74236166665dc 100644
+index cdf6394401882cb0702be6ed962e9c0683d3f67a..5ce1fab4d1e68ad83bd46ae6269446b6f913fa07 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2337,7 +2337,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2333,7 +2333,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
@Override
public boolean isSameThread() {
diff --git a/patches/server/0322-Implement-CraftBlockSoundGroup.patch b/patches/server/0322-Implement-CraftBlockSoundGroup.patch
index ee70b2532f..14bf8faccc 100644
--- a/patches/server/0322-Implement-CraftBlockSoundGroup.patch
+++ b/patches/server/0322-Implement-CraftBlockSoundGroup.patch
@@ -49,10 +49,10 @@ index 0000000000000000000000000000000000000000..9a516520d975f52169e346adc4ec6d9d
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 7ce727c168a4c0fe6d7cd0bbaa8a4121adc96a90..7f1d4015ba795db7404669d931bd44060116bcc9 100644
+index ba8f9ffed49bf377be8b37532d4f2bdcb8c44d82..250185af0abcfea380cc00e670c0076f7fe87446 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -607,4 +607,11 @@ public class CraftBlock implements Block {
+@@ -644,4 +644,11 @@ public class CraftBlock implements Block {
return iblockdata.canSurvive(world, this.position);
}
diff --git a/patches/server/0323-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/0323-Configurable-Keep-Spawn-Loaded-range-per-world.patch
index 5558a4efa3..020061b666 100644
--- a/patches/server/0323-Configurable-Keep-Spawn-Loaded-range-per-world.patch
+++ b/patches/server/0323-Configurable-Keep-Spawn-Loaded-range-per-world.patch
@@ -23,10 +23,10 @@ index a4b20f8616b6fe2046e7a5f00306565b59cd570d..47c8ea0e871959c01371f591c92d7955
config.addDefault("world-settings.default." + path, def);
return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 6cb94b3b188a43535658dedf00b74236166665dc..e75ca992a5fc0cc16b5d365287f63215c124759b 100644
+index 5ce1fab4d1e68ad83bd46ae6269446b6f913fa07..25fb2789bcec7cf864b3a401610e765daa1abe22 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -760,31 +760,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -758,31 +758,34 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) {
@@ -71,7 +71,7 @@ index 6cb94b3b188a43535658dedf00b74236166665dc..e75ca992a5fc0cc16b5d365287f63215
if (true) {
ServerLevel worldserver1 = worldserver;
-@@ -807,7 +810,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -805,7 +808,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// this.nextTickTime = SystemUtils.getMillis() + 10L;
this.executeModerately();
// CraftBukkit end
@@ -81,7 +81,7 @@ index 6cb94b3b188a43535658dedf00b74236166665dc..e75ca992a5fc0cc16b5d365287f63215
// CraftBukkit start
// this.updateMobSpawningFlags();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index ebaa49c99eb797dfefe401731884f70a841904ad..704d5fd4038cd6913e0804b66da920cd661e93ee 100644
+index 46e16685dfe3b7721692f96d7d7e0af0a1fb9c22..3c89e7ec876cc11437e1e035d1f43ea32426eec7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -63,6 +63,7 @@ import net.minecraft.network.protocol.game.ClientboundSoundEntityPacket;
@@ -92,7 +92,7 @@ index ebaa49c99eb797dfefe401731884f70a841904ad..704d5fd4038cd6913e0804b66da920cd
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.ServerScoreboard;
import net.minecraft.server.level.progress.ChunkProgressListener;
-@@ -1614,12 +1615,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1618,12 +1619,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex::load, MapIndex::new, "idcounts")).getFreeAuxValueForMap();
}
diff --git a/patches/server/0328-Fix-World-isChunkGenerated-calls.patch b/patches/server/0328-Fix-World-isChunkGenerated-calls.patch
index 3d88741861..b2948523d7 100644
--- a/patches/server/0328-Fix-World-isChunkGenerated-calls.patch
+++ b/patches/server/0328-Fix-World-isChunkGenerated-calls.patch
@@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that
its only purpose is to cache the status on DISK)
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 6a7e6cbc188619b0239e97237069c895a50e8083..5ccf921bb0ed5f1d4330fec3b3fdfc654d8c5160 100644
+index 04b287c91acef5b9f0b73edb71fbefbb1f08eee6..ebb2b7323b4e11749b7b905cc76863a841a74784 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -90,6 +90,7 @@ import net.minecraft.world.level.chunk.ProtoChunk;
@@ -19,7 +19,7 @@ index 6a7e6cbc188619b0239e97237069c895a50e8083..5ccf921bb0ed5f1d4330fec3b3fdfc65
import net.minecraft.world.level.entity.ChunkStatusUpdateListener;
import net.minecraft.world.level.levelgen.blending.BlendingData;
import net.minecraft.world.level.levelgen.structure.StructureStart;
-@@ -1232,10 +1233,59 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1218,10 +1219,59 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@Nullable
public CompoundTag readChunk(ChunkPos pos) throws IOException {
CompoundTag nbttagcompound = this.read(pos);
diff --git a/patches/server/0341-Duplicate-UUID-Resolve-Option.patch b/patches/server/0341-Duplicate-UUID-Resolve-Option.patch
index 9f63a884e0..9960332821 100644
--- a/patches/server/0341-Duplicate-UUID-Resolve-Option.patch
+++ b/patches/server/0341-Duplicate-UUID-Resolve-Option.patch
@@ -83,7 +83,7 @@ index 11c5c7c703cbf631097056dd00a18a0236fac806..2f060bc6b108df0c4fb07758005a911d
private void countAllMobsForSpawning() {
countAllMobsForSpawning = getBoolean("count-all-mobs-for-spawning", false);
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 5ccf921bb0ed5f1d4330fec3b3fdfc654d8c5160..e3c9b1f33e146918dcdf4f3cd76fdf324acedda1 100644
+index ebb2b7323b4e11749b7b905cc76863a841a74784..5685ffe47fd68230cf30ca9f0e49e471b86eab00 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,6 +1,7 @@
@@ -112,7 +112,7 @@ index 5ccf921bb0ed5f1d4330fec3b3fdfc654d8c5160..e3c9b1f33e146918dcdf4f3cd76fdf32
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.CompletionStage;
-@@ -859,6 +864,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -845,6 +850,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
entity.discard();
needsRemoval = true;
}
@@ -120,7 +120,7 @@ index 5ccf921bb0ed5f1d4330fec3b3fdfc654d8c5160..e3c9b1f33e146918dcdf4f3cd76fdf32
return !needsRemoval;
}));
// CraftBukkit end
-@@ -909,6 +915,43 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -895,6 +901,43 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
});
}
diff --git a/patches/server/0342-Optimize-Hoppers.patch b/patches/server/0342-Optimize-Hoppers.patch
index 66df27dd80..5be48c4437 100644
--- a/patches/server/0342-Optimize-Hoppers.patch
+++ b/patches/server/0342-Optimize-Hoppers.patch
@@ -35,10 +35,10 @@ index 2f060bc6b108df0c4fb07758005a911d92c09057..73d82e20d7353120a36815dc94be8c22
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index e75ca992a5fc0cc16b5d365287f63215c124759b..8e49a648671b4d4c0d07af35ba6558b63bbf28ee 100644
+index 25fb2789bcec7cf864b3a401610e765daa1abe22..bec5328f1ab05faab83584f75d54a5a6c830f9b7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1455,6 +1455,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1451,6 +1451,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
diff --git a/patches/server/0352-Add-effect-to-block-break-naturally.patch b/patches/server/0352-Add-effect-to-block-break-naturally.patch
index f05e2e493f..c254d6a8ee 100644
--- a/patches/server/0352-Add-effect-to-block-break-naturally.patch
+++ b/patches/server/0352-Add-effect-to-block-break-naturally.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add effect to block break naturally
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 7f1d4015ba795db7404669d931bd44060116bcc9..7eb8f37f493a83058a6e96f2e134a204b3304015 100644
+index 250185af0abcfea380cc00e670c0076f7fe87446..945553bfe218a16ebe4abbb11e0723b6d8fc4910 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -468,6 +468,18 @@ public class CraftBlock implements Block {
+@@ -475,6 +475,18 @@ public class CraftBlock implements Block {
@Override
public boolean breakNaturally(ItemStack item) {
@@ -27,7 +27,7 @@ index 7f1d4015ba795db7404669d931bd44060116bcc9..7eb8f37f493a83058a6e96f2e134a204
// Order matters here, need to drop before setting to air so skulls can get their data
net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS();
net.minecraft.world.level.block.Block block = iblockdata.getBlock();
-@@ -477,6 +489,7 @@ public class CraftBlock implements Block {
+@@ -484,6 +496,7 @@ public class CraftBlock implements Block {
// Modelled off EntityHuman#hasBlock
if (block != Blocks.AIR && (item == null || !iblockdata.requiresCorrectToolForDrops() || nmsItem.isCorrectToolForDrops(iblockdata))) {
net.minecraft.world.level.block.Block.dropResources(iblockdata, this.world.getMinecraftWorld(), position, this.world.getBlockEntity(position), null, nmsItem);
diff --git a/patches/server/0354-Increase-Light-Queue-Size.patch b/patches/server/0354-Increase-Light-Queue-Size.patch
index fa65647a58..0a9c51833b 100644
--- a/patches/server/0354-Increase-Light-Queue-Size.patch
+++ b/patches/server/0354-Increase-Light-Queue-Size.patch
@@ -29,10 +29,10 @@ index 73d82e20d7353120a36815dc94be8c2253b2602d..6b88162d286bdabda0449d52b87457ac
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 8e49a648671b4d4c0d07af35ba6558b63bbf28ee..e621d683df00a7d095cc72f74357224208b0dbca 100644
+index bec5328f1ab05faab83584f75d54a5a6c830f9b7..287014feb99c67083a959f2c09213d49ad5f743d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -811,7 +811,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -809,7 +809,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.executeModerately();
// CraftBukkit end
if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper
diff --git a/patches/server/0356-Anti-Xray.patch b/patches/server/0356-Anti-Xray.patch
index 5dd064947f..ad8b66e124 100644
--- a/patches/server/0356-Anti-Xray.patch
+++ b/patches/server/0356-Anti-Xray.patch
@@ -1127,10 +1127,10 @@ index 7825d6f0fdcfda6212cff8033ec55fb7db236154..2072aa8710f6e285f7c8f76c63b7bcf8
public ClientboundLevelChunkWithLightPacket(FriendlyByteBuf buf) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 655a2f2fd64cc3ce1c972f3b05df8136f31a603a..ab976352bb0b7a7aa9ffaf1f8bffeadb31abcc1d 100644
+index 071d821094ce1c13ad5755a1ba76d9a8f27bba97..0fad7ad13be138cbc7c4b09f457adbde570cf6fa 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -980,7 +980,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -966,7 +966,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
completablefuture1.thenAcceptAsync((either) -> {
either.ifLeft((chunk) -> {
this.tickingGenerated.getAndIncrement();
@@ -1139,7 +1139,7 @@ index 655a2f2fd64cc3ce1c972f3b05df8136f31a603a..ab976352bb0b7a7aa9ffaf1f8bffeadb
this.getPlayers(chunkcoordintpair, false).forEach((entityplayer) -> {
this.playerLoadedChunk(entityplayer, mutableobject, chunk);
-@@ -1159,7 +1159,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1145,7 +1145,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
while (objectiterator.hasNext()) {
ChunkHolder playerchunk = (ChunkHolder) objectiterator.next();
ChunkPos chunkcoordintpair = playerchunk.getPos();
@@ -1148,7 +1148,7 @@ index 655a2f2fd64cc3ce1c972f3b05df8136f31a603a..ab976352bb0b7a7aa9ffaf1f8bffeadb
this.getPlayers(chunkcoordintpair, false).forEach((entityplayer) -> {
SectionPos sectionposition = entityplayer.getLastSectionPos();
-@@ -1173,7 +1173,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1159,7 +1159,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
@@ -1157,7 +1157,7 @@ index 655a2f2fd64cc3ce1c972f3b05df8136f31a603a..ab976352bb0b7a7aa9ffaf1f8bffeadb
if (player.level == this.level) {
if (newWithinViewDistance && !oldWithinViewDistance) {
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos.toLong());
-@@ -1693,12 +1693,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1679,12 +1679,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
diff --git a/patches/server/0358-Tracking-Range-Improvements.patch b/patches/server/0358-Tracking-Range-Improvements.patch
index 8d05c0e50d..2a36982dc4 100644
--- a/patches/server/0358-Tracking-Range-Improvements.patch
+++ b/patches/server/0358-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 ab976352bb0b7a7aa9ffaf1f8bffeadb31abcc1d..6dae228c0d0460d74ed49aee5a38dfd7b145d891 100644
+index 0fad7ad13be138cbc7c4b09f457adbde570cf6fa..f1bf847a498023ce8729315c6ec68f1d16cab822 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1881,6 +1881,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1867,6 +1867,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/server/0376-Add-tick-times-API-and-mspt-command.patch b/patches/server/0376-Add-tick-times-API-and-mspt-command.patch
index 7bf2ffe7f4..19bf56aa04 100644
--- a/patches/server/0376-Add-tick-times-API-and-mspt-command.patch
+++ b/patches/server/0376-Add-tick-times-API-and-mspt-command.patch
@@ -87,10 +87,10 @@ index 83bf428abd3be89e34cf42638bd1357a708ea0e3..fda5a623ec6bba0ed4d230415f7b9779
version = getInt("config-version", 25);
set("config-version", 25);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index e621d683df00a7d095cc72f74357224208b0dbca..1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e 100644
+index 287014feb99c67083a959f2c09213d49ad5f743d..2e08855085a547151140bcb05dce9bc469d81ff6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -245,6 +245,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -244,6 +244,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private String motd;
private int playerIdleTimeout;
public final long[] tickTimes;
@@ -102,7 +102,7 @@ index e621d683df00a7d095cc72f74357224208b0dbca..1ab4e3a1d2e3a576ea5f05c2d92a1aae
@Nullable
private KeyPair keyPair;
@Nullable
-@@ -1404,6 +1409,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1401,6 +1406,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.averageTickTime = this.averageTickTime * 0.8F + (float) l / 1000000.0F * 0.19999999F;
long i1 = Util.getNanos();
@@ -115,7 +115,7 @@ index e621d683df00a7d095cc72f74357224208b0dbca..1ab4e3a1d2e3a576ea5f05c2d92a1aae
this.frameTimer.logFrameDuration(i1 - i);
this.profiler.pop();
org.spigotmc.WatchdogThread.tick(); // Spigot
-@@ -2541,4 +2552,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2537,4 +2548,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
};
}
}
diff --git a/patches/server/0382-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0382-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
index e74cc3c4e0..c2ca16c8a1 100644
--- a/patches/server/0382-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
+++ b/patches/server/0382-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
@@ -7,10 +7,10 @@ Suspected case would be around the technique used in .stopRiding
Stack will identify any causer of this and warn instead of crashing.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index c7114fc8045feab770dde30669d2711313bff189..04596feb8667e3abbfa1c7343b46cacaf88ecce8 100644
+index a0ffdeaad5c375539857d6a5a94832216d09f024..5346109670bedf88f13b4eff47c5292170fb47cc 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1614,6 +1614,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1600,6 +1600,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void addEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
@@ -26,10 +26,10 @@ index c7114fc8045feab770dde30669d2711313bff189..04596feb8667e3abbfa1c7343b46caca
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 2119a0cb18edffb88150451446f488b763db977c..01fca7eb1b12948d475f794e5a319ada72f0eb38 100644
+index e0e6915320264da3fefb3f449f27efb8477e1e63..5c5f9cf3539aeba4911d27111b0580d99a61f577 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2200,7 +2200,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2204,7 +2204,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTrackingStart(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
@@ -38,7 +38,7 @@ index 2119a0cb18edffb88150451446f488b763db977c..01fca7eb1b12948d475f794e5a319ada
if (entity instanceof ServerPlayer) {
ServerPlayer entityplayer = (ServerPlayer) entity;
-@@ -2233,6 +2233,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2237,6 +2237,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
entity.valid = true; // CraftBukkit
diff --git a/patches/server/0384-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0384-Dead-Player-s-shouldn-t-be-able-to-move.patch
index f2b52414bc..b79b2b17bc 100644
--- a/patches/server/0384-Dead-Player-s-shouldn-t-be-able-to-move.patch
+++ b/patches/server/0384-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 a55ee0868fbf85456749ecede30cea7e0c481bb3..4e604e902145ea91811e8e7769952024fcbd1a3d 100644
+index 8a05690556f8f979d268cd7c6b5c14343ad33579..49648e258c6e72ac921f69114e1e36a926749d46 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1118,7 +1118,7 @@ public abstract class Player extends LivingEntity {
+@@ -1128,7 +1128,7 @@ public abstract class Player extends LivingEntity {
@Override
protected boolean isImmobile() {
diff --git a/patches/server/0388-Improved-Watchdog-Support.patch b/patches/server/0388-Improved-Watchdog-Support.patch
index 2da28bf8c2..6e1675915d 100644
--- a/patches/server/0388-Improved-Watchdog-Support.patch
+++ b/patches/server/0388-Improved-Watchdog-Support.patch
@@ -71,10 +71,10 @@ index 8cc4cb2163a93b9491550fe6d0f5d980fb216920..4dd14d73a37b32288a64fbd67ee22c43
cause = cause.getCause();
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20faadb9c9 100644
+index 2e08855085a547151140bcb05dce9bc469d81ff6..c39479a9dffd9f9d7a8a6f99b97fef47391de1cd 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -298,7 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -297,7 +297,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
public Commands vanillaCommandDispatcher;
@@ -83,7 +83,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
// CraftBukkit end
// Spigot start
public static final int TPS = 20;
-@@ -309,6 +309,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -307,6 +307,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot end
public static long currentTickLong = 0L; // Paper
@@ -93,7 +93,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
Thread thread = new Thread(() -> {
-@@ -913,6 +916,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -911,6 +914,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
@@ -101,7 +101,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (this.stopLock) {
-@@ -927,6 +931,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -925,6 +929,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hasStopped) return;
this.hasStopped = true;
}
@@ -121,7 +121,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
// CraftBukkit end
MinecraftServer.LOGGER.info("Stopping server");
MinecraftTimings.stopServer(); // Paper
-@@ -1007,7 +1024,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1005,7 +1022,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getProfileCache().save(false); // Paper
}
// Spigot end
@@ -140,7 +140,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
}
public String getLocalIp() {
-@@ -1100,6 +1128,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1098,6 +1126,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
protected void runServer() {
try {
@@ -148,7 +148,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
if (this.initServer()) {
this.nextTickTime = Util.getMillis();
this.status.setDescription(new TextComponent(this.motd));
-@@ -1107,6 +1136,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1105,6 +1134,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.updateStatusIcon(this.status);
// Spigot start
@@ -167,7 +167,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Arrays.fill( recentTps, 20 );
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
-@@ -1164,6 +1205,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1162,6 +1203,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.onServerCrash((CrashReport) null);
}
} catch (Throwable throwable) {
@@ -180,7 +180,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable);
// Spigot Start
if ( throwable.getCause() != null )
-@@ -1197,14 +1244,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1195,14 +1242,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.profileCache.clearExecutor();
}
@@ -198,7 +198,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
}
}
-@@ -1268,6 +1315,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1266,6 +1313,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public TickTask wrapRunnable(Runnable runnable) {
@@ -211,7 +211,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
return new TickTask(this.tickCount, runnable);
}
-@@ -1496,6 +1549,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1492,6 +1545,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
} catch (Throwable t) {
@@ -219,7 +219,7 @@ index 1ab4e3a1d2e3a576ea5f05c2d92a1aae47b1f73e..2b301ab18cc67c04f6091f3a001aff20
throw new RuntimeException("Error generating crash report", t);
}
// Spigot End
-@@ -1953,7 +2007,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1949,7 +2003,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.packRepository.setSelected(dataPacks);
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());
@@ -262,7 +262,7 @@ index ab26a26ac553071ecd943dc8a3b41debf8b797ef..d0d058287fc1e87e944e99d4fc2cbd38
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 04596feb8667e3abbfa1c7343b46cacaf88ecce8..7e3f7b69fc7a608dd82b471d832cc401a77f0738 100644
+index 5346109670bedf88f13b4eff47c5292170fb47cc..7776c22744cdd31459e9634d1d549bdf2876e04f 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -571,6 +571,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
diff --git a/patches/server/0398-Fix-Chunk-Post-Processing-deadlock-risk.patch b/patches/server/0398-Fix-Chunk-Post-Processing-deadlock-risk.patch
index f3f4e5d8b2..0f3fb79f59 100644
--- a/patches/server/0398-Fix-Chunk-Post-Processing-deadlock-risk.patch
+++ b/patches/server/0398-Fix-Chunk-Post-Processing-deadlock-risk.patch
@@ -25,7 +25,7 @@ This successfully fixed a reoccurring and highly reproducible crash
for heightmaps.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 7e3f7b69fc7a608dd82b471d832cc401a77f0738..95feb9e316d4d1115c7dad5873979708f8d647d9 100644
+index 7776c22744cdd31459e9634d1d549bdf2876e04f..43e5e148f1289ff5e42311981c597c66d98447aa 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -178,6 +178,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -36,7 +36,7 @@ index 7e3f7b69fc7a608dd82b471d832cc401a77f0738..95feb9e316d4d1115c7dad5873979708
// Paper start - distance maps
private final com.destroystokyo.paper.util.misc.PooledLinkedHashSets<ServerPlayer> pooledLinkedPlayerHashSets = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets<>();
-@@ -1009,16 +1010,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -995,16 +996,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
});
CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> completablefuture1 = completablefuture.thenApplyAsync((either) -> {
return either.mapLeft((list) -> {
diff --git a/patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch b/patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch
index 1ea10446b3..d7248b82b6 100644
--- a/patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch
+++ b/patches/server/0399-Fix-Longstanding-Broken-behavior-of-PlayerJoinEvent.patch
@@ -28,10 +28,10 @@ receives a deterministic result, and should no longer require 1 tick
delays anymore.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 95feb9e316d4d1115c7dad5873979708f8d647d9..da40ae8799de108b1d3913c3c27ed4f9273fb303 100644
+index 43e5e148f1289ff5e42311981c597c66d98447aa..f4b14d77d5c256852677bd9bc6dbda2bbe5367e3 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1622,6 +1622,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1608,6 +1608,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
.printStackTrace();
return;
}
diff --git a/patches/server/0411-misc-debugging-dumps.patch b/patches/server/0411-misc-debugging-dumps.patch
index a56f23d099..1c556f4401 100644
--- a/patches/server/0411-misc-debugging-dumps.patch
+++ b/patches/server/0411-misc-debugging-dumps.patch
@@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 2b301ab18cc67c04f6091f3a001aff20faadb9c9..fe877316a1c347354ee8e0651bbc243fb5eddc81 100644
+index c39479a9dffd9f9d7a8a6f99b97fef47391de1cd..6d774f126e31e90d0845fc24b1ad7df5346c7cc9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -917,6 +917,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -915,6 +915,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
public volatile boolean hasFullyShutdown = false; // Paper
@@ -40,7 +40,7 @@ index 2b301ab18cc67c04f6091f3a001aff20faadb9c9..fe877316a1c347354ee8e0651bbc243f
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (this.stopLock) {
-@@ -931,6 +932,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -929,6 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hasStopped) return;
this.hasStopped = true;
}
@@ -48,7 +48,7 @@ index 2b301ab18cc67c04f6091f3a001aff20faadb9c9..fe877316a1c347354ee8e0651bbc243f
// Paper start - kill main thread, and kill it hard
shutdownThread = Thread.currentThread();
org.spigotmc.WatchdogThread.doStop(); // Paper
-@@ -1056,6 +1058,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1054,6 +1056,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void safeShutdown(boolean flag, boolean isRestarting) {
this.isRestarting = isRestarting;
diff --git a/patches/server/0421-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0421-Wait-for-Async-Tasks-during-shutdown.patch
index 62f28a9fa9..050ebb6ea6 100644
--- a/patches/server/0421-Wait-for-Async-Tasks-during-shutdown.patch
+++ b/patches/server/0421-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 fe877316a1c347354ee8e0651bbc243fb5eddc81..4658883ffc150e38d29d5387784587e6299fab65 100644
+index 6d774f126e31e90d0845fc24b1ad7df5346c7cc9..ca228085e07254aa23937219c7ef2b3330ca8fe0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -952,6 +952,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -950,6 +950,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
diff --git a/patches/server/0425-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0425-Reduce-allocation-of-Vec3D-by-entity-tracker.patch
index e2ed8544dc..ad01a02411 100644
--- a/patches/server/0425-Reduce-allocation-of-Vec3D-by-entity-tracker.patch
+++ b/patches/server/0425-Reduce-allocation-of-Vec3D-by-entity-tracker.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Reduce allocation of Vec3D by entity tracker
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index da40ae8799de108b1d3913c3c27ed4f9273fb303..7f8f242a746d542192bf59fc17e43d3544e5a442 100644
+index f4b14d77d5c256852677bd9bc6dbda2bbe5367e3..38efde791c99dd22de71183676d0301a1d5a14e0 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1900,9 +1900,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1886,9 +1886,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void updatePlayer(ServerPlayer player) {
org.spigotmc.AsyncCatcher.catchOp("player tracker update"); // Spigot
if (player != this.entity) {
diff --git a/patches/server/0428-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch b/patches/server/0428-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch
index a2d751fb31..9c9de12eb8 100644
--- a/patches/server/0428-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch
+++ b/patches/server/0428-Optimize-anyPlayerCloseEnoughForSpawning-to-use-dist.patch
@@ -42,7 +42,7 @@ index 674a6492e2eb10cfd29989643eedcea08b2d5218..dff475b327d6edaa4dcb9bc09029237f
// Paper start
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 7f8f242a746d542192bf59fc17e43d3544e5a442..80018a94c12b7963c87b3960b71d88d8ac50ff09 100644
+index 38efde791c99dd22de71183676d0301a1d5a14e0..63e264c862053874585b0f6aad2f89389c2dadcb 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -181,11 +181,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -135,15 +135,15 @@ index 7f8f242a746d542192bf59fc17e43d3544e5a442..80018a94c12b7963c87b3960b71d88d8
} else {
holder = new ChunkHolder(new ChunkPos(pos), level, this.level, this.lightEngine, this.queueSorter, this);
// Paper start
-@@ -640,6 +690,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -632,6 +682,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
if (playerchunk != null) {
+ playerchunk.onChunkRemove(); // Paper
this.pendingUnloads.put(j, playerchunk);
this.modified = true;
- this.scheduleUnload(j, playerchunk); // Paper - Move up - don't leak chunks
-@@ -1384,43 +1435,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+ ++i;
+@@ -1370,43 +1421,48 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return this.anyPlayerCloseEnoughForSpawning(pos, false);
}
diff --git a/patches/server/0429-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/0429-Use-distance-map-to-optimise-entity-tracker.patch
index ef2dfbe246..89223bf280 100644
--- a/patches/server/0429-Use-distance-map-to-optimise-entity-tracker.patch
+++ b/patches/server/0429-Use-distance-map-to-optimise-entity-tracker.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker
Use the distance map to find candidate players for tracking.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 80018a94c12b7963c87b3960b71d88d8ac50ff09..2ff9c1f1c41494c282b43eafeb719172f664414b 100644
+index 63e264c862053874585b0f6aad2f89389c2dadcb..2c9cd3619b0759905637eff746a761ebe89a38d8 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -70,6 +70,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
@@ -126,7 +126,7 @@ index 80018a94c12b7963c87b3960b71d88d8ac50ff09..2ff9c1f1c41494c282b43eafeb719172
// Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
this.playerChunkTickRangeMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets,
(ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ,
-@@ -1558,17 +1636,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1544,17 +1622,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public void move(ServerPlayer player) {
@@ -145,7 +145,7 @@ index 80018a94c12b7963c87b3960b71d88d8ac50ff09..2ff9c1f1c41494c282b43eafeb719172
int i = SectionPos.blockToSectionCoord(player.getBlockX());
int j = SectionPos.blockToSectionCoord(player.getBlockZ());
-@@ -1695,7 +1763,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1681,7 +1749,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
entity.tracker = playerchunkmap_entitytracker; // Paper - Fast access to tracker
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
@@ -154,7 +154,7 @@ index 80018a94c12b7963c87b3960b71d88d8ac50ff09..2ff9c1f1c41494c282b43eafeb719172
if (entity instanceof ServerPlayer) {
ServerPlayer entityplayer = (ServerPlayer) entity;
-@@ -1739,7 +1807,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1725,7 +1793,37 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
entity.tracker = null; // Paper - We're no longer tracked
}
@@ -192,7 +192,7 @@ index 80018a94c12b7963c87b3960b71d88d8ac50ff09..2ff9c1f1c41494c282b43eafeb719172
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
ObjectIterator objectiterator = this.entityMap.values().iterator();
-@@ -1815,23 +1913,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1801,23 +1899,31 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos());
List<Entity> list = Lists.newArrayList();
List<Entity> list1 = Lists.newArrayList();
@@ -236,7 +236,7 @@ index 80018a94c12b7963c87b3960b71d88d8ac50ff09..2ff9c1f1c41494c282b43eafeb719172
Iterator iterator;
Entity entity1;
-@@ -1907,6 +2013,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1893,6 +1999,42 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.lastSectionPos = SectionPos.of(entity);
}
diff --git a/patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch b/patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch
index e10d972ecc..ef41103791 100644
--- a/patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch
+++ b/patches/server/0430-Optimize-ServerLevels-chunk-level-checking-methods.patch
@@ -8,10 +8,10 @@ so inline where possible, and avoid the abstraction of the
Either class.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 01fca7eb1b12948d475f794e5a319ada72f0eb38..2fed7a347844a24a1095a654f27c1494a53eef51 100644
+index 5c5f9cf3539aeba4911d27111b0580d99a61f577..42d7802e787d1e2722bf94487f9bf8383aeef660 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2165,19 +2165,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2169,19 +2169,22 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) {
diff --git a/patches/server/0438-Fix-sand-duping.patch b/patches/server/0438-Fix-sand-duping.patch
index 59c437cfea..c68919d4ee 100644
--- a/patches/server/0438-Fix-sand-duping.patch
+++ b/patches/server/0438-Fix-sand-duping.patch
@@ -7,10 +7,10 @@ If the falling block dies during teleportation (entity#move), then we need
to detect that by placing a check after the move.
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-index 2723816204ee61ea3fda9279369df030b8d70a13..c267bc75a5a2a410d941accbe8c41e3422a634a5 100644
+index f12eafb49c2536f91f4716188c931ad97264c113..e234373432f34f237f884f7054c0d80829228522 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -119,6 +119,11 @@ public class FallingBlockEntity extends Entity {
+@@ -120,6 +120,11 @@ public class FallingBlockEntity extends Entity {
@Override
public void tick() {
@@ -22,7 +22,7 @@ index 2723816204ee61ea3fda9279369df030b8d70a13..c267bc75a5a2a410d941accbe8c41e34
if (this.blockState.isAir()) {
this.discard();
} else {
-@@ -131,6 +136,12 @@ public class FallingBlockEntity extends Entity {
+@@ -132,6 +137,12 @@ public class FallingBlockEntity extends Entity {
this.move(MoverType.SELF, this.getDeltaMovement());
diff --git a/patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
index e1eb2923ff..560761824a 100644
--- a/patches/server/0446-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
+++ b/patches/server/0446-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 4658883ffc150e38d29d5387784587e6299fab65..81f611fef60518da5ee1bc34dcd7b8688818b096 100644
+index ca228085e07254aa23937219c7ef2b3330ca8fe0..03ef045c166c92efaeeaf655178b9729549e2296 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -822,7 +822,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -820,7 +820,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
chunkproviderserver.getLightEngine().setTaskPerBatch(worldserver.paperConfig.lightQueueSize); // Paper - increase light queue size
// CraftBukkit start
// this.updateMobSpawningFlags();
@@ -20,7 +20,7 @@ index 4658883ffc150e38d29d5387784587e6299fab65..81f611fef60518da5ee1bc34dcd7b868
this.forceTicks = false;
// CraftBukkit end
-@@ -1737,11 +1737,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1733,11 +1733,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@@ -40,7 +40,7 @@ index 4658883ffc150e38d29d5387784587e6299fab65..81f611fef60518da5ee1bc34dcd7b868
}
}
-@@ -1755,7 +1758,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1751,7 +1754,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
diff --git a/patches/server/0452-incremental-chunk-and-player-saving.patch b/patches/server/0452-incremental-chunk-and-player-saving.patch
index b3e2ede950..e8198919a1 100644
--- a/patches/server/0452-incremental-chunk-and-player-saving.patch
+++ b/patches/server/0452-incremental-chunk-and-player-saving.patch
@@ -50,10 +50,10 @@ index 64ceb8609891f59f4cf3b54844a25402bab32c26..213e9db18d1e0eede0e825797a3d3c15
config.addDefault("world-settings.default." + path, def);
return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 81f611fef60518da5ee1bc34dcd7b8688818b096..2d1163fb234a2327373099dbfb569c3b8af9fa46 100644
+index 03ef045c166c92efaeeaf655178b9729549e2296..851d63ba918f1fb2ffb975b0b46c8797e2b3b903 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -900,7 +900,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -898,7 +898,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
this.isSaving = true;
@@ -62,7 +62,7 @@ index 81f611fef60518da5ee1bc34dcd7b8688818b096..2d1163fb234a2327373099dbfb569c3b
flag3 = this.saveAllChunks(suppressLogs, flush, force);
} finally {
this.isSaving = false;
-@@ -1443,13 +1443,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1440,13 +1440,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@@ -165,7 +165,7 @@ index dff475b327d6edaa4dcb9bc09029237f8f659846..05d2790b80a6d2e1dc6b8d2375f783be
for (int i = 0; i < this.futures.length(); ++i) {
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = (CompletableFuture) this.futures.get(i);
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc 100644
+index 2c9cd3619b0759905637eff746a761ebe89a38d8..1614b056d9e0c9e6b62d6c6a8926e87b2f3ad131 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -104,6 +104,7 @@ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureMana
@@ -241,7 +241,7 @@ index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b163
protected void saveAllChunks(boolean flush) {
if (flush) {
List<ChunkHolder> list = (List) this.visibleChunkMap.values().stream().filter(ChunkHolder::wasAccessibleSinceLastSave).peek(ChunkHolder::refreshAccessibility).collect(Collectors.toList());
-@@ -792,13 +851,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -778,13 +837,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
int l = 0;
@@ -256,7 +256,7 @@ index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b163
}
-@@ -836,6 +889,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -822,6 +875,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.level.unload(chunk);
}
@@ -264,7 +264,7 @@ index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b163
this.lightEngine.updateChunkStatus(ichunkaccess.getPos());
this.lightEngine.tryScheduleUpdate();
-@@ -1246,6 +1300,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1232,6 +1286,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
asyncSaveData, chunk);
chunk.setUnsaved(false);
@@ -272,7 +272,7 @@ index 2ff9c1f1c41494c282b43eafeb719172f664414b..85a05c9e59ae1909e6d4ce7a2e45b163
}
// Paper end
-@@ -1255,6 +1310,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1241,6 +1296,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (!chunk.isUnsaved()) {
return false;
} else {
diff --git a/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch b/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch
index 1b34693479..ac9fef7627 100644
--- a/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch
+++ b/patches/server/0466-Implement-Chunk-Priority-Urgency-System-for-Chunks.patch
@@ -360,7 +360,7 @@ index 05d2790b80a6d2e1dc6b8d2375f783be4eff2343..6ba7e2713452c4c6f48a1a825ef27b50
return this.isEntityTickingReady;
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406ec7bc5ac 100644
+index 1614b056d9e0c9e6b62d6c6a8926e87b2f3ad131..c6ea30c9e91382297a5340096540f1ebc914fc35 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -131,6 +131,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -448,7 +448,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406
list1.add(playerchunk);
list.add(completablefuture);
-@@ -930,11 +980,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -916,11 +966,19 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (requiredStatus == ChunkStatus.EMPTY) {
return this.scheduleChunkLoad(chunkcoordintpair);
} else {
@@ -469,7 +469,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406
if (optional.isPresent() && ((ChunkAccess) optional.get()).getStatus().isOrAfter(requiredStatus)) {
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = requiredStatus.load(this.level, this.structureManager, this.lightEngine, (ichunkaccess) -> {
-@@ -946,6 +1004,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -932,6 +990,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
} else {
return this.scheduleChunkGeneration(holder, requiredStatus);
}
@@ -477,7 +477,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406
}
}
-@@ -1002,14 +1061,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -988,14 +1047,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
};
CompletableFuture<CompoundTag> chunkSaveFuture = this.level.asyncChunkTaskManager.getChunkSaveFuture(pos.x, pos.z);
@@ -507,7 +507,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406
return ret;
// Paper end
}
-@@ -1061,7 +1130,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1047,7 +1116,10 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.releaseLightTicket(chunkcoordintpair);
return CompletableFuture.completedFuture(Either.right(playerchunk_failure));
});
@@ -519,7 +519,7 @@ index 85a05c9e59ae1909e6d4ce7a2e45b16366a1b7dc..17af44ebe972158a4fa7b0cb5ea67406
}
protected void releaseLightTicket(ChunkPos pos) {
-@@ -1145,7 +1217,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1131,7 +1203,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
long i = chunkHolder.getPos().toLong();
Objects.requireNonNull(chunkHolder);
diff --git a/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch
index 4a7aa73b9c..77a8845bd3 100644
--- a/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch
+++ b/patches/server/0484-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 2182d17d463cea2ff999c5bc61eb31f4317362d8..f8a892110339ef63b5bdc31b64c4a40833685526 100644
+index c77f464b772e72c23fe00e99bc0fee24d46fb16b..b42637a2e9594cc2a30f910ef08399c11607e094 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1751,6 +1751,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1755,6 +1755,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
//ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(this.worldData.a(), 0, this.worldData.c()));
this.levelData.setSpawn(pos, angle);
diff --git a/patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch b/patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch
index cefa980de0..ce941b1f3f 100644
--- a/patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch
+++ b/patches/server/0486-Improve-Chunk-Status-Transition-Speed.patch
@@ -54,7 +54,7 @@ index 6ba7e2713452c4c6f48a1a825ef27b500140aa16..cd4328bd606d778ebb45f36af8cf23d8
public ChunkHolder(ChunkPos pos, int level, LevelHeightAccessor world, LevelLightEngine lightingProvider, ChunkHolder.LevelChangeListener levelUpdateListener, ChunkHolder.PlayerProvider playersWatchingChunkProvider) {
this.futures = new AtomicReferenceArray(ChunkHolder.CHUNK_STATUSES.size());
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 17af44ebe972158a4fa7b0cb5ea67406ec7bc5ac..9d9312cb8e9681428f7ab1b1e6eb803fc558d651 100644
+index c6ea30c9e91382297a5340096540f1ebc914fc35..104e7d0c18b032ee8198c4de25a57676d0f64745 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -691,7 +691,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -66,7 +66,7 @@ index 17af44ebe972158a4fa7b0cb5ea67406ec7bc5ac..9d9312cb8e9681428f7ab1b1e6eb803f
}
@Nullable
-@@ -1101,6 +1101,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1087,6 +1087,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return "chunkGenerate " + requiredStatus.getName();
});
Executor executor = (runnable) -> {
diff --git a/patches/server/0496-Add-methods-to-get-translation-keys.patch b/patches/server/0496-Add-methods-to-get-translation-keys.patch
index a6fb1b05f7..84393fcfd6 100644
--- a/patches/server/0496-Add-methods-to-get-translation-keys.patch
+++ b/patches/server/0496-Add-methods-to-get-translation-keys.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add methods to get translation keys
Co-authored-by: MeFisto94 <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 7eb8f37f493a83058a6e96f2e134a204b3304015..5fbfa060fc476236face04af724356dc5a21b5b5 100644
+index 945553bfe218a16ebe4abbb11e0723b6d8fc4910..e116ccfa4878636073cc4cdcf680683cda88d314 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -626,5 +626,15 @@ public class CraftBlock implements Block {
+@@ -663,5 +663,15 @@ public class CraftBlock implements Block {
public com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup() {
return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMS().getBlock().defaultBlockState().getSoundType());
}
diff --git a/patches/server/0498-Cache-block-data-strings.patch b/patches/server/0498-Cache-block-data-strings.patch
index cb029f98bc..4d0cb9354d 100644
--- a/patches/server/0498-Cache-block-data-strings.patch
+++ b/patches/server/0498-Cache-block-data-strings.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 2d1163fb234a2327373099dbfb569c3b8af9fa46..583031b2d26f9410306cbacd158fb6a21f0f24b5 100644
+index 851d63ba918f1fb2ffb975b0b46c8797e2b3b903..7e4c9fb177211afc1fbbede3393cc7de8d9014a9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2035,6 +2035,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2031,6 +2031,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().reloadResources();
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureManager.onResourceManagerReload(this.resources.resourceManager);
diff --git a/patches/server/0502-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0502-Extend-block-drop-capture-to-capture-all-items-added.patch
index 26250fd153..04dc0dd436 100644
--- a/patches/server/0502-Extend-block-drop-capture-to-capture-all-items-added.patch
+++ b/patches/server/0502-Extend-block-drop-capture-to-capture-all-items-added.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index f8a892110339ef63b5bdc31b64c4a40833685526..6e3eb9624d6febc995cf428d9d0136718e6b7f4a 100644
+index b42637a2e9594cc2a30f910ef08399c11607e094..83c48cb9640ad1a300538bf176e1584c8a0dc539 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1263,6 +1263,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1266,6 +1266,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
} else {
@@ -19,10 +19,9 @@ index f8a892110339ef63b5bdc31b64c4a40833685526..6e3eb9624d6febc995cf428d9d013671
+ return true;
+ }
+ // Paper end
-+
- if (!CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
+ // SPIGOT-6415: Don't call spawn event when reason is null. For example when an entity teleports to a new world.
+ if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
return false;
- }
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 176e5bbac94cf39805dcacfcae3a3daa98b793b7..d006964cb6c4c3cd843064ab685700c67df8c238 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
diff --git a/patches/server/0507-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0507-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch
index 9305c28388..9879dd70b5 100644
--- a/patches/server/0507-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch
+++ b/patches/server/0507-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 583031b2d26f9410306cbacd158fb6a21f0f24b5..de024bf476e07558a249e2734be1f6ef6810ddd9 100644
+index 7e4c9fb177211afc1fbbede3393cc7de8d9014a9..98d896db95953a91d31830a23b23265fa9f2c795 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2101,13 +2101,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2097,13 +2097,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.isEnforceWhitelist()) {
PlayerList playerlist = source.getServer().getPlayerList();
UserWhiteList whitelist = playerlist.getWhiteList();
diff --git a/patches/server/0511-Optimise-getType-calls.patch b/patches/server/0511-Optimise-getType-calls.patch
index 3db112812d..6653f476f0 100644
--- a/patches/server/0511-Optimise-getType-calls.patch
+++ b/patches/server/0511-Optimise-getType-calls.patch
@@ -41,10 +41,10 @@ index 8001245c4ba619cd357a194d60fdc2efe186efb3..07fa4e4ae5f2cfb4447a608dc645c0b7
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 5fbfa060fc476236face04af724356dc5a21b5b5..17cfa5bd58417c541e2d922c7d7b57676246f0d8 100644
+index e116ccfa4878636073cc4cdcf680683cda88d314..4bbaf22f449af42eba1307604e3860ea8b60a38c 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -217,7 +217,7 @@ public class CraftBlock implements Block {
+@@ -224,7 +224,7 @@ public class CraftBlock implements Block {
@Override
public Material getType() {
diff --git a/patches/server/0524-Item-no-age-no-player-pickup.patch b/patches/server/0524-Item-no-age-no-player-pickup.patch
index a121c378e3..13b456555a 100644
--- a/patches/server/0524-Item-no-age-no-player-pickup.patch
+++ b/patches/server/0524-Item-no-age-no-player-pickup.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Item no age & no player pickup
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
-index 0d262c99c7e9ef06e297612b1802c493700f64ae..342345eb04d00efb58392ccf209e3c51c1064173 100644
+index 30c954efba587d69ff55df509339f03e7d5a476e..1d90219c3a0e86786a9497d4c078c2d4077ab6cd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
@@ -10,6 +10,12 @@ import org.bukkit.entity.Item;
@@ -21,7 +21,7 @@ index 0d262c99c7e9ef06e297612b1802c493700f64ae..342345eb04d00efb58392ccf209e3c51
private final ItemEntity item;
public CraftItem(CraftServer server, Entity entity, ItemEntity item) {
-@@ -59,6 +65,26 @@ public class CraftItem extends CraftEntity implements Item {
+@@ -76,6 +82,26 @@ public class CraftItem extends CraftEntity implements Item {
public void setCanMobPickup(boolean canMobPickup) {
item.canMobPickup = canMobPickup;
}
diff --git a/patches/server/0531-Add-Destroy-Speed-API.patch b/patches/server/0531-Add-Destroy-Speed-API.patch
index cfd4fa1a5f..c38a358b78 100644
--- a/patches/server/0531-Add-Destroy-Speed-API.patch
+++ b/patches/server/0531-Add-Destroy-Speed-API.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add Destroy Speed API
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 17cfa5bd58417c541e2d922c7d7b57676246f0d8..437daff6408357a4a19420422100914b3308b465 100644
+index 4bbaf22f449af42eba1307604e3860ea8b60a38c..25794fca0c10b262a696ecec9c736a991e8f357d 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -636,5 +636,26 @@ public class CraftBlock implements Block {
+@@ -673,5 +673,26 @@ public class CraftBlock implements Block {
public String translationKey() {
return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
}
diff --git a/patches/server/0550-Additional-Block-Material-API-s.patch b/patches/server/0550-Additional-Block-Material-API-s.patch
index 8d23c9d902..c37be6c6ce 100644
--- a/patches/server/0550-Additional-Block-Material-API-s.patch
+++ b/patches/server/0550-Additional-Block-Material-API-s.patch
@@ -9,10 +9,10 @@ process to do this in the Bukkit API
Adds API for buildable, replaceable, burnable too.
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 437daff6408357a4a19420422100914b3308b465..0be0ddcb8ea184683c1d0c619a932f3b03064941 100644
+index 25794fca0c10b262a696ecec9c736a991e8f357d..3430bf2c05f9dc47a7483327bee4c04e4d87349e 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -456,6 +456,25 @@ public class CraftBlock implements Block {
+@@ -463,6 +463,25 @@ public class CraftBlock implements Block {
return this.getNMS().getMaterial().isLiquid();
}
diff --git a/patches/server/0563-Added-ServerResourcesReloadedEvent.patch b/patches/server/0563-Added-ServerResourcesReloadedEvent.patch
index 3ea83769b9..32592e509b 100644
--- a/patches/server/0563-Added-ServerResourcesReloadedEvent.patch
+++ b/patches/server/0563-Added-ServerResourcesReloadedEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Added ServerResourcesReloadedEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index de024bf476e07558a249e2734be1f6ef6810ddd9..670180dd48a8e04b76c65242d2b316d52ae9090f 100644
+index 98d896db95953a91d31830a23b23265fa9f2c795..9abe6de575509d930c3f055e8dc5a14de5f1f49d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2004,7 +2004,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2000,7 +2000,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.functionManager;
}
@@ -22,7 +22,7 @@ index de024bf476e07558a249e2734be1f6ef6810ddd9..670180dd48a8e04b76c65242d2b316d5
RegistryAccess.Frozen iregistrycustom_dimension = this.registryAccess();
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
-@@ -2030,6 +2036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2026,6 +2032,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.packRepository.setSelected(dataPacks);
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());
diff --git a/patches/server/0571-Remove-stale-POIs.patch b/patches/server/0571-Remove-stale-POIs.patch
index 59efbc0b2b..6ea7a5b8fe 100644
--- a/patches/server/0571-Remove-stale-POIs.patch
+++ b/patches/server/0571-Remove-stale-POIs.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 6e3eb9624d6febc995cf428d9d0136718e6b7f4a..4797737c8085012bb898da0313a9ef9bf44e723d 100644
+index 83c48cb9640ad1a300538bf176e1584c8a0dc539..f408d59f2b829765e915dfdb09733407012c8524 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1831,6 +1831,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1834,6 +1834,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
});
optional1.ifPresent((villageplacetype) -> {
this.getServer().execute(() -> {
diff --git a/patches/server/0574-Add-PaperRegistry.patch b/patches/server/0574-Add-PaperRegistry.patch
index 07bb4192a0..ce5b0c9aa6 100644
--- a/patches/server/0574-Add-PaperRegistry.patch
+++ b/patches/server/0574-Add-PaperRegistry.patch
@@ -171,10 +171,10 @@ index 0000000000000000000000000000000000000000..6f39e343147803e15e7681c993b8797a
+public record RegistryKey<API extends Keyed, MINECRAFT>(Class<API> apiClass, ResourceKey<? extends Registry<MINECRAFT>> resourceKey) {
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 670180dd48a8e04b76c65242d2b316d52ae9090f..14b1524fcd27341eb8257f3925b94715bd4da152 100644
+index 9abe6de575509d930c3f055e8dc5a14de5f1f49d..696d382283f94335f6e23eb12c6fa209c51cff8c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2036,6 +2036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2032,6 +2032,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.packRepository.setSelected(dataPacks);
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());
diff --git a/patches/server/0575-Add-StructuresLocateEvent.patch b/patches/server/0575-Add-StructuresLocateEvent.patch
index f5c3398594..b42b98e3db 100644
--- a/patches/server/0575-Add-StructuresLocateEvent.patch
+++ b/patches/server/0575-Add-StructuresLocateEvent.patch
@@ -72,10 +72,10 @@ index 0000000000000000000000000000000000000000..41f6c2e1e60fc32e6393097711412ca2
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 14b1524fcd27341eb8257f3925b94715bd4da152..eafa494d9c4d9fac40b62c439dbdae5bf70fd3a1 100644
+index 696d382283f94335f6e23eb12c6fa209c51cff8c..e74885c51c2970af13d847ec34a415e5aa18b01c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2036,7 +2036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2032,7 +2032,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.packRepository.setSelected(dataPacks);
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());
diff --git a/patches/server/0588-EntityMoveEvent.patch b/patches/server/0588-EntityMoveEvent.patch
index 65856e82cd..53db38d2a5 100644
--- a/patches/server/0588-EntityMoveEvent.patch
+++ b/patches/server/0588-EntityMoveEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] EntityMoveEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index eafa494d9c4d9fac40b62c439dbdae5bf70fd3a1..9fb306fdb2071ffcd16e9bb83da75c8923f2ba8e 100644
+index e74885c51c2970af13d847ec34a415e5aa18b01c..445efad6a35b819dcb845524a28055a90da6e7f6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1539,6 +1539,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1535,6 +1535,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
diff --git a/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch
index 3206f89517..044e23afdd 100644
--- a/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch
+++ b/patches/server/0589-added-option-to-disable-pathfinding-updates-on-block.patch
@@ -21,10 +21,10 @@ index 4ab8e20efc54e7094e3e0f98109c95252d5e7c01..cdcb877e374bcd2dd944c754bfc91e23
public boolean phantomOnlyAttackInsomniacs = true;
private void phantomSettings() {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 3b5eceaf3a40fee6430864e849d403f5e3c5f9b4..1b678f60ae054f6d9c97ba17f5ffe258d65cccb1 100644
+index 349f92a10e80f091abca6d86b869800d8c5ea787..773c7b0fe682fa17363f0a7841a77010b0b38b71 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1403,6 +1403,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1406,6 +1406,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
this.getChunkSource().blockChanged(pos);
@@ -32,7 +32,7 @@ index 3b5eceaf3a40fee6430864e849d403f5e3c5f9b4..1b678f60ae054f6d9c97ba17f5ffe258
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
-@@ -1444,6 +1445,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1447,6 +1448,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
diff --git a/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch b/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch
index 96353575f3..cd8f46da31 100644
--- a/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch
+++ b/patches/server/0596-Add-support-for-hex-color-codes-in-console.patch
@@ -270,10 +270,10 @@ index 0000000000000000000000000000000000000000..ea83ee8762c126c449993a7497257b0b
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 9fb306fdb2071ffcd16e9bb83da75c8923f2ba8e..7aba7d63727f6c7bbc074b5df5421ea449224ba4 100644
+index 445efad6a35b819dcb845524a28055a90da6e7f6..2914355be3f6c45b2dbd7ceb0ea65c7f22255a6d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1716,7 +1716,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1712,7 +1712,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void sendMessage(Component message, UUID sender) {
diff --git a/patches/server/0607-Add-Block-isValidTool.patch b/patches/server/0607-Add-Block-isValidTool.patch
index 8442851de2..aa6d01211e 100644
--- a/patches/server/0607-Add-Block-isValidTool.patch
+++ b/patches/server/0607-Add-Block-isValidTool.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Block#isValidTool
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 0be0ddcb8ea184683c1d0c619a932f3b03064941..55f830598e67943674aa54ddfefc02bb3a3a3dcc 100644
+index 3430bf2c05f9dc47a7483327bee4c04e4d87349e..56fd99224edf9041104a540fd14ba3468af4805e 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -676,5 +676,9 @@ public class CraftBlock implements Block {
+@@ -713,5 +713,9 @@ public class CraftBlock implements Block {
}
return speed;
}
diff --git a/patches/server/0615-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0615-forced-whitelist-use-configurable-kick-message.patch
index 4a57708ea9..1335c9be51 100644
--- a/patches/server/0615-forced-whitelist-use-configurable-kick-message.patch
+++ b/patches/server/0615-forced-whitelist-use-configurable-kick-message.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] forced whitelist: use configurable kick message
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 9fb306fdb2071ffcd16e9bb83da75c8923f2ba8e..abb6b8f3b69826d69956a248770fc7b87745ba9a 100644
+index 445efad6a35b819dcb845524a28055a90da6e7f6..0e888c2d64cddb8b44e0572cea07fbb3cf0e6987 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -73,7 +73,6 @@ import net.minecraft.gametest.framework.GameTestTicker;
@@ -16,7 +16,7 @@ index 9fb306fdb2071ffcd16e9bb83da75c8923f2ba8e..abb6b8f3b69826d69956a248770fc7b8
import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
import net.minecraft.network.protocol.game.ClientboundSetTimePacket;
import net.minecraft.network.protocol.status.ServerStatus;
-@@ -2118,7 +2117,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2114,7 +2113,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
diff --git a/patches/server/0625-Fix-duplicating-give-items-on-item-drop-cancel.patch b/patches/server/0625-Fix-duplicating-give-items-on-item-drop-cancel.patch
deleted file mode 100644
index 1fdb5f16ee..0000000000
--- a/patches/server/0625-Fix-duplicating-give-items-on-item-drop-cancel.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Alphaesia <[email protected]>
-Date: Fri, 23 Apr 2021 09:57:56 +1200
-Subject: [PATCH] Fix duplicating /give items on item drop cancel
-
-Fixes SPIGOT-2942 (Give command fires PlayerDropItemEvent, cancelling it causes item duplication).
-
-For every stack of items to give, /give puts the item stack straight
-into the player's inventory. However, it also summons a "fake item"
-at the player's location. When the PlayerDropItemEvent for this fake
-item is cancelled, the server attempts to put the item back into the
-player's inventory. The result is that the fake item, which is never
-meant to be obtained, is combined with the real items injected directly
-into the player's inventory. This means more items than the amount
-specified in /give are given to the player - one for every stack of
-items given. (e.g. /give @s dirt 1 gives you 2 dirt).
-
-While this isn't a big issue for general building usage, it can affect
-e.g. adventure maps where the number of items the player receives is
-important (and you want to restrict the player from throwing items).
-
-If there are any overflow items that didn't make it into the inventory
-(insufficient space), those items are dropped as a real item instead
-of a fake one. While cancelling this drop would also result in the
-server attempting to put those items into the inventory, since it is
-full this has no effect.
-
-Just ignoring cancellation of the PlayerDropItemEvent seems like the
-cleanest and least intrusive way to fix it.
-
-diff --git a/src/main/java/net/minecraft/server/commands/GiveCommand.java b/src/main/java/net/minecraft/server/commands/GiveCommand.java
-index 58941830a4bd024fcdb97df47783c82062e9167f..a0dc380e90415de9068ea408d62a1605c82631df 100644
---- a/src/main/java/net/minecraft/server/commands/GiveCommand.java
-+++ b/src/main/java/net/minecraft/server/commands/GiveCommand.java
-@@ -47,7 +47,7 @@ public class GiveCommand {
- boolean bl = serverPlayer.getInventory().add(itemStack);
- if (bl && itemStack.isEmpty()) {
- itemStack.setCount(1);
-- ItemEntity itemEntity2 = serverPlayer.drop(itemStack, false);
-+ ItemEntity itemEntity2 = serverPlayer.drop(itemStack, false, false, true); // Paper - Fix duplicating /give items on item drop cancel
- if (itemEntity2 != null) {
- itemEntity2.makeFakeItem();
- }
-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 4e604e902145ea91811e8e7769952024fcbd1a3d..0a486c8c4ad6abfdca804887e5db1487f53c1098 100644
---- a/src/main/java/net/minecraft/world/entity/player/Player.java
-+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -693,6 +693,13 @@ public abstract class Player extends LivingEntity {
-
- @Nullable
- public ItemEntity drop(ItemStack stack, boolean throwRandomly, boolean retainOwnership) {
-+ // Paper start - Fix duplicating /give items on item drop cancel
-+ return this.drop(stack, throwRandomly, retainOwnership, false);
-+ }
-+
-+ @Nullable
-+ public ItemEntity drop(ItemStack stack, boolean throwRandomly, boolean retainOwnership, boolean alwaysSucceed) {
-+ // Paper end
- if (stack.isEmpty()) {
- return null;
- } else {
-@@ -734,7 +741,7 @@ public abstract class Player extends LivingEntity {
- PlayerDropItemEvent event = new PlayerDropItemEvent(player, drop);
- this.level.getCraftServer().getPluginManager().callEvent(event);
-
-- if (event.isCancelled()) {
-+ if (event.isCancelled() && !alwaysSucceed) { // Paper - Fix duplicating /give items on item drop cancel
- org.bukkit.inventory.ItemStack cur = player.getInventory().getItemInHand();
- if (retainOwnership && (cur == null || cur.getAmount() == 0)) {
- // The complete stack was dropped
diff --git a/patches/server/0626-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/server/0625-add-consumeFuel-to-FurnaceBurnEvent.patch
index ffb9062039..ffb9062039 100644
--- a/patches/server/0626-add-consumeFuel-to-FurnaceBurnEvent.patch
+++ b/patches/server/0625-add-consumeFuel-to-FurnaceBurnEvent.patch
diff --git a/patches/server/0627-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/server/0626-add-get-set-drop-chance-to-EntityEquipment.patch
index 9720fcdaf4..9720fcdaf4 100644
--- a/patches/server/0627-add-get-set-drop-chance-to-EntityEquipment.patch
+++ b/patches/server/0626-add-get-set-drop-chance-to-EntityEquipment.patch
diff --git a/patches/server/0628-fix-PigZombieAngerEvent-cancellation.patch b/patches/server/0627-fix-PigZombieAngerEvent-cancellation.patch
index 9b69dc24f2..9b69dc24f2 100644
--- a/patches/server/0628-fix-PigZombieAngerEvent-cancellation.patch
+++ b/patches/server/0627-fix-PigZombieAngerEvent-cancellation.patch
diff --git a/patches/server/0629-Fix-checkReach-check-for-Shulker-boxes.patch b/patches/server/0628-Fix-checkReach-check-for-Shulker-boxes.patch
index e63651a68f..e63651a68f 100644
--- a/patches/server/0629-Fix-checkReach-check-for-Shulker-boxes.patch
+++ b/patches/server/0628-Fix-checkReach-check-for-Shulker-boxes.patch
diff --git a/patches/server/0630-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0629-fix-PlayerItemHeldEvent-firing-twice.patch
index 7a332176ff..7a332176ff 100644
--- a/patches/server/0630-fix-PlayerItemHeldEvent-firing-twice.patch
+++ b/patches/server/0629-fix-PlayerItemHeldEvent-firing-twice.patch
diff --git a/patches/server/0631-Added-PlayerDeepSleepEvent.patch b/patches/server/0630-Added-PlayerDeepSleepEvent.patch
index 00b71569b1..77e3bcfdaa 100644
--- a/patches/server/0631-Added-PlayerDeepSleepEvent.patch
+++ b/patches/server/0630-Added-PlayerDeepSleepEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Added PlayerDeepSleepEvent
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 0a486c8c4ad6abfdca804887e5db1487f53c1098..f4c861c86b718d67ae13ac02c6d1f20433312725 100644
+index 49648e258c6e72ac921f69114e1e36a926749d46..de0b885ebafecb37ef8be127362f76d487ff92ae 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -246,6 +246,11 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0632-More-World-API.patch b/patches/server/0631-More-World-API.patch
index 3fac16090a..3fac16090a 100644
--- a/patches/server/0632-More-World-API.patch
+++ b/patches/server/0631-More-World-API.patch
diff --git a/patches/server/0633-Added-PlayerBedFailEnterEvent.patch b/patches/server/0632-Added-PlayerBedFailEnterEvent.patch
index 95b8821728..95b8821728 100644
--- a/patches/server/0633-Added-PlayerBedFailEnterEvent.patch
+++ b/patches/server/0632-Added-PlayerBedFailEnterEvent.patch
diff --git a/patches/server/0634-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0633-Implement-methods-to-convert-between-Component-and-B.patch
index ad3e98c8b5..ad3e98c8b5 100644
--- a/patches/server/0634-Implement-methods-to-convert-between-Component-and-B.patch
+++ b/patches/server/0633-Implement-methods-to-convert-between-Component-and-B.patch
diff --git a/patches/server/0635-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0634-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
index 576aa63f5a..576aa63f5a 100644
--- a/patches/server/0635-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
+++ b/patches/server/0634-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch
diff --git a/patches/server/0636-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0635-Introduce-beacon-activation-deactivation-events.patch
index 4858e0f40b..4858e0f40b 100644
--- a/patches/server/0636-Introduce-beacon-activation-deactivation-events.patch
+++ b/patches/server/0635-Introduce-beacon-activation-deactivation-events.patch
diff --git a/patches/server/0637-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0636-add-RespawnFlags-to-PlayerRespawnEvent.patch
index 5fff43eeb8..5fff43eeb8 100644
--- a/patches/server/0637-add-RespawnFlags-to-PlayerRespawnEvent.patch
+++ b/patches/server/0636-add-RespawnFlags-to-PlayerRespawnEvent.patch
diff --git a/patches/server/0638-Add-Channel-initialization-listeners.patch b/patches/server/0637-Add-Channel-initialization-listeners.patch
index 1f7fe2772b..1f7fe2772b 100644
--- a/patches/server/0638-Add-Channel-initialization-listeners.patch
+++ b/patches/server/0637-Add-Channel-initialization-listeners.patch
diff --git a/patches/server/0639-Send-empty-commands-if-tab-completion-is-disabled.patch b/patches/server/0638-Send-empty-commands-if-tab-completion-is-disabled.patch
index 2b52bb5343..2b52bb5343 100644
--- a/patches/server/0639-Send-empty-commands-if-tab-completion-is-disabled.patch
+++ b/patches/server/0638-Send-empty-commands-if-tab-completion-is-disabled.patch
diff --git a/patches/server/0640-Add-more-WanderingTrader-API.patch b/patches/server/0639-Add-more-WanderingTrader-API.patch
index 65d351d6df..65d351d6df 100644
--- a/patches/server/0640-Add-more-WanderingTrader-API.patch
+++ b/patches/server/0639-Add-more-WanderingTrader-API.patch
diff --git a/patches/server/0641-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0640-Add-EntityBlockStorage-clearEntities.patch
index 4742b14dac..4742b14dac 100644
--- a/patches/server/0641-Add-EntityBlockStorage-clearEntities.patch
+++ b/patches/server/0640-Add-EntityBlockStorage-clearEntities.patch
diff --git a/patches/server/0642-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/server/0641-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch
index b53cff9d00..b53cff9d00 100644
--- a/patches/server/0642-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch
+++ b/patches/server/0641-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch
diff --git a/patches/server/0643-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0642-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch
index 0b88624654..0b88624654 100644
--- a/patches/server/0643-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch
+++ b/patches/server/0642-Add-raw-address-to-AsyncPlayerPreLoginEvent.patch
diff --git a/patches/server/0644-Inventory-close.patch b/patches/server/0643-Inventory-close.patch
index e7f478324a..e7f478324a 100644
--- a/patches/server/0644-Inventory-close.patch
+++ b/patches/server/0643-Inventory-close.patch
diff --git a/patches/server/0645-call-PortalCreateEvent-players-and-end-platform.patch b/patches/server/0644-call-PortalCreateEvent-players-and-end-platform.patch
index ea0c797028..ea0c797028 100644
--- a/patches/server/0645-call-PortalCreateEvent-players-and-end-platform.patch
+++ b/patches/server/0644-call-PortalCreateEvent-players-and-end-platform.patch
diff --git a/patches/server/0646-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0645-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
index 9fc439f344..9fc439f344 100644
--- a/patches/server/0646-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
+++ b/patches/server/0645-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
diff --git a/patches/server/0647-Fix-CraftPotionBrewer-cache.patch b/patches/server/0646-Fix-CraftPotionBrewer-cache.patch
index 2d8295382f..2d8295382f 100644
--- a/patches/server/0647-Fix-CraftPotionBrewer-cache.patch
+++ b/patches/server/0646-Fix-CraftPotionBrewer-cache.patch
diff --git a/patches/server/0648-Add-basic-Datapack-API.patch b/patches/server/0647-Add-basic-Datapack-API.patch
index 70549c3014..70549c3014 100644
--- a/patches/server/0648-Add-basic-Datapack-API.patch
+++ b/patches/server/0647-Add-basic-Datapack-API.patch
diff --git a/patches/server/0649-Add-environment-variable-to-disable-server-gui.patch b/patches/server/0648-Add-environment-variable-to-disable-server-gui.patch
index a8785b7a29..a8785b7a29 100644
--- a/patches/server/0649-Add-environment-variable-to-disable-server-gui.patch
+++ b/patches/server/0648-Add-environment-variable-to-disable-server-gui.patch
diff --git a/patches/server/0650-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0649-additions-to-PlayerGameModeChangeEvent.patch
index 769f85c58f..769f85c58f 100644
--- a/patches/server/0650-additions-to-PlayerGameModeChangeEvent.patch
+++ b/patches/server/0649-additions-to-PlayerGameModeChangeEvent.patch
diff --git a/patches/server/0651-ItemStack-repair-check-API.patch b/patches/server/0650-ItemStack-repair-check-API.patch
index 4663820353..4663820353 100644
--- a/patches/server/0651-ItemStack-repair-check-API.patch
+++ b/patches/server/0650-ItemStack-repair-check-API.patch
diff --git a/patches/server/0652-More-Enchantment-API.patch b/patches/server/0651-More-Enchantment-API.patch
index be8a7f96c7..be8a7f96c7 100644
--- a/patches/server/0652-More-Enchantment-API.patch
+++ b/patches/server/0651-More-Enchantment-API.patch
diff --git a/patches/server/0653-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0652-Fix-and-optimise-world-force-upgrading.patch
index b110c0d528..f7e34581ab 100644
--- a/patches/server/0653-Fix-and-optimise-world-force-upgrading.patch
+++ b/patches/server/0652-Fix-and-optimise-world-force-upgrading.patch
@@ -272,10 +272,10 @@ index 69dc1271be0a3f3f2fb4ce15981ed25d24dce785..1e0d261439255091a6f61485c0747231
Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index abb6b8f3b69826d69956a248770fc7b87745ba9a..5a2c5dc61580ff343ca96561fa56400c31995529 100644
+index 0e888c2d64cddb8b44e0572cea07fbb3cf0e6987..4a92ea5d6db5873277708d9fba6e1dd04205da78 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -557,11 +557,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -555,11 +555,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worlddata = new PrimaryLevelData(worldsettings, generatorsettings, Lifecycle.stable());
}
worlddata.checkName(name); // CraftBukkit - Migration did not rewrite the level.dat; This forces 1.8 to take the last loaded world as respawn (in this case the end)
@@ -288,7 +288,7 @@ index abb6b8f3b69826d69956a248770fc7b87745ba9a..5a2c5dc61580ff343ca96561fa56400c
ServerLevelData iworlddataserver = worlddata;
WorldGenSettings generatorsettings = worlddata.worldGenSettings();
-@@ -593,6 +589,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -591,6 +587,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
diff --git a/patches/server/0654-Add-Mob-lookAt-API.patch b/patches/server/0653-Add-Mob-lookAt-API.patch
index 26b90782d2..26b90782d2 100644
--- a/patches/server/0654-Add-Mob-lookAt-API.patch
+++ b/patches/server/0653-Add-Mob-lookAt-API.patch
diff --git a/patches/server/0655-Add-Unix-domain-socket-support.patch b/patches/server/0654-Add-Unix-domain-socket-support.patch
index 85d133844f..85d133844f 100644
--- a/patches/server/0655-Add-Unix-domain-socket-support.patch
+++ b/patches/server/0654-Add-Unix-domain-socket-support.patch
diff --git a/patches/server/0656-Add-EntityInsideBlockEvent.patch b/patches/server/0655-Add-EntityInsideBlockEvent.patch
index 2c221ccdeb..2c221ccdeb 100644
--- a/patches/server/0656-Add-EntityInsideBlockEvent.patch
+++ b/patches/server/0655-Add-EntityInsideBlockEvent.patch
diff --git a/patches/server/0657-Attributes-API-for-item-defaults.patch b/patches/server/0656-Attributes-API-for-item-defaults.patch
index dd2a25bfc9..dd2a25bfc9 100644
--- a/patches/server/0657-Attributes-API-for-item-defaults.patch
+++ b/patches/server/0656-Attributes-API-for-item-defaults.patch
diff --git a/patches/server/0658-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0657-Add-cause-to-Weather-ThunderChangeEvents.patch
index 74ac72ae3b..74ac72ae3b 100644
--- a/patches/server/0658-Add-cause-to-Weather-ThunderChangeEvents.patch
+++ b/patches/server/0657-Add-cause-to-Weather-ThunderChangeEvents.patch
diff --git a/patches/server/0659-More-Lidded-Block-API.patch b/patches/server/0658-More-Lidded-Block-API.patch
index 5b7c8a3b64..5b7c8a3b64 100644
--- a/patches/server/0659-More-Lidded-Block-API.patch
+++ b/patches/server/0658-More-Lidded-Block-API.patch
diff --git a/patches/server/0660-Limit-item-frame-cursors-on-maps.patch b/patches/server/0659-Limit-item-frame-cursors-on-maps.patch
index 97ce04c935..97ce04c935 100644
--- a/patches/server/0660-Limit-item-frame-cursors-on-maps.patch
+++ b/patches/server/0659-Limit-item-frame-cursors-on-maps.patch
diff --git a/patches/server/0661-Add-PlayerKickEvent-causes.patch b/patches/server/0660-Add-PlayerKickEvent-causes.patch
index 9d07cf1b03..3823cfc3c7 100644
--- a/patches/server/0661-Add-PlayerKickEvent-causes.patch
+++ b/patches/server/0660-Add-PlayerKickEvent-causes.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerKickEvent causes
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 5a2c5dc61580ff343ca96561fa56400c31995529..ce40b5999e97b1bc56342876861b5bdad18d6cd6 100644
+index 4a92ea5d6db5873277708d9fba6e1dd04205da78..65d5d96a687712d87bbc61d85f80438811bae07d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2121,7 +2121,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2117,7 +2117,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
diff --git a/patches/server/0662-Add-PufferFishStateChangeEvent.patch b/patches/server/0661-Add-PufferFishStateChangeEvent.patch
index e15126884a..e15126884a 100644
--- a/patches/server/0662-Add-PufferFishStateChangeEvent.patch
+++ b/patches/server/0661-Add-PufferFishStateChangeEvent.patch
diff --git a/patches/server/0663-Fix-PlayerBucketEmptyEvent-result-itemstack.patch b/patches/server/0662-Fix-PlayerBucketEmptyEvent-result-itemstack.patch
index 2d2d6ea63a..2d2d6ea63a 100644
--- a/patches/server/0663-Fix-PlayerBucketEmptyEvent-result-itemstack.patch
+++ b/patches/server/0662-Fix-PlayerBucketEmptyEvent-result-itemstack.patch
diff --git a/patches/server/0664-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch b/patches/server/0663-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch
index 670063cc65..670063cc65 100644
--- a/patches/server/0664-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch
+++ b/patches/server/0663-Synchronize-PalettedContainer-instead-of-ReentrantLo.patch
diff --git a/patches/server/0665-Add-option-to-fix-items-merging-through-walls.patch b/patches/server/0664-Add-option-to-fix-items-merging-through-walls.patch
index 3855ef8543..3855ef8543 100644
--- a/patches/server/0665-Add-option-to-fix-items-merging-through-walls.patch
+++ b/patches/server/0664-Add-option-to-fix-items-merging-through-walls.patch
diff --git a/patches/server/0666-Add-BellRevealRaiderEvent.patch b/patches/server/0665-Add-BellRevealRaiderEvent.patch
index 587e0f0400..587e0f0400 100644
--- a/patches/server/0666-Add-BellRevealRaiderEvent.patch
+++ b/patches/server/0665-Add-BellRevealRaiderEvent.patch
diff --git a/patches/server/0667-Fix-invulnerable-end-crystals.patch b/patches/server/0666-Fix-invulnerable-end-crystals.patch
index e4866ecc06..e4866ecc06 100644
--- a/patches/server/0667-Fix-invulnerable-end-crystals.patch
+++ b/patches/server/0666-Fix-invulnerable-end-crystals.patch
diff --git a/patches/server/0668-Add-ElderGuardianAppearanceEvent.patch b/patches/server/0667-Add-ElderGuardianAppearanceEvent.patch
index 540926f9ef..540926f9ef 100644
--- a/patches/server/0668-Add-ElderGuardianAppearanceEvent.patch
+++ b/patches/server/0667-Add-ElderGuardianAppearanceEvent.patch
diff --git a/patches/server/0669-Fix-dangerous-end-portal-logic.patch b/patches/server/0668-Fix-dangerous-end-portal-logic.patch
index 1be4e84ec5..1be4e84ec5 100644
--- a/patches/server/0669-Fix-dangerous-end-portal-logic.patch
+++ b/patches/server/0668-Fix-dangerous-end-portal-logic.patch
diff --git a/patches/server/0670-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/patches/server/0669-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch
index c3c7f53663..c3c7f53663 100644
--- a/patches/server/0670-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch
+++ b/patches/server/0669-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch
diff --git a/patches/server/0671-Make-item-validations-configurable.patch b/patches/server/0670-Make-item-validations-configurable.patch
index b10a52f5e4..b10a52f5e4 100644
--- a/patches/server/0671-Make-item-validations-configurable.patch
+++ b/patches/server/0670-Make-item-validations-configurable.patch
diff --git a/patches/server/0672-Line-Of-Sight-Changes.patch b/patches/server/0671-Line-Of-Sight-Changes.patch
index 28e1141d0b..28e1141d0b 100644
--- a/patches/server/0672-Line-Of-Sight-Changes.patch
+++ b/patches/server/0671-Line-Of-Sight-Changes.patch
diff --git a/patches/server/0673-add-per-world-spawn-limits.patch b/patches/server/0672-add-per-world-spawn-limits.patch
index adf5a71947..adf5a71947 100644
--- a/patches/server/0673-add-per-world-spawn-limits.patch
+++ b/patches/server/0672-add-per-world-spawn-limits.patch
diff --git a/patches/server/0674-Fix-PotionSplashEvent-for-water-splash-potions.patch b/patches/server/0673-Fix-PotionSplashEvent-for-water-splash-potions.patch
index 56f02dad6e..56f02dad6e 100644
--- a/patches/server/0674-Fix-PotionSplashEvent-for-water-splash-potions.patch
+++ b/patches/server/0673-Fix-PotionSplashEvent-for-water-splash-potions.patch
diff --git a/patches/server/0675-Add-more-LimitedRegion-API.patch b/patches/server/0674-Add-more-LimitedRegion-API.patch
index e9e7611f99..e9e7611f99 100644
--- a/patches/server/0675-Add-more-LimitedRegion-API.patch
+++ b/patches/server/0674-Add-more-LimitedRegion-API.patch
diff --git a/patches/server/0676-Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/0675-Fix-PlayerDropItemEvent-using-wrong-item.patch
index 6ae023df0a..55b44190bb 100644
--- a/patches/server/0676-Fix-PlayerDropItemEvent-using-wrong-item.patch
+++ b/patches/server/0675-Fix-PlayerDropItemEvent-using-wrong-item.patch
@@ -18,7 +18,7 @@ index f1661e228ed982f38e0bc3e9e0c1720608e0b4a4..ca9a30a279e7d12c63b351e437fb9dcc
this.awardStat(Stats.DROP);
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 f4c861c86b718d67ae13ac02c6d1f20433312725..be2f492343770af9d360c4e7ed7495d196b2424c 100644
+index de0b885ebafecb37ef8be127362f76d487ff92ae..909f5c26ca149687c03688c33c241e549f19a3e9 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -713,6 +713,11 @@ public abstract class Player extends LivingEntity {
@@ -26,10 +26,10 @@ index f4c861c86b718d67ae13ac02c6d1f20433312725..be2f492343770af9d360c4e7ed7495d1
double d0 = this.getEyeY() - 0.30000001192092896D;
+ // Paper start
-+ ItemStack tmp = stack.copy();
-+ stack.setCount(0);
-+ stack = tmp;
++ ItemStack tmp = itemstack.copy();
++ itemstack.setCount(0);
++ itemstack = tmp;
+ // Paper end
- ItemEntity entityitem = new ItemEntity(this.level, this.getX(), d0, this.getZ(), stack);
+ ItemEntity entityitem = new ItemEntity(this.level, this.getX(), d0, this.getZ(), itemstack);
entityitem.setPickUpDelay(40);
diff --git a/patches/server/0677-Missing-Entity-Behavior-API.patch b/patches/server/0676-Missing-Entity-Behavior-API.patch
index b1edabe7e5..b1edabe7e5 100644
--- a/patches/server/0677-Missing-Entity-Behavior-API.patch
+++ b/patches/server/0676-Missing-Entity-Behavior-API.patch
diff --git a/patches/server/0678-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0677-Ensure-disconnect-for-book-edit-is-called-on-main.patch
index 61eab94f77..61eab94f77 100644
--- a/patches/server/0678-Ensure-disconnect-for-book-edit-is-called-on-main.patch
+++ b/patches/server/0677-Ensure-disconnect-for-book-edit-is-called-on-main.patch
diff --git a/patches/server/0678-Fix-return-value-of-Block-applyBoneMeal-always-being.patch b/patches/server/0678-Fix-return-value-of-Block-applyBoneMeal-always-being.patch
new file mode 100644
index 0000000000..7b6806a054
--- /dev/null
+++ b/patches/server/0678-Fix-return-value-of-Block-applyBoneMeal-always-being.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jason Penilla <[email protected]>
+Date: Mon, 28 Jun 2021 18:16:52 -0700
+Subject: [PATCH] Fix return value of Block#applyBoneMeal always being false
+
+
+diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+index 56fd99224edf9041104a540fd14ba3468af4805e..6c29efdb641c5d768a8bbf410da2a059e7d3e90a 100644
+--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+@@ -558,7 +558,7 @@ public class CraftBlock implements Block {
+ }
+ }
+
+- return result == InteractionResult.SUCCESS && (event == null || !event.isCancelled());
++ return result == InteractionResult.CONSUME && (event == null || !event.isCancelled()); // Paper - CONSUME is returned on success server-side (see BoneMealItem.applyBoneMeal and InteractionResult.sidedSuccess(boolean))
+ }
+
+ @Override
diff --git a/patches/server/0679-Fix-return-value-of-Block-applyBoneMeal-always-being.patch b/patches/server/0679-Fix-return-value-of-Block-applyBoneMeal-always-being.patch
deleted file mode 100644
index 179e878420..0000000000
--- a/patches/server/0679-Fix-return-value-of-Block-applyBoneMeal-always-being.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jason Penilla <[email protected]>
-Date: Mon, 28 Jun 2021 18:16:52 -0700
-Subject: [PATCH] Fix return value of Block#applyBoneMeal always being false
-
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 55f830598e67943674aa54ddfefc02bb3a3a3dcc..bb1f39fb215bbd422d6bb9ed0928d4d749d61dab 100644
---- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -521,7 +521,7 @@ public class CraftBlock implements Block {
- Direction direction = CraftBlock.blockFaceToNotch(face);
- UseOnContext context = new UseOnContext(this.getCraftWorld().getHandle(), null, InteractionHand.MAIN_HAND, Items.BONE_MEAL.getDefaultInstance(), new BlockHitResult(Vec3.ZERO, direction, this.getPosition(), false));
-
-- return BoneMealItem.applyBonemeal(context) == InteractionResult.SUCCESS;
-+ return BoneMealItem.applyBonemeal(context) == InteractionResult.CONSUME; // Paper - CONSUME is returned on success server-side (see BoneMealItem.applyBoneMeal and InteractionResult.sidedSuccess(boolean))
- }
-
- @Override
diff --git a/patches/server/0680-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0679-Use-getChunkIfLoadedImmediately-in-places.patch
index 99213d6d81..99213d6d81 100644
--- a/patches/server/0680-Use-getChunkIfLoadedImmediately-in-places.patch
+++ b/patches/server/0679-Use-getChunkIfLoadedImmediately-in-places.patch
diff --git a/patches/server/0681-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0680-Fix-commands-from-signs-not-firing-command-events.patch
index 386073e2a7..386073e2a7 100644
--- a/patches/server/0681-Fix-commands-from-signs-not-firing-command-events.patch
+++ b/patches/server/0680-Fix-commands-from-signs-not-firing-command-events.patch
diff --git a/patches/server/0682-Adds-PlayerArmSwingEvent.patch b/patches/server/0681-Adds-PlayerArmSwingEvent.patch
index 0ac17873c1..0ac17873c1 100644
--- a/patches/server/0682-Adds-PlayerArmSwingEvent.patch
+++ b/patches/server/0681-Adds-PlayerArmSwingEvent.patch
diff --git a/patches/server/0683-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0682-Fixes-kick-event-leave-message-not-being-sent.patch
index 316e9e0de5..316e9e0de5 100644
--- a/patches/server/0683-Fixes-kick-event-leave-message-not-being-sent.patch
+++ b/patches/server/0682-Fixes-kick-event-leave-message-not-being-sent.patch
diff --git a/patches/server/0684-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0683-Add-config-for-mobs-immune-to-default-effects.patch
index a5538750c3..a5538750c3 100644
--- a/patches/server/0684-Add-config-for-mobs-immune-to-default-effects.patch
+++ b/patches/server/0683-Add-config-for-mobs-immune-to-default-effects.patch
diff --git a/patches/server/0685-Fix-incorrect-message-for-outdated-client.patch b/patches/server/0684-Fix-incorrect-message-for-outdated-client.patch
index 1b0f3a3869..1b0f3a3869 100644
--- a/patches/server/0685-Fix-incorrect-message-for-outdated-client.patch
+++ b/patches/server/0684-Fix-incorrect-message-for-outdated-client.patch
diff --git a/patches/server/0686-Don-t-apply-cramming-damage-to-players.patch b/patches/server/0685-Don-t-apply-cramming-damage-to-players.patch
index 12bca847ff..12bca847ff 100644
--- a/patches/server/0686-Don-t-apply-cramming-damage-to-players.patch
+++ b/patches/server/0685-Don-t-apply-cramming-damage-to-players.patch
diff --git a/patches/server/0687-Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/0686-Rate-options-and-timings-for-sensors-and-behaviors.patch
index 74cf0c5264..74cf0c5264 100644
--- a/patches/server/0687-Rate-options-and-timings-for-sensors-and-behaviors.patch
+++ b/patches/server/0686-Rate-options-and-timings-for-sensors-and-behaviors.patch
diff --git a/patches/server/0688-Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/0687-Add-a-bunch-of-missing-forceDrop-toggles.patch
index 8e69a76f25..8e69a76f25 100644
--- a/patches/server/0688-Add-a-bunch-of-missing-forceDrop-toggles.patch
+++ b/patches/server/0687-Add-a-bunch-of-missing-forceDrop-toggles.patch
diff --git a/patches/server/0689-Stinger-API.patch b/patches/server/0688-Stinger-API.patch
index 33f8959315..33f8959315 100644
--- a/patches/server/0689-Stinger-API.patch
+++ b/patches/server/0688-Stinger-API.patch
diff --git a/patches/server/0690-Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/0689-Fix-incosistency-issue-with-empty-map-items-in-CB.patch
index 8d4fe001d2..8d4fe001d2 100644
--- a/patches/server/0690-Fix-incosistency-issue-with-empty-map-items-in-CB.patch
+++ b/patches/server/0689-Fix-incosistency-issue-with-empty-map-items-in-CB.patch
diff --git a/patches/server/0691-Add-System.out-err-catcher.patch b/patches/server/0690-Add-System.out-err-catcher.patch
index dde83aa3c8..dde83aa3c8 100644
--- a/patches/server/0691-Add-System.out-err-catcher.patch
+++ b/patches/server/0690-Add-System.out-err-catcher.patch
diff --git a/patches/server/0692-Fix-test-not-bootstrapping.patch b/patches/server/0691-Fix-test-not-bootstrapping.patch
index 5d0466c3b3..5d0466c3b3 100644
--- a/patches/server/0692-Fix-test-not-bootstrapping.patch
+++ b/patches/server/0691-Fix-test-not-bootstrapping.patch
diff --git a/patches/server/0693-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/0692-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
index 10cd90749d..10cd90749d 100644
--- a/patches/server/0693-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
+++ b/patches/server/0692-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
diff --git a/patches/server/0694-Improve-boat-collision-performance.patch b/patches/server/0693-Improve-boat-collision-performance.patch
index 24fc315296..24fc315296 100644
--- a/patches/server/0694-Improve-boat-collision-performance.patch
+++ b/patches/server/0693-Improve-boat-collision-performance.patch
diff --git a/patches/server/0695-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0694-Prevent-AFK-kick-while-watching-end-credits.patch
index 44c6dff957..44c6dff957 100644
--- a/patches/server/0695-Prevent-AFK-kick-while-watching-end-credits.patch
+++ b/patches/server/0694-Prevent-AFK-kick-while-watching-end-credits.patch
diff --git a/patches/server/0696-Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/0695-Allow-skipping-writing-of-comments-to-server.propert.patch
index 6395f3f4a8..6395f3f4a8 100644
--- a/patches/server/0696-Allow-skipping-writing-of-comments-to-server.propert.patch
+++ b/patches/server/0695-Allow-skipping-writing-of-comments-to-server.propert.patch
diff --git a/patches/server/0697-Add-PlayerSetSpawnEvent.patch b/patches/server/0696-Add-PlayerSetSpawnEvent.patch
index 5af986d650..5af986d650 100644
--- a/patches/server/0697-Add-PlayerSetSpawnEvent.patch
+++ b/patches/server/0696-Add-PlayerSetSpawnEvent.patch
diff --git a/patches/server/0698-Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/0697-Make-hoppers-respect-inventory-max-stack-size.patch
index ea86736121..ea86736121 100644
--- a/patches/server/0698-Make-hoppers-respect-inventory-max-stack-size.patch
+++ b/patches/server/0697-Make-hoppers-respect-inventory-max-stack-size.patch
diff --git a/patches/server/0699-Optimize-entity-tracker-passenger-checks.patch b/patches/server/0698-Optimize-entity-tracker-passenger-checks.patch
index cf8b4494f3..cf8b4494f3 100644
--- a/patches/server/0699-Optimize-entity-tracker-passenger-checks.patch
+++ b/patches/server/0698-Optimize-entity-tracker-passenger-checks.patch
diff --git a/patches/server/0700-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0699-Config-option-for-Piglins-guarding-chests.patch
index ca40719e13..ca40719e13 100644
--- a/patches/server/0700-Config-option-for-Piglins-guarding-chests.patch
+++ b/patches/server/0699-Config-option-for-Piglins-guarding-chests.patch
diff --git a/patches/server/0701-Added-EntityDamageItemEvent.patch b/patches/server/0700-Added-EntityDamageItemEvent.patch
index 0f5056e7ce..0f5056e7ce 100644
--- a/patches/server/0701-Added-EntityDamageItemEvent.patch
+++ b/patches/server/0700-Added-EntityDamageItemEvent.patch
diff --git a/patches/server/0702-Optimize-indirect-passenger-iteration.patch b/patches/server/0701-Optimize-indirect-passenger-iteration.patch
index 3f6f8f2a1f..3f6f8f2a1f 100644
--- a/patches/server/0702-Optimize-indirect-passenger-iteration.patch
+++ b/patches/server/0701-Optimize-indirect-passenger-iteration.patch
diff --git a/patches/server/0703-Fix-block-drops-position-losing-precision-millions-o.patch b/patches/server/0702-Fix-block-drops-position-losing-precision-millions-o.patch
index a32af5a891..a32af5a891 100644
--- a/patches/server/0703-Fix-block-drops-position-losing-precision-millions-o.patch
+++ b/patches/server/0702-Fix-block-drops-position-losing-precision-millions-o.patch
diff --git a/patches/server/0704-Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/0703-Configurable-item-frame-map-cursor-update-interval.patch
index ad55f5c5ec..ad55f5c5ec 100644
--- a/patches/server/0704-Configurable-item-frame-map-cursor-update-interval.patch
+++ b/patches/server/0703-Configurable-item-frame-map-cursor-update-interval.patch
diff --git a/patches/server/0705-Make-EntityUnleashEvent-cancellable.patch b/patches/server/0704-Make-EntityUnleashEvent-cancellable.patch
index 2d8246afff..2d8246afff 100644
--- a/patches/server/0705-Make-EntityUnleashEvent-cancellable.patch
+++ b/patches/server/0704-Make-EntityUnleashEvent-cancellable.patch
diff --git a/patches/server/0706-Clear-bucket-NBT-after-dispense.patch b/patches/server/0705-Clear-bucket-NBT-after-dispense.patch
index 50f3155d75..50f3155d75 100644
--- a/patches/server/0706-Clear-bucket-NBT-after-dispense.patch
+++ b/patches/server/0705-Clear-bucket-NBT-after-dispense.patch
diff --git a/patches/server/0707-Respect-despawn-rate-in-item-merge-check.patch b/patches/server/0706-Respect-despawn-rate-in-item-merge-check.patch
index 8967390e3e..8967390e3e 100644
--- a/patches/server/0707-Respect-despawn-rate-in-item-merge-check.patch
+++ b/patches/server/0706-Respect-despawn-rate-in-item-merge-check.patch
diff --git a/patches/server/0708-Change-EnderEye-target-without-changing-other-things.patch b/patches/server/0707-Change-EnderEye-target-without-changing-other-things.patch
index e4af6267df..e4af6267df 100644
--- a/patches/server/0708-Change-EnderEye-target-without-changing-other-things.patch
+++ b/patches/server/0707-Change-EnderEye-target-without-changing-other-things.patch
diff --git a/patches/server/0709-Add-BlockBreakBlockEvent.patch b/patches/server/0708-Add-BlockBreakBlockEvent.patch
index b7f264d94f..b7f264d94f 100644
--- a/patches/server/0709-Add-BlockBreakBlockEvent.patch
+++ b/patches/server/0708-Add-BlockBreakBlockEvent.patch
diff --git a/patches/server/0710-Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/server/0709-Option-to-prevent-NBT-copy-in-smithing-recipes.patch
index 14e666a79e..14e666a79e 100644
--- a/patches/server/0710-Option-to-prevent-NBT-copy-in-smithing-recipes.patch
+++ b/patches/server/0709-Option-to-prevent-NBT-copy-in-smithing-recipes.patch
diff --git a/patches/server/0711-More-CommandBlock-API.patch b/patches/server/0710-More-CommandBlock-API.patch
index daf682f8a0..daf682f8a0 100644
--- a/patches/server/0711-More-CommandBlock-API.patch
+++ b/patches/server/0710-More-CommandBlock-API.patch
diff --git a/patches/server/0712-Add-missing-team-sidebar-display-slots.patch b/patches/server/0711-Add-missing-team-sidebar-display-slots.patch
index 5581728a48..5581728a48 100644
--- a/patches/server/0712-Add-missing-team-sidebar-display-slots.patch
+++ b/patches/server/0711-Add-missing-team-sidebar-display-slots.patch
diff --git a/patches/server/0713-Add-back-EntityPortalExitEvent.patch b/patches/server/0712-Add-back-EntityPortalExitEvent.patch
index a44e713ebd..a44e713ebd 100644
--- a/patches/server/0713-Add-back-EntityPortalExitEvent.patch
+++ b/patches/server/0712-Add-back-EntityPortalExitEvent.patch
diff --git a/patches/server/0714-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0713-Add-methods-to-find-targets-for-lightning-strikes.patch
index 742d7716ff..742d7716ff 100644
--- a/patches/server/0714-Add-methods-to-find-targets-for-lightning-strikes.patch
+++ b/patches/server/0713-Add-methods-to-find-targets-for-lightning-strikes.patch
diff --git a/patches/server/0715-Get-entity-default-attributes.patch b/patches/server/0714-Get-entity-default-attributes.patch
index 6ae983a717..6ae983a717 100644
--- a/patches/server/0715-Get-entity-default-attributes.patch
+++ b/patches/server/0714-Get-entity-default-attributes.patch
diff --git a/patches/server/0716-Left-handed-API.patch b/patches/server/0715-Left-handed-API.patch
index dd1acc7723..dd1acc7723 100644
--- a/patches/server/0716-Left-handed-API.patch
+++ b/patches/server/0715-Left-handed-API.patch
diff --git a/patches/server/0717-Add-advancement-display-API.patch b/patches/server/0716-Add-advancement-display-API.patch
index c2bd6b94c0..c2bd6b94c0 100644
--- a/patches/server/0717-Add-advancement-display-API.patch
+++ b/patches/server/0716-Add-advancement-display-API.patch
diff --git a/patches/server/0718-Add-ItemFactory-getMonsterEgg-API.patch b/patches/server/0717-Add-ItemFactory-getMonsterEgg-API.patch
index f22d19fef2..f22d19fef2 100644
--- a/patches/server/0718-Add-ItemFactory-getMonsterEgg-API.patch
+++ b/patches/server/0717-Add-ItemFactory-getMonsterEgg-API.patch
diff --git a/patches/server/0719-Add-critical-damage-API.patch b/patches/server/0718-Add-critical-damage-API.patch
index ca4be99b06..1eb7eeb9dd 100644
--- a/patches/server/0719-Add-critical-damage-API.patch
+++ b/patches/server/0718-Add-critical-damage-API.patch
@@ -29,10 +29,10 @@ index 80d19af2ad423bd3de0e039c5bb8f97af536aaa9..a828cad27fcd39f8bfbaefa97052a2a3
public static DamageSource sting(LivingEntity attacker) {
return new EntityDamageSource("sting", attacker);
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 be2f492343770af9d360c4e7ed7495d196b2424c..3b235e98072664047c352dbb07fdcf2bd8553970 100644
+index 909f5c26ca149687c03688c33c241e549f19a3e9..8c74787c81d2b72a8b1c9dfff0a9db38ab13c973 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1227,7 +1227,7 @@ public abstract class Player extends LivingEntity {
+@@ -1230,7 +1230,7 @@ public abstract class Player extends LivingEntity {
flag1 = true;
}
@@ -41,7 +41,7 @@ index be2f492343770af9d360c4e7ed7495d196b2424c..3b235e98072664047c352dbb07fdcf2b
flag2 = flag2 && !level.paperConfig.disablePlayerCrits; // Paper
flag2 = flag2 && !this.isSprinting();
-@@ -1267,7 +1267,7 @@ public abstract class Player extends LivingEntity {
+@@ -1270,7 +1270,7 @@ public abstract class Player extends LivingEntity {
}
Vec3 vec3d = target.getDeltaMovement();
@@ -50,7 +50,7 @@ index be2f492343770af9d360c4e7ed7495d196b2424c..3b235e98072664047c352dbb07fdcf2b
if (flag5) {
if (i > 0) {
-@@ -1295,7 +1295,7 @@ public abstract class Player extends LivingEntity {
+@@ -1298,7 +1298,7 @@ public abstract class Player extends LivingEntity {
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
// CraftBukkit start - Only apply knockback if the damage hits
diff --git a/patches/server/0720-Fix-issues-with-mob-conversion.patch b/patches/server/0719-Fix-issues-with-mob-conversion.patch
index 69feb4b3a4..69feb4b3a4 100644
--- a/patches/server/0720-Fix-issues-with-mob-conversion.patch
+++ b/patches/server/0719-Fix-issues-with-mob-conversion.patch
diff --git a/patches/server/0721-Add-isCollidable-methods-to-various-places.patch b/patches/server/0720-Add-isCollidable-methods-to-various-places.patch
index 6e08b33501..1497c827c3 100644
--- a/patches/server/0721-Add-isCollidable-methods-to-various-places.patch
+++ b/patches/server/0720-Add-isCollidable-methods-to-various-places.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index bb1f39fb215bbd422d6bb9ed0928d4d749d61dab..88c8817a85546ff92424b1164abcd74a15ff0917 100644
+index 6c29efdb641c5d768a8bbf410da2a059e7d3e90a..0b2e33fb16f832e0ddfe5e39a8a16caf98521098 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -473,6 +473,11 @@ public class CraftBlock implements Block {
+@@ -480,6 +480,11 @@ public class CraftBlock implements Block {
public boolean isSolid() {
return getNMS().getMaterial().blocksMotion();
}
diff --git a/patches/server/0722-Goat-ram-API.patch b/patches/server/0721-Goat-ram-API.patch
index f1fcff3a29..f1fcff3a29 100644
--- a/patches/server/0722-Goat-ram-API.patch
+++ b/patches/server/0721-Goat-ram-API.patch
diff --git a/patches/server/0723-Add-API-for-resetting-a-single-score.patch b/patches/server/0722-Add-API-for-resetting-a-single-score.patch
index c2e1fd93b9..c2e1fd93b9 100644
--- a/patches/server/0723-Add-API-for-resetting-a-single-score.patch
+++ b/patches/server/0722-Add-API-for-resetting-a-single-score.patch
diff --git a/patches/server/0724-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0723-Add-Raw-Byte-Entity-Serialization.patch
index d7e938d57a..d7e938d57a 100644
--- a/patches/server/0724-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/server/0723-Add-Raw-Byte-Entity-Serialization.patch
diff --git a/patches/server/0725-Vanilla-command-permission-fixes.patch b/patches/server/0724-Vanilla-command-permission-fixes.patch
index d9b53520f4..d9b53520f4 100644
--- a/patches/server/0725-Vanilla-command-permission-fixes.patch
+++ b/patches/server/0724-Vanilla-command-permission-fixes.patch
diff --git a/patches/server/0726-Make-CallbackExecutor-strict-again.patch b/patches/server/0725-Make-CallbackExecutor-strict-again.patch
index d2fcbba34f..9360912a3d 100644
--- a/patches/server/0726-Make-CallbackExecutor-strict-again.patch
+++ b/patches/server/0725-Make-CallbackExecutor-strict-again.patch
@@ -10,7 +10,7 @@ schedules. Effectively, use the callback executor as a tool of
finding issues rather than hiding these issues.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 9d9312cb8e9681428f7ab1b1e6eb803fc558d651..edb35a483ae44073d560df1fe949aad60bf3d39d 100644
+index 104e7d0c18b032ee8198c4de25a57676d0f64745..d53ff732a503eab3aea0384475f8a56d3076828d 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -164,17 +164,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
diff --git a/patches/server/0727-Do-not-allow-the-server-to-unload-chunks-at-request-.patch b/patches/server/0726-Do-not-allow-the-server-to-unload-chunks-at-request-.patch
index d2c7c618d7..d2c7c618d7 100644
--- a/patches/server/0727-Do-not-allow-the-server-to-unload-chunks-at-request-.patch
+++ b/patches/server/0726-Do-not-allow-the-server-to-unload-chunks-at-request-.patch
diff --git a/patches/server/0728-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0727-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
index b4e5807041..62e9ac7bb2 100644
--- a/patches/server/0728-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
+++ b/patches/server/0727-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
@@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/
state desync POV because the TE is getting unloaded anyways.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 7eeb80e708da11cc0ec41e4eeee53fb370ac17b1..02b6cdc6b0b90fba7523f5eafb1b5641d6eceb66 100644
+index 990c16b52ac80df180086d045d56923bb2d69b1e..3d00c1bcd5acbeee09f1854076545a1d3628d27e 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1309,9 +1309,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1312,9 +1312,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
if (tileentity instanceof net.minecraft.world.Container) {
@@ -51,7 +51,7 @@ index 55bdc0abb1fe42c02479678c3840d1d4da3253ae..1a2dd16ec1f189c3b53a57c0224a15f4
public void doCloseContainer() {
this.containerMenu.removed(this);
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 3b235e98072664047c352dbb07fdcf2bd8553970..9c767096ca950d55d6002282c7a3fe2884bcd630 100644
+index 8c74787c81d2b72a8b1c9dfff0a9db38ab13c973..2483d7df7f1bf94344afd38b37602c645a4a2dff 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -497,6 +497,11 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0729-Correctly-handle-recursion-for-chunkholder-updates.patch b/patches/server/0728-Correctly-handle-recursion-for-chunkholder-updates.patch
index 48e805996a..48e805996a 100644
--- a/patches/server/0729-Correctly-handle-recursion-for-chunkholder-updates.patch
+++ b/patches/server/0728-Correctly-handle-recursion-for-chunkholder-updates.patch
diff --git a/patches/server/0730-Separate-lookup-locking-from-state-access-in-UserCac.patch b/patches/server/0729-Separate-lookup-locking-from-state-access-in-UserCac.patch
index 86c0e502fd..86c0e502fd 100644
--- a/patches/server/0730-Separate-lookup-locking-from-state-access-in-UserCac.patch
+++ b/patches/server/0729-Separate-lookup-locking-from-state-access-in-UserCac.patch
diff --git a/patches/server/0731-Fix-chunks-refusing-to-unload-at-low-TPS.patch b/patches/server/0730-Fix-chunks-refusing-to-unload-at-low-TPS.patch
index 0ea9e0770d..9faff94627 100644
--- a/patches/server/0731-Fix-chunks-refusing-to-unload-at-low-TPS.patch
+++ b/patches/server/0730-Fix-chunks-refusing-to-unload-at-low-TPS.patch
@@ -10,10 +10,10 @@ chunk future to complete. We can simply schedule to the immediate
executor to get this effect, rather than the main mailbox.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index edb35a483ae44073d560df1fe949aad60bf3d39d..fdfac353fe9cf8509a08b5157ed0762c3a12f3e3 100644
+index d53ff732a503eab3aea0384475f8a56d3076828d..971a31641ec33a80f45e507944fa4cd90bfc466a 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1314,9 +1314,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1300,9 +1300,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return chunk;
});
diff --git a/patches/server/0732-Do-not-allow-ticket-level-changes-while-unloading-pl.patch b/patches/server/0731-Do-not-allow-ticket-level-changes-while-unloading-pl.patch
index 477937d99b..a1d6ef4207 100644
--- a/patches/server/0732-Do-not-allow-ticket-level-changes-while-unloading-pl.patch
+++ b/patches/server/0731-Do-not-allow-ticket-level-changes-while-unloading-pl.patch
@@ -8,7 +8,7 @@ Sync loading the chunk at this stage would cause it to load
older data, as well as screwing our region state.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index fdfac353fe9cf8509a08b5157ed0762c3a12f3e3..33eebcd8f3459fcdc51c0a327563a1abc3c1d432 100644
+index 971a31641ec33a80f45e507944fa4cd90bfc466a..5d60fa26e9f5d3c9c57a61c509d5b924bbed3281 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -313,6 +313,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -27,7 +27,7 @@ index fdfac353fe9cf8509a08b5157ed0762c3a12f3e3..33eebcd8f3459fcdc51c0a327563a1ab
if (k > ChunkMap.MAX_CHUNK_DISTANCE && level > ChunkMap.MAX_CHUNK_DISTANCE) {
return holder;
} else {
-@@ -924,6 +926,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -910,6 +912,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (completablefuture1 != completablefuture) {
this.scheduleUnload(pos, holder);
} else {
@@ -40,7 +40,7 @@ index fdfac353fe9cf8509a08b5157ed0762c3a12f3e3..33eebcd8f3459fcdc51c0a327563a1ab
// Paper start
boolean removed;
if ((removed = this.pendingUnloads.remove(pos, holder)) && ichunkaccess != null) {
-@@ -961,6 +969,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -947,6 +955,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z);
}
} // Paper end
diff --git a/patches/server/0733-Do-not-allow-ticket-level-changes-when-updating-chun.patch b/patches/server/0732-Do-not-allow-ticket-level-changes-when-updating-chun.patch
index d0f51016fc..d0f51016fc 100644
--- a/patches/server/0733-Do-not-allow-ticket-level-changes-when-updating-chun.patch
+++ b/patches/server/0732-Do-not-allow-ticket-level-changes-when-updating-chun.patch
diff --git a/patches/server/0734-Do-not-submit-profile-lookups-to-worldgen-threads.patch b/patches/server/0733-Do-not-submit-profile-lookups-to-worldgen-threads.patch
index 7654abc8b4..7654abc8b4 100644
--- a/patches/server/0734-Do-not-submit-profile-lookups-to-worldgen-threads.patch
+++ b/patches/server/0733-Do-not-submit-profile-lookups-to-worldgen-threads.patch
diff --git a/patches/server/0735-Log-when-the-async-catcher-is-tripped.patch b/patches/server/0734-Log-when-the-async-catcher-is-tripped.patch
index bede76faf6..bede76faf6 100644
--- a/patches/server/0735-Log-when-the-async-catcher-is-tripped.patch
+++ b/patches/server/0734-Log-when-the-async-catcher-is-tripped.patch
diff --git a/patches/server/0736-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0735-Add-paper-mobcaps-and-paper-playermobcaps.patch
index f36284ae0c..f36284ae0c 100644
--- a/patches/server/0736-Add-paper-mobcaps-and-paper-playermobcaps.patch
+++ b/patches/server/0735-Add-paper-mobcaps-and-paper-playermobcaps.patch
diff --git a/patches/server/0737-Prevent-unload-calls-removing-tickets-for-sync-loads.patch b/patches/server/0736-Prevent-unload-calls-removing-tickets-for-sync-loads.patch
index e2c4416234..e2c4416234 100644
--- a/patches/server/0737-Prevent-unload-calls-removing-tickets-for-sync-loads.patch
+++ b/patches/server/0736-Prevent-unload-calls-removing-tickets-for-sync-loads.patch
diff --git a/patches/server/0738-Sanitize-ResourceLocation-error-logging.patch b/patches/server/0737-Sanitize-ResourceLocation-error-logging.patch
index ff7e0b7826..ff7e0b7826 100644
--- a/patches/server/0738-Sanitize-ResourceLocation-error-logging.patch
+++ b/patches/server/0737-Sanitize-ResourceLocation-error-logging.patch
diff --git a/patches/server/0739-Optimise-general-POI-access.patch b/patches/server/0738-Optimise-general-POI-access.patch
index 7fa35796de..7fa35796de 100644
--- a/patches/server/0739-Optimise-general-POI-access.patch
+++ b/patches/server/0738-Optimise-general-POI-access.patch
diff --git a/patches/server/0740-Allow-controlled-flushing-for-network-manager.patch b/patches/server/0739-Allow-controlled-flushing-for-network-manager.patch
index 9b061bed55..9b061bed55 100644
--- a/patches/server/0740-Allow-controlled-flushing-for-network-manager.patch
+++ b/patches/server/0739-Allow-controlled-flushing-for-network-manager.patch
diff --git a/patches/server/0741-Add-more-async-catchers.patch b/patches/server/0740-Add-more-async-catchers.patch
index f0813b3370..f0813b3370 100644
--- a/patches/server/0741-Add-more-async-catchers.patch
+++ b/patches/server/0740-Add-more-async-catchers.patch
diff --git a/patches/server/0742-Rewrite-entity-bounding-box-lookup-calls.patch b/patches/server/0741-Rewrite-entity-bounding-box-lookup-calls.patch
index 0a840e45df..0a840e45df 100644
--- a/patches/server/0742-Rewrite-entity-bounding-box-lookup-calls.patch
+++ b/patches/server/0741-Rewrite-entity-bounding-box-lookup-calls.patch
diff --git a/patches/server/0743-Optimise-chunk-tick-iteration.patch b/patches/server/0742-Optimise-chunk-tick-iteration.patch
index 4e6d8f0cb1..6d81aa8739 100644
--- a/patches/server/0743-Optimise-chunk-tick-iteration.patch
+++ b/patches/server/0742-Optimise-chunk-tick-iteration.patch
@@ -70,7 +70,7 @@ index fbfbe9adeca7364e6346c887616890bf968f38a1..bd43fbc8a93afa7604aa467392520ed7
int i = 0;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 33eebcd8f3459fcdc51c0a327563a1abc3c1d432..9b2c5fe2389c6baa239de4f7b479d9ca273e59cf 100644
+index 5d60fa26e9f5d3c9c57a61c509d5b924bbed3281..ef28e0f57ba593265a3eca4d3f21d0b1b51e8740 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -159,6 +159,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
diff --git a/patches/server/0744-Execute-chunk-tasks-mid-tick.patch b/patches/server/0743-Execute-chunk-tasks-mid-tick.patch
index 3705f009e8..acf3980fc3 100644
--- a/patches/server/0744-Execute-chunk-tasks-mid-tick.patch
+++ b/patches/server/0743-Execute-chunk-tasks-mid-tick.patch
@@ -19,10 +19,10 @@ index b27021a42cbed3f0648a8d0903d00d03922ae221..eada966d7f108a6081be7a848f5c1dfc
private MinecraftTimings() {}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index ce40b5999e97b1bc56342876861b5bdad18d6cd6..ee33fd892e97e1ffea259a4f7974675923377d6b 100644
+index 65d5d96a687712d87bbc61d85f80438811bae07d..a279368fe144bd41d15e5fe5e565412f8b4ef9f7 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1346,6 +1346,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1344,6 +1344,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean pollTaskInternal() {
if (super.pollTask()) {
@@ -30,7 +30,7 @@ index ce40b5999e97b1bc56342876861b5bdad18d6cd6..ee33fd892e97e1ffea259a4f79746759
return true;
} else {
if (this.haveTime()) {
-@@ -2669,4 +2670,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2665,4 +2666,74 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Paper end
diff --git a/patches/server/0745-Do-not-copy-visible-chunks.patch b/patches/server/0744-Do-not-copy-visible-chunks.patch
index fdcf7f41ba..6a9cf7d61e 100644
--- a/patches/server/0745-Do-not-copy-visible-chunks.patch
+++ b/patches/server/0744-Do-not-copy-visible-chunks.patch
@@ -35,7 +35,7 @@ index b3516862d796c2d9fcc1c67a6073445403d73088..b61abf227a04b4565c2525e5f469db30
List<ChunkHolder> allChunks = new ArrayList<>(visibleChunks.values());
List<ServerPlayer> players = world.players;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a53d4ca46 100644
+index ef28e0f57ba593265a3eca4d3f21d0b1b51e8740..f4c1316ae1cadc1a7a7fed16e0e99704662c41e8 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -123,9 +123,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -120,7 +120,7 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a
}
}
-@@ -873,7 +880,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -873,14 +880,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public boolean hasWork() {
@@ -128,17 +128,16 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a
+ return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || !this.updatingChunks.getUpdatingValuesCopy().isEmpty() || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.queueSorter.hasWork() || this.distanceManager.hasTickets(); // Paper
}
- private static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.90; // Spigot // Paper - unload more
-@@ -888,7 +895,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- while (longiterator.hasNext()) { // Spigot
+ private void processUnloads(BooleanSupplier shouldKeepTicking) {
+ LongIterator longiterator = this.toDrop.iterator();
+ for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) {
long j = longiterator.nextLong();
- longiterator.remove(); // Spigot
- ChunkHolder playerchunk = (ChunkHolder) this.updatingChunkMap.remove(j);
+ ChunkHolder playerchunk = this.updatingChunks.queueRemove(j); // Paper - Don't copy
if (playerchunk != null) {
playerchunk.onChunkRemove(); // Paper
-@@ -989,7 +996,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -975,7 +982,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (!this.modified) {
return false;
} else {
@@ -152,7 +151,7 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a
this.modified = false;
return true;
}
-@@ -1479,7 +1491,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1465,7 +1477,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.viewDistance = j;
this.distanceManager.updatePlayerTickets(this.viewDistance + 1);
@@ -161,7 +160,7 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a
while (objectiterator.hasNext()) {
ChunkHolder playerchunk = (ChunkHolder) objectiterator.next();
-@@ -1522,7 +1534,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1508,7 +1520,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public int size() {
@@ -170,7 +169,7 @@ index 9b2c5fe2389c6baa239de4f7b479d9ca273e59cf..c19395ab43b956787bf0e59ae242ff3a
}
public DistanceManager getDistanceManager() {
-@@ -1530,13 +1542,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1516,13 +1528,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
protected Iterable<ChunkHolder> getChunks() {
diff --git a/patches/server/0746-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/0745-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch
index 5459269b64..5459269b64 100644
--- a/patches/server/0746-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch
+++ b/patches/server/0745-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch
diff --git a/patches/server/0747-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/0746-Custom-table-implementation-for-blockstate-state-loo.patch
index 9b556d7fe8..9b556d7fe8 100644
--- a/patches/server/0747-Custom-table-implementation-for-blockstate-state-loo.patch
+++ b/patches/server/0746-Custom-table-implementation-for-blockstate-state-loo.patch
diff --git a/patches/server/0748-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0747-Detail-more-information-in-watchdog-dumps.patch
index 7d2d44d42b..7d2d44d42b 100644
--- a/patches/server/0748-Detail-more-information-in-watchdog-dumps.patch
+++ b/patches/server/0747-Detail-more-information-in-watchdog-dumps.patch
diff --git a/patches/server/0749-Manually-inline-methods-in-BlockPosition.patch b/patches/server/0748-Manually-inline-methods-in-BlockPosition.patch
index 6668339cba..6668339cba 100644
--- a/patches/server/0749-Manually-inline-methods-in-BlockPosition.patch
+++ b/patches/server/0748-Manually-inline-methods-in-BlockPosition.patch
diff --git a/patches/server/0750-Distance-manager-tick-timings.patch b/patches/server/0749-Distance-manager-tick-timings.patch
index 69c8bf095e..69c8bf095e 100644
--- a/patches/server/0750-Distance-manager-tick-timings.patch
+++ b/patches/server/0749-Distance-manager-tick-timings.patch
diff --git a/patches/server/0751-Name-craft-scheduler-threads-according-to-the-plugin.patch b/patches/server/0750-Name-craft-scheduler-threads-according-to-the-plugin.patch
index 7d081ee195..7d081ee195 100644
--- a/patches/server/0751-Name-craft-scheduler-threads-according-to-the-plugin.patch
+++ b/patches/server/0750-Name-craft-scheduler-threads-according-to-the-plugin.patch
diff --git a/patches/server/0752-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0751-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch
index c3f6182749..c3f6182749 100644
--- a/patches/server/0752-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch
+++ b/patches/server/0751-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch
diff --git a/patches/server/0753-Add-packet-limiter-config.patch b/patches/server/0752-Add-packet-limiter-config.patch
index cd072e69e2..cd072e69e2 100644
--- a/patches/server/0753-Add-packet-limiter-config.patch
+++ b/patches/server/0752-Add-packet-limiter-config.patch
diff --git a/patches/server/0754-Lag-compensate-block-breaking.patch b/patches/server/0753-Lag-compensate-block-breaking.patch
index 985f81e240..985f81e240 100644
--- a/patches/server/0754-Lag-compensate-block-breaking.patch
+++ b/patches/server/0753-Lag-compensate-block-breaking.patch
diff --git a/patches/server/0755-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0754-Use-correct-LevelStem-registry-when-loading-default-.patch
index 53e2e20e8f..9bc3b8153a 100644
--- a/patches/server/0755-Use-correct-LevelStem-registry-when-loading-default-.patch
+++ b/patches/server/0754-Use-correct-LevelStem-registry-when-loading-default-.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Use correct LevelStem registry when loading default
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index ee33fd892e97e1ffea259a4f7974675923377d6b..dff3ce704d44d13a250b9a6ae1ec1768e4a8187a 100644
+index a279368fe144bd41d15e5fe5e565412f8b4ef9f7..f877b956859643b4f3d969992f2e515dc490f90c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -565,7 +565,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -563,7 +563,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long i = generatorsettings.seed();
long j = BiomeManager.obfuscateSeed(i);
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver));
diff --git a/patches/server/0756-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch b/patches/server/0755-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch
index c5bd6526f7..c5bd6526f7 100644
--- a/patches/server/0756-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch
+++ b/patches/server/0755-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch
diff --git a/patches/server/0757-Consolidate-flush-calls-for-entity-tracker-packets.patch b/patches/server/0756-Consolidate-flush-calls-for-entity-tracker-packets.patch
index 4669941fb1..4669941fb1 100644
--- a/patches/server/0757-Consolidate-flush-calls-for-entity-tracker-packets.patch
+++ b/patches/server/0756-Consolidate-flush-calls-for-entity-tracker-packets.patch
diff --git a/patches/server/0758-Don-t-lookup-fluid-state-when-raytracing.patch b/patches/server/0757-Don-t-lookup-fluid-state-when-raytracing.patch
index eef7de0e32..eef7de0e32 100644
--- a/patches/server/0758-Don-t-lookup-fluid-state-when-raytracing.patch
+++ b/patches/server/0757-Don-t-lookup-fluid-state-when-raytracing.patch
diff --git a/patches/server/0759-Time-scoreboard-search.patch b/patches/server/0758-Time-scoreboard-search.patch
index 48469b83af..48469b83af 100644
--- a/patches/server/0759-Time-scoreboard-search.patch
+++ b/patches/server/0758-Time-scoreboard-search.patch
diff --git a/patches/server/0760-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0759-Send-full-pos-packets-for-hard-colliding-entities.patch
index d9e0872338..d9e0872338 100644
--- a/patches/server/0760-Send-full-pos-packets-for-hard-colliding-entities.patch
+++ b/patches/server/0759-Send-full-pos-packets-for-hard-colliding-entities.patch
diff --git a/patches/server/0761-Do-not-run-raytrace-logic-for-AIR.patch b/patches/server/0760-Do-not-run-raytrace-logic-for-AIR.patch
index baedf55a9d..baedf55a9d 100644
--- a/patches/server/0761-Do-not-run-raytrace-logic-for-AIR.patch
+++ b/patches/server/0760-Do-not-run-raytrace-logic-for-AIR.patch
diff --git a/patches/server/0762-Oprimise-map-impl-for-tracked-players.patch b/patches/server/0761-Oprimise-map-impl-for-tracked-players.patch
index 7ee2e496b9..91de4460ec 100644
--- a/patches/server/0762-Oprimise-map-impl-for-tracked-players.patch
+++ b/patches/server/0761-Oprimise-map-impl-for-tracked-players.patch
@@ -7,7 +7,7 @@ Reference2BooleanOpenHashMap is going to have
better lookups than HashMap.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index c19395ab43b956787bf0e59ae242ff3a53d4ca46..af9b1fe737ab430861b4d0de33eec1325964c3a5 100644
+index f4c1316ae1cadc1a7a7fed16e0e99704662c41e8..b0aaeb601c8d9df50bf612985bbcbef8a082551f 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -110,6 +110,7 @@ import org.apache.commons.lang3.mutable.MutableObject;
@@ -18,7 +18,7 @@ index c19395ab43b956787bf0e59ae242ff3a53d4ca46..af9b1fe737ab430861b4d0de33eec132
public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider {
-@@ -2169,7 +2170,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -2155,7 +2156,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
final Entity entity;
private final int range;
SectionPos lastSectionPos;
diff --git a/patches/server/0763-Optimise-BlockSoil-nearby-water-lookup.patch b/patches/server/0762-Optimise-BlockSoil-nearby-water-lookup.patch
index f3fe0f0f17..f3fe0f0f17 100644
--- a/patches/server/0763-Optimise-BlockSoil-nearby-water-lookup.patch
+++ b/patches/server/0762-Optimise-BlockSoil-nearby-water-lookup.patch
diff --git a/patches/server/0764-Allow-removal-addition-of-entities-to-entity-ticklis.patch b/patches/server/0763-Allow-removal-addition-of-entities-to-entity-ticklis.patch
index d68c8524e7..d68c8524e7 100644
--- a/patches/server/0764-Allow-removal-addition-of-entities-to-entity-ticklis.patch
+++ b/patches/server/0763-Allow-removal-addition-of-entities-to-entity-ticklis.patch
diff --git a/patches/server/0765-Optimise-random-block-ticking.patch b/patches/server/0764-Optimise-random-block-ticking.patch
index 1d0d60fbe6..1d0d60fbe6 100644
--- a/patches/server/0765-Optimise-random-block-ticking.patch
+++ b/patches/server/0764-Optimise-random-block-ticking.patch
diff --git a/patches/server/0766-Optimise-non-flush-packet-sending.patch b/patches/server/0765-Optimise-non-flush-packet-sending.patch
index f4d6e1b6b4..f4d6e1b6b4 100644
--- a/patches/server/0766-Optimise-non-flush-packet-sending.patch
+++ b/patches/server/0765-Optimise-non-flush-packet-sending.patch
diff --git a/patches/server/0767-Optimise-nearby-player-lookups.patch b/patches/server/0766-Optimise-nearby-player-lookups.patch
index 6f6a160a7e..ac5756d263 100644
--- a/patches/server/0767-Optimise-nearby-player-lookups.patch
+++ b/patches/server/0766-Optimise-nearby-player-lookups.patch
@@ -39,7 +39,7 @@ index bd43fbc8a93afa7604aa467392520ed7b30a1d83..1a7fc533afced7235162f81b2de8148c
// Paper end - optimise anyPlayerCloseEnoughForSpawning
long lastAutoSaveTime; // Paper - incremental autosave
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index af9b1fe737ab430861b4d0de33eec1325964c3a5..43373e6bbe20e467043e750e0d7a11cd5a0ea1bc 100644
+index b0aaeb601c8d9df50bf612985bbcbef8a082551f..bc6a4bfe7df804ee22791fb767f059a541a3900f 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -164,6 +164,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
diff --git a/patches/server/0768-Optimise-WorldServer-notify.patch b/patches/server/0767-Optimise-WorldServer-notify.patch
index a84a979c64..dfd4370097 100644
--- a/patches/server/0768-Optimise-WorldServer-notify.patch
+++ b/patches/server/0767-Optimise-WorldServer-notify.patch
@@ -8,7 +8,7 @@ Instead, only iterate over navigators in the current region that are
eligible for repathing.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 43373e6bbe20e467043e750e0d7a11cd5a0ea1bc..952286cca1ce9e893f4a9e5939c552efe975abb4 100644
+index bc6a4bfe7df804ee22791fb767f059a541a3900f..a578ff8a88ef944516150303e96f8b49bc797f64 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -301,15 +301,81 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -110,7 +110,7 @@ index 43373e6bbe20e467043e750e0d7a11cd5a0ea1bc..952286cca1ce9e893f4a9e5939c552ef
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index ea665ae89b0963e5605ff0bc87f906fdddeb2c9a..ca9c43f48ab269430accbefe0ed470bc62efade9 100644
+index 3d4671dfa6ab878aa0fd076797de482fa8cb9b51..0a11eeaefe39d637fe2f9243b0f8a4b2d9734446 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1096,6 +1096,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -121,7 +121,7 @@ index ea665ae89b0963e5605ff0bc87f906fdddeb2c9a..ca9c43f48ab269430accbefe0ed470bc
try {
if (currentlyTickingEntity.get() == null) {
currentlyTickingEntity.lazySet(entity);
-@@ -1548,9 +1549,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1551,9 +1552,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (Shapes.joinIsNotEmpty(voxelshape, voxelshape1, BooleanOp.NOT_SAME)) {
List<PathNavigation> list = new ObjectArrayList();
@@ -142,7 +142,7 @@ index ea665ae89b0963e5605ff0bc87f906fdddeb2c9a..ca9c43f48ab269430accbefe0ed470bc
// CraftBukkit start - fix SPIGOT-6362
Mob entityinsentient;
try {
-@@ -1572,16 +1582,23 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1575,16 +1585,23 @@ public class ServerLevel extends Level implements WorldGenLevel {
try {
this.isUpdatingNavigations = true;
@@ -169,7 +169,7 @@ index ea665ae89b0963e5605ff0bc87f906fdddeb2c9a..ca9c43f48ab269430accbefe0ed470bc
}
} // Paper
-@@ -2381,10 +2398,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2384,10 +2401,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTickingStart(Entity entity) {
ServerLevel.this.entityTickList.add(entity);
diff --git a/patches/server/0769-Remove-streams-for-villager-AI.patch b/patches/server/0768-Remove-streams-for-villager-AI.patch
index 8257c2de40..8257c2de40 100644
--- a/patches/server/0769-Remove-streams-for-villager-AI.patch
+++ b/patches/server/0768-Remove-streams-for-villager-AI.patch
diff --git a/patches/server/0770-Rewrite-dataconverter-system.patch b/patches/server/0769-Rewrite-dataconverter-system.patch
index 89bdb29386..89bdb29386 100644
--- a/patches/server/0770-Rewrite-dataconverter-system.patch
+++ b/patches/server/0769-Rewrite-dataconverter-system.patch
diff --git a/patches/server/0771-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0770-Use-Velocity-compression-and-cipher-natives.patch
index cb29c8b7b1..cb29c8b7b1 100644
--- a/patches/server/0771-Use-Velocity-compression-and-cipher-natives.patch
+++ b/patches/server/0770-Use-Velocity-compression-and-cipher-natives.patch
diff --git a/patches/server/0772-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch b/patches/server/0771-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch
index 5103d7a24c..5103d7a24c 100644
--- a/patches/server/0772-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch
+++ b/patches/server/0771-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch
diff --git a/patches/server/0773-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch b/patches/server/0772-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch
index 5c0a433617..5c0a433617 100644
--- a/patches/server/0773-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch
+++ b/patches/server/0772-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch
diff --git a/patches/server/0774-Async-catch-modifications-to-critical-entity-state.patch b/patches/server/0773-Async-catch-modifications-to-critical-entity-state.patch
index 305329fc53..305329fc53 100644
--- a/patches/server/0774-Async-catch-modifications-to-critical-entity-state.patch
+++ b/patches/server/0773-Async-catch-modifications-to-critical-entity-state.patch
diff --git a/patches/server/0775-Fix-Bukkit-NamespacedKey-shenanigans.patch b/patches/server/0774-Fix-Bukkit-NamespacedKey-shenanigans.patch
index 8f152dd0e7..8f152dd0e7 100644
--- a/patches/server/0775-Fix-Bukkit-NamespacedKey-shenanigans.patch
+++ b/patches/server/0774-Fix-Bukkit-NamespacedKey-shenanigans.patch
diff --git a/patches/server/0776-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0775-Fix-merchant-inventory-not-closing-on-entity-removal.patch
index 52fbf4f871..cbc189593a 100644
--- a/patches/server/0776-Fix-merchant-inventory-not-closing-on-entity-removal.patch
+++ b/patches/server/0775-Fix-merchant-inventory-not-closing-on-entity-removal.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index ca9c43f48ab269430accbefe0ed470bc62efade9..2187331d2f3c4f14281dde6f01422fc4d5458e0e 100644
+index 0a11eeaefe39d637fe2f9243b0f8a4b2d9734446..1e2c430a8df6afde91e3c5169d2d7b501acdec7f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2482,6 +2482,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2485,6 +2485,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot end
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
diff --git a/patches/server/0777-Check-requirement-before-suggesting-root-nodes.patch b/patches/server/0776-Check-requirement-before-suggesting-root-nodes.patch
index da19d3f1ca..da19d3f1ca 100644
--- a/patches/server/0777-Check-requirement-before-suggesting-root-nodes.patch
+++ b/patches/server/0776-Check-requirement-before-suggesting-root-nodes.patch
diff --git a/patches/server/0778-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0777-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch
index 5f48d6b3b1..5f48d6b3b1 100644
--- a/patches/server/0778-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch
+++ b/patches/server/0777-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch
diff --git a/patches/server/0779-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0778-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
index 31e987614a..31e987614a 100644
--- a/patches/server/0779-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
+++ b/patches/server/0778-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
diff --git a/patches/server/0780-Ensure-valid-vehicle-status.patch b/patches/server/0779-Ensure-valid-vehicle-status.patch
index 5715c2ca86..5715c2ca86 100644
--- a/patches/server/0780-Ensure-valid-vehicle-status.patch
+++ b/patches/server/0779-Ensure-valid-vehicle-status.patch
diff --git a/patches/server/0781-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0780-Prevent-softlocked-end-exit-portal-generation.patch
index 855c2ec833..855c2ec833 100644
--- a/patches/server/0781-Prevent-softlocked-end-exit-portal-generation.patch
+++ b/patches/server/0780-Prevent-softlocked-end-exit-portal-generation.patch
diff --git a/patches/server/0782-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch b/patches/server/0781-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch
index 2ce994e362..2ce994e362 100644
--- a/patches/server/0782-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch
+++ b/patches/server/0781-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch
diff --git a/patches/server/0783-Don-t-log-debug-logging-being-disabled.patch b/patches/server/0782-Don-t-log-debug-logging-being-disabled.patch
index 5bec880eb8..5bec880eb8 100644
--- a/patches/server/0783-Don-t-log-debug-logging-being-disabled.patch
+++ b/patches/server/0782-Don-t-log-debug-logging-being-disabled.patch
diff --git a/patches/server/0784-Mark-fish-and-axolotls-from-buckets-as-persistent.patch b/patches/server/0783-Mark-fish-and-axolotls-from-buckets-as-persistent.patch
index a29e839964..a29e839964 100644
--- a/patches/server/0784-Mark-fish-and-axolotls-from-buckets-as-persistent.patch
+++ b/patches/server/0783-Mark-fish-and-axolotls-from-buckets-as-persistent.patch
diff --git a/patches/server/0785-fix-various-menus-with-empty-level-accesses.patch b/patches/server/0784-fix-various-menus-with-empty-level-accesses.patch
index 3bda24b9c6..3bda24b9c6 100644
--- a/patches/server/0785-fix-various-menus-with-empty-level-accesses.patch
+++ b/patches/server/0784-fix-various-menus-with-empty-level-accesses.patch
diff --git a/patches/server/0786-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch b/patches/server/0785-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch
index dad671a3bd..6e988a6c7e 100644
--- a/patches/server/0786-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch
+++ b/patches/server/0785-Do-not-overload-I-O-threads-with-chunk-data-while-fl.patch
@@ -12,7 +12,7 @@ time to save, as flush saving performs a full flush at
the end anyways.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 952286cca1ce9e893f4a9e5939c552efe975abb4..9ba13ee1df980b9bd5318cefeb3412a8923b66a3 100644
+index a578ff8a88ef944516150303e96f8b49bc797f64..9999f9743184ba929635d625c60836c046ededd4 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -928,6 +928,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
diff --git a/patches/server/0787-Preserve-overstacked-loot.patch b/patches/server/0786-Preserve-overstacked-loot.patch
index 57bfd046f8..57bfd046f8 100644
--- a/patches/server/0787-Preserve-overstacked-loot.patch
+++ b/patches/server/0786-Preserve-overstacked-loot.patch
diff --git a/patches/server/0788-Update-head-rotation-in-missing-places.patch b/patches/server/0787-Update-head-rotation-in-missing-places.patch
index 2dd4efaae9..2dd4efaae9 100644
--- a/patches/server/0788-Update-head-rotation-in-missing-places.patch
+++ b/patches/server/0787-Update-head-rotation-in-missing-places.patch
diff --git a/patches/server/0789-prevent-unintended-light-block-manipulation.patch b/patches/server/0788-prevent-unintended-light-block-manipulation.patch
index 08bd6164f5..08bd6164f5 100644
--- a/patches/server/0789-prevent-unintended-light-block-manipulation.patch
+++ b/patches/server/0788-prevent-unintended-light-block-manipulation.patch
diff --git a/patches/server/0790-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch b/patches/server/0789-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch
index 89603862f0..89603862f0 100644
--- a/patches/server/0790-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch
+++ b/patches/server/0789-Dont-count-named-piglins-and-hoglins-towards-mob-cap.patch
diff --git a/patches/server/0791-Fix-CraftCriteria-defaults-map.patch b/patches/server/0790-Fix-CraftCriteria-defaults-map.patch
index 11fce3ca24..11fce3ca24 100644
--- a/patches/server/0791-Fix-CraftCriteria-defaults-map.patch
+++ b/patches/server/0790-Fix-CraftCriteria-defaults-map.patch
diff --git a/patches/server/0792-Fix-upstreams-block-state-factories.patch b/patches/server/0791-Fix-upstreams-block-state-factories.patch
index 4a88c25608..4a88c25608 100644
--- a/patches/server/0792-Fix-upstreams-block-state-factories.patch
+++ b/patches/server/0791-Fix-upstreams-block-state-factories.patch
diff --git a/patches/server/0793-Add-config-option-for-logging-player-ip-addresses.patch b/patches/server/0792-Add-config-option-for-logging-player-ip-addresses.patch
index dab95bb75b..dab95bb75b 100644
--- a/patches/server/0793-Add-config-option-for-logging-player-ip-addresses.patch
+++ b/patches/server/0792-Add-config-option-for-logging-player-ip-addresses.patch
diff --git a/patches/server/0794-Configurable-feature-seeds.patch b/patches/server/0793-Configurable-feature-seeds.patch
index 31778d1a17..31778d1a17 100644
--- a/patches/server/0794-Configurable-feature-seeds.patch
+++ b/patches/server/0793-Configurable-feature-seeds.patch
diff --git a/patches/server/0795-VanillaCommandWrapper-didnt-account-for-entity-sende.patch b/patches/server/0794-VanillaCommandWrapper-didnt-account-for-entity-sende.patch
index 6e33709dbe..6e33709dbe 100644
--- a/patches/server/0795-VanillaCommandWrapper-didnt-account-for-entity-sende.patch
+++ b/patches/server/0794-VanillaCommandWrapper-didnt-account-for-entity-sende.patch
diff --git a/patches/server/0796-Add-root-admin-user-detection.patch b/patches/server/0795-Add-root-admin-user-detection.patch
index 86c355de50..86c355de50 100644
--- a/patches/server/0796-Add-root-admin-user-detection.patch
+++ b/patches/server/0795-Add-root-admin-user-detection.patch
diff --git a/patches/server/0797-Always-allow-item-changing-in-Fireball.patch b/patches/server/0796-Always-allow-item-changing-in-Fireball.patch
index fe4cbf2ef1..fe4cbf2ef1 100644
--- a/patches/server/0797-Always-allow-item-changing-in-Fireball.patch
+++ b/patches/server/0796-Always-allow-item-changing-in-Fireball.patch
diff --git a/patches/server/0798-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0797-don-t-attempt-to-teleport-dead-entities.patch
index 0d78c1bee5..0d78c1bee5 100644
--- a/patches/server/0798-don-t-attempt-to-teleport-dead-entities.patch
+++ b/patches/server/0797-don-t-attempt-to-teleport-dead-entities.patch
diff --git a/patches/server/0799-Fix-anvil-prepare-event-not-working-with-zero-xp.patch b/patches/server/0798-Fix-anvil-prepare-event-not-working-with-zero-xp.patch
index efa5aa2399..efa5aa2399 100644
--- a/patches/server/0799-Fix-anvil-prepare-event-not-working-with-zero-xp.patch
+++ b/patches/server/0798-Fix-anvil-prepare-event-not-working-with-zero-xp.patch
diff --git a/patches/server/0800-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0799-Prevent-excessive-velocity-through-repeated-crits.patch
index 4304993831..4304993831 100644
--- a/patches/server/0800-Prevent-excessive-velocity-through-repeated-crits.patch
+++ b/patches/server/0799-Prevent-excessive-velocity-through-repeated-crits.patch
diff --git a/patches/server/0801-Remove-client-side-code-using-deprecated-for-removal.patch b/patches/server/0800-Remove-client-side-code-using-deprecated-for-removal.patch
index a11975f1ad..a11975f1ad 100644
--- a/patches/server/0801-Remove-client-side-code-using-deprecated-for-removal.patch
+++ b/patches/server/0800-Remove-client-side-code-using-deprecated-for-removal.patch
diff --git a/patches/server/0802-Rewrite-the-light-engine.patch b/patches/server/0801-Rewrite-the-light-engine.patch
index f0e4f7552d..e0442546ff 100644
--- a/patches/server/0802-Rewrite-the-light-engine.patch
+++ b/patches/server/0801-Rewrite-the-light-engine.patch
@@ -4432,7 +4432,7 @@ index 1a7fc533afced7235162f81b2de8148cef05414a..36b6e7295cf7484675c8c2b9624c1f6f
private final DebugBuffer<ChunkHolder.ChunkSaveDebug> chunkToSaveHistory;
public int oldTicketLevel;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 9ba13ee1df980b9bd5318cefeb3412a8923b66a3..78aab9174f8359ffc38fb5a79930e541b5cd419e 100644
+index 9999f9743184ba929635d625c60836c046ededd4..727ee42ec573fd1d008f526f49d0e63396ef0a9d 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -133,7 +133,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
diff --git a/patches/server/0803-Always-parse-protochunk-light-sources-unless-it-is-m.patch b/patches/server/0802-Always-parse-protochunk-light-sources-unless-it-is-m.patch
index a1b655d7c1..a1b655d7c1 100644
--- a/patches/server/0803-Always-parse-protochunk-light-sources-unless-it-is-m.patch
+++ b/patches/server/0802-Always-parse-protochunk-light-sources-unless-it-is-m.patch
diff --git a/patches/server/0804-Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/0803-Fix-removing-recipes-from-RecipeIterator.patch
index 5784fd4dc3..5784fd4dc3 100644
--- a/patches/server/0804-Fix-removing-recipes-from-RecipeIterator.patch
+++ b/patches/server/0803-Fix-removing-recipes-from-RecipeIterator.patch
diff --git a/patches/server/0805-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0804-Prevent-sending-oversized-item-data-in-equipment-and.patch
index e35fbc79b1..e35fbc79b1 100644
--- a/patches/server/0805-Prevent-sending-oversized-item-data-in-equipment-and.patch
+++ b/patches/server/0804-Prevent-sending-oversized-item-data-in-equipment-and.patch
diff --git a/patches/server/0806-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0805-Hide-unnecessary-itemmeta-from-clients.patch
index 7290d9ffe1..7290d9ffe1 100644
--- a/patches/server/0806-Hide-unnecessary-itemmeta-from-clients.patch
+++ b/patches/server/0805-Hide-unnecessary-itemmeta-from-clients.patch
diff --git a/patches/server/0807-Fix-kelp-modifier-changing-growth-for-other-crops.patch b/patches/server/0806-Fix-kelp-modifier-changing-growth-for-other-crops.patch
index da0f208d4e..da0f208d4e 100644
--- a/patches/server/0807-Fix-kelp-modifier-changing-growth-for-other-crops.patch
+++ b/patches/server/0806-Fix-kelp-modifier-changing-growth-for-other-crops.patch
diff --git a/patches/server/0808-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0807-Prevent-ContainerOpenersCounter-openCount-from-going.patch
index 0e41fd2743..0e41fd2743 100644
--- a/patches/server/0808-Prevent-ContainerOpenersCounter-openCount-from-going.patch
+++ b/patches/server/0807-Prevent-ContainerOpenersCounter-openCount-from-going.patch
diff --git a/patches/server/0809-Add-PlayerItemFrameChangeEvent.patch b/patches/server/0808-Add-PlayerItemFrameChangeEvent.patch
index 464f2144c1..464f2144c1 100644
--- a/patches/server/0809-Add-PlayerItemFrameChangeEvent.patch
+++ b/patches/server/0808-Add-PlayerItemFrameChangeEvent.patch
diff --git a/patches/server/0810-Add-player-health-update-API.patch b/patches/server/0809-Add-player-health-update-API.patch
index 9f6cac922a..9f6cac922a 100644
--- a/patches/server/0810-Add-player-health-update-API.patch
+++ b/patches/server/0809-Add-player-health-update-API.patch
diff --git a/patches/server/0811-Optimize-HashMapPalette.patch b/patches/server/0810-Optimize-HashMapPalette.patch
index ef1880895f..ef1880895f 100644
--- a/patches/server/0811-Optimize-HashMapPalette.patch
+++ b/patches/server/0810-Optimize-HashMapPalette.patch
diff --git a/patches/server/0812-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0811-Allow-delegation-to-vanilla-chunk-gen.patch
index 13bdd0f1d7..13bdd0f1d7 100644
--- a/patches/server/0812-Allow-delegation-to-vanilla-chunk-gen.patch
+++ b/patches/server/0811-Allow-delegation-to-vanilla-chunk-gen.patch
diff --git a/patches/server/0813-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0812-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch
index 99a5334c59..99a5334c59 100644
--- a/patches/server/0813-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch
+++ b/patches/server/0812-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch
diff --git a/patches/server/0814-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0813-Optimise-collision-checking-in-player-move-packet-ha.patch
index f33b2ef6aa..f33b2ef6aa 100644
--- a/patches/server/0814-Optimise-collision-checking-in-player-move-packet-ha.patch
+++ b/patches/server/0813-Optimise-collision-checking-in-player-move-packet-ha.patch
diff --git a/patches/server/0815-Actually-unload-POI-data.patch b/patches/server/0814-Actually-unload-POI-data.patch
index b23193ed6b..8a61aa29f6 100644
--- a/patches/server/0815-Actually-unload-POI-data.patch
+++ b/patches/server/0814-Actually-unload-POI-data.patch
@@ -10,7 +10,7 @@ This patch also prevents the saving/unloading of POI data when
world saving is disabled.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917469cccb9 100644
+index 727ee42ec573fd1d008f526f49d0e63396ef0a9d..0e6bc8f7b31581fe0e7adb13119b30295aeac48d 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -848,6 +848,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -21,16 +21,16 @@ index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917
this.updatingChunks.queueUpdate(pos, holder); // Paper - Don't copy
this.modified = true;
-@@ -997,7 +998,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- return this.lightEngine.hasLightWork() || !this.pendingUnloads.isEmpty() || !this.updatingChunks.getUpdatingValuesCopy().isEmpty() || this.poiManager.hasWork() || !this.toDrop.isEmpty() || !this.unloadQueue.isEmpty() || this.queueSorter.hasWork() || this.distanceManager.hasTickets(); // Paper
- }
-
-- private static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.90; // Spigot // Paper - unload more
-+ public static final double UNLOAD_QUEUE_RESIZE_FACTOR = 0.90; // Spigot // Paper - unload more
+@@ -999,7 +1000,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private void processUnloads(BooleanSupplier shouldKeepTicking) {
LongIterator longiterator = this.toDrop.iterator();
-@@ -1061,6 +1062,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+- for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) {
++ for (int i = 0; longiterator.hasNext() && (shouldKeepTicking.getAsBoolean() || i < 200 || this.toDrop.size() > 2000); longiterator.remove()) { // Paper - diff on change
+ long j = longiterator.nextLong();
+ ChunkHolder playerchunk = this.updatingChunks.queueRemove(j); // Paper - Don't copy
+
+@@ -1047,6 +1048,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z);
}
// Paper end
@@ -38,7 +38,7 @@ index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917
if (ichunkaccess instanceof LevelChunk) {
((LevelChunk) ichunkaccess).setLoaded(false);
}
-@@ -1090,6 +1092,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1076,6 +1078,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
for (int index = 0, len = this.regionManagers.size(); index < len; ++index) {
this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z);
}
@@ -46,7 +46,7 @@ index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917
} // Paper end
} finally { this.unloadingPlayerChunk = unloadingBefore; } // Paper - do not allow ticket level changes while unloading chunks
-@@ -1166,6 +1169,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1152,6 +1155,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
this.poiManager.loadInData(pos, chunkHolder.poiData);
chunkHolder.tasks.forEach(Runnable::run);
@@ -55,7 +55,7 @@ index 78aab9174f8359ffc38fb5a79930e541b5cd419e..a29b97f941eadb1ede5db805d32f2917
if (chunkHolder.protoChunk != null) {try (Timing ignored2 = this.level.timings.chunkLoadLevelTimer.startTimingIfSync()) { // Paper start - timings // Paper - chunk is created async
diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
-index 8a569e3300543cb171c3befae59969628adc424c..bbd9fdaa4b12543307b144da72b0604eae638cbb 100644
+index 8a569e3300543cb171c3befae59969628adc424c..54013682ee07cfe34f47070b6460c21ff420130f 100644
--- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
+++ b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java
@@ -1,5 +1,6 @@
@@ -169,9 +169,9 @@ index 8a569e3300543cb171c3befae59969628adc424c..bbd9fdaa4b12543307b144da72b0604e
+ net.minecraft.server.level.ServerChunkCache chunkProvider = this.world.getChunkSource();
+ net.minecraft.server.level.ChunkMap playerChunkMap = chunkProvider.chunkMap;
+ // copied target determination from PlayerChunkMap
-+ int target = Math.min(this.queuedUnloads.size() - 100, (int) (this.queuedUnloads.size() * net.minecraft.server.level.ChunkMap.UNLOAD_QUEUE_RESIZE_FACTOR)); // Paper - Make more aggressive
-+ for (java.util.Iterator<QueuedUnload> iterator = this.queuedUnloads.iterator();
-+ iterator.hasNext() && (this.queuedUnloads.size() > target || canSleepForTick.getAsBoolean());) {
++
++ java.util.Iterator<QueuedUnload> iterator = this.queuedUnloads.iterator();
++ for (int i = 0; iterator.hasNext() && (i < 200 || this.queuedUnloads.size() > 2000 || canSleepForTick.getAsBoolean()); i++) {
+ QueuedUnload unload = iterator.next();
+ if (unload.unloadTick > currentTick) {
+ break;
diff --git a/patches/server/0816-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/0815-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch
index c03eefb28c..c03eefb28c 100644
--- a/patches/server/0816-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch
+++ b/patches/server/0815-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch
diff --git a/patches/server/0817-Update-Log4j.patch b/patches/server/0816-Update-Log4j.patch
index 1b301675ed..1b301675ed 100644
--- a/patches/server/0817-Update-Log4j.patch
+++ b/patches/server/0816-Update-Log4j.patch
diff --git a/patches/server/0818-Add-more-Campfire-API.patch b/patches/server/0817-Add-more-Campfire-API.patch
index 75cef9d65b..75cef9d65b 100644
--- a/patches/server/0818-Add-more-Campfire-API.patch
+++ b/patches/server/0817-Add-more-Campfire-API.patch
diff --git a/patches/server/0819-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch b/patches/server/0818-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch
index 324e828c7c..324e828c7c 100644
--- a/patches/server/0819-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch
+++ b/patches/server/0818-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch
diff --git a/patches/server/0820-Fix-tripwire-state-inconsistency.patch b/patches/server/0819-Fix-tripwire-state-inconsistency.patch
index ef3e8540d4..ef3e8540d4 100644
--- a/patches/server/0820-Fix-tripwire-state-inconsistency.patch
+++ b/patches/server/0819-Fix-tripwire-state-inconsistency.patch
diff --git a/patches/server/0821-Fix-fluid-logging-on-Block-breakNaturally.patch b/patches/server/0820-Fix-fluid-logging-on-Block-breakNaturally.patch
index 3d1428bea5..b87c2849f5 100644
--- a/patches/server/0821-Fix-fluid-logging-on-Block-breakNaturally.patch
+++ b/patches/server/0820-Fix-fluid-logging-on-Block-breakNaturally.patch
@@ -7,10 +7,10 @@ Leaves fluid if the block broken was fluid-logged which is what
happens if a player breaks a fluid-logged block
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-index 88c8817a85546ff92424b1164abcd74a15ff0917..c18edb2c0680a336f11fab30d1d985192dc1393e 100644
+index 0b2e33fb16f832e0ddfe5e39a8a16caf98521098..68eaae018646c541c8553ded80c5cafdfc5ae63f 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
-@@ -508,6 +508,7 @@ public class CraftBlock implements Block {
+@@ -515,6 +515,7 @@ public class CraftBlock implements Block {
net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS();
net.minecraft.world.level.block.Block block = iblockdata.getBlock();
net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
@@ -18,7 +18,7 @@ index 88c8817a85546ff92424b1164abcd74a15ff0917..c18edb2c0680a336f11fab30d1d98519
boolean result = false;
// Modelled off EntityHuman#hasBlock
-@@ -518,7 +519,7 @@ public class CraftBlock implements Block {
+@@ -525,7 +526,7 @@ public class CraftBlock implements Block {
}
// SPIGOT-6778: Directly call setBlock instead of setTypeAndData, so that the tile entiy is not removed and custom remove logic is run.
diff --git a/patches/server/0822-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0821-Forward-CraftEntity-in-teleport-command.patch
index 9eec59ce99..9eec59ce99 100644
--- a/patches/server/0822-Forward-CraftEntity-in-teleport-command.patch
+++ b/patches/server/0821-Forward-CraftEntity-in-teleport-command.patch
diff --git a/patches/server/0823-Improve-scoreboard-entries.patch b/patches/server/0822-Improve-scoreboard-entries.patch
index ee3bcefafe..ee3bcefafe 100644
--- a/patches/server/0823-Improve-scoreboard-entries.patch
+++ b/patches/server/0822-Improve-scoreboard-entries.patch
diff --git a/patches/server/0824-Entity-powdered-snow-API.patch b/patches/server/0823-Entity-powdered-snow-API.patch
index 7df19b80b9..7df19b80b9 100644
--- a/patches/server/0824-Entity-powdered-snow-API.patch
+++ b/patches/server/0823-Entity-powdered-snow-API.patch
diff --git a/patches/server/0825-Add-API-for-item-entity-health.patch b/patches/server/0824-Add-API-for-item-entity-health.patch
index c475b8fda1..d923270a18 100644
--- a/patches/server/0825-Add-API-for-item-entity-health.patch
+++ b/patches/server/0824-Add-API-for-item-entity-health.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add API for item entity health
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
-index 342345eb04d00efb58392ccf209e3c51c1064173..8d56f0ab748373e55c0166b92382c126fe8e5381 100644
+index 1d90219c3a0e86786a9497d4c078c2d4077ab6cd..fea44ba6a6584b4a510af6a58cab07eecec6b68b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
-@@ -85,6 +85,21 @@ public class CraftItem extends CraftEntity implements Item {
+@@ -102,6 +102,21 @@ public class CraftItem extends CraftEntity implements Item {
public void setWillAge(boolean willAge) {
item.age = willAge ? 0 : NO_AGE_TIME;
}
diff --git a/patches/server/0826-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0825-Fix-entity-type-tags-suggestions-in-selectors.patch
index d3dad4267f..d3dad4267f 100644
--- a/patches/server/0826-Fix-entity-type-tags-suggestions-in-selectors.patch
+++ b/patches/server/0825-Fix-entity-type-tags-suggestions-in-selectors.patch
diff --git a/patches/server/0827-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0826-Configurable-max-block-light-for-monster-spawning.patch
index 9adc6a2a1c..9adc6a2a1c 100644
--- a/patches/server/0827-Configurable-max-block-light-for-monster-spawning.patch
+++ b/patches/server/0826-Configurable-max-block-light-for-monster-spawning.patch
diff --git a/patches/server/0828-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0827-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch
index 8ed1ba062d..8ed1ba062d 100644
--- a/patches/server/0828-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch
+++ b/patches/server/0827-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch
diff --git a/patches/server/0829-Load-effect-amplifiers-greater-than-127-correctly.patch b/patches/server/0828-Load-effect-amplifiers-greater-than-127-correctly.patch
index 83f5b4740d..83f5b4740d 100644
--- a/patches/server/0829-Load-effect-amplifiers-greater-than-127-correctly.patch
+++ b/patches/server/0828-Load-effect-amplifiers-greater-than-127-correctly.patch
diff --git a/patches/server/0830-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/0829-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
index 9f3ee548ee..9f3ee548ee 100644
--- a/patches/server/0830-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
+++ b/patches/server/0829-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
diff --git a/patches/server/0831-Fix-bees-aging-inside-hives.patch b/patches/server/0830-Fix-bees-aging-inside-hives.patch
index c9303da67b..c9303da67b 100644
--- a/patches/server/0831-Fix-bees-aging-inside-hives.patch
+++ b/patches/server/0830-Fix-bees-aging-inside-hives.patch
diff --git a/patches/server/0832-Bucketable-API.patch b/patches/server/0831-Bucketable-API.patch
index ff1194970a..ff1194970a 100644
--- a/patches/server/0832-Bucketable-API.patch
+++ b/patches/server/0831-Bucketable-API.patch
diff --git a/patches/server/0833-Check-player-world-in-endPortalSoundRadius.patch b/patches/server/0832-Check-player-world-in-endPortalSoundRadius.patch
index a632d3d594..a632d3d594 100644
--- a/patches/server/0833-Check-player-world-in-endPortalSoundRadius.patch
+++ b/patches/server/0832-Check-player-world-in-endPortalSoundRadius.patch
diff --git a/patches/server/0834-Validate-usernames.patch b/patches/server/0833-Validate-usernames.patch
index 91f5741e38..91f5741e38 100644
--- a/patches/server/0834-Validate-usernames.patch
+++ b/patches/server/0833-Validate-usernames.patch
diff --git a/patches/server/0835-Fix-saving-configs-with-more-long-comments.patch b/patches/server/0834-Fix-saving-configs-with-more-long-comments.patch
index 7d52b01085..7d52b01085 100644
--- a/patches/server/0835-Fix-saving-configs-with-more-long-comments.patch
+++ b/patches/server/0834-Fix-saving-configs-with-more-long-comments.patch
diff --git a/patches/server/0836-Make-water-animal-spawn-height-configurable.patch b/patches/server/0835-Make-water-animal-spawn-height-configurable.patch
index 39b751fcef..39b751fcef 100644
--- a/patches/server/0836-Make-water-animal-spawn-height-configurable.patch
+++ b/patches/server/0835-Make-water-animal-spawn-height-configurable.patch
diff --git a/patches/server/0837-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0836-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
index ba7ebe0dba..9f61505995 100644
--- a/patches/server/0837-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
+++ b/patches/server/0836-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index dff3ce704d44d13a250b9a6ae1ec1768e4a8187a..4eafa147edad4fe66fb419635c320a01186e7fea 100644
+index f877b956859643b4f3d969992f2e515dc490f90c..88db383a1527301332e8a047066afa5ed827db32 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -584,7 +584,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -582,7 +582,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
chunkgenerator = worlddimension.generator();
}
diff --git a/patches/server/0838-Add-config-option-for-worlds-affected-by-time-cmd.patch b/patches/server/0837-Add-config-option-for-worlds-affected-by-time-cmd.patch
index 46c8e7935a..46c8e7935a 100644
--- a/patches/server/0838-Add-config-option-for-worlds-affected-by-time-cmd.patch
+++ b/patches/server/0837-Add-config-option-for-worlds-affected-by-time-cmd.patch
diff --git a/patches/server/0839-Add-new-overload-to-PersistentDataContainer-has.patch b/patches/server/0838-Add-new-overload-to-PersistentDataContainer-has.patch
index d19f7179e1..d19f7179e1 100644
--- a/patches/server/0839-Add-new-overload-to-PersistentDataContainer-has.patch
+++ b/patches/server/0838-Add-new-overload-to-PersistentDataContainer-has.patch
diff --git a/patches/server/0840-Multiple-Entries-with-Scoreboards.patch b/patches/server/0839-Multiple-Entries-with-Scoreboards.patch
index 2f9e8e9118..2f9e8e9118 100644
--- a/patches/server/0840-Multiple-Entries-with-Scoreboards.patch
+++ b/patches/server/0839-Multiple-Entries-with-Scoreboards.patch
diff --git a/patches/server/0841-Reset-placed-block-on-exception.patch b/patches/server/0840-Reset-placed-block-on-exception.patch
index 7666ecdfe1..7666ecdfe1 100644
--- a/patches/server/0841-Reset-placed-block-on-exception.patch
+++ b/patches/server/0840-Reset-placed-block-on-exception.patch
diff --git a/patches/server/0842-Add-configurable-height-for-slime-spawn.patch b/patches/server/0841-Add-configurable-height-for-slime-spawn.patch
index 0e03810577..0e03810577 100644
--- a/patches/server/0842-Add-configurable-height-for-slime-spawn.patch
+++ b/patches/server/0841-Add-configurable-height-for-slime-spawn.patch
diff --git a/patches/server/0843-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch b/patches/server/0842-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch
index a834180d50..a834180d50 100644
--- a/patches/server/0843-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch
+++ b/patches/server/0842-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch
diff --git a/patches/server/0844-Fix-xp-reward-for-baby-zombies.patch b/patches/server/0843-Fix-xp-reward-for-baby-zombies.patch
index 0c5733a372..0c5733a372 100644
--- a/patches/server/0844-Fix-xp-reward-for-baby-zombies.patch
+++ b/patches/server/0843-Fix-xp-reward-for-baby-zombies.patch
diff --git a/patches/server/0845-Kick-on-main-for-illegal-chars.patch b/patches/server/0844-Kick-on-main-for-illegal-chars.patch
index f5c7e34afc..f5c7e34afc 100644
--- a/patches/server/0845-Kick-on-main-for-illegal-chars.patch
+++ b/patches/server/0844-Kick-on-main-for-illegal-chars.patch
diff --git a/patches/server/0846-Multi-Block-Change-API-Implementation.patch b/patches/server/0845-Multi-Block-Change-API-Implementation.patch
index 97bf93afe6..97bf93afe6 100644
--- a/patches/server/0846-Multi-Block-Change-API-Implementation.patch
+++ b/patches/server/0845-Multi-Block-Change-API-Implementation.patch
diff --git a/patches/server/0847-Fix-NotePlayEvent.patch b/patches/server/0846-Fix-NotePlayEvent.patch
index 3d7aa4d732..3d7aa4d732 100644
--- a/patches/server/0847-Fix-NotePlayEvent.patch
+++ b/patches/server/0846-Fix-NotePlayEvent.patch
diff --git a/patches/server/0848-Freeze-Tick-Lock-API.patch b/patches/server/0847-Freeze-Tick-Lock-API.patch
index e3599f4743..e3599f4743 100644
--- a/patches/server/0848-Freeze-Tick-Lock-API.patch
+++ b/patches/server/0847-Freeze-Tick-Lock-API.patch
diff --git a/patches/server/0849-Dolphin-API.patch b/patches/server/0848-Dolphin-API.patch
index 4bb12a6785..4bb12a6785 100644
--- a/patches/server/0849-Dolphin-API.patch
+++ b/patches/server/0848-Dolphin-API.patch
diff --git a/patches/server/0850-More-PotionEffectType-API.patch b/patches/server/0849-More-PotionEffectType-API.patch
index 14fb482187..14fb482187 100644
--- a/patches/server/0850-More-PotionEffectType-API.patch
+++ b/patches/server/0849-More-PotionEffectType-API.patch
diff --git a/patches/server/0851-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/0850-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch
index 3b79f9947c..3b79f9947c 100644
--- a/patches/server/0851-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch
+++ b/patches/server/0850-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch
diff --git a/patches/server/0852-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0851-API-for-creating-command-sender-which-forwards-feedb.patch
index aa0eae89a4..aa0eae89a4 100644
--- a/patches/server/0852-API-for-creating-command-sender-which-forwards-feedb.patch
+++ b/patches/server/0851-API-for-creating-command-sender-which-forwards-feedb.patch
diff --git a/patches/server/0853-Add-config-for-stronghold-seed.patch b/patches/server/0852-Add-config-for-stronghold-seed.patch
index 97945d92cf..97945d92cf 100644
--- a/patches/server/0853-Add-config-for-stronghold-seed.patch
+++ b/patches/server/0852-Add-config-for-stronghold-seed.patch
diff --git a/patches/server/0854-Implement-regenerateChunk.patch b/patches/server/0853-Implement-regenerateChunk.patch
index 21a5aa32b4..21a5aa32b4 100644
--- a/patches/server/0854-Implement-regenerateChunk.patch
+++ b/patches/server/0853-Implement-regenerateChunk.patch
diff --git a/patches/server/0855-Log-exceptions-thrown-during-chat-processing.patch b/patches/server/0854-Log-exceptions-thrown-during-chat-processing.patch
index 76bdbcdd9c..76bdbcdd9c 100644
--- a/patches/server/0855-Log-exceptions-thrown-during-chat-processing.patch
+++ b/patches/server/0854-Log-exceptions-thrown-during-chat-processing.patch
diff --git a/patches/server/0856-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0855-Fix-cancelled-powdered-snow-bucket-placement.patch
index 9a95fdb1d3..9a95fdb1d3 100644
--- a/patches/server/0856-Fix-cancelled-powdered-snow-bucket-placement.patch
+++ b/patches/server/0855-Fix-cancelled-powdered-snow-bucket-placement.patch
diff --git a/patches/server/0857-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0856-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
index 82fcd35c3f..82fcd35c3f 100644
--- a/patches/server/0857-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
+++ b/patches/server/0856-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
diff --git a/patches/server/0858-Add-GameEvent-tags.patch b/patches/server/0857-Add-GameEvent-tags.patch
index ad8dc46e85..ad8dc46e85 100644
--- a/patches/server/0858-Add-GameEvent-tags.patch
+++ b/patches/server/0857-Add-GameEvent-tags.patch
diff --git a/patches/server/0859-Replace-player-chunk-loader-system.patch b/patches/server/0858-Replace-player-chunk-loader-system.patch
index 291f0bb8be..a23dcdd0a8 100644
--- a/patches/server/0859-Replace-player-chunk-loader-system.patch
+++ b/patches/server/0858-Replace-player-chunk-loader-system.patch
@@ -1381,7 +1381,7 @@ index 36b6e7295cf7484675c8c2b9624c1f6fea7aed1d..38db3905f47fefb5c958fa24aef2313e
public CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> getOrScheduleFuture(ChunkStatus targetStatus, ChunkMap chunkStorage) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993e65b2ad0 100644
+index 0e6bc8f7b31581fe0e7adb13119b30295aeac48d..6ce27675103d4b691216c6b701b6ceb821af528f 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -217,6 +217,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1434,7 +1434,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993
}
// Paper end
// Paper start
-@@ -1435,11 +1439,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1421,11 +1425,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
completablefuture1.thenAcceptAsync((either) -> {
either.ifLeft((chunk) -> {
this.tickingGenerated.getAndIncrement();
@@ -1447,7 +1447,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993
});
}, (runnable) -> {
this.mainThreadMailbox.tell(ChunkTaskPriorityQueueSorter.message(holder, runnable));
-@@ -1608,33 +1608,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1594,33 +1594,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
int k = this.viewDistance;
this.viewDistance = j;
@@ -1490,7 +1490,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993
if (chunk != null) {
this.playerLoadedChunk(player, packet, chunk);
-@@ -1665,7 +1656,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1651,7 +1642,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
void dumpChunks(Writer writer) throws IOException {
CsvOutput csvwriter = CsvOutput.builder().addColumn("x").addColumn("z").addColumn("level").addColumn("in_memory").addColumn("status").addColumn("full_status").addColumn("accessible_ready").addColumn("ticking_ready").addColumn("entity_ticking_ready").addColumn("ticket").addColumn("spawning").addColumn("block_entity_count").addColumn("ticking_ticket").addColumn("ticking_level").addColumn("block_ticks").addColumn("fluid_ticks").build(writer);
@@ -1499,7 +1499,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993
ObjectBidirectionalIterator objectbidirectionaliterator = this.updatingChunks.getVisibleMap().clone().long2ObjectEntrySet().fastIterator(); // Paper
while (objectbidirectionaliterator.hasNext()) {
-@@ -1681,7 +1672,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1667,7 +1658,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// CraftBukkit - decompile error
csvwriter.writeRow(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(ChunkAccess::getStatus).orElse(null), optional1.map(LevelChunk::getFullStatus).orElse(null), ChunkMap.printFuture(playerchunk.getFullChunkFuture()), ChunkMap.printFuture(playerchunk.getTickingChunkFuture()), ChunkMap.printFuture(playerchunk.getEntityTickingChunkFuture()), this.distanceManager.getTicketDebugString(i), this.anyPlayerCloseEnoughForSpawning(chunkcoordintpair), optional1.map((chunk) -> {
return chunk.getBlockEntities().size();
@@ -1508,7 +1508,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993
return chunk.getBlockTicks().count();
}).orElse(0), optional1.map((chunk) -> {
return chunk.getFluidTicks().count();
-@@ -1898,15 +1889,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1884,15 +1875,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.removePlayerFromDistanceMaps(player); // Paper - distance maps
}
@@ -1525,7 +1525,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993
}
-@@ -1914,7 +1897,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1900,7 +1883,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
SectionPos sectionposition = SectionPos.of((Entity) player);
player.setLastSectionPos(sectionposition);
@@ -1534,7 +1534,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993
return sectionposition;
}
-@@ -1959,65 +1942,40 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1945,65 +1928,40 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
int k1;
int l1;
@@ -1622,7 +1622,7 @@ index a29b97f941eadb1ede5db805d32f2917469cccb9..eb469eabf7a5888a4249a6267de0c993
}
public void addEntity(Entity entity) {
-@@ -2386,7 +2344,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -2372,7 +2330,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
double vec3d_dx = player.getX() - this.entity.getX();
double vec3d_dz = player.getZ() - this.entity.getZ();
// Paper end - remove allocation of Vec3D here
@@ -1874,7 +1874,7 @@ index cd6eb305f4d36be923f6c5f0dd85e449d0f94c8f..5793154c0deca7fc570bbe858c6bea0d
return true;
} else {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 2187331d2f3c4f14281dde6f01422fc4d5458e0e..af7e4ce201a471d2f59d16c0810bb08cc586363b 100644
+index 1e2c430a8df6afde91e3c5169d2d7b501acdec7f..1347ea594d3e771f02a73d95454388d4533c8be8 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -658,7 +658,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1898,7 +1898,7 @@ index 2187331d2f3c4f14281dde6f01422fc4d5458e0e..af7e4ce201a471d2f59d16c0810bb08c
}
protected void tickTime() {
-@@ -2370,7 +2373,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -2373,7 +2376,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
private boolean isPositionTickingWithEntitiesLoaded(long chunkPos) {
// Paper start - optimize is ticking ready type functions
ChunkHolder chunkHolder = this.chunkSource.chunkMap.getVisibleChunkIfPresent(chunkPos);
diff --git a/patches/server/0860-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0859-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch
index 17181993c9..5421744dc3 100644
--- a/patches/server/0860-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch
+++ b/patches/server/0859-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch
@@ -9,10 +9,10 @@ This might result in chunks loading far slower in the nether,
for example.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 4eafa147edad4fe66fb419635c320a01186e7fea..b69af9a2f1a0e3d578aaade1fb040d3d4230a941 100644
+index 88db383a1527301332e8a047066afa5ed827db32..dc94d0a99af26a61b1309ea556b0df2d5f525ea3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1356,6 +1356,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1354,6 +1354,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.executeMidTickTasks(); // Paper - execute chunk tasks mid tick
return true;
} else {
@@ -20,7 +20,7 @@ index 4eafa147edad4fe66fb419635c320a01186e7fea..b69af9a2f1a0e3d578aaade1fb040d3d
if (this.haveTime()) {
Iterator iterator = this.getAllLevels().iterator();
-@@ -1363,12 +1364,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1361,12 +1362,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerLevel worldserver = (ServerLevel) iterator.next();
if (worldserver.getChunkSource().pollTask()) {
diff --git a/patches/server/0861-Replace-ticket-level-propagator.patch b/patches/server/0860-Replace-ticket-level-propagator.patch
index 03d6ba0cb1..03d6ba0cb1 100644
--- a/patches/server/0861-Replace-ticket-level-propagator.patch
+++ b/patches/server/0860-Replace-ticket-level-propagator.patch
diff --git a/patches/server/0862-Furnace-RecipesUsed-API.patch b/patches/server/0861-Furnace-RecipesUsed-API.patch
index 2e6cf1c2fe..2e6cf1c2fe 100644
--- a/patches/server/0862-Furnace-RecipesUsed-API.patch
+++ b/patches/server/0861-Furnace-RecipesUsed-API.patch
diff --git a/patches/server/0863-Configurable-sculk-sensor-listener-range.patch b/patches/server/0862-Configurable-sculk-sensor-listener-range.patch
index 2e9adfa399..2e9adfa399 100644
--- a/patches/server/0863-Configurable-sculk-sensor-listener-range.patch
+++ b/patches/server/0862-Configurable-sculk-sensor-listener-range.patch
diff --git a/patches/server/0864-Add-missing-block-data-mins-and-maxes.patch b/patches/server/0863-Add-missing-block-data-mins-and-maxes.patch
index 6f3d051671..6f3d051671 100644
--- a/patches/server/0864-Add-missing-block-data-mins-and-maxes.patch
+++ b/patches/server/0863-Add-missing-block-data-mins-and-maxes.patch
diff --git a/patches/server/0865-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0864-Option-to-have-default-CustomSpawners-in-custom-worl.patch
index 46cd5e1db7..a3e598bfc4 100644
--- a/patches/server/0865-Option-to-have-default-CustomSpawners-in-custom-worl.patch
+++ b/patches/server/0864-Option-to-have-default-CustomSpawners-in-custom-worl.patch
@@ -24,10 +24,10 @@ index 9bff729df7156b071b08913549838024bb17c3c9..88a4dda44e59fbe6215d7ac2e5af0c54
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index b69af9a2f1a0e3d578aaade1fb040d3d4230a941..7ca233fa8a76a0734964957fcd8e09e7a44a39e8 100644
+index dc94d0a99af26a61b1309ea556b0df2d5f525ea3..dca58725c490bbfef0c50bdd38b58a93622422e2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -619,7 +619,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -617,7 +617,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.commandStorage = new CommandStorage(worldpersistentdata);
} else {
ChunkProgressListener worldloadlistener = this.progressListenerFactory.create(11);
diff --git a/patches/server/0866-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0865-Put-world-into-worldlist-before-initing-the-world.patch
index b277ac14c6..31c73d119d 100644
--- a/patches/server/0866-Put-world-into-worldlist-before-initing-the-world.patch
+++ b/patches/server/0865-Put-world-into-worldlist-before-initing-the-world.patch
@@ -7,10 +7,10 @@ Some parts of legacy conversion will need the overworld
to get the legacy structure data storage
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 7ca233fa8a76a0734964957fcd8e09e7a44a39e8..05b834a99649e3f3e8e7759234006b1c0b799629 100644
+index dca58725c490bbfef0c50bdd38b58a93622422e2..93a4b1f94e86aa2b747a8c511de0ff6b11cf7f36 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -631,9 +631,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -629,9 +629,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
diff --git a/patches/server/0867-Fix-Entity-Position-Desync.patch b/patches/server/0866-Fix-Entity-Position-Desync.patch
index 32aeaec69d..32aeaec69d 100644
--- a/patches/server/0867-Fix-Entity-Position-Desync.patch
+++ b/patches/server/0866-Fix-Entity-Position-Desync.patch
diff --git a/patches/server/0868-Custom-Potion-Mixes.patch b/patches/server/0867-Custom-Potion-Mixes.patch
index 31003aba09..74ebe6704e 100644
--- a/patches/server/0868-Custom-Potion-Mixes.patch
+++ b/patches/server/0867-Custom-Potion-Mixes.patch
@@ -24,10 +24,10 @@ index 0000000000000000000000000000000000000000..6b0bed550763f34e18c9e92f9a47ec0c
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 05b834a99649e3f3e8e7759234006b1c0b799629..85b3bf7718e51ffa52799c0748843aaad3fd3813 100644
+index 93a4b1f94e86aa2b747a8c511de0ff6b11cf7f36..2285fb8bc025fafc0531f2ce1b658c3a458e02d0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2059,6 +2059,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2055,6 +2055,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.worldData.setDataPackConfig(MinecraftServer.getSelectedPacks(this.packRepository));
this.resources.managers.updateRegistryTags(this.registryAccess());
io.papermc.paper.registry.PaperRegistry.clearCaches(); // Paper
diff --git a/patches/server/0869-Fix-Fluid-tags-isTagged-method.patch b/patches/server/0868-Fix-Fluid-tags-isTagged-method.patch
index 95eeab8b2f..95eeab8b2f 100644
--- a/patches/server/0869-Fix-Fluid-tags-isTagged-method.patch
+++ b/patches/server/0868-Fix-Fluid-tags-isTagged-method.patch
diff --git a/patches/server/0870-Fix-World-locateNearestStructure.patch b/patches/server/0869-Fix-World-locateNearestStructure.patch
index 79fdc88050..747ca89c54 100644
--- a/patches/server/0870-Fix-World-locateNearestStructure.patch
+++ b/patches/server/0869-Fix-World-locateNearestStructure.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Fix World#locateNearestStructure
impl needs to be changed to reflect that
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 85b3bf7718e51ffa52799c0748843aaad3fd3813..17e87875a95495940899b862eabf98b3d6a365da 100644
+index 2285fb8bc025fafc0531f2ce1b658c3a458e02d0..edceca7fe37c9b10a80829182c0b3af82b3d163d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2060,6 +2060,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2056,6 +2056,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.resources.managers.updateRegistryTags(this.registryAccess());
io.papermc.paper.registry.PaperRegistry.clearCaches(); // Paper
net.minecraft.world.item.alchemy.PotionBrewing.reload(); // Paper
@@ -23,10 +23,10 @@ index 85b3bf7718e51ffa52799c0748843aaad3fd3813..17e87875a95495940899b862eabf98b3
if (Thread.currentThread() != this.serverThread) return; // Paper
//this.getPlayerList().saveAll(); // Paper - we don't need to do this
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index af7e4ce201a471d2f59d16c0810bb08cc586363b..5181f061c73c120c8e9ef30b7da1945c8f57b418 100644
+index 1347ea594d3e771f02a73d95454388d4533c8be8..60e5a9e11ab7f4c2af4e9a2c9066cce02b544af8 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1790,7 +1790,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
+@@ -1793,7 +1793,16 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (optional.isEmpty()) {
return null;
} else {
diff --git a/patches/server/0871-Force-close-world-loading-screen.patch b/patches/server/0870-Force-close-world-loading-screen.patch
index 24a6fd821f..24a6fd821f 100644
--- a/patches/server/0871-Force-close-world-loading-screen.patch
+++ b/patches/server/0870-Force-close-world-loading-screen.patch
diff --git a/patches/server/0872-Fix-falling-block-spawn-methods.patch b/patches/server/0871-Fix-falling-block-spawn-methods.patch
index 5ff117ee09..5ff117ee09 100644
--- a/patches/server/0872-Fix-falling-block-spawn-methods.patch
+++ b/patches/server/0871-Fix-falling-block-spawn-methods.patch
diff --git a/patches/server/0873-Expose-furnace-minecart-push-values.patch b/patches/server/0872-Expose-furnace-minecart-push-values.patch
index 4086d94249..4086d94249 100644
--- a/patches/server/0873-Expose-furnace-minecart-push-values.patch
+++ b/patches/server/0872-Expose-furnace-minecart-push-values.patch
diff --git a/patches/server/0874-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0873-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
index b95d6ace5a..b95d6ace5a 100644
--- a/patches/server/0874-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
+++ b/patches/server/0873-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
diff --git a/patches/server/0875-Fix-save-problems-on-shutdown.patch b/patches/server/0874-Fix-save-problems-on-shutdown.patch
index 51a0ce45a7..ea6cc1f913 100644
--- a/patches/server/0875-Fix-save-problems-on-shutdown.patch
+++ b/patches/server/0874-Fix-save-problems-on-shutdown.patch
@@ -12,10 +12,10 @@ Subject: [PATCH] Fix save problems on shutdown
processed so that the main process queue can be drained
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 17e87875a95495940899b862eabf98b3d6a365da..39b7c78b032ed6fc29ac765020d5a38858bf2a3a 100644
+index edceca7fe37c9b10a80829182c0b3af82b3d163d..32099b8ca18f298812e15285a8e04039eca1375d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -998,6 +998,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -996,6 +996,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@@ -29,7 +29,7 @@ index 17e87875a95495940899b862eabf98b3d6a365da..39b7c78b032ed6fc29ac765020d5a388
while (this.levels.values().stream().anyMatch((worldserver1) -> {
return worldserver1.getChunkSource().chunkMap.hasWork();
})) {
-@@ -1010,9 +1017,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1008,9 +1015,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.getChunkSource().tick(() -> {
return true;
}, false);
@@ -42,7 +42,7 @@ index 17e87875a95495940899b862eabf98b3d6a365da..39b7c78b032ed6fc29ac765020d5a388
}
this.saveAllChunks(false, true, false);
-@@ -1308,6 +1317,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1306,6 +1315,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
private boolean haveTime() {
diff --git a/patches/server/0876-More-Projectile-API.patch b/patches/server/0875-More-Projectile-API.patch
index 94ead9690b..94ead9690b 100644
--- a/patches/server/0876-More-Projectile-API.patch
+++ b/patches/server/0875-More-Projectile-API.patch
diff --git a/patches/server/0877-Fix-swamp-hut-cat-generation-deadlock.patch b/patches/server/0876-Fix-swamp-hut-cat-generation-deadlock.patch
index c928ada21b..c928ada21b 100644
--- a/patches/server/0877-Fix-swamp-hut-cat-generation-deadlock.patch
+++ b/patches/server/0876-Fix-swamp-hut-cat-generation-deadlock.patch
diff --git a/patches/server/0878-Fix-CreativeCategory-API.patch b/patches/server/0877-Fix-CreativeCategory-API.patch
index 6835fb2350..6835fb2350 100644
--- a/patches/server/0878-Fix-CreativeCategory-API.patch
+++ b/patches/server/0877-Fix-CreativeCategory-API.patch