aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-10-27 18:11:15 +0100
committerNassim Jahnke <[email protected]>2024-10-27 18:39:30 +0100
commit02bca1e6558bf4ac0cbf928d48e90f497b10b0a3 (patch)
tree1144072e447f4c0b7e80b278fd769106227f016a
parent12ed02105177f54906a7d4422b235929426bc264 (diff)
downloadPaper-02bca1e6558bf4ac0cbf928d48e90f497b10b0a3.tar.gz
Paper-02bca1e6558bf4ac0cbf928d48e90f497b10b0a3.zip
Remove timings impl
-rw-r--r--patches/api/0011-Timings-v2.patch62
-rw-r--r--patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch2
-rw-r--r--patches/api/0015-Expose-server-build-information.patch13
-rw-r--r--patches/api/0021-Add-exception-reporting-event.patch2
-rw-r--r--patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch4
-rw-r--r--patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch4
-rw-r--r--patches/api/0253-Expand-world-key-API.patch4
-rw-r--r--patches/api/0255-Expose-protocol-version.patch4
-rw-r--r--patches/api/0272-ItemStack-repair-check-API.patch4
-rw-r--r--patches/api/0304-Get-entity-default-attributes.patch4
-rw-r--r--patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch4
-rw-r--r--patches/api/0358-Add-NamespacedKey-biome-methods.patch4
-rw-r--r--patches/api/0402-Fix-custom-statistic-criteria-creation.patch4
-rw-r--r--patches/api/0440-Add-api-for-spawn-egg-texture-colors.patch4
-rw-r--r--patches/api/0441-Add-Lifecycle-Event-system.patch4
-rw-r--r--patches/api/0442-ItemStack-Tooltip-API.patch4
-rw-r--r--patches/api/0472-Registry-Modification-API.patch4
-rw-r--r--patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch4
-rw-r--r--patches/api/0485-Add-FeatureFlag-API.patch4
-rw-r--r--patches/api/0487-Item-serialization-as-json.patch4
-rw-r--r--patches/server/0005-Paper-config-files.patch29
-rw-r--r--patches/server/0009-MC-Utils.patch4
-rw-r--r--patches/server/0023-Further-improve-server-tick-loop.patch (renamed from patches/server/0024-Further-improve-server-tick-loop.patch)14
-rw-r--r--patches/server/0023-Timings-v2.patch2077
-rw-r--r--patches/server/0024-Remove-Spigot-timings.patch967
-rw-r--r--patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch4
-rw-r--r--patches/server/0033-Expose-server-build-information.patch30
-rw-r--r--patches/server/0036-Entity-Origin-API.patch4
-rw-r--r--patches/server/0037-Prevent-block-entity-and-entity-crashes.patch16
-rw-r--r--patches/server/0040-Add-more-entities-to-activation-range-ignore-list.patch4
-rw-r--r--patches/server/0043-Optimize-explosions.patch8
-rw-r--r--patches/server/0045-Disable-thunder.patch4
-rw-r--r--patches/server/0046-Disable-ice-and-snow.patch6
-rw-r--r--patches/server/0052-Disable-spigot-tick-limiters.patch4
-rw-r--r--patches/server/0053-Fix-spawn-location-event-changing-location.patch4
-rw-r--r--patches/server/0055-Improve-Player-chat-API-handling.patch14
-rw-r--r--patches/server/0057-Expose-server-CommandMap.patch4
-rw-r--r--patches/server/0061-Add-velocity-warnings.patch2
-rw-r--r--patches/server/0062-Add-exception-reporting-event.patch18
-rw-r--r--patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch4
-rw-r--r--patches/server/0067-Default-loading-permissions.yml-before-plugins.patch6
-rw-r--r--patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch4
-rw-r--r--patches/server/0069-Remove-Metadata-on-reload.patch4
-rw-r--r--patches/server/0072-Add-World-Util-Methods.patch4
-rw-r--r--patches/server/0073-Custom-replacement-for-eaten-items.patch8
-rw-r--r--patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch8
-rw-r--r--patches/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch4
-rw-r--r--patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch12
-rw-r--r--patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch6
-rw-r--r--patches/server/0079-Configurable-Chunk-Inhabited-Time.patch2
-rw-r--r--patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch4
-rw-r--r--patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch4
-rw-r--r--patches/server/0088-Configurable-Player-Collision.patch14
-rw-r--r--patches/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch4
-rw-r--r--patches/server/0093-remove-null-possibility-for-getServer-singleton.patch8
-rw-r--r--patches/server/0097-Async-GameProfileCache-saving.patch8
-rw-r--r--patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch4
-rw-r--r--patches/server/0101-Fix-global-sound-handling.patch6
-rw-r--r--patches/server/0104-Add-setting-for-proxy-online-mode-status.patch8
-rw-r--r--patches/server/0106-Configurable-packet-in-spam-threshold.patch2
-rw-r--r--patches/server/0107-Configurable-flying-kick-messages.patch2
-rw-r--r--patches/server/0111-Allow-Reloading-of-Command-Aliases.patch4
-rw-r--r--patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch4
-rw-r--r--patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch2
-rw-r--r--patches/server/0124-Enforce-Sync-Player-Saves.patch10
-rw-r--r--patches/server/0125-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch8
-rw-r--r--patches/server/0126-Cap-Entity-Collisions.patch4
-rw-r--r--patches/server/0127-Remove-CraftScheduler-Async-Task-Debugger.patch10
-rw-r--r--patches/server/0128-Properly-handle-async-calls-to-restart-the-server.patch12
-rw-r--r--patches/server/0129-Add-option-to-make-parrots-stay-on-shoulders-despite.patch4
-rw-r--r--patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch4
-rw-r--r--patches/server/0136-Basic-PlayerProfile-API.patch4
-rw-r--r--patches/server/0137-Add-UnknownCommandEvent.patch4
-rw-r--r--patches/server/0145-ProfileWhitelistVerifyEvent.patch6
-rw-r--r--patches/server/0151-Add-PlayerJumpEvent.patch2
-rw-r--r--patches/server/0156-Add-PlayerArmorChangeEvent.patch4
-rw-r--r--patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch8
-rw-r--r--patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch8
-rw-r--r--patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch8
-rw-r--r--patches/server/0161-AsyncTabCompleteEvent.patch6
-rw-r--r--patches/server/0164-PlayerNaturallySpawnCreaturesEvent.patch10
-rw-r--r--patches/server/0166-PreCreatureSpawnEvent.patch10
-rw-r--r--patches/server/0174-Implement-extended-PaperServerListPingEvent.patch4
-rw-r--r--patches/server/0176-Player.setPlayerProfile-API.patch4
-rw-r--r--patches/server/0177-getPlayerUniqueId-API.patch4
-rw-r--r--patches/server/0178-Improved-Async-Task-Scheduler.patch43
-rw-r--r--patches/server/0186-Expand-World.spawnParticle-API-and-add-Builder.patch4
-rw-r--r--patches/server/0198-Make-shield-blocking-delay-configurable.patch4
-rw-r--r--patches/server/0201-Add-entity-knockback-events.patch10
-rw-r--r--patches/server/0202-Expand-Explosions-API.patch6
-rw-r--r--patches/server/0207-InventoryCloseEvent-Reason-API.patch14
-rw-r--r--patches/server/0214-Option-to-prevent-armor-stands-from-doing-entity-loo.patch4
-rw-r--r--patches/server/0215-Vanished-players-don-t-have-rights.patch4
-rw-r--r--patches/server/0221-Break-up-and-make-tab-spam-limits-configurable.patch2
-rw-r--r--patches/server/0224-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch4
-rw-r--r--patches/server/0225-Add-Early-Warning-Feature-to-WatchDog.patch14
-rw-r--r--patches/server/0226-Use-ConcurrentHashMap-in-JsonList.patch4
-rw-r--r--patches/server/0227-Use-a-Queue-for-Queueing-Commands.patch7
-rw-r--r--patches/server/0239-Add-ray-tracing-methods-to-LivingEntity.patch4
-rw-r--r--patches/server/0241-Improve-death-events.patch14
-rw-r--r--patches/server/0245-Prevent-mob-spawning-from-loading-generating-chunks.patch6
-rw-r--r--patches/server/0251-Add-LivingEntity-getTargetEntity.patch4
-rw-r--r--patches/server/0257-Add-option-to-prevent-players-from-moving-into-unloa.patch2
-rw-r--r--patches/server/0260-Improve-Server-Thread-Pool-and-Thread-Priorities.patch4
-rw-r--r--patches/server/0261-Optimize-World-Time-Updates.patch10
-rw-r--r--patches/server/0264-Don-t-allow-digging-into-unloaded-chunks.patch2
-rw-r--r--patches/server/0265-Make-the-default-permission-message-configurable.patch4
-rw-r--r--patches/server/0266-force-entity-dismount-during-teleportation.patch4
-rw-r--r--patches/server/0268-Book-size-limits.patch2
-rw-r--r--patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch4
-rw-r--r--patches/server/0273-BlockDestroyEvent.patch4
-rw-r--r--patches/server/0274-Async-command-map-building.patch6
-rw-r--r--patches/server/0275-Brigadier-Mojang-API.patch2
-rw-r--r--patches/server/0276-Limit-Client-Sign-length-more.patch4
-rw-r--r--patches/server/0277-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch4
-rw-r--r--patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch12
-rw-r--r--patches/server/0280-Add-PlayerPostRespawnEvent.patch10
-rw-r--r--patches/server/0281-Server-Tick-Events.patch20
-rw-r--r--patches/server/0283-Optimize-Captured-BlockEntity-Lookup.patch4
-rw-r--r--patches/server/0288-Expose-the-internal-current-tick.patch4
-rw-r--r--patches/server/0290-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch2
-rw-r--r--patches/server/0293-Prevent-consuming-the-wrong-itemstack.patch8
-rw-r--r--patches/server/0301-Optimise-EntityGetter-getPlayerByUUID.patch4
-rw-r--r--patches/server/0302-Fix-items-not-falling-correctly.patch4
-rw-r--r--patches/server/0306-Tracking-Range-Improvements.patch4
-rw-r--r--patches/server/0309-Optimise-getChunkAt-calls-for-loaded-chunks.patch4
-rw-r--r--patches/server/0310-Add-debug-for-sync-chunk-loads.patch14
-rw-r--r--patches/server/0313-Entity-Jump-API.patch4
-rw-r--r--patches/server/0320-Optimise-Chunk-getFluid.patch2
-rw-r--r--patches/server/0322-Add-tick-times-API-and-mspt-command.patch14
-rw-r--r--patches/server/0323-Expose-MinecraftServer-isRunning.patch4
-rw-r--r--patches/server/0324-Add-Raw-Byte-ItemStack-Serialization.patch6
-rw-r--r--patches/server/0326-Remote-Connections-shouldn-t-hold-up-shutdown.patch4
-rw-r--r--patches/server/0328-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch10
-rw-r--r--patches/server/0331-Don-t-move-existing-players-to-world-spawn.patch4
-rw-r--r--patches/server/0336-Don-t-run-entity-collision-code-if-not-needed.patch4
-rw-r--r--patches/server/0339-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch12
-rw-r--r--patches/server/0340-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch8
-rw-r--r--patches/server/0341-Add-PlayerAttackEntityCooldownResetEvent.patch4
-rw-r--r--patches/server/0344-Fix-item-duplication-and-teleport-issues.patch6
-rw-r--r--patches/server/0346-Validate-PickItem-Packet-and-kick-for-invalid.patch2
-rw-r--r--patches/server/0348-misc-debugging-dumps.patch12
-rw-r--r--patches/server/0349-Prevent-teleporting-dead-entities.patch2
-rw-r--r--patches/server/0350-Implement-Mob-Goal-API.patch4
-rw-r--r--patches/server/0355-Wait-for-Async-Tasks-during-shutdown.patch8
-rw-r--r--patches/server/0361-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch4
-rw-r--r--patches/server/0364-Prevent-position-desync-causing-tp-exploit.patch2
-rw-r--r--patches/server/0366-Add-PlayerRecipeBookClickEvent.patch4
-rw-r--r--patches/server/0368-Add-permission-for-command-blocks.patch2
-rw-r--r--patches/server/0370-Fix-Per-World-Difficulty-Remembering-Difficulty.patch20
-rw-r--r--patches/server/0373-Add-Plugin-Tickets-to-API-Chunk-Methods.patch6
-rw-r--r--patches/server/0376-Do-not-accept-invalid-client-settings.patch4
-rw-r--r--patches/server/0380-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch4
-rw-r--r--patches/server/0392-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch4
-rw-r--r--patches/server/0403-Cache-block-data-strings.patch4
-rw-r--r--patches/server/0404-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch2
-rw-r--r--patches/server/0407-Extend-block-drop-capture-to-capture-all-items-added.patch4
-rw-r--r--patches/server/0408-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch6
-rw-r--r--patches/server/0411-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch4
-rw-r--r--patches/server/0414-Fix-for-large-move-vectors-crashing-server.patch2
-rw-r--r--patches/server/0417-Retain-block-place-order-when-capturing-blockstates.patch2
-rw-r--r--patches/server/0421-Add-getOfflinePlayerIfCached-String.patch4
-rw-r--r--patches/server/0424-Fix-client-lag-on-advancement-loading.patch4
-rw-r--r--patches/server/0427-Add-API-for-quit-reason.patch4
-rw-r--r--patches/server/0435-Climbing-should-not-bypass-cramming-gamerule.patch6
-rw-r--r--patches/server/0438-Limit-recipe-packets.patch4
-rw-r--r--patches/server/0452-Fix-interact-event-not-being-called-sometimes.patch4
-rw-r--r--patches/server/0457-Add-ServerResourcesReloadedEvent.patch6
-rw-r--r--patches/server/0464-Remove-stale-POIs.patch4
-rw-r--r--patches/server/0465-Fix-villager-boat-exploit.patch4
-rw-r--r--patches/server/0466-Add-sendOpLevel-API.patch6
-rw-r--r--patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch6
-rw-r--r--patches/server/0480-Add-EntityMoveEvent.patch12
-rw-r--r--patches/server/0481-added-option-to-disable-pathfinding-updates-on-block.patch6
-rw-r--r--patches/server/0484-Add-getMainThreadExecutor-to-BukkitScheduler.patch4
-rw-r--r--patches/server/0490-fix-converting-txt-to-json-file.patch10
-rw-r--r--patches/server/0495-Allow-using-signs-inside-spawn-protection.patch2
-rw-r--r--patches/server/0496-Expand-world-key-API.patch14
-rw-r--r--patches/server/0498-Drop-carried-item-when-player-has-disconnected.patch4
-rw-r--r--patches/server/0499-forced-whitelist-use-configurable-kick-message.patch4
-rw-r--r--patches/server/0500-Don-t-ignore-result-of-PlayerEditBookEvent.patch2
-rw-r--r--patches/server/0501-Expose-protocol-version.patch6
-rw-r--r--patches/server/0502-Enhance-console-tab-completions-for-brigadier-comman.patch6
-rw-r--r--patches/server/0503-Fix-PlayerItemConsumeEvent-cancelling-properly.patch4
-rw-r--r--patches/server/0510-fix-PlayerItemHeldEvent-firing-twice.patch2
-rw-r--r--patches/server/0514-Implement-methods-to-convert-between-Component-and-B.patch4
-rw-r--r--patches/server/0525-Add-basic-Datapack-API.patch6
-rw-r--r--patches/server/0527-Expand-PlayerGameModeChangeEvent.patch4
-rw-r--r--patches/server/0528-ItemStack-repair-check-API.patch6
-rw-r--r--patches/server/0530-Move-range-check-for-block-placing-up.patch2
-rw-r--r--patches/server/0533-Add-Unix-domain-socket-support.patch10
-rw-r--r--patches/server/0535-Improve-item-default-attribute-API.patch4
-rw-r--r--patches/server/0536-Add-cause-to-Weather-ThunderChangeEvents.patch8
-rw-r--r--patches/server/0539-Add-PlayerKickEvent-causes.patch28
-rw-r--r--patches/server/0548-Line-Of-Sight-Changes.patch4
-rw-r--r--patches/server/0555-Use-getChunkIfLoadedImmediately-in-places.patch8
-rw-r--r--patches/server/0557-Add-PlayerArmSwingEvent.patch4
-rw-r--r--patches/server/0558-Fix-kick-event-leave-message-not-being-sent.patch6
-rw-r--r--patches/server/0560-Rate-options-and-timings-for-sensors-and-behaviors.patch61
-rw-r--r--patches/server/0563-Add-System.out-err-catcher.patch2
-rw-r--r--patches/server/0564-Prevent-AFK-kick-while-watching-end-credits.patch2
-rw-r--r--patches/server/0566-Add-PlayerSetSpawnEvent.patch4
-rw-r--r--patches/server/0574-Add-BlockBreakBlockEvent.patch4
-rw-r--r--patches/server/0579-Add-methods-to-find-targets-for-lightning-strikes.patch6
-rw-r--r--patches/server/0580-Get-entity-default-attributes.patch6
-rw-r--r--patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch4
-rw-r--r--patches/server/0591-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch4
-rw-r--r--patches/server/0593-Improve-and-expand-AsyncCatcher.patch6
-rw-r--r--patches/server/0594-Add-paper-mobcaps-and-paper-playermobcaps.patch8
-rw-r--r--patches/server/0598-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch4
-rw-r--r--patches/server/0601-Oprimise-map-impl-for-tracked-players.patch (renamed from patches/server/0602-Oprimise-map-impl-for-tracked-players.patch)4
-rw-r--r--patches/server/0601-Time-scoreboard-search.patch43
-rw-r--r--patches/server/0602-Add-missing-InventoryType.patch (renamed from patches/server/0603-Add-missing-InventoryType.patch)0
-rw-r--r--patches/server/0603-Optimise-BlockSoil-nearby-water-lookup.patch (renamed from patches/server/0604-Optimise-BlockSoil-nearby-water-lookup.patch)0
-rw-r--r--patches/server/0604-Fix-merchant-inventory-not-closing-on-entity-removal.patch (renamed from patches/server/0605-Fix-merchant-inventory-not-closing-on-entity-removal.patch)4
-rw-r--r--patches/server/0605-Check-requirement-before-suggesting-root-nodes.patch (renamed from patches/server/0606-Check-requirement-before-suggesting-root-nodes.patch)0
-rw-r--r--patches/server/0606-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch (renamed from patches/server/0607-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch)2
-rw-r--r--patches/server/0607-Add-packet-limiter-config.patch (renamed from patches/server/0608-Add-packet-limiter-config.patch)0
-rw-r--r--patches/server/0608-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch (renamed from patches/server/0609-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch)0
-rw-r--r--patches/server/0609-Ensure-valid-vehicle-status.patch (renamed from patches/server/0610-Ensure-valid-vehicle-status.patch)0
-rw-r--r--patches/server/0610-Prevent-softlocked-end-exit-portal-generation.patch (renamed from patches/server/0611-Prevent-softlocked-end-exit-portal-generation.patch)0
-rw-r--r--patches/server/0611-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch (renamed from patches/server/0612-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch)0
-rw-r--r--patches/server/0612-Don-t-log-debug-logging-being-disabled.patch (renamed from patches/server/0613-Don-t-log-debug-logging-being-disabled.patch)0
-rw-r--r--patches/server/0613-fix-various-menus-with-empty-level-accesses.patch (renamed from patches/server/0614-fix-various-menus-with-empty-level-accesses.patch)0
-rw-r--r--patches/server/0614-Preserve-overstacked-loot.patch (renamed from patches/server/0615-Preserve-overstacked-loot.patch)0
-rw-r--r--patches/server/0615-Update-head-rotation-in-missing-places.patch (renamed from patches/server/0616-Update-head-rotation-in-missing-places.patch)0
-rw-r--r--patches/server/0616-prevent-unintended-light-block-manipulation.patch (renamed from patches/server/0617-prevent-unintended-light-block-manipulation.patch)0
-rw-r--r--patches/server/0617-Fix-CraftCriteria-defaults-map.patch (renamed from patches/server/0618-Fix-CraftCriteria-defaults-map.patch)0
-rw-r--r--patches/server/0618-Fix-upstreams-block-state-factories.patch (renamed from patches/server/0619-Fix-upstreams-block-state-factories.patch)4
-rw-r--r--patches/server/0619-Configurable-feature-seeds.patch (renamed from patches/server/0620-Configurable-feature-seeds.patch)13
-rw-r--r--patches/server/0620-Add-root-admin-user-detection.patch (renamed from patches/server/0621-Add-root-admin-user-detection.patch)4
-rw-r--r--patches/server/0621-don-t-attempt-to-teleport-dead-entities.patch (renamed from patches/server/0622-don-t-attempt-to-teleport-dead-entities.patch)0
-rw-r--r--patches/server/0622-Prevent-excessive-velocity-through-repeated-crits.patch (renamed from patches/server/0623-Prevent-excessive-velocity-through-repeated-crits.patch)4
-rw-r--r--patches/server/0623-Remove-client-side-code-using-deprecated-for-removal.patch (renamed from patches/server/0624-Remove-client-side-code-using-deprecated-for-removal.patch)0
-rw-r--r--patches/server/0624-Fix-Spigot-growth-modifiers.patch (renamed from patches/server/0625-Fix-Spigot-growth-modifiers.patch)0
-rw-r--r--patches/server/0625-Prevent-ContainerOpenersCounter-openCount-from-going.patch (renamed from patches/server/0626-Prevent-ContainerOpenersCounter-openCount-from-going.patch)0
-rw-r--r--patches/server/0626-Add-PlayerItemFrameChangeEvent.patch (renamed from patches/server/0627-Add-PlayerItemFrameChangeEvent.patch)0
-rw-r--r--patches/server/0627-Optimize-HashMapPalette.patch (renamed from patches/server/0628-Optimize-HashMapPalette.patch)0
-rw-r--r--patches/server/0628-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch (renamed from patches/server/0629-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch)0
-rw-r--r--patches/server/0629-Add-more-Campfire-API.patch (renamed from patches/server/0630-Add-more-Campfire-API.patch)0
-rw-r--r--patches/server/0630-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch (renamed from patches/server/0631-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch)0
-rw-r--r--patches/server/0631-Forward-CraftEntity-in-teleport-command.patch (renamed from patches/server/0632-Forward-CraftEntity-in-teleport-command.patch)0
-rw-r--r--patches/server/0632-Improve-scoreboard-entries.patch (renamed from patches/server/0633-Improve-scoreboard-entries.patch)0
-rw-r--r--patches/server/0633-Entity-powdered-snow-API.patch (renamed from patches/server/0634-Entity-powdered-snow-API.patch)0
-rw-r--r--patches/server/0634-Add-API-for-item-entity-health.patch (renamed from patches/server/0635-Add-API-for-item-entity-health.patch)0
-rw-r--r--patches/server/0635-Configurable-max-block-light-for-monster-spawning.patch (renamed from patches/server/0636-Configurable-max-block-light-for-monster-spawning.patch)0
-rw-r--r--patches/server/0636-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch (renamed from patches/server/0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch)0
-rw-r--r--patches/server/0637-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch (renamed from patches/server/0638-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch)0
-rw-r--r--patches/server/0638-Bucketable-API.patch (renamed from patches/server/0639-Bucketable-API.patch)0
-rw-r--r--patches/server/0639-Validate-usernames.patch (renamed from patches/server/0640-Validate-usernames.patch)4
-rw-r--r--patches/server/0640-Make-water-animal-spawn-height-configurable.patch (renamed from patches/server/0641-Make-water-animal-spawn-height-configurable.patch)0
-rw-r--r--patches/server/0641-Expose-vanilla-BiomeProvider-from-WorldInfo.patch (renamed from patches/server/0642-Expose-vanilla-BiomeProvider-from-WorldInfo.patch)12
-rw-r--r--patches/server/0642-Add-config-option-for-worlds-affected-by-time-cmd.patch (renamed from patches/server/0643-Add-config-option-for-worlds-affected-by-time-cmd.patch)0
-rw-r--r--patches/server/0643-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch (renamed from patches/server/0644-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch)0
-rw-r--r--patches/server/0644-Multiple-Entries-with-Scoreboards.patch (renamed from patches/server/0645-Multiple-Entries-with-Scoreboards.patch)0
-rw-r--r--patches/server/0645-Reset-placed-block-on-exception.patch (renamed from patches/server/0646-Reset-placed-block-on-exception.patch)0
-rw-r--r--patches/server/0646-Add-configurable-height-for-slime-spawn.patch (renamed from patches/server/0647-Add-configurable-height-for-slime-spawn.patch)0
-rw-r--r--patches/server/0647-Fix-xp-reward-for-baby-zombies.patch (renamed from patches/server/0648-Fix-xp-reward-for-baby-zombies.patch)0
-rw-r--r--patches/server/0648-Multi-Block-Change-API-Implementation.patch (renamed from patches/server/0649-Multi-Block-Change-API-Implementation.patch)0
-rw-r--r--patches/server/0649-Fix-NotePlayEvent.patch (renamed from patches/server/0650-Fix-NotePlayEvent.patch)0
-rw-r--r--patches/server/0650-Freeze-Tick-Lock-API.patch (renamed from patches/server/0651-Freeze-Tick-Lock-API.patch)4
-rw-r--r--patches/server/0651-More-PotionEffectType-API.patch (renamed from patches/server/0652-More-PotionEffectType-API.patch)0
-rw-r--r--patches/server/0652-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch (renamed from patches/server/0653-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch)0
-rw-r--r--patches/server/0653-API-for-creating-command-sender-which-forwards-feedb.patch (renamed from patches/server/0654-API-for-creating-command-sender-which-forwards-feedb.patch)4
-rw-r--r--patches/server/0654-Add-missing-structure-set-seed-configs.patch (renamed from patches/server/0655-Add-missing-structure-set-seed-configs.patch)0
-rw-r--r--patches/server/0655-Fix-cancelled-powdered-snow-bucket-placement.patch (renamed from patches/server/0656-Fix-cancelled-powdered-snow-bucket-placement.patch)0
-rw-r--r--patches/server/0656-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch (renamed from patches/server/0657-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch)4
-rw-r--r--patches/server/0657-Add-GameEvent-tags.patch (renamed from patches/server/0658-Add-GameEvent-tags.patch)6
-rw-r--r--patches/server/0658-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch (renamed from patches/server/0659-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch)6
-rw-r--r--patches/server/0659-Furnace-RecipesUsed-API.patch (renamed from patches/server/0660-Furnace-RecipesUsed-API.patch)0
-rw-r--r--patches/server/0660-Configurable-sculk-sensor-listener-range.patch (renamed from patches/server/0661-Configurable-sculk-sensor-listener-range.patch)0
-rw-r--r--patches/server/0661-Add-missing-block-data-API.patch (renamed from patches/server/0662-Add-missing-block-data-API.patch)0
-rw-r--r--patches/server/0662-Option-to-have-default-CustomSpawners-in-custom-worl.patch (renamed from patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch)4
-rw-r--r--patches/server/0663-Put-world-into-worldlist-before-initing-the-world.patch (renamed from patches/server/0664-Put-world-into-worldlist-before-initing-the-world.patch)8
-rw-r--r--patches/server/0664-Custom-Potion-Mixes.patch (renamed from patches/server/0665-Custom-Potion-Mixes.patch)10
-rw-r--r--patches/server/0665-Force-close-world-loading-screen.patch (renamed from patches/server/0666-Force-close-world-loading-screen.patch)4
-rw-r--r--patches/server/0666-Fix-falling-block-spawn-methods.patch (renamed from patches/server/0667-Fix-falling-block-spawn-methods.patch)0
-rw-r--r--patches/server/0667-Expose-furnace-minecart-push-values.patch (renamed from patches/server/0668-Expose-furnace-minecart-push-values.patch)0
-rw-r--r--patches/server/0668-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch (renamed from patches/server/0669-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch)0
-rw-r--r--patches/server/0669-More-Projectile-API.patch (renamed from patches/server/0670-More-Projectile-API.patch)0
-rw-r--r--patches/server/0670-Fix-swamp-hut-cat-generation-deadlock.patch (renamed from patches/server/0671-Fix-swamp-hut-cat-generation-deadlock.patch)0
-rw-r--r--patches/server/0671-Don-t-allow-vehicle-movement-from-players-while-tele.patch (renamed from patches/server/0672-Don-t-allow-vehicle-movement-from-players-while-tele.patch)2
-rw-r--r--patches/server/0672-Implement-getComputedBiome-API.patch (renamed from patches/server/0673-Implement-getComputedBiome-API.patch)0
-rw-r--r--patches/server/0673-Make-some-itemstacks-nonnull.patch (renamed from patches/server/0674-Make-some-itemstacks-nonnull.patch)0
-rw-r--r--patches/server/0674-Implement-enchantWithLevels-API.patch (renamed from patches/server/0675-Implement-enchantWithLevels-API.patch)0
-rw-r--r--patches/server/0675-Fix-saving-in-unloadWorld.patch (renamed from patches/server/0676-Fix-saving-in-unloadWorld.patch)4
-rw-r--r--patches/server/0676-Buffer-OOB-setBlock-calls.patch (renamed from patches/server/0677-Buffer-OOB-setBlock-calls.patch)0
-rw-r--r--patches/server/0677-Add-TameableDeathMessageEvent.patch (renamed from patches/server/0678-Add-TameableDeathMessageEvent.patch)0
-rw-r--r--patches/server/0678-Fix-new-block-data-for-EntityChangeBlockEvent.patch (renamed from patches/server/0679-Fix-new-block-data-for-EntityChangeBlockEvent.patch)0
-rw-r--r--patches/server/0679-fix-player-loottables-running-when-mob-loot-gamerule.patch (renamed from patches/server/0680-fix-player-loottables-running-when-mob-loot-gamerule.patch)0
-rw-r--r--patches/server/0680-Ensure-entity-passenger-world-matches-ridden-entity.patch (renamed from patches/server/0681-Ensure-entity-passenger-world-matches-ridden-entity.patch)0
-rw-r--r--patches/server/0681-Cache-resource-keys-and-optimize-reference-Holder-ta.patch (renamed from patches/server/0682-Cache-resource-keys-and-optimize-reference-Holder-ta.patch)0
-rw-r--r--patches/server/0682-Allow-changing-the-EnderDragon-podium.patch (renamed from patches/server/0683-Allow-changing-the-EnderDragon-podium.patch)0
-rw-r--r--patches/server/0683-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch (renamed from patches/server/0684-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch)0
-rw-r--r--patches/server/0684-Prevent-tile-entity-copies-loading-chunks.patch (renamed from patches/server/0685-Prevent-tile-entity-copies-loading-chunks.patch)4
-rw-r--r--patches/server/0685-Use-username-instead-of-display-name-in-PlayerList-g.patch (renamed from patches/server/0686-Use-username-instead-of-display-name-in-PlayerList-g.patch)4
-rw-r--r--patches/server/0686-Expand-PlayerItemDamageEvent.patch (renamed from patches/server/0687-Expand-PlayerItemDamageEvent.patch)0
-rw-r--r--patches/server/0687-WorldCreator-keepSpawnLoaded.patch (renamed from patches/server/0688-WorldCreator-keepSpawnLoaded.patch)4
-rw-r--r--patches/server/0688-Fix-CME-in-CraftPersistentDataTypeRegistry.patch (renamed from patches/server/0689-Fix-CME-in-CraftPersistentDataTypeRegistry.patch)0
-rw-r--r--patches/server/0689-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch (renamed from patches/server/0690-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch)0
-rw-r--r--patches/server/0690-Add-EntityDyeEvent-and-CollarColorable-interface.patch (renamed from patches/server/0691-Add-EntityDyeEvent-and-CollarColorable-interface.patch)0
-rw-r--r--patches/server/0691-Fire-CauldronLevelChange-on-initial-fill.patch (renamed from patches/server/0692-Fire-CauldronLevelChange-on-initial-fill.patch)0
-rw-r--r--patches/server/0692-fix-powder-snow-cauldrons-not-turning-to-water.patch (renamed from patches/server/0693-fix-powder-snow-cauldrons-not-turning-to-water.patch)0
-rw-r--r--patches/server/0693-Add-PlayerStopUsingItemEvent.patch (renamed from patches/server/0694-Add-PlayerStopUsingItemEvent.patch)4
-rw-r--r--patches/server/0694-Don-t-tick-markers.patch (renamed from patches/server/0695-Don-t-tick-markers.patch)4
-rw-r--r--patches/server/0695-Expand-FallingBlock-API.patch (renamed from patches/server/0696-Expand-FallingBlock-API.patch)0
-rw-r--r--patches/server/0696-Add-support-for-Proxy-Protocol.patch (renamed from patches/server/0697-Add-support-for-Proxy-Protocol.patch)0
-rw-r--r--patches/server/0697-Fix-OfflinePlayer-getBedSpawnLocation.patch (renamed from patches/server/0698-Fix-OfflinePlayer-getBedSpawnLocation.patch)0
-rw-r--r--patches/server/0698-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch (renamed from patches/server/0699-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch)0
-rw-r--r--patches/server/0699-Sanitize-sent-BlockEntity-NBT.patch (renamed from patches/server/0700-Sanitize-sent-BlockEntity-NBT.patch)4
-rw-r--r--patches/server/0700-Disable-component-selector-resolving-in-books-by-def.patch (renamed from patches/server/0701-Disable-component-selector-resolving-in-books-by-def.patch)0
-rw-r--r--patches/server/0701-Prevent-entity-loading-causing-async-lookups.patch (renamed from patches/server/0702-Prevent-entity-loading-causing-async-lookups.patch)0
-rw-r--r--patches/server/0702-Throw-exception-on-world-create-while-being-ticked.patch (renamed from patches/server/0703-Throw-exception-on-world-create-while-being-ticked.patch)26
-rw-r--r--patches/server/0703-Dont-resent-entity-on-art-update.patch (renamed from patches/server/0704-Dont-resent-entity-on-art-update.patch)0
-rw-r--r--patches/server/0704-Add-WardenAngerChangeEvent.patch (renamed from patches/server/0705-Add-WardenAngerChangeEvent.patch)0
-rw-r--r--patches/server/0705-Add-option-for-strict-advancement-dimension-checks.patch (renamed from patches/server/0706-Add-option-for-strict-advancement-dimension-checks.patch)0
-rw-r--r--patches/server/0706-Add-missing-important-BlockStateListPopulator-method.patch (renamed from patches/server/0707-Add-missing-important-BlockStateListPopulator-method.patch)0
-rw-r--r--patches/server/0707-Nameable-Banner-API.patch (renamed from patches/server/0708-Nameable-Banner-API.patch)0
-rw-r--r--patches/server/0708-Don-t-broadcast-messages-to-command-blocks.patch (renamed from patches/server/0709-Don-t-broadcast-messages-to-command-blocks.patch)4
-rw-r--r--patches/server/0709-Prevent-empty-items-from-being-added-to-world.patch (renamed from patches/server/0710-Prevent-empty-items-from-being-added-to-world.patch)4
-rw-r--r--patches/server/0710-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch (renamed from patches/server/0711-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch)0
-rw-r--r--patches/server/0711-Add-Player-getFishHook.patch (renamed from patches/server/0712-Add-Player-getFishHook.patch)0
-rw-r--r--patches/server/0712-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch (renamed from patches/server/0713-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch)0
-rw-r--r--patches/server/0713-Add-various-missing-EntityDropItemEvent-calls.patch (renamed from patches/server/0714-Add-various-missing-EntityDropItemEvent-calls.patch)0
-rw-r--r--patches/server/0714-Fix-Bee-flower-NPE.patch (renamed from patches/server/0715-Fix-Bee-flower-NPE.patch)0
-rw-r--r--patches/server/0715-More-Teleport-API.patch (renamed from patches/server/0716-More-Teleport-API.patch)2
-rw-r--r--patches/server/0716-Add-EntityPortalReadyEvent.patch (renamed from patches/server/0717-Add-EntityPortalReadyEvent.patch)0
-rw-r--r--patches/server/0717-Don-t-use-level-random-in-entity-constructors.patch (renamed from patches/server/0718-Don-t-use-level-random-in-entity-constructors.patch)0
-rw-r--r--patches/server/0718-Send-block-entities-after-destroy-prediction.patch (renamed from patches/server/0719-Send-block-entities-after-destroy-prediction.patch)2
-rw-r--r--patches/server/0719-Warn-on-plugins-accessing-faraway-chunks.patch (renamed from patches/server/0720-Warn-on-plugins-accessing-faraway-chunks.patch)4
-rw-r--r--patches/server/0720-Custom-Chat-Completion-Suggestions-API.patch (renamed from patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch)0
-rw-r--r--patches/server/0721-Add-and-fix-missing-BlockFadeEvents.patch (renamed from patches/server/0722-Add-and-fix-missing-BlockFadeEvents.patch)0
-rw-r--r--patches/server/0722-Collision-API.patch (renamed from patches/server/0723-Collision-API.patch)0
-rw-r--r--patches/server/0723-Fix-suggest-command-message-for-brigadier-syntax-exc.patch (renamed from patches/server/0724-Fix-suggest-command-message-for-brigadier-syntax-exc.patch)0
-rw-r--r--patches/server/0724-Block-Ticking-API.patch (renamed from patches/server/0725-Block-Ticking-API.patch)0
-rw-r--r--patches/server/0725-Add-Velocity-IP-Forwarding-Support.patch (renamed from patches/server/0726-Add-Velocity-IP-Forwarding-Support.patch)8
-rw-r--r--patches/server/0726-Add-NamespacedKey-biome-methods.patch (renamed from patches/server/0727-Add-NamespacedKey-biome-methods.patch)18
-rw-r--r--patches/server/0727-Fix-plugin-loggers-on-server-shutdown.patch (renamed from patches/server/0728-Fix-plugin-loggers-on-server-shutdown.patch)4
-rw-r--r--patches/server/0728-Stop-large-look-changes-from-crashing-the-server.patch (renamed from patches/server/0729-Stop-large-look-changes-from-crashing-the-server.patch)4
-rw-r--r--patches/server/0729-Fire-EntityChangeBlockEvent-in-more-places.patch (renamed from patches/server/0730-Fire-EntityChangeBlockEvent-in-more-places.patch)0
-rw-r--r--patches/server/0730-Missing-eating-regain-reason.patch (renamed from patches/server/0731-Missing-eating-regain-reason.patch)0
-rw-r--r--patches/server/0731-Missing-effect-cause.patch (renamed from patches/server/0732-Missing-effect-cause.patch)0
-rw-r--r--patches/server/0732-Added-byte-array-serialization-deserialization-for-P.patch (renamed from patches/server/0733-Added-byte-array-serialization-deserialization-for-P.patch)0
-rw-r--r--patches/server/0733-Call-BlockPhysicsEvent-more-often.patch (renamed from patches/server/0734-Call-BlockPhysicsEvent-more-often.patch)0
-rw-r--r--patches/server/0734-Configurable-chat-thread-limit.patch (renamed from patches/server/0735-Configurable-chat-thread-limit.patch)4
-rw-r--r--patches/server/0735-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch (renamed from patches/server/0736-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch)0
-rw-r--r--patches/server/0736-fix-Jigsaw-block-kicking-user.patch (renamed from patches/server/0737-fix-Jigsaw-block-kicking-user.patch)0
-rw-r--r--patches/server/0737-use-BlockFormEvent-for-mud-converting-into-clay.patch (renamed from patches/server/0738-use-BlockFormEvent-for-mud-converting-into-clay.patch)0
-rw-r--r--patches/server/0738-Add-getDrops-to-BlockState.patch (renamed from patches/server/0739-Add-getDrops-to-BlockState.patch)0
-rw-r--r--patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch (renamed from patches/server/0740-Fix-a-bunch-of-vanilla-bugs.patch)16
-rw-r--r--patches/server/0740-Remove-unnecessary-onTrackingStart-during-navigation.patch (renamed from patches/server/0741-Remove-unnecessary-onTrackingStart-during-navigation.patch)6
-rw-r--r--patches/server/0741-Fix-custom-piglin-loved-items.patch (renamed from patches/server/0742-Fix-custom-piglin-loved-items.patch)0
-rw-r--r--patches/server/0742-EntityPickupItemEvent-fixes.patch (renamed from patches/server/0743-EntityPickupItemEvent-fixes.patch)0
-rw-r--r--patches/server/0743-Correctly-handle-interactions-with-items-on-cooldown.patch (renamed from patches/server/0744-Correctly-handle-interactions-with-items-on-cooldown.patch)0
-rw-r--r--patches/server/0744-Add-PlayerInventorySlotChangeEvent.patch (renamed from patches/server/0745-Add-PlayerInventorySlotChangeEvent.patch)0
-rw-r--r--patches/server/0745-Elder-Guardian-appearance-API.patch (renamed from patches/server/0746-Elder-Guardian-appearance-API.patch)0
-rw-r--r--patches/server/0746-Add-entity-knockback-API.patch (renamed from patches/server/0747-Add-entity-knockback-API.patch)0
-rw-r--r--patches/server/0747-Detect-headless-JREs.patch (renamed from patches/server/0748-Detect-headless-JREs.patch)0
-rw-r--r--patches/server/0748-fix-entity-vehicle-collision-event-not-called.patch (renamed from patches/server/0749-fix-entity-vehicle-collision-event-not-called.patch)0
-rw-r--r--patches/server/0749-Add-EntityToggleSitEvent.patch (renamed from patches/server/0750-Add-EntityToggleSitEvent.patch)0
-rw-r--r--patches/server/0750-Add-fire-tick-delay-option.patch (renamed from patches/server/0751-Add-fire-tick-delay-option.patch)0
-rw-r--r--patches/server/0751-Add-Moving-Piston-API.patch (renamed from patches/server/0752-Add-Moving-Piston-API.patch)0
-rw-r--r--patches/server/0752-Ignore-impossible-spawn-tick.patch (renamed from patches/server/0753-Ignore-impossible-spawn-tick.patch)0
-rw-r--r--patches/server/0753-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch (renamed from patches/server/0754-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch)0
-rw-r--r--patches/server/0754-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch (renamed from patches/server/0755-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch)0
-rw-r--r--patches/server/0755-Add-PrePlayerAttackEntityEvent.patch (renamed from patches/server/0756-Add-PrePlayerAttackEntityEvent.patch)0
-rw-r--r--patches/server/0756-ensure-reset-EnderDragon-boss-event-name.patch (renamed from patches/server/0757-ensure-reset-EnderDragon-boss-event-name.patch)0
-rw-r--r--patches/server/0757-Add-Player-Warden-Warning-API.patch (renamed from patches/server/0758-Add-Player-Warden-Warning-API.patch)0
-rw-r--r--patches/server/0758-More-vanilla-friendly-methods-to-update-trades.patch (renamed from patches/server/0759-More-vanilla-friendly-methods-to-update-trades.patch)0
-rw-r--r--patches/server/0759-Add-paper-dumplisteners-command.patch (renamed from patches/server/0760-Add-paper-dumplisteners-command.patch)0
-rw-r--r--patches/server/0760-check-global-player-list-where-appropriate.patch (renamed from patches/server/0761-check-global-player-list-where-appropriate.patch)8
-rw-r--r--patches/server/0761-Fix-async-entity-add-due-to-fungus-trees.patch (renamed from patches/server/0762-Fix-async-entity-add-due-to-fungus-trees.patch)0
-rw-r--r--patches/server/0762-ItemStack-damage-API.patch (renamed from patches/server/0763-ItemStack-damage-API.patch)0
-rw-r--r--patches/server/0763-Friction-API.patch (renamed from patches/server/0764-Friction-API.patch)10
-rw-r--r--patches/server/0764-Ability-to-control-player-s-insomnia-and-phantoms.patch (renamed from patches/server/0765-Ability-to-control-player-s-insomnia-and-phantoms.patch)0
-rw-r--r--patches/server/0765-Fix-premature-player-kicks-on-shutdown.patch (renamed from patches/server/0766-Fix-premature-player-kicks-on-shutdown.patch)4
-rw-r--r--patches/server/0766-Sync-offhand-slot-in-menus.patch (renamed from patches/server/0767-Sync-offhand-slot-in-menus.patch)0
-rw-r--r--patches/server/0767-Player-Entity-Tracking-Events.patch (renamed from patches/server/0768-Player-Entity-Tracking-Events.patch)4
-rw-r--r--patches/server/0768-Limit-pet-look-distance.patch (renamed from patches/server/0769-Limit-pet-look-distance.patch)0
-rw-r--r--patches/server/0769-fix-Instruments.patch (renamed from patches/server/0770-fix-Instruments.patch)0
-rw-r--r--patches/server/0770-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch (renamed from patches/server/0771-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch)0
-rw-r--r--patches/server/0771-Add-BlockLockCheckEvent.patch (renamed from patches/server/0772-Add-BlockLockCheckEvent.patch)0
-rw-r--r--patches/server/0772-Add-Sneaking-API-for-Entities.patch (renamed from patches/server/0773-Add-Sneaking-API-for-Entities.patch)0
-rw-r--r--patches/server/0773-Improve-logging-and-errors.patch (renamed from patches/server/0774-Improve-logging-and-errors.patch)8
-rw-r--r--patches/server/0774-Improve-PortalEvents.patch (renamed from patches/server/0775-Improve-PortalEvents.patch)0
-rw-r--r--patches/server/0775-Add-config-option-for-spider-worldborder-climbing.patch (renamed from patches/server/0776-Add-config-option-for-spider-worldborder-climbing.patch)0
-rw-r--r--patches/server/0776-Add-missing-SpigotConfig-logCommands-check.patch (renamed from patches/server/0777-Add-missing-SpigotConfig-logCommands-check.patch)2
-rw-r--r--patches/server/0777-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch (renamed from patches/server/0778-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch)0
-rw-r--r--patches/server/0778-Flying-Fall-Damage.patch (renamed from patches/server/0779-Flying-Fall-Damage.patch)0
-rw-r--r--patches/server/0779-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch (renamed from patches/server/0780-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch)0
-rw-r--r--patches/server/0780-config-for-disabling-entity-tag-tags.patch (renamed from patches/server/0781-config-for-disabling-entity-tag-tags.patch)4
-rw-r--r--patches/server/0781-Use-single-player-info-update-packet-on-join.patch (renamed from patches/server/0782-Use-single-player-info-update-packet-on-join.patch)10
-rw-r--r--patches/server/0782-Correctly-shrink-items-during-EntityResurrectEvent.patch (renamed from patches/server/0783-Correctly-shrink-items-during-EntityResurrectEvent.patch)4
-rw-r--r--patches/server/0783-Win-Screen-API.patch (renamed from patches/server/0784-Win-Screen-API.patch)0
-rw-r--r--patches/server/0784-Remove-CraftItemStack-setAmount-null-assignment.patch (renamed from patches/server/0785-Remove-CraftItemStack-setAmount-null-assignment.patch)0
-rw-r--r--patches/server/0785-Fix-force-opening-enchantment-tables.patch (renamed from patches/server/0786-Fix-force-opening-enchantment-tables.patch)0
-rw-r--r--patches/server/0786-Add-Entity-Body-Yaw-API.patch (renamed from patches/server/0787-Add-Entity-Body-Yaw-API.patch)0
-rw-r--r--patches/server/0787-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch (renamed from patches/server/0788-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch)0
-rw-r--r--patches/server/0788-Add-EntityFertilizeEggEvent.patch (renamed from patches/server/0789-Add-EntityFertilizeEggEvent.patch)0
-rw-r--r--patches/server/0789-Fix-HumanEntity-drop-not-updating-the-client-inv.patch (renamed from patches/server/0790-Fix-HumanEntity-drop-not-updating-the-client-inv.patch)0
-rw-r--r--patches/server/0790-Add-CompostItemEvent-and-EntityCompostItemEvent.patch (renamed from patches/server/0791-Add-CompostItemEvent-and-EntityCompostItemEvent.patch)0
-rw-r--r--patches/server/0791-Correctly-handle-ArmorStand-invisibility.patch (renamed from patches/server/0792-Correctly-handle-ArmorStand-invisibility.patch)0
-rw-r--r--patches/server/0792-Fix-advancement-triggers-for-entity-damage.patch (renamed from patches/server/0793-Fix-advancement-triggers-for-entity-damage.patch)6
-rw-r--r--patches/server/0793-Fix-text-display-error-on-spawn.patch (renamed from patches/server/0794-Fix-text-display-error-on-spawn.patch)0
-rw-r--r--patches/server/0794-Fix-inventories-returning-null-Locations.patch (renamed from patches/server/0795-Fix-inventories-returning-null-Locations.patch)0
-rw-r--r--patches/server/0795-Add-Shearable-API.patch (renamed from patches/server/0796-Add-Shearable-API.patch)0
-rw-r--r--patches/server/0796-Fix-SpawnEggMeta-get-setSpawnedType.patch (renamed from patches/server/0797-Fix-SpawnEggMeta-get-setSpawnedType.patch)0
-rw-r--r--patches/server/0797-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch (renamed from patches/server/0798-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch)0
-rw-r--r--patches/server/0798-Treat-sequence-violations-like-they-should-be.patch (renamed from patches/server/0799-Treat-sequence-violations-like-they-should-be.patch)2
-rw-r--r--patches/server/0799-Prevent-causing-expired-keys-from-impacting-new-join.patch (renamed from patches/server/0800-Prevent-causing-expired-keys-from-impacting-new-join.patch)4
-rw-r--r--patches/server/0800-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch (renamed from patches/server/0801-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch)4
-rw-r--r--patches/server/0801-Use-array-for-gamerule-storage.patch (renamed from patches/server/0802-Use-array-for-gamerule-storage.patch)0
-rw-r--r--patches/server/0802-Fix-a-couple-of-upstream-bed-issues.patch (renamed from patches/server/0803-Fix-a-couple-of-upstream-bed-issues.patch)0
-rw-r--r--patches/server/0803-Fix-demo-flag-not-enabling-demo-mode.patch (renamed from patches/server/0804-Fix-demo-flag-not-enabling-demo-mode.patch)0
-rw-r--r--patches/server/0804-Add-Mob-Experience-reward-API.patch (renamed from patches/server/0805-Add-Mob-Experience-reward-API.patch)0
-rw-r--r--patches/server/0805-Break-redstone-on-top-of-trap-doors-early.patch (renamed from patches/server/0806-Break-redstone-on-top-of-trap-doors-early.patch)0
-rw-r--r--patches/server/0806-Avoid-Lazy-Initialization-for-Enum-Fields.patch (renamed from patches/server/0807-Avoid-Lazy-Initialization-for-Enum-Fields.patch)0
-rw-r--r--patches/server/0807-More-accurate-isInOpenWater-impl.patch (renamed from patches/server/0808-More-accurate-isInOpenWater-impl.patch)0
-rw-r--r--patches/server/0808-Expand-PlayerItemMendEvent.patch (renamed from patches/server/0809-Expand-PlayerItemMendEvent.patch)0
-rw-r--r--patches/server/0809-Refresh-ProjectileSource-for-projectiles.patch (renamed from patches/server/0810-Refresh-ProjectileSource-for-projectiles.patch)0
-rw-r--r--patches/server/0810-Add-transient-modifier-API.patch (renamed from patches/server/0811-Add-transient-modifier-API.patch)0
-rw-r--r--patches/server/0811-Fix-block-place-logic.patch (renamed from patches/server/0812-Fix-block-place-logic.patch)4
-rw-r--r--patches/server/0812-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch (renamed from patches/server/0813-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch)0
-rw-r--r--patches/server/0813-Call-BlockGrowEvent-for-missing-blocks.patch (renamed from patches/server/0814-Call-BlockGrowEvent-for-missing-blocks.patch)0
-rw-r--r--patches/server/0814-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch (renamed from patches/server/0815-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch)2
-rw-r--r--patches/server/0815-fix-MapLike-spam-for-missing-key-selector.patch (renamed from patches/server/0816-fix-MapLike-spam-for-missing-key-selector.patch)0
-rw-r--r--patches/server/0816-Fix-sniffer-removeExploredLocation.patch (renamed from patches/server/0817-Fix-sniffer-removeExploredLocation.patch)0
-rw-r--r--patches/server/0817-Add-method-to-remove-all-active-potion-effects.patch (renamed from patches/server/0818-Add-method-to-remove-all-active-potion-effects.patch)0
-rw-r--r--patches/server/0818-Add-event-for-player-editing-sign.patch (renamed from patches/server/0819-Add-event-for-player-editing-sign.patch)0
-rw-r--r--patches/server/0819-Only-tick-item-frames-if-players-can-see-it.patch (renamed from patches/server/0820-Only-tick-item-frames-if-players-can-see-it.patch)0
-rw-r--r--patches/server/0820-Fix-cmd-permission-levels-for-command-blocks.patch (renamed from patches/server/0821-Fix-cmd-permission-levels-for-command-blocks.patch)0
-rw-r--r--patches/server/0821-Add-option-to-disable-block-updates.patch (renamed from patches/server/0822-Add-option-to-disable-block-updates.patch)0
-rw-r--r--patches/server/0822-Call-missing-BlockDispenseEvent.patch (renamed from patches/server/0823-Call-missing-BlockDispenseEvent.patch)0
-rw-r--r--patches/server/0823-Don-t-load-chunks-for-supporting-block-checks.patch (renamed from patches/server/0824-Don-t-load-chunks-for-supporting-block-checks.patch)0
-rw-r--r--patches/server/0824-Optimize-player-lookups-for-beacons.patch (renamed from patches/server/0825-Optimize-player-lookups-for-beacons.patch)0
-rw-r--r--patches/server/0825-More-Sign-Block-API.patch (renamed from patches/server/0826-More-Sign-Block-API.patch)0
-rw-r--r--patches/server/0826-fix-item-meta-for-tadpole-buckets.patch (renamed from patches/server/0827-fix-item-meta-for-tadpole-buckets.patch)0
-rw-r--r--patches/server/0827-Fix-BanList-API.patch (renamed from patches/server/0828-Fix-BanList-API.patch)0
-rw-r--r--patches/server/0828-Determine-lava-and-water-fluid-explosion-resistance-.patch (renamed from patches/server/0829-Determine-lava-and-water-fluid-explosion-resistance-.patch)0
-rw-r--r--patches/server/0829-Fix-possible-NPE-on-painting-creation.patch (renamed from patches/server/0830-Fix-possible-NPE-on-painting-creation.patch)0
-rw-r--r--patches/server/0830-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch (renamed from patches/server/0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch)0
-rw-r--r--patches/server/0831-ExperienceOrb-should-call-EntitySpawnEvent.patch (renamed from patches/server/0832-ExperienceOrb-should-call-EntitySpawnEvent.patch)0
-rw-r--r--patches/server/0832-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch (renamed from patches/server/0833-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch)0
-rw-r--r--patches/server/0833-Add-whitelist-events.patch (renamed from patches/server/0834-Add-whitelist-events.patch)0
-rw-r--r--patches/server/0834-Implement-PlayerFailMoveEvent.patch (renamed from patches/server/0835-Implement-PlayerFailMoveEvent.patch)4
-rw-r--r--patches/server/0835-Folia-scheduler-and-owned-region-API.patch (renamed from patches/server/0836-Folia-scheduler-and-owned-region-API.patch)16
-rw-r--r--patches/server/0836-Only-erase-allay-memory-on-non-item-targets.patch (renamed from patches/server/0837-Only-erase-allay-memory-on-non-item-targets.patch)0
-rw-r--r--patches/server/0837-Fix-rotation-when-spawning-display-entities.patch (renamed from patches/server/0838-Fix-rotation-when-spawning-display-entities.patch)0
-rw-r--r--patches/server/0838-Only-capture-actual-tree-growth.patch (renamed from patches/server/0839-Only-capture-actual-tree-growth.patch)4
-rw-r--r--patches/server/0839-Use-correct-source-for-mushroom-block-spread-event.patch (renamed from patches/server/0840-Use-correct-source-for-mushroom-block-spread-event.patch)0
-rw-r--r--patches/server/0840-Respect-randomizeData-on-more-entities-when-spawning.patch (renamed from patches/server/0841-Respect-randomizeData-on-more-entities-when-spawning.patch)0
-rw-r--r--patches/server/0841-Use-correct-seed-on-api-world-load.patch (renamed from patches/server/0842-Use-correct-seed-on-api-world-load.patch)4
-rw-r--r--patches/server/0842-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch (renamed from patches/server/0843-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch)0
-rw-r--r--patches/server/0843-Cache-map-ids-on-item-frames.patch (renamed from patches/server/0844-Cache-map-ids-on-item-frames.patch)0
-rw-r--r--patches/server/0844-API-for-updating-recipes-on-clients.patch (renamed from patches/server/0845-API-for-updating-recipes-on-clients.patch)16
-rw-r--r--patches/server/0845-Fix-custom-statistic-criteria-creation.patch (renamed from patches/server/0846-Fix-custom-statistic-criteria-creation.patch)18
-rw-r--r--patches/server/0846-Bandaid-fix-for-Effect.patch (renamed from patches/server/0847-Bandaid-fix-for-Effect.patch)0
-rw-r--r--patches/server/0847-SculkCatalyst-bloom-API.patch (renamed from patches/server/0848-SculkCatalyst-bloom-API.patch)0
-rw-r--r--patches/server/0848-API-for-an-entity-s-scoreboard-name.patch (renamed from patches/server/0849-API-for-an-entity-s-scoreboard-name.patch)0
-rw-r--r--patches/server/0849-Deprecate-and-replace-methods-with-old-StructureType.patch (renamed from patches/server/0850-Deprecate-and-replace-methods-with-old-StructureType.patch)6
-rw-r--r--patches/server/0850-Don-t-tab-complete-namespaced-commands-if-send-names.patch (renamed from patches/server/0851-Don-t-tab-complete-namespaced-commands-if-send-names.patch)2
-rw-r--r--patches/server/0851-Properly-handle-BlockBreakEvent-isDropItems.patch (renamed from patches/server/0852-Properly-handle-BlockBreakEvent-isDropItems.patch)4
-rw-r--r--patches/server/0852-Fire-entity-death-event-for-ender-dragon.patch (renamed from patches/server/0853-Fire-entity-death-event-for-ender-dragon.patch)0
-rw-r--r--patches/server/0853-Configurable-entity-tracking-range-by-Y-coordinate.patch (renamed from patches/server/0854-Configurable-entity-tracking-range-by-Y-coordinate.patch)4
-rw-r--r--patches/server/0854-Add-Listing-API-for-Player.patch (renamed from patches/server/0855-Add-Listing-API-for-Player.patch)6
-rw-r--r--patches/server/0855-Configurable-Region-Compression-Format.patch (renamed from patches/server/0856-Configurable-Region-Compression-Format.patch)0
-rw-r--r--patches/server/0856-Add-BlockFace-to-BlockDamageEvent.patch (renamed from patches/server/0857-Add-BlockFace-to-BlockDamageEvent.patch)0
-rw-r--r--patches/server/0857-Fix-NPE-on-Boat-getStatus.patch (renamed from patches/server/0858-Fix-NPE-on-Boat-getStatus.patch)0
-rw-r--r--patches/server/0858-Expand-Pose-API.patch (renamed from patches/server/0859-Expand-Pose-API.patch)0
-rw-r--r--patches/server/0859-More-DragonBattle-API.patch (renamed from patches/server/0860-More-DragonBattle-API.patch)0
-rw-r--r--patches/server/0860-Add-PlayerPickItemEvent.patch (renamed from patches/server/0861-Add-PlayerPickItemEvent.patch)2
-rw-r--r--patches/server/0861-Allow-trident-custom-damage.patch (renamed from patches/server/0862-Allow-trident-custom-damage.patch)0
-rw-r--r--patches/server/0862-Expose-hand-in-BlockCanBuildEvent.patch (renamed from patches/server/0863-Expose-hand-in-BlockCanBuildEvent.patch)0
-rw-r--r--patches/server/0863-Optimize-nearest-structure-border-iteration.patch (renamed from patches/server/0864-Optimize-nearest-structure-border-iteration.patch)0
-rw-r--r--patches/server/0864-Implement-OfflinePlayer-isConnected.patch (renamed from patches/server/0865-Implement-OfflinePlayer-isConnected.patch)0
-rw-r--r--patches/server/0865-Fix-slot-desync.patch (renamed from patches/server/0866-Fix-slot-desync.patch)4
-rw-r--r--patches/server/0866-Add-titleOverride-to-InventoryOpenEvent.patch (renamed from patches/server/0867-Add-titleOverride-to-InventoryOpenEvent.patch)0
-rw-r--r--patches/server/0867-Configure-sniffer-egg-hatch-time.patch (renamed from patches/server/0868-Configure-sniffer-egg-hatch-time.patch)0
-rw-r--r--patches/server/0868-Do-crystal-portal-proximity-check-before-entity-look.patch (renamed from patches/server/0869-Do-crystal-portal-proximity-check-before-entity-look.patch)0
-rw-r--r--patches/server/0869-Skip-POI-finding-if-stuck-in-vehicle.patch (renamed from patches/server/0870-Skip-POI-finding-if-stuck-in-vehicle.patch)0
-rw-r--r--patches/server/0870-Add-slot-sanity-checks-in-container-clicks.patch (renamed from patches/server/0871-Add-slot-sanity-checks-in-container-clicks.patch)4
-rw-r--r--patches/server/0871-Call-BlockRedstoneEvents-for-lecterns.patch (renamed from patches/server/0872-Call-BlockRedstoneEvents-for-lecterns.patch)0
-rw-r--r--patches/server/0872-Allow-proper-checking-of-empty-item-stacks.patch (renamed from patches/server/0873-Allow-proper-checking-of-empty-item-stacks.patch)0
-rw-r--r--patches/server/0873-Fix-silent-equipment-change-for-mobs.patch (renamed from patches/server/0874-Fix-silent-equipment-change-for-mobs.patch)0
-rw-r--r--patches/server/0874-Fix-spigot-s-Forced-Stats.patch (renamed from patches/server/0875-Fix-spigot-s-Forced-Stats.patch)0
-rw-r--r--patches/server/0875-Add-missing-InventoryHolders-to-inventories.patch (renamed from patches/server/0876-Add-missing-InventoryHolders-to-inventories.patch)0
-rw-r--r--patches/server/0876-Do-not-read-tile-entities-in-chunks-that-are-positio.patch (renamed from patches/server/0877-Do-not-read-tile-entities-in-chunks-that-are-positio.patch)0
-rw-r--r--patches/server/0877-Add-missing-logs-for-log-ips-config-option.patch (renamed from patches/server/0878-Add-missing-logs-for-log-ips-config-option.patch)0
-rw-r--r--patches/server/0878-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch (renamed from patches/server/0879-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch)0
-rw-r--r--patches/server/0879-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch (renamed from patches/server/0880-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch)0
-rw-r--r--patches/server/0880-Fix-team-sidebar-objectives-not-being-cleared.patch (renamed from patches/server/0881-Fix-team-sidebar-objectives-not-being-cleared.patch)2
-rw-r--r--patches/server/0881-Fix-missing-map-initialize-event-call.patch (renamed from patches/server/0882-Fix-missing-map-initialize-event-call.patch)4
-rw-r--r--patches/server/0882-Update-entity-data-when-attaching-firework-to-entity.patch (renamed from patches/server/0883-Update-entity-data-when-attaching-firework-to-entity.patch)0
-rw-r--r--patches/server/0883-Fix-UnsafeValues-loadAdvancement.patch (renamed from patches/server/0884-Fix-UnsafeValues-loadAdvancement.patch)4
-rw-r--r--patches/server/0884-Add-player-idle-duration-API.patch (renamed from patches/server/0885-Add-player-idle-duration-API.patch)0
-rw-r--r--patches/server/0885-Don-t-check-if-we-can-see-non-visible-entities.patch (renamed from patches/server/0886-Don-t-check-if-we-can-see-non-visible-entities.patch)4
-rw-r--r--patches/server/0886-Fix-NPE-in-SculkBloomEvent-world-access.patch (renamed from patches/server/0887-Fix-NPE-in-SculkBloomEvent-world-access.patch)0
-rw-r--r--patches/server/0887-Allow-null-itemstack-for-Player-sendEquipmentChange.patch (renamed from patches/server/0888-Allow-null-itemstack-for-Player-sendEquipmentChange.patch)0
-rw-r--r--patches/server/0888-Optimize-VarInts.patch (renamed from patches/server/0889-Optimize-VarInts.patch)0
-rw-r--r--patches/server/0889-Add-API-to-get-the-collision-shape-of-a-block-before.patch (renamed from patches/server/0890-Add-API-to-get-the-collision-shape-of-a-block-before.patch)0
-rw-r--r--patches/server/0890-Add-predicate-for-blocks-when-raytracing.patch (renamed from patches/server/0891-Add-predicate-for-blocks-when-raytracing.patch)0
-rw-r--r--patches/server/0891-Broadcast-take-item-packets-with-collector-as-source.patch (renamed from patches/server/0892-Broadcast-take-item-packets-with-collector-as-source.patch)4
-rw-r--r--patches/server/0892-Expand-LingeringPotion-API.patch (renamed from patches/server/0893-Expand-LingeringPotion-API.patch)0
-rw-r--r--patches/server/0893-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch (renamed from patches/server/0894-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch)0
-rw-r--r--patches/server/0894-Add-hand-to-fish-event-for-all-player-interactions.patch (renamed from patches/server/0895-Add-hand-to-fish-event-for-all-player-interactions.patch)0
-rw-r--r--patches/server/0895-Fix-several-issues-with-EntityBreedEvent.patch (renamed from patches/server/0896-Fix-several-issues-with-EntityBreedEvent.patch)0
-rw-r--r--patches/server/0896-Add-UUID-attribute-modifier-API.patch (renamed from patches/server/0897-Add-UUID-attribute-modifier-API.patch)0
-rw-r--r--patches/server/0897-Fix-missing-event-call-for-entity-teleport-API.patch (renamed from patches/server/0898-Fix-missing-event-call-for-entity-teleport-API.patch)0
-rw-r--r--patches/server/0898-Lazily-create-LootContext-for-criterions.patch (renamed from patches/server/0899-Lazily-create-LootContext-for-criterions.patch)0
-rw-r--r--patches/server/0899-Don-t-fire-sync-events-during-worldgen.patch (renamed from patches/server/0900-Don-t-fire-sync-events-during-worldgen.patch)16
-rw-r--r--patches/server/0900-Add-Structure-check-API.patch (renamed from patches/server/0901-Add-Structure-check-API.patch)0
-rw-r--r--patches/server/0901-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch (renamed from patches/server/0902-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch)0
-rw-r--r--patches/server/0902-Restore-vanilla-entity-drops-behavior.patch (renamed from patches/server/0903-Restore-vanilla-entity-drops-behavior.patch)4
-rw-r--r--patches/server/0903-Dont-resend-blocks-on-interactions.patch (renamed from patches/server/0904-Dont-resend-blocks-on-interactions.patch)0
-rw-r--r--patches/server/0904-add-more-scoreboard-API.patch (renamed from patches/server/0905-add-more-scoreboard-API.patch)0
-rw-r--r--patches/server/0905-Improve-Registry.patch (renamed from patches/server/0906-Improve-Registry.patch)0
-rw-r--r--patches/server/0906-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch (renamed from patches/server/0907-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch)4
-rw-r--r--patches/server/0907-Add-experience-points-API.patch (renamed from patches/server/0908-Add-experience-points-API.patch)0
-rw-r--r--patches/server/0908-Add-drops-to-shear-events.patch (renamed from patches/server/0909-Add-drops-to-shear-events.patch)0
-rw-r--r--patches/server/0909-Add-PlayerShieldDisableEvent.patch (renamed from patches/server/0910-Add-PlayerShieldDisableEvent.patch)0
-rw-r--r--patches/server/0910-Validate-ResourceLocation-in-NBT-reading.patch (renamed from patches/server/0911-Validate-ResourceLocation-in-NBT-reading.patch)8
-rw-r--r--patches/server/0911-Properly-handle-experience-dropping-on-block-break.patch (renamed from patches/server/0912-Properly-handle-experience-dropping-on-block-break.patch)10
-rw-r--r--patches/server/0912-Fixup-NamespacedKey-handling.patch (renamed from patches/server/0913-Fixup-NamespacedKey-handling.patch)0
-rw-r--r--patches/server/0913-Expose-LootTable-of-DecoratedPot.patch (renamed from patches/server/0914-Expose-LootTable-of-DecoratedPot.patch)0
-rw-r--r--patches/server/0914-Reduce-allocation-of-Vec3D-by-entity-tracker.patch (renamed from patches/server/0915-Reduce-allocation-of-Vec3D-by-entity-tracker.patch)4
-rw-r--r--patches/server/0915-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch (renamed from patches/server/0916-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch)0
-rw-r--r--patches/server/0916-Add-ShulkerDuplicateEvent.patch (renamed from patches/server/0917-Add-ShulkerDuplicateEvent.patch)0
-rw-r--r--patches/server/0917-Add-api-for-spawn-egg-texture-colors.patch (renamed from patches/server/0918-Add-api-for-spawn-egg-texture-colors.patch)6
-rw-r--r--patches/server/0918-Add-Lifecycle-Event-system.patch (renamed from patches/server/0919-Add-Lifecycle-Event-system.patch)8
-rw-r--r--patches/server/0919-ItemStack-Tooltip-API.patch (renamed from patches/server/0920-ItemStack-Tooltip-API.patch)18
-rw-r--r--patches/server/0920-Add-getChunkSnapshot-includeLightData-parameter.patch (renamed from patches/server/0921-Add-getChunkSnapshot-includeLightData-parameter.patch)0
-rw-r--r--patches/server/0921-Add-FluidState-API.patch (renamed from patches/server/0922-Add-FluidState-API.patch)0
-rw-r--r--patches/server/0922-add-number-format-api.patch (renamed from patches/server/0923-add-number-format-api.patch)0
-rw-r--r--patches/server/0923-improve-BanList-types.patch (renamed from patches/server/0924-improve-BanList-types.patch)4
-rw-r--r--patches/server/0924-Expanded-Hopper-API.patch (renamed from patches/server/0925-Expanded-Hopper-API.patch)0
-rw-r--r--patches/server/0925-Add-BlockBreakProgressUpdateEvent.patch (renamed from patches/server/0926-Add-BlockBreakProgressUpdateEvent.patch)4
-rw-r--r--patches/server/0926-Deprecate-ItemStack-setType.patch (renamed from patches/server/0927-Deprecate-ItemStack-setType.patch)0
-rw-r--r--patches/server/0927-Add-CartographyItemEvent.patch (renamed from patches/server/0928-Add-CartographyItemEvent.patch)4
-rw-r--r--patches/server/0928-More-Raid-API.patch (renamed from patches/server/0929-More-Raid-API.patch)0
-rw-r--r--patches/server/0929-Add-onboarding-message-for-initial-server-start.patch (renamed from patches/server/0930-Add-onboarding-message-for-initial-server-start.patch)8
-rw-r--r--patches/server/0930-Configurable-max-block-fluid-ticks.patch (renamed from patches/server/0931-Configurable-max-block-fluid-ticks.patch)6
-rw-r--r--patches/server/0931-Fix-bees-aging-inside-hives.patch (renamed from patches/server/0932-Fix-bees-aging-inside-hives.patch)0
-rw-r--r--patches/server/0932-Disable-memory-reserve-allocating.patch (renamed from patches/server/0933-Disable-memory-reserve-allocating.patch)0
-rw-r--r--patches/server/0933-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch (renamed from patches/server/0934-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch)0
-rw-r--r--patches/server/0934-Fix-DamageSource-API.patch (renamed from patches/server/0935-Fix-DamageSource-API.patch)0
-rw-r--r--patches/server/0935-Fix-creation-of-invalid-block-entity-during-world-ge.patch (renamed from patches/server/0936-Fix-creation-of-invalid-block-entity-during-world-ge.patch)4
-rw-r--r--patches/server/0936-Fix-possible-StackOverflowError-for-some-dispenses.patch (renamed from patches/server/0937-Fix-possible-StackOverflowError-for-some-dispenses.patch)0
-rw-r--r--patches/server/0937-Improve-tag-parser-handling.patch (renamed from patches/server/0938-Improve-tag-parser-handling.patch)2
-rw-r--r--patches/server/0938-Item-Mutation-Fixes.patch (renamed from patches/server/0939-Item-Mutation-Fixes.patch)0
-rw-r--r--patches/server/0939-Per-world-ticks-per-spawn-settings.patch (renamed from patches/server/0940-Per-world-ticks-per-spawn-settings.patch)6
-rw-r--r--patches/server/0940-Properly-track-the-changed-item-from-dispense-events.patch (renamed from patches/server/0941-Properly-track-the-changed-item-from-dispense-events.patch)0
-rw-r--r--patches/server/0941-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch (renamed from patches/server/0942-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch)18
-rw-r--r--patches/server/0942-Add-config-for-mobs-immune-to-default-effects.patch (renamed from patches/server/0943-Add-config-for-mobs-immune-to-default-effects.patch)0
-rw-r--r--patches/server/0943-Deep-clone-nbt-tags-in-PDC.patch (renamed from patches/server/0944-Deep-clone-nbt-tags-in-PDC.patch)0
-rw-r--r--patches/server/0944-Support-old-UUID-format-for-NBT.patch (renamed from patches/server/0945-Support-old-UUID-format-for-NBT.patch)0
-rw-r--r--patches/server/0945-Fix-shield-disable-inconsistency.patch (renamed from patches/server/0946-Fix-shield-disable-inconsistency.patch)4
-rw-r--r--patches/server/0946-Handle-Large-Packets-disconnecting-client.patch (renamed from patches/server/0947-Handle-Large-Packets-disconnecting-client.patch)0
-rw-r--r--patches/server/0947-Fix-ItemFlags.patch (renamed from patches/server/0948-Fix-ItemFlags.patch)0
-rw-r--r--patches/server/0948-Fix-helmet-damage-reduction-inconsistencies.patch (renamed from patches/server/0949-Fix-helmet-damage-reduction-inconsistencies.patch)0
-rw-r--r--patches/server/0949-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch (renamed from patches/server/0950-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch)10
-rw-r--r--patches/server/0950-improve-checking-handled-tags-in-itemmeta.patch (renamed from patches/server/0951-improve-checking-handled-tags-in-itemmeta.patch)0
-rw-r--r--patches/server/0951-Expose-hasColor-to-leather-armor.patch (renamed from patches/server/0952-Expose-hasColor-to-leather-armor.patch)0
-rw-r--r--patches/server/0952-Added-API-to-get-player-ha-proxy-address.patch (renamed from patches/server/0953-Added-API-to-get-player-ha-proxy-address.patch)0
-rw-r--r--patches/server/0953-General-ItemMeta-fixes.patch (renamed from patches/server/0954-General-ItemMeta-fixes.patch)4
-rw-r--r--patches/server/0954-More-Chest-Block-API.patch (renamed from patches/server/0955-More-Chest-Block-API.patch)0
-rw-r--r--patches/server/0955-Print-data-component-type-on-encoding-error.patch (renamed from patches/server/0956-Print-data-component-type-on-encoding-error.patch)0
-rw-r--r--patches/server/0956-Brigadier-based-command-API.patch (renamed from patches/server/0957-Brigadier-based-command-API.patch)40
-rw-r--r--patches/server/0957-Fix-issues-with-Recipe-API.patch (renamed from patches/server/0958-Fix-issues-with-Recipe-API.patch)0
-rw-r--r--patches/server/0958-Fix-equipment-slot-and-group-API.patch (renamed from patches/server/0959-Fix-equipment-slot-and-group-API.patch)0
-rw-r--r--patches/server/0959-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch (renamed from patches/server/0960-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch)0
-rw-r--r--patches/server/0960-Prevent-sending-oversized-item-data-in-equipment-and.patch (renamed from patches/server/0961-Prevent-sending-oversized-item-data-in-equipment-and.patch)4
-rw-r--r--patches/server/0961-Prevent-NPE-if-hooked-entity-was-cleared.patch (renamed from patches/server/0962-Prevent-NPE-if-hooked-entity-was-cleared.patch)0
-rw-r--r--patches/server/0962-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch (renamed from patches/server/0963-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch)4
-rw-r--r--patches/server/0963-Add-missing-fishing-event-state.patch (renamed from patches/server/0964-Add-missing-fishing-event-state.patch)0
-rw-r--r--patches/server/0964-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch (renamed from patches/server/0965-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch)0
-rw-r--r--patches/server/0965-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch (renamed from patches/server/0966-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch)0
-rw-r--r--patches/server/0966-Adopt-MaterialRerouting.patch (renamed from patches/server/0967-Adopt-MaterialRerouting.patch)0
-rw-r--r--patches/server/0967-Suspicious-Effect-Entry-API.patch (renamed from patches/server/0968-Suspicious-Effect-Entry-API.patch)0
-rw-r--r--patches/server/0968-check-if-itemstack-is-stackable-first.patch (renamed from patches/server/0969-check-if-itemstack-is-stackable-first.patch)0
-rw-r--r--patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch (renamed from patches/server/0970-Fix-removing-recipes-from-RecipeIterator.patch)0
-rw-r--r--patches/server/0970-Configurable-damage-tick-when-blocking-with-shield.patch (renamed from patches/server/0971-Configurable-damage-tick-when-blocking-with-shield.patch)4
-rw-r--r--patches/server/0971-Properly-remove-the-experimental-smithing-inventory-.patch (renamed from patches/server/0972-Properly-remove-the-experimental-smithing-inventory-.patch)0
-rw-r--r--patches/server/0972-disable-forced-empty-world-ticks.patch (renamed from patches/server/0973-disable-forced-empty-world-ticks.patch)4
-rw-r--r--patches/server/0973-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch (renamed from patches/server/0974-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch)4
-rw-r--r--patches/server/0974-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch (renamed from patches/server/0975-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch)4
-rw-r--r--patches/server/0975-Optimize-Network-Manager-and-add-advanced-packet-sup.patch (renamed from patches/server/0976-Optimize-Network-Manager-and-add-advanced-packet-sup.patch)0
-rw-r--r--patches/server/0976-Allow-Saving-of-Oversized-Chunks.patch (renamed from patches/server/0977-Allow-Saving-of-Oversized-Chunks.patch)0
-rw-r--r--patches/server/0977-Flat-bedrock-generator-settings.patch (renamed from patches/server/0978-Flat-bedrock-generator-settings.patch)0
-rw-r--r--patches/server/0978-Entity-Activation-Range-2.0.patch (renamed from patches/server/0979-Entity-Activation-Range-2.0.patch)94
-rw-r--r--patches/server/0979-Anti-Xray.patch (renamed from patches/server/0980-Anti-Xray.patch)26
-rw-r--r--patches/server/0980-Use-Velocity-compression-and-cipher-natives.patch (renamed from patches/server/0981-Use-Velocity-compression-and-cipher-natives.patch)0
-rw-r--r--patches/server/0981-Optimize-Collision-to-not-load-chunks.patch (renamed from patches/server/0982-Optimize-Collision-to-not-load-chunks.patch)4
-rw-r--r--patches/server/0982-Optimize-GoalSelector-Goal.Flag-Set-operations.patch (renamed from patches/server/0983-Optimize-GoalSelector-Goal.Flag-Set-operations.patch)0
-rw-r--r--patches/server/0983-Optimize-Hoppers.patch (renamed from patches/server/0984-Optimize-Hoppers.patch)14
-rw-r--r--patches/server/0984-Optimize-Voxel-Shape-Merging.patch (renamed from patches/server/0985-Optimize-Voxel-Shape-Merging.patch)0
-rw-r--r--patches/server/0985-Optimize-Bit-Operations-by-inlining.patch (renamed from patches/server/0986-Optimize-Bit-Operations-by-inlining.patch)0
-rw-r--r--patches/server/0986-Remove-streams-from-hot-code.patch (renamed from patches/server/0987-Remove-streams-from-hot-code.patch)0
-rw-r--r--patches/server/0987-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch (renamed from patches/server/0988-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch)0
-rw-r--r--patches/server/0988-Fix-entity-type-tags-suggestions-in-selectors.patch (renamed from patches/server/0989-Fix-entity-type-tags-suggestions-in-selectors.patch)0
-rw-r--r--patches/server/0989-Handle-Oversized-block-entities-in-chunks.patch (renamed from patches/server/0990-Handle-Oversized-block-entities-in-chunks.patch)0
-rw-r--r--patches/server/0990-Check-distance-in-entity-interactions.patch (renamed from patches/server/0991-Check-distance-in-entity-interactions.patch)8
-rw-r--r--patches/server/0991-Configurable-Sand-Duping.patch (renamed from patches/server/0992-Configurable-Sand-Duping.patch)0
-rw-r--r--patches/server/0992-Properly-resend-entities.patch (renamed from patches/server/0993-Properly-resend-entities.patch)10
-rw-r--r--patches/server/0993-Registry-Modification-API.patch (renamed from patches/server/0994-Registry-Modification-API.patch)4
-rw-r--r--patches/server/0994-Add-registry-entry-and-builders.patch (renamed from patches/server/0995-Add-registry-entry-and-builders.patch)0
-rw-r--r--patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch (renamed from patches/server/0996-Proxy-ItemStack-to-CraftItemStack.patch)4
-rw-r--r--patches/server/0996-Make-a-PDC-view-accessible-directly-from-ItemStack.patch (renamed from patches/server/0997-Make-a-PDC-view-accessible-directly-from-ItemStack.patch)0
-rw-r--r--patches/server/0997-Prioritize-Minecraft-commands-in-function-parsing-an.patch (renamed from patches/server/0998-Prioritize-Minecraft-commands-in-function-parsing-an.patch)0
-rw-r--r--patches/server/0998-optimize-dirt-and-snow-spreading.patch (renamed from patches/server/0999-optimize-dirt-and-snow-spreading.patch)0
-rw-r--r--patches/server/0999-Fix-NPE-for-Jukebox-setRecord.patch (renamed from patches/server/1000-Fix-NPE-for-Jukebox-setRecord.patch)0
-rw-r--r--patches/server/1000-fix-horse-inventories.patch (renamed from patches/server/1001-fix-horse-inventories.patch)0
-rw-r--r--patches/server/1001-Only-call-EntityDamageEvents-before-actuallyHurt.patch (renamed from patches/server/1002-Only-call-EntityDamageEvents-before-actuallyHurt.patch)10
-rw-r--r--patches/server/1002-Add-ItemType-getItemRarity.patch (renamed from patches/server/1003-Add-ItemType-getItemRarity.patch)0
-rw-r--r--patches/server/1003-Add-plugin-info-at-startup.patch (renamed from patches/server/1004-Add-plugin-info-at-startup.patch)0
-rw-r--r--patches/server/1004-Make-interaction-leniency-distance-configurable.patch (renamed from patches/server/1005-Make-interaction-leniency-distance-configurable.patch)0
-rw-r--r--patches/server/1005-Fix-PickupStatus-getting-reset.patch (renamed from patches/server/1006-Fix-PickupStatus-getting-reset.patch)0
-rw-r--r--patches/server/1006-Check-for-block-type-in-SculkSensorBlock-canActivate.patch (renamed from patches/server/1007-Check-for-block-type-in-SculkSensorBlock-canActivate.patch)0
-rw-r--r--patches/server/1007-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch (renamed from patches/server/1008-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch)0
-rw-r--r--patches/server/1008-Configuration-for-horizontal-only-item-merging.patch (renamed from patches/server/1009-Configuration-for-horizontal-only-item-merging.patch)0
-rw-r--r--patches/server/1009-Add-skipping-world-symlink-scan.patch (renamed from patches/server/1010-Add-skipping-world-symlink-scan.patch)0
-rw-r--r--patches/server/1010-Add-even-more-Enchantment-API.patch (renamed from patches/server/1011-Add-even-more-Enchantment-API.patch)0
-rw-r--r--patches/server/1011-Leashable-API.patch (renamed from patches/server/1012-Leashable-API.patch)0
-rw-r--r--patches/server/1012-Fix-CraftBukkit-drag-system.patch (renamed from patches/server/1013-Fix-CraftBukkit-drag-system.patch)0
-rw-r--r--patches/server/1013-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch (renamed from patches/server/1014-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch)0
-rw-r--r--patches/server/1014-Remove-set-damage-lootable-item-function-from-compas.patch (renamed from patches/server/1015-Remove-set-damage-lootable-item-function-from-compas.patch)0
-rw-r--r--patches/server/1015-Add-enchantment-seed-update-API.patch (renamed from patches/server/1016-Add-enchantment-seed-update-API.patch)0
-rw-r--r--patches/server/1016-Fix-synchronise-sending-chat-to-client-with-updating.patch (renamed from patches/server/1017-Fix-synchronise-sending-chat-to-client-with-updating.patch)0
-rw-r--r--patches/server/1017-Fix-InventoryOpenEvent-cancellation.patch (renamed from patches/server/1018-Fix-InventoryOpenEvent-cancellation.patch)0
-rw-r--r--patches/server/1018-Fire-BlockExpEvent-on-grindstone-use.patch (renamed from patches/server/1019-Fire-BlockExpEvent-on-grindstone-use.patch)0
-rw-r--r--patches/server/1019-Check-dead-flag-in-isAlive.patch (renamed from patches/server/1020-Check-dead-flag-in-isAlive.patch)4
-rw-r--r--patches/server/1020-Add-FeatureFlag-API.patch (renamed from patches/server/1021-Add-FeatureFlag-API.patch)4
-rw-r--r--patches/server/1021-Tag-Lifecycle-Events.patch (renamed from patches/server/1022-Tag-Lifecycle-Events.patch)4
-rw-r--r--patches/server/1022-Item-serialization-as-json.patch (renamed from patches/server/1023-Item-serialization-as-json.patch)4
-rw-r--r--patches/server/1023-Validate-slot-in-PlayerInventory-setSlot.patch (renamed from patches/server/1024-Validate-slot-in-PlayerInventory-setSlot.patch)0
-rw-r--r--patches/server/1024-Remove-wall-time-unused-skip-tick-protection.patch (renamed from patches/server/1025-Remove-wall-time-unused-skip-tick-protection.patch)0
-rw-r--r--patches/server/1025-Disable-pretty-printing-for-advancement-saving.patch (renamed from patches/server/1026-Disable-pretty-printing-for-advancement-saving.patch)0
-rw-r--r--patches/server/1026-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch (renamed from patches/server/1027-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch)0
-rw-r--r--patches/server/1027-Add-enchantWithLevels-with-enchantment-registry-set.patch (renamed from patches/server/1028-Add-enchantWithLevels-with-enchantment-registry-set.patch)0
-rw-r--r--patches/server/1028-Improve-entity-effect-API.patch (renamed from patches/server/1029-Improve-entity-effect-API.patch)0
-rw-r--r--patches/server/1029-Add-recipeBrewTime.patch (renamed from patches/server/1030-Add-recipeBrewTime.patch)0
-rw-r--r--patches/server/1030-Call-bucket-events-for-cauldrons.patch (renamed from patches/server/1031-Call-bucket-events-for-cauldrons.patch)0
-rw-r--r--patches/server/1031-Add-PlayerInsertLecternBookEvent.patch (renamed from patches/server/1032-Add-PlayerInsertLecternBookEvent.patch)0
-rw-r--r--patches/server/1032-Void-damage-configuration-API.patch (renamed from patches/server/1033-Void-damage-configuration-API.patch)4
-rw-r--r--patches/server/1033-Add-Offline-PDC-API.patch (renamed from patches/server/1034-Add-Offline-PDC-API.patch)0
-rw-r--r--patches/server/1034-Add-AnvilView-bypassEnchantmentLevelRestriction.patch (renamed from patches/server/1035-Add-AnvilView-bypassEnchantmentLevelRestriction.patch)0
-rw-r--r--patches/server/1035-Add-proper-async-player-disconnections.patch (renamed from patches/server/1036-Add-proper-async-player-disconnections.patch)0
-rw-r--r--patches/server/1036-Always-send-Banner-patterns-to-the-client.patch (renamed from patches/server/1037-Always-send-Banner-patterns-to-the-client.patch)0
-rw-r--r--patches/server/1037-Rewrite-dataconverter-system.patch (renamed from patches/server/1038-Rewrite-dataconverter-system.patch)6
-rw-r--r--patches/server/1038-Moonrise-optimisation-patches.patch (renamed from patches/server/1039-Moonrise-optimisation-patches.patch)244
-rw-r--r--patches/server/1039-API-for-checking-sent-chunks.patch (renamed from patches/server/1040-API-for-checking-sent-chunks.patch)0
-rw-r--r--patches/server/1040-Fix-CraftWorld-isChunkGenerated.patch (renamed from patches/server/1041-Fix-CraftWorld-isChunkGenerated.patch)0
-rw-r--r--patches/server/1041-Add-startup-flag-to-disable-gamerule-limits.patch (renamed from patches/server/1042-Add-startup-flag-to-disable-gamerule-limits.patch)0
-rw-r--r--patches/server/1042-Improved-Watchdog-Support.patch (renamed from patches/server/1043-Improved-Watchdog-Support.patch)46
-rw-r--r--patches/server/1043-Detail-more-information-in-watchdog-dumps.patch (renamed from patches/server/1044-Detail-more-information-in-watchdog-dumps.patch)19
-rw-r--r--patches/server/1044-Entity-load-save-limit-per-chunk.patch (renamed from patches/server/1045-Entity-load-save-limit-per-chunk.patch)4
-rw-r--r--patches/server/1045-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch (renamed from patches/server/1046-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch)0
-rw-r--r--patches/server/1046-Bundle-spark.patch (renamed from patches/server/1047-Bundle-spark.patch)36
-rw-r--r--patches/server/1047-Improve-performance-of-mass-crafts.patch (renamed from patches/server/1048-Improve-performance-of-mass-crafts.patch)0
-rw-r--r--patches/server/1048-Incremental-chunk-and-player-saving.patch (renamed from patches/server/1049-Incremental-chunk-and-player-saving.patch)56
-rw-r--r--patches/server/1049-Optimise-general-POI-access.patch (renamed from patches/server/1050-Optimise-general-POI-access.patch)0
-rw-r--r--patches/server/1050-Fix-entity-tracker-desync-when-new-players-are-added.patch (renamed from patches/server/1051-Fix-entity-tracker-desync-when-new-players-are-added.patch)4
-rw-r--r--patches/server/1051-Lag-compensation-ticks.patch (renamed from patches/server/1052-Lag-compensation-ticks.patch)22
-rw-r--r--patches/server/1052-Optimise-collision-checking-in-player-move-packet-ha.patch (renamed from patches/server/1053-Optimise-collision-checking-in-player-move-packet-ha.patch)0
-rw-r--r--patches/server/1053-Optional-per-player-mob-spawns.patch (renamed from patches/server/1054-Optional-per-player-mob-spawns.patch)26
-rw-r--r--patches/server/1054-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch (renamed from patches/server/1055-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch)12
665 files changed, 2226 insertions, 3556 deletions
diff --git a/patches/api/0011-Timings-v2.patch b/patches/api/0011-Timings-v2.patch
index 36aae54822..a484a8afd2 100644
--- a/patches/api/0011-Timings-v2.patch
+++ b/patches/api/0011-Timings-v2.patch
@@ -8,7 +8,7 @@ expose isRunning
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
new file mode 100644
-index 0000000000000000000000000000000000000000..3e747abde6fefae90f1c15cb00158bc5303cbe50
+index 0000000000000000000000000000000000000000..73b125979e2f2dfd13cbf689a90b29cc68a36e09
--- /dev/null
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
@@ -0,0 +1,89 @@
@@ -94,7 +94,7 @@ index 0000000000000000000000000000000000000000..3e747abde6fefae90f1c15cb00158bc5
+ TimingsManager.HISTORY.add(new TimingHistory());
+ TimingsManager.resetTimings();
+ }
-+ Bukkit.getUnsafe().reportTimings();
++ //Bukkit.getUnsafe().reportTimings();
+ }
+
+ boolean isViolated() {
@@ -1275,10 +1275,10 @@ index 0000000000000000000000000000000000000000..df142a89b8c43acb81eb383eac0ef048
+}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e81d0bc309de877ed2b5da6122f55c162e9b5f10
+index 0000000000000000000000000000000000000000..95b7cdf0677ef71e6885fa78aa5c75bb500f5f53
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timings.java
-@@ -0,0 +1,331 @@
+@@ -0,0 +1,325 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
@@ -1426,14 +1426,8 @@ index 0000000000000000000000000000000000000000..e81d0bc309de877ed2b5da6122f55c16
+ * @param enabled Should timings be reported
+ */
+ public static void setTimingsEnabled(boolean enabled) {
-+ timingsEnabled = enabled;
-+ warnAboutDeprecationOnEnable();
-+ reset();
-+ }
-+
-+ private static void warnAboutDeprecationOnEnable() {
-+ if (timingsEnabled && !warnedAboutDeprecationOnEnable) {
-+ Bukkit.getLogger().warning(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
++ if (enabled && !warnedAboutDeprecationOnEnable) {
++ Bukkit.getLogger().severe(PlainTextComponentSerializer.plainText().serialize(deprecationMessage()));
+ warnedAboutDeprecationOnEnable = true;
+ }
+ }
@@ -1441,7 +1435,7 @@ index 0000000000000000000000000000000000000000..e81d0bc309de877ed2b5da6122f55c16
+ public static Component deprecationMessage() {
+ return Component.text()
+ .color(TextColor.color(0xffc93a))
-+ .append(Component.text("[!] The timings profiler has been enabled but has been scheduled for removal from Paper in the future."))
++ .append(Component.text("[!] The timings profiler is in no-op mode and will be fully removed in a later update."))
+ .append(Component.newline())
+ .append(Component.text(" We recommend migrating to the spark profiler."))
+ .append(Component.newline())
@@ -1612,10 +1606,10 @@ index 0000000000000000000000000000000000000000..e81d0bc309de877ed2b5da6122f55c16
+
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
new file mode 100644
-index 0000000000000000000000000000000000000000..95d87c9dbf2b237787294dfbe7fed87a36e6dedf
+index 0000000000000000000000000000000000000000..b83e5ff7ada8771fdf27ba9807c77ba6a4ce12da
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
-@@ -0,0 +1,126 @@
+@@ -0,0 +1,127 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
@@ -1674,8 +1668,9 @@ index 0000000000000000000000000000000000000000..95d87c9dbf2b237787294dfbe7fed87a
+ if (!testPermission(sender)) {
+ return true;
+ }
-+ if (false) {
++ if (true) {
+ sender.sendMessage(Timings.deprecationMessage());
++ return true;
+ }
+ if (args.length < 1) {
+ sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED));
@@ -2906,35 +2901,6 @@ index fa6ad07214d5e38866bf6bee9139c6c938e9f51a..57c9b560c77a56588870598acb543469
/**
* Sends the component to the player
*
-diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index d8b346fe0f9634218954fe818d53272a0896af9c..12ef99f1c91b92a133611c5f5aeaaeebd02ce232 100644
---- a/src/main/java/org/bukkit/UnsafeValues.java
-+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -40,6 +40,11 @@ public interface UnsafeValues {
- net.kyori.adventure.text.Component resolveWithContext(net.kyori.adventure.text.Component component, org.bukkit.command.CommandSender context, org.bukkit.entity.Entity scoreboardSubject, boolean bypassPermissions) throws java.io.IOException;
- // Paper end
-
-+ /**
-+ * @deprecated Timings will be removed in the future
-+ */
-+ @Deprecated(forRemoval = true)
-+ void reportTimings(); // Paper
- Material toLegacy(Material material);
-
- Material fromLegacy(Material material);
-@@ -151,4 +156,12 @@ public interface UnsafeValues {
- return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
- }
- // Paper end
-+
-+ // Paper start
-+ /**
-+ * @deprecated Timings will be removed in the future
-+ */
-+ @Deprecated(forRemoval = true)
-+ String getTimingsServerName();
-+ // Paper end
- }
diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java
new file mode 100644
index 0000000000000000000000000000000000000000..45ed63797b13e114bf3795c80a6c3967d8eb2351
@@ -3508,7 +3474,7 @@ index 84befa1e5123038b80e0734622a5174634f5a982..22de066aef71ad2cf135d5b6f5d6f224
@NotNull
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
-index 46c7be5fa69f13900860b9944523beea16f2409b..6018574cd15b802833613beefa88da15dc2730cb 100644
+index 46c7be5fa69f13900860b9944523beea16f2409b..f97669c8b58bc287fc289eeb098836ae314b053a 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -381,7 +381,6 @@ public final class SimplePluginManager implements PluginManager {
@@ -3559,9 +3525,11 @@ index 46c7be5fa69f13900860b9944523beea16f2409b..6018574cd15b802833613beefa88da15
}
/**
-@@ -933,7 +933,7 @@ public final class SimplePluginManager implements PluginManager {
+@@ -932,8 +932,9 @@ public final class SimplePluginManager implements PluginManager {
+ *
* @param use True if per event timing code should be used
*/
++ @Deprecated(forRemoval = true)
public void useTimings(boolean use) {
- useTimings = use;
+ co.aikar.timings.Timings.setTimingsEnabled(use); // Paper
diff --git a/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch
index c73bf65b97..1faeb90190 100644
--- a/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch
+++ b/patches/api/0012-Add-command-line-option-to-load-extra-plugin-jars-no.patch
@@ -55,7 +55,7 @@ index 57c9b560c77a56588870598acb543469040ceec1..8949b8e29ae7f412481291630a5cb7b5
* Used for all administrative messages, such as an operator using a
* command.
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
-index 6018574cd15b802833613beefa88da15dc2730cb..e7b1895d3918487d711afcbe41d76863d85c0a62 100644
+index f97669c8b58bc287fc289eeb098836ae314b053a..2c77b6ab388bd689acb8d84ec62bd5df1eb9373e 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -117,9 +117,22 @@ public final class SimplePluginManager implements PluginManager {
diff --git a/patches/api/0015-Expose-server-build-information.patch b/patches/api/0015-Expose-server-build-information.patch
index f1bf77caf8..2853b45626 100644
--- a/patches/api/0015-Expose-server-build-information.patch
+++ b/patches/api/0015-Expose-server-build-information.patch
@@ -316,21 +316,22 @@ index ba28d9f3213ca4b5f15178dc637bff37a8896edc..8a07f21eeb04fb54032ce377a1478f60
* Gets a view of all currently logged in players. This {@linkplain
* Collections#unmodifiableCollection(Collection) view} is a reused
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 12ef99f1c91b92a133611c5f5aeaaeebd02ce232..6e67fdb091a006d2d13bc2d93db4d55348af4c8f 100644
+index d8b346fe0f9634218954fe818d53272a0896af9c..45ed0007d6de20b98794b3ccaef57aed213e72d4 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -163,5 +163,12 @@ public interface UnsafeValues {
- */
- @Deprecated(forRemoval = true)
- String getTimingsServerName();
+@@ -151,4 +151,13 @@ public interface UnsafeValues {
+ return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
+ }
+ // Paper end
+
++ // Paper start
+ /**
+ * Called once by the version command on first use, then cached.
+ */
+ default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
+ return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
+ }
- // Paper end
++ // Paper end
}
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index 263208d3cba36cb80c9ee4e3022ef702ea113df2..e64bb57f74e6d6f78927be228825b3e0bdf41f48 100644
diff --git a/patches/api/0021-Add-exception-reporting-event.patch b/patches/api/0021-Add-exception-reporting-event.patch
index adf50a8c29..c592c2b2ee 100644
--- a/patches/api/0021-Add-exception-reporting-event.patch
+++ b/patches/api/0021-Add-exception-reporting-event.patch
@@ -494,7 +494,7 @@ index 36fc2c35395c72f8b81a2a2f3265fd205384ce26..c7fa1d235cea78bda4656ed66b8d42b1
}
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
-index e7b1895d3918487d711afcbe41d76863d85c0a62..003bece642b682985625db93cad93026352bfc66 100644
+index 2c77b6ab388bd689acb8d84ec62bd5df1eb9373e..b878e7167cfcdea0e224c182b40abeadd339d3b3 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -528,7 +528,8 @@ public final class SimplePluginManager implements PluginManager {
diff --git a/patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch
index bfdff2a3f4..b852c64ded 100644
--- a/patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch
+++ b/patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch
@@ -8,10 +8,10 @@ Serializes using NBT which is safer for server data migrations than bukkits form
Co-authored-by: Nassim Jahnke <[email protected]>
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 6e67fdb091a006d2d13bc2d93db4d55348af4c8f..e41d5d9b810c8816cd0d1eba5fd1ea56252fb0df 100644
+index 45ed0007d6de20b98794b3ccaef57aed213e72d4..dd81e309c584e37e4bc7644261ecc649e1237570 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -170,5 +170,9 @@ public interface UnsafeValues {
+@@ -159,5 +159,9 @@ public interface UnsafeValues {
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
}
diff --git a/patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
index c5e6d200ab..241d581e0c 100644
--- a/patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
+++ b/patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index e41d5d9b810c8816cd0d1eba5fd1ea56252fb0df..64be4e60a03cb7cdc21013837d241d288695b69d 100644
+index dd81e309c584e37e4bc7644261ecc649e1237570..db48f30704efa6928599a5cebf5ce577c8430198 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -174,5 +174,12 @@ public interface UnsafeValues {
+@@ -163,5 +163,12 @@ public interface UnsafeValues {
byte[] serializeItem(ItemStack item);
ItemStack deserializeItem(byte[] data);
diff --git a/patches/api/0253-Expand-world-key-API.patch b/patches/api/0253-Expand-world-key-API.patch
index 2436c924af..2716158a70 100644
--- a/patches/api/0253-Expand-world-key-API.patch
+++ b/patches/api/0253-Expand-world-key-API.patch
@@ -100,10 +100,10 @@ index 943f8881ea23481ea5d5125b6ec7c9c6f763f0b0..42930006b6425b5d82233e4ffe7025ce
* Create a new virtual {@link WorldBorder}.
* <p>
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 64be4e60a03cb7cdc21013837d241d288695b69d..0231b79d96d535e0ae37296b3e806844740783ca 100644
+index db48f30704efa6928599a5cebf5ce577c8430198..4229db3c6abb693803a4bdd5a71e426c688f26cc 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -181,5 +181,10 @@ public interface UnsafeValues {
+@@ -170,5 +170,10 @@ public interface UnsafeValues {
* Use this when sending custom packets, so that there are no collisions on the client or server.
*/
public int nextEntityId();
diff --git a/patches/api/0255-Expose-protocol-version.patch b/patches/api/0255-Expose-protocol-version.patch
index 9ba0c40a96..f6cace865e 100644
--- a/patches/api/0255-Expose-protocol-version.patch
+++ b/patches/api/0255-Expose-protocol-version.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 0231b79d96d535e0ae37296b3e806844740783ca..51473ffbec65a2344449daa8ff5cf535b0b60520 100644
+index 4229db3c6abb693803a4bdd5a71e426c688f26cc..f33426207c403906c3c6fb99e848fd7ecbffd127 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -186,5 +186,12 @@ public interface UnsafeValues {
+@@ -175,5 +175,12 @@ public interface UnsafeValues {
* Just don't use it.
*/
@org.jetbrains.annotations.NotNull String getMainLevelName();
diff --git a/patches/api/0272-ItemStack-repair-check-API.patch b/patches/api/0272-ItemStack-repair-check-API.patch
index 6ef26350c7..6385fdeb47 100644
--- a/patches/api/0272-ItemStack-repair-check-API.patch
+++ b/patches/api/0272-ItemStack-repair-check-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 51473ffbec65a2344449daa8ff5cf535b0b60520..07669aad6d9910174fbc8fdf3cdd54211fbfcee3 100644
+index f33426207c403906c3c6fb99e848fd7ecbffd127..3ef6ffb506a7fdd05a08353f342e45de8066ca19 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -193,5 +193,15 @@ public interface UnsafeValues {
+@@ -182,5 +182,15 @@ public interface UnsafeValues {
* @return the server's protocol version
*/
int getProtocolVersion();
diff --git a/patches/api/0304-Get-entity-default-attributes.patch b/patches/api/0304-Get-entity-default-attributes.patch
index fd13ed8d7c..deca580fd3 100644
--- a/patches/api/0304-Get-entity-default-attributes.patch
+++ b/patches/api/0304-Get-entity-default-attributes.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Get entity default attributes
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 07669aad6d9910174fbc8fdf3cdd54211fbfcee3..a25f7378e5cef3899c38dd34d369da0441951f24 100644
+index 3ef6ffb506a7fdd05a08353f342e45de8066ca19..b8627d845bbc8c845af364408d3b6abb57c7308b 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -203,5 +203,22 @@ public interface UnsafeValues {
+@@ -192,5 +192,22 @@ public interface UnsafeValues {
* @return true if valid repair, false if not
*/
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
diff --git a/patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch b/patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch
index 790704d4e9..abe5d9f163 100644
--- a/patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index a25f7378e5cef3899c38dd34d369da0441951f24..3aeac7b102f7c6e6186d168294ea73ff022f9349 100644
+index b8627d845bbc8c845af364408d3b6abb57c7308b..ef22077e2bf9709bef21e259cfa6435f80305b5e 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -175,6 +175,14 @@ public interface UnsafeValues {
+@@ -164,6 +164,14 @@ public interface UnsafeValues {
ItemStack deserializeItem(byte[] data);
diff --git a/patches/api/0358-Add-NamespacedKey-biome-methods.patch b/patches/api/0358-Add-NamespacedKey-biome-methods.patch
index adc8f6a1e2..be2c0e7b2a 100644
--- a/patches/api/0358-Add-NamespacedKey-biome-methods.patch
+++ b/patches/api/0358-Add-NamespacedKey-biome-methods.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <[email protected]>
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 3aeac7b102f7c6e6186d168294ea73ff022f9349..4f3e6e2698b28922e7b6448eddd5b166f4631759 100644
+index ef22077e2bf9709bef21e259cfa6435f80305b5e..14cf57a96f47ba666f05cedbc0005ff0fec6a33d 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -229,4 +229,33 @@ public interface UnsafeValues {
+@@ -218,4 +218,33 @@ public interface UnsafeValues {
*/
@org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
// Paper end
diff --git a/patches/api/0402-Fix-custom-statistic-criteria-creation.patch b/patches/api/0402-Fix-custom-statistic-criteria-creation.patch
index 5e3f26f4f3..ff4bad9d35 100644
--- a/patches/api/0402-Fix-custom-statistic-criteria-creation.patch
+++ b/patches/api/0402-Fix-custom-statistic-criteria-creation.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix custom statistic criteria creation
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 4f3e6e2698b28922e7b6448eddd5b166f4631759..334e392800803816cf502c2920c4a85774d6b0b2 100644
+index 14cf57a96f47ba666f05cedbc0005ff0fec6a33d..57b51acd566f6ccabeea0b3f4c76b19547d35b5a 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -258,4 +258,6 @@ public interface UnsafeValues {
+@@ -247,4 +247,6 @@ public interface UnsafeValues {
*/
void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey);
// Paper end - namespaced key biome methods
diff --git a/patches/api/0440-Add-api-for-spawn-egg-texture-colors.patch b/patches/api/0440-Add-api-for-spawn-egg-texture-colors.patch
index 996340cf25..14a80bca1c 100644
--- a/patches/api/0440-Add-api-for-spawn-egg-texture-colors.patch
+++ b/patches/api/0440-Add-api-for-spawn-egg-texture-colors.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add api for spawn egg texture colors
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 334e392800803816cf502c2920c4a85774d6b0b2..27ac8e80192924eb38e5ceaee575ac418e92b410 100644
+index 57b51acd566f6ccabeea0b3f4c76b19547d35b5a..38e84d98670b45b1f855885cf07ce13f0433fa49 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -260,4 +260,17 @@ public interface UnsafeValues {
+@@ -249,4 +249,17 @@ public interface UnsafeValues {
// Paper end - namespaced key biome methods
String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic); // Paper - fix custom stats criteria creation
diff --git a/patches/api/0441-Add-Lifecycle-Event-system.patch b/patches/api/0441-Add-Lifecycle-Event-system.patch
index 31bfe9a70f..2d2d639018 100644
--- a/patches/api/0441-Add-Lifecycle-Event-system.patch
+++ b/patches/api/0441-Add-Lifecycle-Event-system.patch
@@ -546,10 +546,10 @@ index 0000000000000000000000000000000000000000..f70814de0d6c40b2c1c9921b8abdd116
+ }
+}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 27ac8e80192924eb38e5ceaee575ac418e92b410..141d5a964cc299284aecd4d34d57008a32f94247 100644
+index 38e84d98670b45b1f855885cf07ce13f0433fa49..81b1c024e27a7021982336b94fc1e1ba33308f6c 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -273,4 +273,12 @@ public interface UnsafeValues {
+@@ -262,4 +262,12 @@ public interface UnsafeValues {
*/
@Nullable org.bukkit.Color getSpawnEggLayerColor(org.bukkit.entity.EntityType entityType, int layer);
// Paper end - spawn egg color visibility
diff --git a/patches/api/0442-ItemStack-Tooltip-API.patch b/patches/api/0442-ItemStack-Tooltip-API.patch
index 4af91c3ade..1d0644e6e1 100644
--- a/patches/api/0442-ItemStack-Tooltip-API.patch
+++ b/patches/api/0442-ItemStack-Tooltip-API.patch
@@ -110,10 +110,10 @@ index 0000000000000000000000000000000000000000..a649b90dfac6000c01579a48234a1138
+ }
+}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 141d5a964cc299284aecd4d34d57008a32f94247..31217b38e769f97801fa1afefeb223d1c755cabd 100644
+index 81b1c024e27a7021982336b94fc1e1ba33308f6c..e5144471056e69586c1693a9264a3995387de3cc 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -281,4 +281,6 @@ public interface UnsafeValues {
+@@ -270,4 +270,6 @@ public interface UnsafeValues {
@org.jetbrains.annotations.ApiStatus.Internal
io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager<org.bukkit.plugin.Plugin> createPluginLifecycleEventManager(final org.bukkit.plugin.java.JavaPlugin plugin, final java.util.function.BooleanSupplier registrationCheck);
// Paper end - lifecycle event API
diff --git a/patches/api/0472-Registry-Modification-API.patch b/patches/api/0472-Registry-Modification-API.patch
index 6eca654483..b51badfa70 100644
--- a/patches/api/0472-Registry-Modification-API.patch
+++ b/patches/api/0472-Registry-Modification-API.patch
@@ -900,10 +900,10 @@ index 67cf3fcad21a8977d6fad172cc776b628ab68f25..b4ef3133fdd9d79a3381cf8f659ff561
}
}
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 31217b38e769f97801fa1afefeb223d1c755cabd..9bdba60fa96edbc4be5dcf54a815579db887048b 100644
+index e5144471056e69586c1693a9264a3995387de3cc..2c365ecf3f5a5252e489bc1dc04359e766a2d739 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -283,4 +283,6 @@ public interface UnsafeValues {
+@@ -272,4 +272,6 @@ public interface UnsafeValues {
// Paper end - lifecycle event API
@NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
diff --git a/patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch b/patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch
index 246fa425d8..157b63eeb4 100644
--- a/patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch
+++ b/patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Proxy ItemStack to CraftItemStack
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 9bdba60fa96edbc4be5dcf54a815579db887048b..330e3013eda204aa9b33d5e1c3104e0b595abdbc 100644
+index 2c365ecf3f5a5252e489bc1dc04359e766a2d739..06b7af5dbae3dd1c5cb024cc875162725a0b8c37 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -285,4 +285,6 @@ public interface UnsafeValues {
+@@ -274,4 +274,6 @@ public interface UnsafeValues {
@NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
<A extends Keyed, M> io.papermc.paper.registry.tag.@Nullable Tag<A> getTag(io.papermc.paper.registry.tag.@NotNull TagKey<A> tagKey); // Paper - hack to get tags for non-server backed registries
diff --git a/patches/api/0485-Add-FeatureFlag-API.patch b/patches/api/0485-Add-FeatureFlag-API.patch
index 9afc644014..26442d7b01 100644
--- a/patches/api/0485-Add-FeatureFlag-API.patch
+++ b/patches/api/0485-Add-FeatureFlag-API.patch
@@ -247,10 +247,10 @@ index eb33e8e671972aa308ad75a7ce9aa9ac526f470f..05ecf3cb38ff42c8b52405d900197e6b
/**
* Gets the {@link Biome} at the given {@link Location}.
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index 330e3013eda204aa9b33d5e1c3104e0b595abdbc..c80e0ef587a001ee6de3f5c182cc9696d58bafeb 100644
+index 06b7af5dbae3dd1c5cb024cc875162725a0b8c37..aa3916b0d8e40615a7ae142e254277744b4f024e 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -114,8 +114,7 @@ public interface UnsafeValues {
+@@ -109,8 +109,7 @@ public interface UnsafeValues {
String getTranslationKey(Attribute attribute);
diff --git a/patches/api/0487-Item-serialization-as-json.patch b/patches/api/0487-Item-serialization-as-json.patch
index d2951870a1..c2b00d8d3d 100644
--- a/patches/api/0487-Item-serialization-as-json.patch
+++ b/patches/api/0487-Item-serialization-as-json.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Item serialization as json
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
-index c80e0ef587a001ee6de3f5c182cc9696d58bafeb..10c87b7c19ed3eab28fdce5f225df3767292ee0a 100644
+index aa3916b0d8e40615a7ae142e254277744b4f024e..e4084369d12390bb5c92ab58ad34ff07afea1142 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
-@@ -174,6 +174,36 @@ public interface UnsafeValues {
+@@ -163,6 +163,36 @@ public interface UnsafeValues {
ItemStack deserializeItem(byte[] data);
diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch
index 3303f32c8a..c4181a6029 100644
--- a/patches/server/0005-Paper-config-files.patch
+++ b/patches/server/0005-Paper-config-files.patch
@@ -487,13 +487,12 @@ index 0000000000000000000000000000000000000000..d9502ba028a96f9cc846f9ed428bd806
+}
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
new file mode 100644
-index 0000000000000000000000000000000000000000..7e88b1fc1ff700a7771b38f139f4472eaeaf8714
+index 0000000000000000000000000000000000000000..f0d470d7770e119f734b9e72021c806d0ea8ecbd
--- /dev/null
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-@@ -0,0 +1,355 @@
+@@ -0,0 +1,330 @@
+package io.papermc.paper.configuration;
+
-+import co.aikar.timings.MinecraftTimings;
+import com.mojang.logging.LogUtils;
+import io.papermc.paper.configuration.constraint.Constraints;
+import io.papermc.paper.configuration.type.number.DoubleOr;
@@ -510,7 +509,6 @@ index 0000000000000000000000000000000000000000..7e88b1fc1ff700a7771b38f139f4472e
+import org.spongepowered.configurate.objectmapping.meta.Required;
+import org.spongepowered.configurate.objectmapping.meta.Setting;
+
-+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.OptionalInt;
@@ -592,29 +590,6 @@ index 0000000000000000000000000000000000000000..7e88b1fc1ff700a7771b38f139f4472e
+ public boolean enableImmediately = false;
+ }
+
-+ @Deprecated(forRemoval = true)
-+ public Timings timings;
-+
-+ @Deprecated(forRemoval = true)
-+ public class Timings extends ConfigurationPart {
-+ public boolean enabled = false;
-+ public boolean verbose = true;
-+ public String url = "https://timings.aikar.co/";
-+ public boolean serverNamePrivacy = false;
-+ public List<String> hiddenConfigEntries = List.of(
-+ "database",
-+ "proxies.velocity.secret"
-+ );
-+ public int historyInterval = 300;
-+ public int historyLength = 3600;
-+ public String serverName = "Unknown Server";
-+
-+ @PostProcess
-+ private void postProcess() {
-+ MinecraftTimings.processConfig(this);
-+ }
-+ }
-+
+ public Proxies proxies;
+
+ public class Proxies extends ConfigurationPart {
diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch
index b7549f7365..c7768b91e2 100644
--- a/patches/server/0009-MC-Utils.patch
+++ b/patches/server/0009-MC-Utils.patch
@@ -4542,10 +4542,10 @@ index 46cab7a8c7b87ab01b26074b04f5a02b3907cfc4..49019b4a9bc4e634d54a9b0acaf9229a
+ // Paper end
}
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-index 7e88b1fc1ff700a7771b38f139f4472eaeaf8714..904d2f96a60e72aa089fdfe6be08044b04f995c1 100644
+index f0d470d7770e119f734b9e72021c806d0ea8ecbd..c3fe4481dd35f80815716e48beeeb07b1f51e30b 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-@@ -242,7 +242,7 @@ public class GlobalConfiguration extends ConfigurationPart {
+@@ -217,7 +217,7 @@ public class GlobalConfiguration extends ConfigurationPart {
@PostProcess
private void postProcess() {
diff --git a/patches/server/0024-Further-improve-server-tick-loop.patch b/patches/server/0023-Further-improve-server-tick-loop.patch
index 798d5e4b4d..87be9b027e 100644
--- a/patches/server/0024-Further-improve-server-tick-loop.patch
+++ b/patches/server/0023-Further-improve-server-tick-loop.patch
@@ -12,7 +12,7 @@ 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 a76e2f5d29315d21212ff121f0047bf1140ad5ef..31582d4f9d52c86cf834b9dc10e58b68c67f1272 100644
+index 3322865949fe5ddaab2dffc39260b75093f0f204..4a573e8b7cd90f65c190982662e92a11f79a1d3e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -307,7 +307,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -34,7 +34,7 @@ index a76e2f5d29315d21212ff121f0047bf1140ad5ef..31582d4f9d52c86cf834b9dc10e58b68
public final double[] recentTps = new double[ 3 ];
// Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
-@@ -1034,6 +1035,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1033,6 +1034,57 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
{
return ( avg * exp ) + ( tps * ( 1 - exp ) );
}
@@ -92,7 +92,7 @@ index a76e2f5d29315d21212ff121f0047bf1140ad5ef..31582d4f9d52c86cf834b9dc10e58b68
// Spigot End
protected void runServer() {
-@@ -1048,7 +1100,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1047,7 +1099,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( this.recentTps, 20 );
@@ -104,7 +104,7 @@ index a76e2f5d29315d21212ff121f0047bf1140ad5ef..31582d4f9d52c86cf834b9dc10e58b68
while (this.running) {
long i;
-@@ -1070,15 +1125,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1069,15 +1124,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
// Spigot start
@@ -135,7 +135,7 @@ index a76e2f5d29315d21212ff121f0047bf1140ad5ef..31582d4f9d52c86cf834b9dc10e58b68
// Spigot end
boolean flag = i == 0L;
-@@ -1088,7 +1150,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1087,7 +1149,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
}
@@ -146,10 +146,10 @@ index a76e2f5d29315d21212ff121f0047bf1140ad5ef..31582d4f9d52c86cf834b9dc10e58b68
try {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 232a21080ff416ac5b9fdf913f6784eb3bcdacfa..f7af198966928ac28bd7e2851caae93a27974e5c 100644
+index 9bf8c4d9154c433e586f59587e8d7db7c310bb9c..7c5b0db8115dc4032a3a364299ca06c88efd9a26 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2689,7 +2689,11 @@ public final class CraftServer implements Server {
+@@ -2670,7 +2670,11 @@ public final class CraftServer implements Server {
@Override
public double[] getTPS() {
diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch
deleted file mode 100644
index 92fc3f0b70..0000000000
--- a/patches/server/0023-Timings-v2.patch
+++ /dev/null
@@ -1,2077 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Aikar <[email protected]>
-Date: Thu, 3 Mar 2016 04:00:11 -0600
-Subject: [PATCH] Timings v2
-
-
-diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
-new file mode 100644
-index 0000000000000000000000000000000000000000..4bd813161a5d76a83cdbd0a9209b9ea9e60ffe1b
---- /dev/null
-+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
-@@ -0,0 +1,169 @@
-+package co.aikar.timings;
-+
-+import com.google.common.collect.MapMaker;
-+import io.papermc.paper.configuration.GlobalConfiguration;
-+import net.minecraft.commands.functions.CommandFunction;
-+import net.minecraft.network.protocol.Packet;
-+import net.minecraft.world.level.block.Block;
-+import net.minecraft.world.level.block.entity.BlockEntity;
-+import org.bukkit.plugin.Plugin;
-+import org.bukkit.scheduler.BukkitTask;
-+
-+import org.bukkit.craftbukkit.scheduler.CraftTask;
-+
-+import java.util.Map;
-+
-+// TODO: Re-implement missing timers
-+@Deprecated(forRemoval = true)
-+public final class MinecraftTimings {
-+
-+ public static final Timing serverOversleep = Timings.ofSafe("Server Oversleep");
-+ public static final Timing playerListTimer = Timings.ofSafe("Player List");
-+ public static final Timing commandFunctionsTimer = Timings.ofSafe("Command Functions");
-+ public static final Timing connectionTimer = Timings.ofSafe("Connection Handler");
-+ public static final Timing tickablesTimer = Timings.ofSafe("Tickables");
-+ public static final Timing minecraftSchedulerTimer = Timings.ofSafe("Minecraft Scheduler");
-+ public static final Timing bukkitSchedulerTimer = Timings.ofSafe("Bukkit Scheduler");
-+ public static final Timing bukkitSchedulerPendingTimer = Timings.ofSafe("Bukkit Scheduler - Pending");
-+ public static final Timing bukkitSchedulerFinishTimer = Timings.ofSafe("Bukkit Scheduler - Finishing");
-+ public static final Timing chunkIOTickTimer = Timings.ofSafe("ChunkIOTick");
-+ public static final Timing timeUpdateTimer = Timings.ofSafe("Time Update");
-+ public static final Timing serverCommandTimer = Timings.ofSafe("Server Command");
-+ public static final Timing savePlayers = Timings.ofSafe("Save Players");
-+
-+ public static final Timing tickEntityTimer = Timings.ofSafe("## tickEntity");
-+ public static final Timing tickTileEntityTimer = Timings.ofSafe("## tickTileEntity");
-+ public static final Timing packetProcessTimer = Timings.ofSafe("## Packet Processing");
-+ public static final Timing scheduledBlocksTimer = Timings.ofSafe("## Scheduled Blocks");
-+ public static final Timing structureGenerationTimer = Timings.ofSafe("Structure Generation");
-+
-+ public static final Timing processQueueTimer = Timings.ofSafe("processQueue");
-+ public static final Timing processTasksTimer = Timings.ofSafe("processTasks");
-+
-+ public static final Timing playerCommandTimer = Timings.ofSafe("playerCommand");
-+
-+ public static final Timing entityActivationCheckTimer = Timings.ofSafe("entityActivationCheck");
-+
-+ public static final Timing antiXrayUpdateTimer = Timings.ofSafe("anti-xray - update");
-+ public static final Timing antiXrayObfuscateTimer = Timings.ofSafe("anti-xray - obfuscate");
-+
-+ private static final Map<Class<?>, String> taskNameCache = new MapMaker().weakKeys().makeMap();
-+
-+ private MinecraftTimings() {}
-+
-+ public static Timing getInternalTaskName(String taskName) {
-+ return Timings.ofSafe(taskName);
-+ }
-+
-+ /**
-+ * Gets a timer associated with a plugins tasks.
-+ * @param bukkitTask
-+ * @param period
-+ * @return
-+ */
-+ public static Timing getPluginTaskTimings(BukkitTask bukkitTask, long period) {
-+ if (!bukkitTask.isSync()) {
-+ return NullTimingHandler.NULL;
-+ }
-+ Plugin plugin;
-+
-+ CraftTask craftTask = (CraftTask) bukkitTask;
-+
-+ final Class<?> taskClass = craftTask.getTaskClass();
-+ if (bukkitTask.getOwner() != null) {
-+ plugin = bukkitTask.getOwner();
-+ } else {
-+ plugin = TimingsManager.getPluginByClassloader(taskClass);
-+ }
-+
-+ final String taskname = taskNameCache.computeIfAbsent(taskClass, clazz -> {
-+ try {
-+ String clsName = !clazz.isMemberClass()
-+ ? clazz.getName()
-+ : clazz.getCanonicalName();
-+ if (clsName != null && clsName.contains("$Lambda$")) {
-+ clsName = clsName.replaceAll("(Lambda\\$.*?)/.*", "$1");
-+ }
-+ return clsName != null ? clsName : "UnknownTask";
-+ } catch (Throwable ex) {
-+ new Exception("Error occurred detecting class name", ex).printStackTrace();
-+ return "MangledClassFile";
-+ }
-+ });
-+
-+ StringBuilder name = new StringBuilder(64);
-+ name.append("Task: ").append(taskname);
-+ if (period > 0) {
-+ name.append(" (interval:").append(period).append(")");
-+ } else {
-+ name.append(" (Single)");
-+ }
-+
-+ if (plugin == null) {
-+ return Timings.ofSafe(null, name.toString());
-+ }
-+
-+ return Timings.ofSafe(plugin, name.toString());
-+ }
-+
-+ /**
-+ * Get a named timer for the specified entity type to track type specific timings.
-+ * @param entityType
-+ * @return
-+ */
-+ public static Timing getEntityTimings(String entityType, String type) {
-+ return Timings.ofSafe("Minecraft", "## tickEntity - " + entityType + " - " + type, tickEntityTimer);
-+ }
-+
-+ /**
-+ * Get a named timer for the specified tile entity type to track type specific timings.
-+ * @param entity
-+ * @return
-+ */
-+ public static Timing getTileEntityTimings(BlockEntity entity) {
-+ String entityType = entity.getClass().getName();
-+ return Timings.ofSafe("Minecraft", "## tickTileEntity - " + entityType, tickTileEntityTimer);
-+ }
-+ public static Timing getCancelTasksTimer() {
-+ return Timings.ofSafe("Cancel Tasks");
-+ }
-+ public static Timing getCancelTasksTimer(Plugin plugin) {
-+ return Timings.ofSafe(plugin, "Cancel Tasks");
-+ }
-+
-+ public static void stopServer() {
-+ TimingsManager.stopServer();
-+ }
-+
-+ public static Timing getBlockTiming(Block block) {
-+ return Timings.ofSafe("## Scheduled Block: " + block.toString(), scheduledBlocksTimer);
-+ }
-+/*
-+ public static Timing getStructureTiming(StructureGenerator structureGenerator) {
-+ return Timings.ofSafe("Structure Generator - " + structureGenerator.getName(), structureGenerationTimer);
-+ }*/
-+
-+ public static Timing getPacketTiming(Packet packet) {
-+ return Timings.ofSafe("## Packet - " + packet.getClass().getName(), packetProcessTimer);
-+ }
-+
-+ public static Timing getCommandFunctionTiming(CommandFunction<?> function) {
-+ return Timings.ofSafe("Command Function - " + function.id());
-+ }
-+
-+ public static void processConfig(GlobalConfiguration.Timings config) {
-+ TimingsManager.url = config.url;
-+ if (!TimingsManager.url.endsWith("/")) {
-+ TimingsManager.url += "/";
-+ }
-+ TimingsManager.privacy = config.serverNamePrivacy;
-+ if (!config.hiddenConfigEntries.contains("proxies.velocity.secret")) {
-+ config.hiddenConfigEntries.add("proxies.velocity.secret");
-+ }
-+ TimingsManager.hiddenConfigs.addAll(config.hiddenConfigEntries);
-+ co.aikar.timings.Timings.setVerboseTimingsEnabled(config.verbose);
-+ co.aikar.timings.Timings.setTimingsEnabled(config.enabled);
-+ co.aikar.timings.Timings.setHistoryInterval(config.historyInterval * 20);
-+ co.aikar.timings.Timings.setHistoryLength(config.historyLength * 20);
-+ }
-+}
-diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
-new file mode 100644
-index 0000000000000000000000000000000000000000..49028463ba47e760281545c2f7597e3db8d6c453
---- /dev/null
-+++ b/src/main/java/co/aikar/timings/TimingsExport.java
-@@ -0,0 +1,388 @@
-+/*
-+ * This file is licensed under the MIT License (MIT).
-+ *
-+ * Copyright (c) 2014 Daniel Ennis <http://aikar.co>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this software and associated documentation files (the "Software"), to deal
-+ * in the Software without restriction, including without limitation the rights
-+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+ * copies of the Software, and to permit persons to whom the Software is
-+ * furnished to do so, subject to the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-+ * THE SOFTWARE.
-+ */
-+package co.aikar.timings;
-+
-+import com.google.common.collect.Sets;
-+import io.papermc.paper.adventure.PaperAdventure;
-+import net.kyori.adventure.text.event.ClickEvent;
-+import net.kyori.adventure.text.format.NamedTextColor;
-+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
-+import net.minecraft.server.MinecraftServer;
-+import org.apache.commons.lang.StringUtils;
-+import org.bukkit.Bukkit;
-+import org.bukkit.Material;
-+import org.bukkit.configuration.ConfigurationSection;
-+import org.bukkit.configuration.MemorySection;
-+import org.bukkit.entity.EntityType;
-+import org.json.simple.JSONObject;
-+import org.json.simple.JSONValue;
-+import oshi.SystemInfo;
-+import oshi.hardware.HardwareAbstractionLayer;
-+
-+import java.io.ByteArrayOutputStream;
-+import java.io.IOException;
-+import java.io.InputStream;
-+import java.io.OutputStream;
-+import java.lang.management.ManagementFactory;
-+import java.lang.management.OperatingSystemMXBean;
-+import java.lang.management.RuntimeMXBean;
-+import java.net.HttpURLConnection;
-+import java.net.InetAddress;
-+import java.net.URL;
-+import java.util.List;
-+import java.util.Map;
-+import java.util.Set;
-+import java.util.logging.Level;
-+import java.util.zip.GZIPOutputStream;
-+
-+import static co.aikar.timings.TimingsManager.HISTORY;
-+import static co.aikar.util.JSONUtil.appendObjectData;
-+import static co.aikar.util.JSONUtil.createObject;
-+import static co.aikar.util.JSONUtil.pair;
-+import static co.aikar.util.JSONUtil.toArray;
-+import static co.aikar.util.JSONUtil.toArrayMapper;
-+import static co.aikar.util.JSONUtil.toObjectMapper;
-+import static net.kyori.adventure.text.Component.text;
-+
-+@SuppressWarnings({"rawtypes", "SuppressionAnnotation"})
-+@Deprecated(forRemoval = true)
-+public class TimingsExport extends Thread {
-+
-+ private final TimingsReportListener listeners;
-+ private final Map out;
-+ private final TimingHistory[] history;
-+ private static long lastReport = 0;
-+
-+ private TimingsExport(TimingsReportListener listeners, Map out, TimingHistory[] history) {
-+ super("Timings paste thread");
-+ this.listeners = listeners;
-+ this.out = out;
-+ this.history = history;
-+ }
-+
-+ /**
-+ * Checks if any pending reports are being requested, and builds one if needed.
-+ */
-+ public static void reportTimings() {
-+ if (Timings.requestingReport.isEmpty()) {
-+ return;
-+ }
-+ TimingsReportListener listeners = new TimingsReportListener(Timings.requestingReport);
-+ listeners.addConsoleIfNeeded();
-+
-+ Timings.requestingReport.clear();
-+ long now = System.currentTimeMillis();
-+ final long lastReportDiff = now - lastReport;
-+ if (lastReportDiff < 60000) {
-+ listeners.sendMessage(text("Please wait at least 1 minute in between Timings reports. (" + (int)((60000 - lastReportDiff) / 1000) + " seconds)", NamedTextColor.RED));
-+ listeners.done();
-+ return;
-+ }
-+ final long lastStartDiff = now - TimingsManager.timingStart;
-+ if (lastStartDiff < 180000) {
-+ listeners.sendMessage(text("Please wait at least 3 minutes before generating a Timings report. Unlike Timings v1, v2 benefits from longer timings and is not as useful with short timings. (" + (int)((180000 - lastStartDiff) / 1000) + " seconds)", NamedTextColor.RED));
-+ listeners.done();
-+ return;
-+ }
-+ listeners.sendMessage(text("Preparing Timings Report...", NamedTextColor.GREEN));
-+ lastReport = now;
-+ Map parent = createObject(
-+ // Get some basic system details about the server
-+ pair("version", Bukkit.getVersion()),
-+ pair("maxplayers", Bukkit.getMaxPlayers()),
-+ pair("start", TimingsManager.timingStart / 1000),
-+ pair("end", System.currentTimeMillis() / 1000),
-+ pair("online-mode", Bukkit.getServer().getOnlineMode()),
-+ pair("sampletime", (System.currentTimeMillis() - TimingsManager.timingStart) / 1000),
-+ pair("datapacks", toArrayMapper(MinecraftServer.getServer().getPackRepository().getSelectedPacks(), pack -> {
-+ return PlainTextComponentSerializer.plainText().serialize(PaperAdventure.asAdventure(pack.getChatLink(true)));
-+ }))
-+ );
-+ if (!TimingsManager.privacy) {
-+ appendObjectData(parent,
-+ pair("server", Bukkit.getUnsafe().getTimingsServerName()),
-+ pair("motd", Bukkit.getServer().getMotd()),
-+ pair("icon", Bukkit.getServer().getServerIcon().getData())
-+ );
-+ }
-+
-+ final Runtime runtime = Runtime.getRuntime();
-+ RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
-+
-+ OperatingSystemMXBean osInfo = ManagementFactory.getOperatingSystemMXBean();
-+
-+ HardwareAbstractionLayer hardwareInfo = new SystemInfo().getHardware();
-+
-+ parent.put("system", createObject(
-+ pair("timingcost", getCost()),
-+ pair("loadavg", osInfo.getSystemLoadAverage()),
-+ pair("name", System.getProperty("os.name")),
-+ pair("version", System.getProperty("os.version")),
-+ pair("jvmversion", System.getProperty("java.version")),
-+ pair("jvmvendor", System.getProperty("java.vendor")),
-+ pair("jvmvendorversion", System.getProperty("java.vendor.version")),
-+ pair("arch", System.getProperty("os.arch")),
-+ pair("maxmem", runtime.maxMemory()),
-+ pair("memory", createObject(
-+ pair("heap", ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().toString()),
-+ pair("nonheap", ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage().toString()),
-+ pair("finalizing", ManagementFactory.getMemoryMXBean().getObjectPendingFinalizationCount())
-+ )),
-+ pair("cpu", runtime.availableProcessors()),
-+ pair("cpuname", hardwareInfo.getProcessor().getProcessorIdentifier().getName().trim()),
-+ pair("runtime", runtimeBean.getUptime()),
-+ pair("flags", StringUtils.join(runtimeBean.getInputArguments(), " ")),
-+ pair("gc", toObjectMapper(ManagementFactory.getGarbageCollectorMXBeans(), input -> pair(input.getName(), toArray(input.getCollectionCount(), input.getCollectionTime()))))
-+ )
-+ );
-+
-+ parent.put("worlds", toObjectMapper(MinecraftServer.getServer().getAllLevels(), world -> {
-+ if (world.getWorld().getName().equals("worldeditregentempworld")) return null;
-+ return pair(world.getWorld().getName(), createObject(
-+ pair("gamerules", toObjectMapper(world.getWorld().getGameRules(), rule -> {
-+ return pair(rule, world.getWorld().getGameRuleValue(rule));
-+ })),
-+ pair("ticking-distance", world.getWorld().getSimulationDistance()),
-+ pair("no-ticking-distance", world.getWorld().getViewDistance()),
-+ pair("sending-distance", world.getWorld().getSendViewDistance())
-+ ));
-+ }));
-+
-+ Set<Material> tileEntityTypeSet = Sets.newHashSet();
-+ Set<EntityType> entityTypeSet = Sets.newHashSet();
-+
-+ int size = HISTORY.size();
-+ TimingHistory[] history = new TimingHistory[size + 1];
-+ int i = 0;
-+ for (TimingHistory timingHistory : HISTORY) {
-+ tileEntityTypeSet.addAll(timingHistory.tileEntityTypeSet);
-+ entityTypeSet.addAll(timingHistory.entityTypeSet);
-+ history[i++] = timingHistory;
-+ }
-+
-+ history[i] = new TimingHistory(); // Current snapshot
-+ tileEntityTypeSet.addAll(history[i].tileEntityTypeSet);
-+ entityTypeSet.addAll(history[i].entityTypeSet);
-+
-+
-+ Map handlers = createObject();
-+ Map groupData;
-+ synchronized (TimingIdentifier.GROUP_MAP) {
-+ for (TimingIdentifier.TimingGroup group : TimingIdentifier.GROUP_MAP.values()) {
-+ synchronized (group.handlers) {
-+ for (TimingHandler id : group.handlers) {
-+
-+ if (!id.isTimed() && !id.isSpecial()) {
-+ continue;
-+ }
-+
-+ String name = id.identifier.name;
-+ if (name.startsWith("##")) {
-+ name = name.substring(3);
-+ }
-+ handlers.put(id.id, toArray(
-+ group.id,
-+ name
-+ ));
-+ }
-+ }
-+ }
-+
-+ groupData = toObjectMapper(
-+ TimingIdentifier.GROUP_MAP.values(), group -> pair(group.id, group.name));
-+ }
-+
-+ parent.put("idmap", createObject(
-+ pair("groups", groupData),
-+ pair("handlers", handlers),
-+ pair("worlds", toObjectMapper(TimingHistory.worldMap.entrySet(), input -> pair(input.getValue(), input.getKey()))),
-+ pair("tileentity",
-+ toObjectMapper(tileEntityTypeSet, input -> pair(input.ordinal(), input.name()))),
-+ pair("entity",
-+ toObjectMapper(entityTypeSet, input -> pair(input.ordinal(), input.name())))
-+ ));
-+
-+ // Information about loaded plugins
-+
-+ parent.put("plugins", toObjectMapper(Bukkit.getPluginManager().getPlugins(),
-+ plugin -> pair(plugin.getName(), createObject(
-+ pair("version", plugin.getDescription().getVersion()),
-+ pair("description", String.valueOf(plugin.getDescription().getDescription()).trim()),
-+ pair("website", plugin.getDescription().getWebsite()),
-+ pair("authors", StringUtils.join(plugin.getDescription().getAuthors(), ", "))
-+ ))));
-+
-+
-+
-+ // Information on the users Config
-+
-+ parent.put("config", createObject(
-+ pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)),
-+ pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)),
-+ pair("paper", mapAsJSON(Bukkit.spigot().getPaperConfig(), null))
-+ ));
-+
-+ new TimingsExport(listeners, parent, history).start();
-+ }
-+
-+ static long getCost() {
-+ // Benchmark the users System.nanotime() for cost basis
-+ int passes = 100;
-+ TimingHandler SAMPLER1 = Timings.ofSafe("Timings Sampler 1");
-+ TimingHandler SAMPLER2 = Timings.ofSafe("Timings Sampler 2");
-+ TimingHandler SAMPLER3 = Timings.ofSafe("Timings Sampler 3");
-+ TimingHandler SAMPLER4 = Timings.ofSafe("Timings Sampler 4");
-+ TimingHandler SAMPLER5 = Timings.ofSafe("Timings Sampler 5");
-+ TimingHandler SAMPLER6 = Timings.ofSafe("Timings Sampler 6");
-+
-+ long start = System.nanoTime();
-+ for (int i = 0; i < passes; i++) {
-+ SAMPLER1.startTiming();
-+ SAMPLER2.startTiming();
-+ SAMPLER3.startTiming();
-+ SAMPLER3.stopTiming();
-+ SAMPLER4.startTiming();
-+ SAMPLER5.startTiming();
-+ SAMPLER6.startTiming();
-+ SAMPLER6.stopTiming();
-+ SAMPLER5.stopTiming();
-+ SAMPLER4.stopTiming();
-+ SAMPLER2.stopTiming();
-+ SAMPLER1.stopTiming();
-+ }
-+ long timingsCost = (System.nanoTime() - start) / passes / 6;
-+ SAMPLER1.reset(true);
-+ SAMPLER2.reset(true);
-+ SAMPLER3.reset(true);
-+ SAMPLER4.reset(true);
-+ SAMPLER5.reset(true);
-+ SAMPLER6.reset(true);
-+ return timingsCost;
-+ }
-+
-+ private static JSONObject mapAsJSON(ConfigurationSection config, String parentKey) {
-+
-+ JSONObject object = new JSONObject();
-+ for (String key : config.getKeys(false)) {
-+ String fullKey = (parentKey != null ? parentKey + "." + key : key);
-+ if (fullKey.equals("database") || fullKey.equals("settings.bungeecord-addresses") || TimingsManager.hiddenConfigs.contains(fullKey) || key.startsWith("seed-") || key.equals("worldeditregentempworld")) {
-+ continue;
-+ }
-+ final Object val = config.get(key);
-+
-+ object.put(key, valAsJSON(val, fullKey));
-+ }
-+ return object;
-+ }
-+
-+ private static Object valAsJSON(Object val, final String parentKey) {
-+ if (!(val instanceof MemorySection)) {
-+ if (val instanceof List) {
-+ Iterable<Object> v = (Iterable<Object>) val;
-+ return toArrayMapper(v, input -> valAsJSON(input, parentKey));
-+ } else {
-+ return String.valueOf(val);
-+ }
-+ } else {
-+ return mapAsJSON((ConfigurationSection) val, parentKey);
-+ }
-+ }
-+
-+ @Override
-+ public void run() {
-+ out.put("data", toArrayMapper(history, TimingHistory::export));
-+
-+
-+ String response = null;
-+ String timingsURL = null;
-+ try {
-+ HttpURLConnection con = (HttpURLConnection) new URL(TimingsManager.url + "post").openConnection();
-+ con.setDoOutput(true);
-+ String hostName = "BrokenHost";
-+ try {
-+ hostName = InetAddress.getLocalHost().getHostName();
-+ } catch (Exception ignored) {}
-+ con.setRequestProperty("User-Agent", "Paper/" + Bukkit.getUnsafe().getTimingsServerName() + "/" + hostName);
-+ con.setRequestMethod("POST");
-+ con.setInstanceFollowRedirects(false);
-+
-+ OutputStream request = new GZIPOutputStream(con.getOutputStream()) {{
-+ this.def.setLevel(7);
-+ }};
-+
-+ request.write(JSONValue.toJSONString(out).getBytes("UTF-8"));
-+ request.close();
-+
-+ response = getResponse(con);
-+
-+ if (con.getResponseCode() != 302) {
-+ listeners.sendMessage(text( "Upload Error: " + con.getResponseCode() + ": " + con.getResponseMessage(), NamedTextColor.RED));
-+ listeners.sendMessage(text("Check your logs for more information", NamedTextColor.RED));
-+ if (response != null) {
-+ Bukkit.getLogger().log(Level.SEVERE, response);
-+ }
-+ return;
-+ }
-+
-+ timingsURL = con.getHeaderField("Location");
-+ listeners.sendMessage(text("View Timings Report: ", NamedTextColor.GREEN).append(text(timingsURL).clickEvent(ClickEvent.clickEvent(ClickEvent.Action.OPEN_URL, timingsURL))));
-+
-+ if (response != null && !response.isEmpty()) {
-+ Bukkit.getLogger().log(Level.INFO, "Timing Response: " + response);
-+ }
-+ } catch (IOException ex) {
-+ listeners.sendMessage(text("Error uploading timings, check your logs for more information", NamedTextColor.RED));
-+ if (response != null) {
-+ Bukkit.getLogger().log(Level.SEVERE, response);
-+ }
-+ Bukkit.getLogger().log(Level.SEVERE, "Could not paste timings", ex);
-+ } finally {
-+ this.listeners.done(timingsURL);
-+ }
-+ }
-+
-+ private String getResponse(HttpURLConnection con) throws IOException {
-+ InputStream is = null;
-+ try {
-+ is = con.getInputStream();
-+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
-+
-+ byte[] b = new byte[1024];
-+ int bytesRead;
-+ while ((bytesRead = is.read(b)) != -1) {
-+ bos.write(b, 0, bytesRead);
-+ }
-+ return bos.toString();
-+
-+ } catch (IOException ex) {
-+ listeners.sendMessage(text("Error uploading timings, check your logs for more information", NamedTextColor.RED));
-+ Bukkit.getLogger().log(Level.WARNING, con.getResponseMessage(), ex);
-+ return null;
-+ } finally {
-+ if (is != null) {
-+ is.close();
-+ }
-+ }
-+ }
-+}
-diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
-new file mode 100644
-index 0000000000000000000000000000000000000000..2f0d9b953802dee821cfde82d22b0567cce8ee91
---- /dev/null
-+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
-@@ -0,0 +1,120 @@
-+package co.aikar.timings;
-+
-+import net.minecraft.server.level.ServerLevel;
-+import net.minecraft.world.level.Level;
-+import net.minecraft.world.level.storage.PrimaryLevelData;
-+
-+/**
-+ * Set of timers per world, to track world specific timings.
-+ */
-+// TODO: Re-implement missing timers
-+@Deprecated(forRemoval = true)
-+public class WorldTimingsHandler {
-+ public final Timing mobSpawn;
-+ public final Timing doChunkUnload;
-+ public final Timing doPortalForcer;
-+ public final Timing scheduledBlocks;
-+ public final Timing scheduledBlocksCleanup;
-+ public final Timing scheduledBlocksTicking;
-+ public final Timing chunkTicks;
-+ public final Timing lightChunk;
-+ public final Timing chunkTicksBlocks;
-+ public final Timing doVillages;
-+ public final Timing doChunkMap;
-+ public final Timing doChunkMapUpdate;
-+ public final Timing doChunkMapToUpdate;
-+ public final Timing doChunkMapSortMissing;
-+ public final Timing doChunkMapSortSendToPlayers;
-+ public final Timing doChunkMapPlayersNeedingChunks;
-+ public final Timing doChunkMapPendingSendToPlayers;
-+ public final Timing doChunkMapUnloadChunks;
-+ public final Timing doChunkGC;
-+ public final Timing doSounds;
-+ public final Timing entityRemoval;
-+ public final Timing entityTick;
-+ public final Timing tileEntityTick;
-+ public final Timing tileEntityPending;
-+ public final Timing tracker1;
-+ public final Timing tracker2;
-+ public final Timing doTick;
-+ public final Timing tickEntities;
-+ public final Timing chunks;
-+ public final Timing newEntities;
-+ public final Timing raids;
-+ public final Timing chunkProviderTick;
-+ public final Timing broadcastChunkUpdates;
-+ public final Timing countNaturalMobs;
-+
-+ public final Timing chunkLoad;
-+ public final Timing chunkLoadPopulate;
-+ public final Timing syncChunkLoad;
-+ public final Timing chunkLoadLevelTimer;
-+ public final Timing chunkIO;
-+ public final Timing chunkPostLoad;
-+ public final Timing worldSave;
-+ public final Timing worldSaveChunks;
-+ public final Timing worldSaveLevel;
-+ public final Timing chunkSaveData;
-+
-+
-+ public final Timing miscMobSpawning;
-+
-+ public WorldTimingsHandler(Level server) {
-+ String name = ((PrimaryLevelData) server.getLevelData()).getLevelName() + " - ";
-+
-+ mobSpawn = Timings.ofSafe(name + "mobSpawn");
-+ doChunkUnload = Timings.ofSafe(name + "doChunkUnload");
-+ scheduledBlocks = Timings.ofSafe(name + "Scheduled Blocks");
-+ scheduledBlocksCleanup = Timings.ofSafe(name + "Scheduled Blocks - Cleanup");
-+ scheduledBlocksTicking = Timings.ofSafe(name + "Scheduled Blocks - Ticking");
-+ chunkTicks = Timings.ofSafe(name + "Chunk Ticks");
-+ lightChunk = Timings.ofSafe(name + "Light Chunk");
-+ chunkTicksBlocks = Timings.ofSafe(name + "Chunk Ticks - Blocks");
-+ doVillages = Timings.ofSafe(name + "doVillages");
-+ doChunkMap = Timings.ofSafe(name + "doChunkMap");
-+ doChunkMapUpdate = Timings.ofSafe(name + "doChunkMap - Update");
-+ doChunkMapToUpdate = Timings.ofSafe(name + "doChunkMap - To Update");
-+ doChunkMapSortMissing = Timings.ofSafe(name + "doChunkMap - Sort Missing");
-+ doChunkMapSortSendToPlayers = Timings.ofSafe(name + "doChunkMap - Sort Send To Players");
-+ doChunkMapPlayersNeedingChunks = Timings.ofSafe(name + "doChunkMap - Players Needing Chunks");
-+ doChunkMapPendingSendToPlayers = Timings.ofSafe(name + "doChunkMap - Pending Send To Players");
-+ doChunkMapUnloadChunks = Timings.ofSafe(name + "doChunkMap - Unload Chunks");
-+ doSounds = Timings.ofSafe(name + "doSounds");
-+ doChunkGC = Timings.ofSafe(name + "doChunkGC");
-+ doPortalForcer = Timings.ofSafe(name + "doPortalForcer");
-+ entityTick = Timings.ofSafe(name + "entityTick");
-+ entityRemoval = Timings.ofSafe(name + "entityRemoval");
-+ tileEntityTick = Timings.ofSafe(name + "tileEntityTick");
-+ tileEntityPending = Timings.ofSafe(name + "tileEntityPending");
-+
-+ chunkLoad = Timings.ofSafe(name + "Chunk Load");
-+ chunkLoadPopulate = Timings.ofSafe(name + "Chunk Load - Populate");
-+ syncChunkLoad = Timings.ofSafe(name + "Sync Chunk Load");
-+ chunkLoadLevelTimer = Timings.ofSafe(name + "Chunk Load - Load Level");
-+ chunkIO = Timings.ofSafe(name + "Chunk Load - DiskIO");
-+ chunkPostLoad = Timings.ofSafe(name + "Chunk Load - Post Load");
-+ worldSave = Timings.ofSafe(name + "World Save");
-+ worldSaveLevel = Timings.ofSafe(name + "World Save - Level");
-+ worldSaveChunks = Timings.ofSafe(name + "World Save - Chunks");
-+ chunkSaveData = Timings.ofSafe(name + "Chunk Save - Data");
-+
-+ tracker1 = Timings.ofSafe(name + "tracker stage 1");
-+ tracker2 = Timings.ofSafe(name + "tracker stage 2");
-+ doTick = Timings.ofSafe(name + "doTick");
-+ tickEntities = Timings.ofSafe(name + "tickEntities");
-+
-+ chunks = Timings.ofSafe(name + "Chunks");
-+ newEntities = Timings.ofSafe(name + "New entity registration");
-+ raids = Timings.ofSafe(name + "Raids");
-+ chunkProviderTick = Timings.ofSafe(name + "Chunk provider tick");
-+ broadcastChunkUpdates = Timings.ofSafe(name + "Broadcast chunk updates");
-+ countNaturalMobs = Timings.ofSafe(name + "Count natural mobs");
-+
-+
-+ miscMobSpawning = Timings.ofSafe(name + "Mob spawning - Misc");
-+ }
-+
-+ public static Timing getTickList(ServerLevel worldserver, String timingsType) {
-+ return Timings.ofSafe(((PrimaryLevelData) worldserver.getLevelData()).getLevelName() + " - Scheduled " + timingsType);
-+ }
-+}
-diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
-index f7197f1347251a37dd0f6d9ffa2f09bc3a4e1233..d0d36a57ec4896bcb74970f8fb24d8f3e17db133 100644
---- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
-+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
-@@ -31,7 +31,8 @@ public class PacketUtils {
- engine.executeIfPossible(() -> {
- if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
- if (listener.shouldHandleMessage(packet)) {
-- try {
-+ co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
-+ try (co.aikar.timings.Timing ignored = timing.startTiming()) { // Paper - timings
- packet.handle(listener);
- } catch (Exception exception) {
- if (exception instanceof ReportedException) {
-diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 3322865949fe5ddaab2dffc39260b75093f0f204..a76e2f5d29315d21212ff121f0047bf1140ad5ef 100644
---- a/src/main/java/net/minecraft/server/MinecraftServer.java
-+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -203,7 +203,7 @@ import org.bukkit.craftbukkit.Main;
- import org.bukkit.event.server.ServerLoadEvent;
- // CraftBukkit end
-
--import org.bukkit.craftbukkit.SpigotTimings; // Spigot
-+import co.aikar.timings.MinecraftTimings; // Paper
-
- public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource {
-
-@@ -926,6 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- }
-
- MinecraftServer.LOGGER.info("Stopping server");
-+ MinecraftTimings.stopServer(); // Paper
- // CraftBukkit start
- if (this.server != null) {
- this.server.disablePlugins();
-@@ -1228,9 +1229,21 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
-
- private boolean haveTime() {
- // CraftBukkit start
-+ if (isOversleep) return canOversleep(); // Paper - because of our changes, this logic is broken
- return this.forceTicks || this.runningTask() || Util.getNanos() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTimeNanos : this.nextTickTimeNanos);
- }
-
-+ // Paper start
-+ boolean isOversleep = false;
-+ private boolean canOversleep() {
-+ return this.mayHaveDelayedTasks && Util.getNanos() < this.delayedTasksMaxNextTickTimeNanos;
-+ }
-+
-+ private boolean canSleepForTickNoOversleep() {
-+ return this.forceTicks || this.runningTask() || Util.getNanos() < this.nextTickTimeNanos;
-+ }
-+ // Paper end
-+
- private void executeModerately() {
- this.runAllTasks();
- java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
-@@ -1259,12 +1272,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- }
-
- protected void waitUntilNextTick() {
-- this.runAllTasks();
-+ //this.runAllTasks(); // Paper - move this into the tick method for timings
- this.waitingForNextTick = true;
-
- try {
- this.managedBlock(() -> {
-- return !this.haveTime();
-+ return !this.canSleepForTickNoOversleep(); // Paper - move oversleep into full server tick
- });
- } finally {
- this.waitingForNextTick = false;
-@@ -1371,6 +1384,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
-
- public void tickServer(BooleanSupplier shouldKeepTicking) {
- org.spigotmc.WatchdogThread.tick(); // Spigot
-+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.startTiming(); // Paper
- long i = Util.getNanos();
- int j = this.pauseWhileEmptySeconds() * 20;
-
-@@ -1393,7 +1407,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- }
- }
-
-- SpigotTimings.serverTickTimer.startTiming(); // Spigot
-+ // Paper start - move oversleep into full server tick
-+ isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
-+ this.managedBlock(() -> {
-+ return !this.canOversleep();
-+ });
-+ isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
-+ // Paper end
-+
- ++this.tickCount;
- this.tickRateManager.tick();
- this.tickChildren(shouldKeepTicking);
-@@ -1409,6 +1430,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
-
- ProfilerFiller gameprofilerfiller = Profiler.get();
-
-+ // Paper start - move executeAll() into full server tick timing
-+ try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
-+ this.runAllTasks();
-+ }
-+ // Paper end
- gameprofilerfiller.push("tallying");
- long k = Util.getNanos() - i;
- int l = this.tickCount % 100;
-@@ -1419,13 +1445,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) k / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
- this.logTickMethodTime(i);
- gameprofilerfiller.pop();
-- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
-- org.spigotmc.CustomTimingsHandler.tick(); // Spigot
-+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
- }
-
- private void autoSave() {
- this.ticksUntilAutosave = this.autosavePeriod; // CraftBukkit
-- SpigotTimings.worldSaveTimer.startTiming(); // Spigot
- MinecraftServer.LOGGER.debug("Autosave started");
- ProfilerFiller gameprofilerfiller = Profiler.get();
-
-@@ -1433,7 +1457,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- this.saveEverything(true, false, false);
- gameprofilerfiller.pop();
- MinecraftServer.LOGGER.debug("Autosave finished");
-- SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
- }
-
- private void logTickMethodTime(long tickStartTime) {
-@@ -1506,26 +1529,26 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- this.getPlayerList().getPlayers().forEach((entityplayer) -> {
- entityplayer.connection.suspendFlushing();
- });
-- SpigotTimings.schedulerTimer.startTiming(); // Spigot
-+ MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
- this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
-- SpigotTimings.schedulerTimer.stopTiming(); // Spigot
-+ MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
- io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
- gameprofilerfiller.push("commandFunctions");
-- SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
-+ MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
- this.getFunctions().tick();
-- SpigotTimings.commandFunctionsTimer.stopTiming(); // Spigot
-+ MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
- gameprofilerfiller.popPush("levels");
- Iterator iterator = this.getAllLevels().iterator();
-
- // CraftBukkit start
- // Run tasks that are waiting on processing
-- SpigotTimings.processQueueTimer.startTiming(); // Spigot
-+ MinecraftTimings.processQueueTimer.startTiming(); // Spigot
- while (!this.processQueue.isEmpty()) {
- this.processQueue.remove().run();
- }
-- SpigotTimings.processQueueTimer.stopTiming(); // Spigot
-+ MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
-
-- SpigotTimings.timeUpdateTimer.startTiming(); // Spigot
-+ MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
- // 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) {
-@@ -1533,7 +1556,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
- }
- }
-- SpigotTimings.timeUpdateTimer.stopTiming(); // Spigot
-+ MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
-
- while (iterator.hasNext()) {
- ServerLevel worldserver = (ServerLevel) iterator.next();
-@@ -1569,24 +1592,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- }
-
- gameprofilerfiller.popPush("connection");
-- SpigotTimings.connectionTimer.startTiming(); // Spigot
-+ MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
- this.tickConnection();
-- SpigotTimings.connectionTimer.stopTiming(); // Spigot
-+ MinecraftTimings.connectionTimer.stopTiming(); // Spigot // Paper
- gameprofilerfiller.popPush("players");
-- SpigotTimings.playerListTimer.startTiming(); // Spigot
-+ MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
- this.playerList.tick();
-- SpigotTimings.playerListTimer.stopTiming(); // Spigot
-+ MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
- if (SharedConstants.IS_RUNNING_IN_IDE && this.tickRateManager.runsNormally()) {
- GameTestTicker.SINGLETON.tick();
- }
-
- gameprofilerfiller.popPush("server gui refresh");
-
-- SpigotTimings.tickablesTimer.startTiming(); // Spigot
-+ MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper
- for (int i = 0; i < this.tickables.size(); ++i) {
- ((Runnable) this.tickables.get(i)).run();
- }
-- SpigotTimings.tickablesTimer.stopTiming(); // Spigot
-+ MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper
-
- gameprofilerfiller.popPush("send chunks");
- iterator = this.playerList.getPlayers().iterator();
-diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 9d6be455c3bbcdbcb9d3d24b0bad79f46ba6a8cb..de6cceeec4fc4a64d325b506ae9d9b0e0e0d90ff 100644
---- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -64,10 +64,11 @@ import org.apache.logging.log4j.Level;
- import org.apache.logging.log4j.LogManager;
- import org.apache.logging.log4j.io.IoBuilder;
- import org.bukkit.command.CommandSender;
--import org.bukkit.craftbukkit.SpigotTimings; // Spigot
-+import co.aikar.timings.MinecraftTimings; // Paper
- import org.bukkit.craftbukkit.util.TerminalCompletionHandler;
- import org.bukkit.craftbukkit.util.TerminalConsoleWriterThread;
- import org.bukkit.event.server.ServerCommandEvent;
-+import org.bukkit.craftbukkit.util.Waitable; // Paper
- import org.bukkit.event.server.RemoteServerCommandEvent;
- // CraftBukkit end
-
-@@ -421,7 +422,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
- }
-
- public void handleConsoleInputs() {
-- SpigotTimings.serverCommandTimer.startTiming(); // Spigot
-+ MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
- while (!this.consoleInput.isEmpty()) {
- ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
-
-@@ -436,7 +437,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
- // CraftBukkit end
- }
-
-- SpigotTimings.serverCommandTimer.stopTiming(); // Spigot
-+ MinecraftTimings.serverCommandTimer.stopTiming(); // Spigot
- }
-
- @Override
-@@ -694,7 +695,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
- }
-
- public String runCommand(RconConsoleSource rconConsoleSource, String s) {
-+ Waitable[] waitableArray = new Waitable[1]; // Paper
- rconConsoleSource.prepareForCommand();
-+ final java.util.concurrent.atomic.AtomicReference<String> command = new java.util.concurrent.atomic.AtomicReference<>(s); // Paper
- this.executeBlocking(() -> {
- CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
- RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
-@@ -702,9 +705,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
- if (event.isCancelled()) {
- return;
- }
-+ // Paper start
-+ command.set(event.getCommand());
-+ if (event.getCommand().toLowerCase(java.util.Locale.ROOT).startsWith("timings") && event.getCommand().toLowerCase(java.util.Locale.ROOT).matches("timings (report|paste|get|merged|seperate)")) {
-+ org.bukkit.command.BufferedCommandSender sender = new org.bukkit.command.BufferedCommandSender();
-+ Waitable<String> waitable = new Waitable<>() {
-+ @Override
-+ protected String evaluate() {
-+ return sender.getBuffer();
-+ }
-+ };
-+ waitableArray[0] = waitable;
-+ co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable));
-+ } else {
-+ // Paper end
- ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
- this.server.dispatchServerCommand(event.getSender(), serverCommand);
-+ } // Paper
- });
-+ // Paper start
-+ if (waitableArray[0] != null) {
-+ //noinspection unchecked
-+ Waitable<String> waitable = waitableArray[0];
-+ try {
-+ return waitable.get();
-+ } catch (java.util.concurrent.ExecutionException e) {
-+ throw new RuntimeException("Exception processing rcon command " + command.get(), e.getCause());
-+ } catch (InterruptedException e) {
-+ Thread.currentThread().interrupt(); // Maintain interrupted state
-+ throw new RuntimeException("Interrupted processing rcon command " + command.get(), e);
-+ }
-+
-+ }
-+ // Paper end
- return rconConsoleSource.getCommandResponse();
- // CraftBukkit end
- }
-diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 3bb6eaabe8f62b556a52b83227b48f8324a9d0f0..30b28d9523820ed138c837ab9ee9bbb23c0dd285 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 @@
- package net.minecraft.server.level;
-
-+import co.aikar.timings.Timing; // Paper
- import com.google.common.collect.ImmutableList;
- import com.google.common.collect.ImmutableList.Builder;
- import com.google.common.collect.Iterables;
-+import com.google.common.collect.ComparisonChain; // Paper
- import com.google.common.collect.Lists;
- import com.google.common.collect.Queues;
- import com.google.common.collect.Sets;
-@@ -1355,6 +1357,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();
-+ level.timings.tracker1.startTiming(); // Paper
-
- ChunkMap.TrackedEntity playerchunkmap_entitytracker;
-
-@@ -1379,14 +1382,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- playerchunkmap_entitytracker.serverEntity.sendChanges();
- }
- }
-+ level.timings.tracker1.stopTiming(); // Paper
-
- if (!list.isEmpty()) {
- objectiterator = this.entityMap.values().iterator();
-
-+ level.timings.tracker2.startTiming(); // Paper
- while (objectiterator.hasNext()) {
- playerchunkmap_entitytracker = (ChunkMap.TrackedEntity) objectiterator.next();
- playerchunkmap_entitytracker.updatePlayers(list);
- }
-+ level.timings.tracker2.stopTiming(); // Paper
- }
-
- }
-diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index c615510f3f59292715bcff1bd9e4e896c9733436..93422468474189343cdc1e29f06f6dfb12e4760a 100644
---- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -207,13 +207,15 @@ public class ServerChunkCache extends ChunkSource {
- }
-
- gameprofilerfiller.incrementCounter("getChunkCacheMiss");
-- this.level.timings.syncChunkLoadTimer.startTiming(); // Spigot
- CompletableFuture<ChunkResult<ChunkAccess>> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create);
- ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
-
- Objects.requireNonNull(completablefuture);
-+ if (!completablefuture.isDone()) { // Paper
-+ this.level.timings.syncChunkLoad.startTiming(); // Paper
- chunkproviderserver_b.managedBlock(completablefuture::isDone);
-- this.level.timings.syncChunkLoadTimer.stopTiming(); // Spigot
-+ this.level.timings.syncChunkLoad.stopTiming(); // Paper
-+ } // Paper
- ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
- ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
-
-@@ -382,7 +384,9 @@ public class ServerChunkCache extends ChunkSource {
-
- public void save(boolean flush) {
- this.runDistanceManagerUpdates();
-+ try (co.aikar.timings.Timing timed = level.timings.chunkSaveData.startTiming()) { // Paper - Timings
- this.chunkMap.saveAllChunks(flush);
-+ } // Paper - Timings
- }
-
- @Override
-@@ -429,10 +433,10 @@ public class ServerChunkCache extends ChunkSource {
- this.level.timings.doChunkMap.stopTiming(); // Spigot
- gameprofilerfiller.popPush("chunks");
- if (tickChunks) {
-+ this.level.timings.chunks.startTiming(); // Paper - timings
- this.tickChunks();
-- this.level.timings.tracker.startTiming(); // Spigot
-+ this.level.timings.chunks.stopTiming(); // Paper - timings
- this.chunkMap.tick();
-- this.level.timings.tracker.stopTiming(); // Spigot
- }
-
- this.level.timings.doChunkUnload.startTiming(); // Spigot
-@@ -481,7 +485,9 @@ public class ServerChunkCache extends ChunkSource {
- LevelChunk chunk = playerchunk.getTickingChunk();
-
- if (chunk != null) {
-+ this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing
- playerchunk.broadcastChanges(chunk);
-+ this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing
- }
- }
-
-@@ -502,8 +508,10 @@ public class ServerChunkCache extends ChunkSource {
-
- private void tickChunks(ProfilerFiller profiler, long timeDelta, List<LevelChunk> chunks) {
- profiler.popPush("naturalSpawnCount");
-+ this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
- int j = this.distanceManager.getNaturalSpawnChunkCount();
- NaturalSpawner.SpawnState spawnercreature_d = NaturalSpawner.createState(j, this.level.getAllEntities(), this::getFullChunk, new LocalMobCapCalculator(this.chunkMap));
-+ this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
-
- this.lastSpawnState = spawnercreature_d;
- profiler.popPush("spawnAndTick");
-@@ -531,15 +539,17 @@ public class ServerChunkCache extends ChunkSource {
- }
-
- if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
-- this.level.timings.doTickTiles.startTiming(); // Spigot
- this.level.tickChunk(chunk, k);
-- this.level.timings.doTickTiles.stopTiming(); // Spigot
- }
- }
-
-+ this.level.timings.chunkTicks.stopTiming(); // Paper
-+
- profiler.popPush("customSpawners");
- if (flag) {
-+ try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings
- this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
-+ }
- }
-
- }
-diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index c6ded1ac73ddbc0336000f77c0f99fa20551a0de..a1565304c436258b561d97a6cc7aacecf68816b7 100644
---- a/src/main/java/net/minecraft/server/level/ServerLevel.java
-+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1,6 +1,8 @@
- package net.minecraft.server.level;
-
- import com.google.common.annotations.VisibleForTesting;
-+import co.aikar.timings.TimingHistory; // Paper
-+import co.aikar.timings.Timings; // Paper
- import com.google.common.collect.Lists;
- import com.mojang.datafixers.DataFixer;
- import com.mojang.datafixers.util.Pair;
-@@ -176,7 +178,6 @@ import net.minecraft.world.ticks.LevelTicks;
- import org.slf4j.Logger;
- import org.bukkit.Bukkit;
- import org.bukkit.WeatherType;
--import org.bukkit.craftbukkit.SpigotTimings; // Spigot
- import org.bukkit.craftbukkit.event.CraftEventFactory;
- import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
- import org.bukkit.craftbukkit.util.WorldUUID;
-@@ -469,7 +470,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
- }
-
- gameprofilerfiller.push("tickPending");
-- this.timings.doTickPending.startTiming(); // Spigot
-+ this.timings.scheduledBlocks.startTiming(); // Paper
- if (!this.isDebug() && flag) {
- j = this.getGameTime();
- gameprofilerfiller.push("blockTicks");
-@@ -478,15 +479,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
- this.fluidTicks.tick(j, 65536, this::tickFluid);
- gameprofilerfiller.pop();
- }
-- this.timings.doTickPending.stopTiming(); // Spigot
-+ this.timings.scheduledBlocks.stopTiming(); // Paper
-
- gameprofilerfiller.popPush("raid");
- if (flag) {
-+ this.timings.raids.startTiming(); // Paper - timings
- this.raids.tick();
-+ this.timings.raids.stopTiming(); // Paper - timings
- }
-
- gameprofilerfiller.popPush("chunkSource");
-+ this.timings.chunkProviderTick.startTiming(); // Paper - timings
- this.getChunkSource().tick(shouldKeepTicking, true);
-+ this.timings.chunkProviderTick.stopTiming(); // Paper - timings
- gameprofilerfiller.popPush("blockEvents");
- if (flag) {
- this.timings.doSounds.startTiming(); // Spigot
-@@ -635,6 +640,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
- }
-
- gameprofilerfiller.popPush("tickBlocks");
-+ timings.chunkTicksBlocks.startTiming(); // Paper
- if (randomTickSpeed > 0) {
- LevelChunkSection[] achunksection = chunk.getSections();
-
-@@ -667,6 +673,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
- }
- }
-
-+ timings.chunkTicksBlocks.stopTiming(); // Paper
- gameprofilerfiller.pop();
- }
-
-@@ -944,14 +951,22 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
- }
-
- public void tickNonPassenger(Entity entity) {
-+ ++TimingHistory.entityTicks; // Paper - timings
- // Spigot start
-+ co.aikar.timings.Timing timer; // Paper
- if (!org.spigotmc.ActivationRange.checkIfActive(entity)) {
- entity.tickCount++;
-+ timer = entity.getType().inactiveTickTimer.startTiming(); try { // Paper - timings
- entity.inactiveTick();
-+ } finally { timer.stopTiming(); } // Paper
- return;
- }
- // Spigot end
-- entity.tickTimer.startTiming(); // Spigot
-+ // Paper start- timings
-+ TimingHistory.activatedEntityTicks++;
-+ timer = entity.getVehicle() != null ? entity.getType().passengerTickTimer.startTiming() : entity.getType().tickTimer.startTiming();
-+ try {
-+ // Paper end - timings
- entity.setOldPosAndRot();
- ProfilerFiller gameprofilerfiller = Profiler.get();
-
-@@ -970,7 +985,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
-
- this.tickPassenger(entity, entity1);
- }
-- entity.tickTimer.stopTiming(); // Spigot
-+ } finally { timer.stopTiming(); } // Paper - timings
-
- }
-
-@@ -1012,6 +1027,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
-
- if (!savingDisabled) {
- org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
-+ try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
- if (progressListener != null) {
- progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
- }
-@@ -1021,7 +1037,10 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
- progressListener.progressStage(Component.translatable("menu.savingChunks"));
- }
-
-+ timings.worldSaveChunks.startTiming(); // Paper
- chunkproviderserver.save(flush);
-+ timings.worldSaveChunks.stopTiming(); // Paper
-+ }// Paper
- if (flush) {
- this.entityManager.saveAll();
- } else {
-diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 18d56058073b6cc4f9020f0a6137e4ac26eed0b2..d8fd2103a40d278c7ee4135c19dea3eb4534dda8 100644
---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -339,7 +339,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
-
- @Override
- public void tick() {
-- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.startTiming(); // Spigot
- if (this.ackBlockChangesUpTo > -1) {
- this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
- this.ackBlockChangesUpTo = -1;
-@@ -395,7 +394,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
- this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"));
- }
-- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot
-
- }
-
-@@ -2122,7 +2120,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- }
-
- private void handleCommand(String s) {
-- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
-+ co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper
- if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
- this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
-
-@@ -2132,7 +2130,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- this.cserver.getPluginManager().callEvent(event);
-
- if (event.isCancelled()) {
-- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
-+ co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
- return;
- }
-
-@@ -2145,7 +2143,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- return;
- } finally {
-- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
-+ co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
- }
- }
- // CraftBukkit end
-diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 56f046bac04205a813441907058c4ce21982d927..b103d49458330be9f7fb3382c764b204a02a925a 100644
---- a/src/main/java/net/minecraft/server/players/PlayerList.java
-+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1,5 +1,6 @@
- package net.minecraft.server.players;
-
-+import co.aikar.timings.MinecraftTimings;
- import com.google.common.collect.Lists;
- import com.google.common.collect.Maps;
- import com.google.common.collect.Sets;
-@@ -976,10 +977,11 @@ public abstract class PlayerList {
- }
-
- public void saveAll() {
-+ MinecraftTimings.savePlayers.startTiming(); // Paper
- for (int i = 0; i < this.players.size(); ++i) {
- this.save((ServerPlayer) this.players.get(i));
- }
--
-+ MinecraftTimings.savePlayers.stopTiming(); // Paper
- }
-
- public UserWhiteList getWhiteList() {
-diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c594f9a88 100644
---- a/src/main/java/net/minecraft/world/entity/Entity.java
-+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -148,7 +148,6 @@ import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Hanging;
- import org.bukkit.entity.LivingEntity;
- import org.bukkit.entity.Vehicle;
--import org.spigotmc.CustomTimingsHandler; // Spigot
- import org.bukkit.event.entity.EntityCombustByEntityEvent;
- import org.bukkit.event.hanging.HangingBreakByEntityEvent;
- import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
-@@ -326,7 +325,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- // Marks an entity, that it was removed by a plugin via Entity#remove
- // Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
- public boolean pluginRemoved = false;
-- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot
- // Spigot start
- public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
- public final boolean defaultActivationState;
-@@ -866,7 +864,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- }
-
- public void move(MoverType type, Vec3 movement) {
-- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
- if (this.noPhysics) {
- this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
- } else {
-@@ -978,7 +975,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
- gameprofilerfiller.pop();
- }
- }
-- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
- }
-
- private void applyMovementEmissionAndPlaySound(Entity.MovementEmission moveEffect, Vec3 movement, BlockPos landingPos, BlockState landingState) {
-diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index 17ab230c95901f0533997ac117d5b3d852fcd467..970161efa46b3a71ddae665f9df5966c70fd3471 100644
---- a/src/main/java/net/minecraft/world/entity/EntityType.java
-+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -413,6 +413,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
- }
-
- public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, String translationKey, Optional<ResourceKey<LootTable>> lootTable, FeatureFlagSet requiredFeatures) {
-+ // Paper start
-+ this(factory, spawnGroup, saveable, summonable, fireImmune, spawnableFarFromPlayer, canSpawnInside, dimensions, spawnBoxScale, maxTrackDistance, trackTickInterval, translationKey, lootTable, requiredFeatures, "custom");
-+ }
-+ public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, String translationKey, Optional<ResourceKey<LootTable>> lootTable, FeatureFlagSet requiredFeatures, String id) {
-+ this.tickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "tick");
-+ this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick");
-+ this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick");
-+ this.passengerInactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerInactiveTick");
-+ // Paper end
- this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this);
- this.factory = factory;
- this.category = spawnGroup;
-@@ -720,6 +729,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
- return this.updateInterval;
- }
-
-+ // Paper start - timings
-+ public final co.aikar.timings.Timing tickTimer;
-+ public final co.aikar.timings.Timing inactiveTickTimer;
-+ public final co.aikar.timings.Timing passengerTickTimer;
-+ public final co.aikar.timings.Timing passengerInactiveTickTimer;
-+ // Paper end
- public boolean trackDeltas() {
- return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS;
- }
-diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6cc86412d45186dff312d9b1246fd1d03dbc15d8 100644
---- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
-+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -162,7 +162,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
- import org.bukkit.event.player.PlayerItemConsumeEvent;
- // CraftBukkit end
-
--import org.bukkit.craftbukkit.SpigotTimings; // Spigot
-+import co.aikar.timings.MinecraftTimings; // Paper
-
- public abstract class LivingEntity extends Entity implements Attackable {
-
-@@ -3090,7 +3090,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
-
- @Override
- public void tick() {
-- SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
- super.tick();
- this.updatingUsingItem();
- this.updateSwimAmount();
-@@ -3132,9 +3131,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
- }
-
- if (!this.isRemoved()) {
-- SpigotTimings.timerEntityBaseTick.stopTiming(); // Spigot
- this.aiStep();
-- SpigotTimings.timerEntityTickRest.startTiming(); // Spigot
- }
-
- double d0 = this.getX() - this.xo;
-@@ -3228,7 +3225,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
- }
-
- this.elytraAnimationState.tick();
-- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
- }
-
- public void detectEquipmentUpdatesPublic() { // CraftBukkit
-@@ -3435,7 +3431,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
- ProfilerFiller gameprofilerfiller = Profiler.get();
-
- gameprofilerfiller.push("ai");
-- SpigotTimings.timerEntityAI.startTiming(); // Spigot
- if (this.isImmobile()) {
- this.jumping = false;
- this.xxa = 0.0F;
-@@ -3445,7 +3440,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
- this.serverAiStep();
- gameprofilerfiller.pop();
- }
-- SpigotTimings.timerEntityAI.stopTiming(); // Spigot
-
- gameprofilerfiller.pop();
- gameprofilerfiller.push("jump");
-@@ -3488,7 +3482,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
- this.resetFallDistance();
- }
-
-- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
- label112:
- {
- LivingEntity entityliving = this.getControllingPassenger();
-@@ -3502,7 +3495,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
-
- this.travel(vec3d1);
- }
-- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
-
- if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
- this.applyEffectsFromBlocks();
-@@ -3538,9 +3530,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
- this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
- }
-
-- SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
- this.pushEntities();
-- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
- gameprofilerfiller.pop();
- world = this.level();
- if (world instanceof ServerLevel worldserver) {
-diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 3fb17bbcecf6dc4af3b231835adff25f86e1379f..5df862e026e15e10e2fcc7c5a49e8a8022125579 100644
---- a/src/main/java/net/minecraft/world/level/Level.java
-+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -95,7 +95,6 @@ import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePa
- import org.bukkit.Bukkit;
- import org.bukkit.craftbukkit.CraftServer;
- import org.bukkit.craftbukkit.CraftWorld;
--import org.bukkit.craftbukkit.SpigotTimings; // Spigot
- import org.bukkit.craftbukkit.block.CapturedBlockState;
- import org.bukkit.craftbukkit.block.CraftBlockState;
- import org.bukkit.craftbukkit.block.data.CraftBlockData;
-@@ -165,7 +164,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
- }
- // Paper end - add paper world config
-
-- public final SpigotTimings.WorldTimingsHandler timings; // Spigot
-+ public final co.aikar.timings.WorldTimingsHandler timings; // Paper
- public static BlockPos lastPhysicsProblem; // Spigot
- private org.spigotmc.TickLimiter entityLimiter;
- private org.spigotmc.TickLimiter tileLimiter;
-@@ -259,7 +258,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
- public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
- });
- // CraftBukkit end
-- this.timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
-+ this.timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
- this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
- this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
- }
-@@ -725,15 +724,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
-
- this.timings.tileEntityTick.stopTiming(); // Spigot
- this.tickingBlockEntities = false;
-+ co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
- gameprofilerfiller.pop();
- this.spigotConfig.currentPrimedTnt = 0; // Spigot
- }
-
- public <T extends Entity> void guardEntityTick(Consumer<T> tickConsumer, T entity) {
- try {
-- SpigotTimings.tickEntityTimer.startTiming(); // Spigot
- tickConsumer.accept(entity);
-- SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
- } catch (Throwable throwable) {
- CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
- CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
-diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index 27cbec37c6ea278232970ae035795fdecca71735..3cefda12d4c2ca2c4e9ef97eff961a55af164d6b 100644
---- a/src/main/java/net/minecraft/world/level/block/Block.java
-+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -88,6 +88,15 @@ public class Block extends BlockBehaviour implements ItemLike {
- public static final int UPDATE_LIMIT = 512;
- protected final StateDefinition<Block, BlockState> stateDefinition;
- private BlockState defaultBlockState;
-+ // Paper start
-+ public co.aikar.timings.Timing timing;
-+ public co.aikar.timings.Timing getTiming() {
-+ if (timing == null) {
-+ timing = co.aikar.timings.MinecraftTimings.getBlockTiming(this);
-+ }
-+ return timing;
-+ }
-+ // Paper end
- @Nullable
- private Item item;
- private static final int CACHE_SIZE = 256;
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 4c3bc3a495990bc486fce7ba1758bf731c3baf02..9afe509b3455a7aabd11976fb8a7430d1bce065d 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -34,10 +34,12 @@ import org.bukkit.inventory.InventoryHolder;
- // CraftBukkit end
-
- import org.spigotmc.CustomTimingsHandler; // Spigot
-+import co.aikar.timings.MinecraftTimings; // Paper
-+import co.aikar.timings.Timing; // Paper
-
- public abstract class BlockEntity {
-
-- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
-+ public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
- // CraftBukkit start - data containers
- private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
- public CraftPersistentDataContainer persistentDataContainer;
-diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index d76591694c3b167b8b8f17b61a373a43140a8b68..717e4bf9f5ee0ec2c3a0b5cc65a50b0f6d649a8d 100644
---- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -627,6 +627,7 @@ public class LevelChunk extends ChunkAccess {
- server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration));
-
- if (this.needsDecoration) {
-+ try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper
- this.needsDecoration = false;
- java.util.Random random = new java.util.Random();
- random.setSeed(this.level.getSeed());
-@@ -646,6 +647,7 @@ public class LevelChunk extends ChunkAccess {
- }
- }
- server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
-+ } // Paper
- }
- }
- }
-diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java b/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
-index d1b82dec25069a7027aaf53086b1829e511fc301..4367ccc628bb4f404d6a081083002518442f462b 100644
---- a/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
-+++ b/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
-@@ -576,15 +576,12 @@ public record SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chun
- @Nullable
- private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel world, List<CompoundTag> entities, List<CompoundTag> blockEntities) {
- return entities.isEmpty() && blockEntities.isEmpty() ? null : (chunk) -> {
-- world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
- if (!entities.isEmpty()) {
- world.addLegacyChunkEntities(EntityType.loadEntitiesRecursive(entities, world, EntitySpawnReason.LOAD));
- }
-- world.timings.syncChunkLoadEntitiesTimer.stopTiming(); // Spigot
-
- Iterator iterator = blockEntities.iterator();
-
-- world.timings.syncChunkLoadTileEntitiesTimer.startTiming(); // Spigot
- while (iterator.hasNext()) {
- CompoundTag nbttagcompound = (CompoundTag) iterator.next();
- boolean flag = nbttagcompound.getBoolean("keepPacked");
-@@ -600,7 +597,6 @@ public record SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chun
- }
- }
- }
-- world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
-
- };
- }
-diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 9bf8c4d9154c433e586f59587e8d7db7c310bb9c..232a21080ff416ac5b9fdf913f6784eb3bcdacfa 100644
---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -379,7 +379,7 @@ public final class CraftServer implements Server {
- this.saveCommandsConfig();
- this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
- this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
-- this.pluginManager.useTimings(this.configuration.getBoolean("settings.plugin-profiling"));
-+ //this.pluginManager.useTimings(this.configuration.getBoolean("settings.plugin-profiling")); // Paper - we already moved this
- this.overrideSpawnLimits();
- console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
- this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
-@@ -2636,12 +2636,31 @@ public final class CraftServer implements Server {
- private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
- {
-
-+ @Deprecated
- @Override
- public YamlConfiguration getConfig()
- {
- return org.spigotmc.SpigotConfig.config;
- }
-
-+ @Override
-+ public YamlConfiguration getBukkitConfig()
-+ {
-+ return configuration;
-+ }
-+
-+ @Override
-+ public YamlConfiguration getSpigotConfig()
-+ {
-+ return org.spigotmc.SpigotConfig.config;
-+ }
-+
-+ @Override
-+ public YamlConfiguration getPaperConfig()
-+ {
-+ return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
-+ }
-+
- @Override
- public void restart() {
- org.spigotmc.RestartCommand.restart();
-diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
-deleted file mode 100644
-index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..0000000000000000000000000000000000000000
---- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
-+++ /dev/null
-@@ -1,163 +0,0 @@
--package org.bukkit.craftbukkit;
--
--import java.util.HashMap;
--import net.minecraft.world.entity.Entity;
--import net.minecraft.world.level.Level;
--import net.minecraft.world.level.block.entity.BlockEntity;
--import net.minecraft.world.level.storage.PrimaryLevelData;
--import org.bukkit.craftbukkit.scheduler.CraftTask;
--import org.bukkit.plugin.java.JavaPluginLoader;
--import org.bukkit.scheduler.BukkitTask;
--import org.spigotmc.CustomTimingsHandler;
--
--public class SpigotTimings {
--
-- public static final CustomTimingsHandler serverTickTimer = new CustomTimingsHandler("** Full Server Tick");
-- public static final CustomTimingsHandler playerListTimer = new CustomTimingsHandler("Player List");
-- public static final CustomTimingsHandler commandFunctionsTimer = new CustomTimingsHandler("Command Functions");
-- public static final CustomTimingsHandler connectionTimer = new CustomTimingsHandler("Connection Handler");
-- public static final CustomTimingsHandler playerConnectionTimer = new CustomTimingsHandler("** PlayerConnection");
-- public static final CustomTimingsHandler tickablesTimer = new CustomTimingsHandler("Tickables");
-- public static final CustomTimingsHandler schedulerTimer = new CustomTimingsHandler("Scheduler");
-- public static final CustomTimingsHandler timeUpdateTimer = new CustomTimingsHandler("Time Update");
-- public static final CustomTimingsHandler serverCommandTimer = new CustomTimingsHandler("Server Command");
-- public static final CustomTimingsHandler worldSaveTimer = new CustomTimingsHandler("World Save");
--
-- public static final CustomTimingsHandler entityMoveTimer = new CustomTimingsHandler("** entityMove");
-- public static final CustomTimingsHandler tickEntityTimer = new CustomTimingsHandler("** tickEntity");
-- public static final CustomTimingsHandler activatedEntityTimer = new CustomTimingsHandler("** activatedTickEntity");
-- public static final CustomTimingsHandler tickTileEntityTimer = new CustomTimingsHandler("** tickTileEntity");
--
-- public static final CustomTimingsHandler timerEntityBaseTick = new CustomTimingsHandler("** livingEntityBaseTick");
-- public static final CustomTimingsHandler timerEntityAI = new CustomTimingsHandler("** livingEntityAI");
-- public static final CustomTimingsHandler timerEntityAICollision = new CustomTimingsHandler("** livingEntityAICollision");
-- public static final CustomTimingsHandler timerEntityAIMove = new CustomTimingsHandler("** livingEntityAIMove");
-- public static final CustomTimingsHandler timerEntityTickRest = new CustomTimingsHandler("** livingEntityTickRest");
--
-- public static final CustomTimingsHandler processQueueTimer = new CustomTimingsHandler("processQueue");
-- public static final CustomTimingsHandler schedulerSyncTimer = new CustomTimingsHandler("** Scheduler - Sync Tasks", JavaPluginLoader.pluginParentTimer);
--
-- public static final CustomTimingsHandler playerCommandTimer = new CustomTimingsHandler("** playerCommand");
--
-- public static final CustomTimingsHandler entityActivationCheckTimer = new CustomTimingsHandler("entityActivationCheck");
-- public static final CustomTimingsHandler checkIfActiveTimer = new CustomTimingsHandler("** checkIfActive");
--
-- public static final HashMap<String, CustomTimingsHandler> entityTypeTimingMap = new HashMap<String, CustomTimingsHandler>();
-- public static final HashMap<String, CustomTimingsHandler> tileEntityTypeTimingMap = new HashMap<String, CustomTimingsHandler>();
-- public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = new HashMap<String, CustomTimingsHandler>();
--
-- /**
-- * Gets a timer associated with a plugins tasks.
-- * @param task
-- * @param period
-- * @return
-- */
-- public static CustomTimingsHandler getPluginTaskTimings(BukkitTask task, long period) {
-- if (!task.isSync()) {
-- return null;
-- }
-- String plugin;
-- final CraftTask ctask = (CraftTask) task;
--
-- if (task.getOwner() != null) {
-- plugin = task.getOwner().getDescription().getFullName();
-- } else {
-- plugin = "Unknown";
-- }
-- String taskname = ctask.getTaskName();
--
-- String name = "Task: " + plugin + " Runnable: " + taskname;
-- if (period > 0) {
-- name += "(interval:" + period + ")";
-- } else {
-- name += "(Single)";
-- }
-- CustomTimingsHandler result = SpigotTimings.pluginTaskTimingMap.get(name);
-- if (result == null) {
-- result = new CustomTimingsHandler(name, SpigotTimings.schedulerSyncTimer);
-- SpigotTimings.pluginTaskTimingMap.put(name, result);
-- }
-- return result;
-- }
--
-- /**
-- * Get a named timer for the specified entity type to track type specific timings.
-- * @param entity
-- * @return
-- */
-- public static CustomTimingsHandler getEntityTimings(Entity entity) {
-- String entityType = entity.getClass().getName();
-- CustomTimingsHandler result = SpigotTimings.entityTypeTimingMap.get(entityType);
-- if (result == null) {
-- result = new CustomTimingsHandler("** tickEntity - " + entity.getClass().getSimpleName(), SpigotTimings.activatedEntityTimer);
-- SpigotTimings.entityTypeTimingMap.put(entityType, result);
-- }
-- return result;
-- }
--
-- /**
-- * Get a named timer for the specified tile entity type to track type specific timings.
-- * @param entity
-- * @return
-- */
-- public static CustomTimingsHandler getTileEntityTimings(BlockEntity entity) {
-- String entityType = entity.getClass().getName();
-- CustomTimingsHandler result = SpigotTimings.tileEntityTypeTimingMap.get(entityType);
-- if (result == null) {
-- result = new CustomTimingsHandler("** tickTileEntity - " + entity.getClass().getSimpleName(), SpigotTimings.tickTileEntityTimer);
-- SpigotTimings.tileEntityTypeTimingMap.put(entityType, result);
-- }
-- return result;
-- }
--
-- /**
-- * Set of timers per world, to track world specific timings.
-- */
-- public static class WorldTimingsHandler {
-- public final CustomTimingsHandler mobSpawn;
-- public final CustomTimingsHandler doChunkUnload;
-- public final CustomTimingsHandler doTickPending;
-- public final CustomTimingsHandler doTickTiles;
-- public final CustomTimingsHandler doChunkMap;
-- public final CustomTimingsHandler doSounds;
-- public final CustomTimingsHandler entityTick;
-- public final CustomTimingsHandler tileEntityTick;
-- public final CustomTimingsHandler tileEntityPending;
-- public final CustomTimingsHandler tracker;
-- public final CustomTimingsHandler doTick;
-- public final CustomTimingsHandler tickEntities;
--
-- public final CustomTimingsHandler syncChunkLoadTimer;
-- public final CustomTimingsHandler syncChunkLoadStructuresTimer;
-- public final CustomTimingsHandler syncChunkLoadEntitiesTimer;
-- public final CustomTimingsHandler syncChunkLoadTileEntitiesTimer;
-- public final CustomTimingsHandler syncChunkLoadTileTicksTimer;
-- public final CustomTimingsHandler syncChunkLoadPostTimer;
--
-- public WorldTimingsHandler(Level server) {
-- String name = ((PrimaryLevelData) server.levelData).getLevelName() + " - ";
--
-- this.mobSpawn = new CustomTimingsHandler("** " + name + "mobSpawn");
-- this.doChunkUnload = new CustomTimingsHandler("** " + name + "doChunkUnload");
-- this.doTickPending = new CustomTimingsHandler("** " + name + "doTickPending");
-- this.doTickTiles = new CustomTimingsHandler("** " + name + "doTickTiles");
-- this.doChunkMap = new CustomTimingsHandler("** " + name + "doChunkMap");
-- this.doSounds = new CustomTimingsHandler("** " + name + "doSounds");
-- this.entityTick = new CustomTimingsHandler("** " + name + "entityTick");
-- this.tileEntityTick = new CustomTimingsHandler("** " + name + "tileEntityTick");
-- this.tileEntityPending = new CustomTimingsHandler("** " + name + "tileEntityPending");
--
-- this.syncChunkLoadTimer = new CustomTimingsHandler("** " + name + "syncChunkLoad");
-- this.syncChunkLoadStructuresTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Structures");
-- this.syncChunkLoadEntitiesTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Entities");
-- this.syncChunkLoadTileEntitiesTimer = new CustomTimingsHandler("** " + name + "chunkLoad - TileEntities");
-- this.syncChunkLoadTileTicksTimer = new CustomTimingsHandler("** " + name + "chunkLoad - TileTicks");
-- this.syncChunkLoadPostTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Post");
--
--
-- this.tracker = new CustomTimingsHandler(name + "tracker");
-- this.doTick = new CustomTimingsHandler(name + "doTick");
-- this.tickEntities = new CustomTimingsHandler(name + "tickEntities");
-- }
-- }
--}
-diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 24631135f90bb74bf829160ed079e152573666a2..f7833cd528797ba46b001db5208c29eb11ae2529 100644
---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -2809,6 +2809,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
-
- CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
- }
-+
-+ // Paper start
-+ @Override
-+ public int getPing()
-+ {
-+ return CraftPlayer.this.getPing();
-+ }
-+ // Paper end
- };
-
- public Player.Spigot spigot()
-diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-index 6effe47b32a8551aa6f6b11bc0315714a119e199..4c376f67ae311b4fedea27b3475f9fb56054aec2 100644
---- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-@@ -1,5 +1,6 @@
- package org.bukkit.craftbukkit.scheduler;
-
-+import co.aikar.timings.MinecraftTimings; // Paper
- import com.google.common.base.Preconditions;
- import com.google.common.util.concurrent.ThreadFactoryBuilder;
- import java.util.ArrayList;
-@@ -271,7 +272,7 @@ public class CraftScheduler implements BukkitScheduler {
- }
- return false;
- }
-- });
-+ }){{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer();}}; // Paper
- this.handle(task, 0L);
- for (CraftTask taskPending = this.head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
- if (taskPending == task) {
-@@ -306,7 +307,7 @@ public class CraftScheduler implements BukkitScheduler {
- }
- }
- }
-- });
-+ }){{this.timings=co.aikar.timings.MinecraftTimings.getCancelTasksTimer(plugin);}}; // Paper
- this.handle(task, 0L);
- for (CraftTask taskPending = this.head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
- if (taskPending == task) {
-@@ -413,9 +414,7 @@ public class CraftScheduler implements BukkitScheduler {
- if (task.isSync()) {
- this.currentTask = task;
- try {
-- task.timings.startTiming(); // Spigot
- task.run();
-- task.timings.stopTiming(); // Spigot
- } catch (final Throwable throwable) {
- task.getOwner().getLogger().log(
- Level.WARNING,
-@@ -442,8 +441,10 @@ public class CraftScheduler implements BukkitScheduler {
- this.runners.remove(task.getTaskId());
- }
- }
-+ MinecraftTimings.bukkitSchedulerFinishTimer.startTiming(); // Paper
- this.pending.addAll(temp);
- temp.clear();
-+ MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming(); // Paper
- this.debugHead = this.debugHead.getNextHead(this.currentTick);
- }
-
-@@ -480,6 +481,7 @@ public class CraftScheduler implements BukkitScheduler {
- }
-
- private void parsePending() {
-+ MinecraftTimings.bukkitSchedulerPendingTimer.startTiming();
- CraftTask head = this.head;
- CraftTask task = head.getNext();
- CraftTask lastTask = head;
-@@ -498,6 +500,7 @@ public class CraftScheduler implements BukkitScheduler {
- task.setNext(null);
- }
- this.head = lastTask;
-+ MinecraftTimings.bukkitSchedulerPendingTimer.stopTiming();
- }
-
- private boolean isReady(final int currentTick) {
-diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
-index e4d1eb4a0ce2c9874922585f6bb0d9ead433fde1..ba369f3dcfdf498e971dc4405d39657a9b6e97cc 100644
---- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
-+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
-@@ -1,12 +1,15 @@
- package org.bukkit.craftbukkit.scheduler;
-
- import java.util.function.Consumer;
-+
-+import co.aikar.timings.NullTimingHandler;
- import org.bukkit.Bukkit;
- import org.bukkit.plugin.Plugin;
- import org.bukkit.scheduler.BukkitTask;
-
--import org.bukkit.craftbukkit.SpigotTimings; // Spigot
- import org.spigotmc.CustomTimingsHandler; // Spigot
-+import co.aikar.timings.MinecraftTimings; // Paper
-+import co.aikar.timings.Timing; // Paper
-
- public class CraftTask implements BukkitTask, Runnable { // Spigot
-
-@@ -26,13 +29,13 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
- */
- private volatile long period;
- private long nextRun;
-- private final Runnable rTask;
-- private final Consumer<BukkitTask> cTask;
-+ public final Runnable rTask; // Paper
-+ public final Consumer<BukkitTask> cTask; // Paper
-+ public Timing timings; // Paper
- private final Plugin plugin;
- private final int id;
- private final long createdAt = System.nanoTime();
-
-- final CustomTimingsHandler timings; // Spigot
- CraftTask() {
- this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
- }
-@@ -58,7 +61,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
- }
- this.id = id;
- this.period = period;
-- this.timings = this.isSync() ? SpigotTimings.getPluginTaskTimings(this, period) : null; // Spigot
-+ timings = task != null ? MinecraftTimings.getPluginTaskTimings(this, period) : NullTimingHandler.NULL; // Paper
- }
-
- @Override
-@@ -78,11 +81,13 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
-
- @Override
- public void run() {
-+ try (Timing ignored = timings.startTiming()) { // Paper
- if (this.rTask != null) {
- this.rTask.run();
- } else {
- this.cTask.accept(this);
- }
-+ } // Paper
- }
-
- long getCreatedAt() {
-@@ -113,7 +118,7 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
- this.next = next;
- }
-
-- Class<?> getTaskClass() {
-+ public Class<?> getTaskClass() { // Paper
- return (this.rTask != null) ? this.rTask.getClass() : ((this.cTask != null) ? this.cTask.getClass() : null);
- }
-
-@@ -137,9 +142,4 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
- return true;
- }
-
-- // Spigot start
-- public String getTaskName() {
-- return (this.getTaskClass() == null) ? "Unknown" : this.getTaskClass().getName();
-- }
-- // Spigot end
- }
-diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
-index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222612aec14 100644
---- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
-+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
-@@ -8,4 +8,11 @@ public class CraftIconCache implements CachedServerIcon {
- public CraftIconCache(final byte[] value) {
- this.value = value;
- }
-+
-+ public String getData() {
-+ if (value == null) {
-+ return null;
-+ }
-+ return "data:image/png;base64," + new String(java.util.Base64.getEncoder().encode(value), java.nio.charset.StandardCharsets.UTF_8);
-+ } // Paper
- }
-diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 4b2377a1de608b9142a28c66389d04290f7c0330..0285349c0e882c1d928240a7ece2f9cc9f4122f2 100644
---- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -199,6 +199,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
- return CraftNamespacedKey.toMinecraft(mat.getKey());
- }
- // ========================================================================
-+ // Paper start
-+ @Override
-+ public void reportTimings() {
-+ co.aikar.timings.TimingsExport.reportTimings();
-+ }
-+ // Paper end
-
- public static byte toLegacyData(BlockState data) {
- return CraftLegacy.toLegacyData(data);
-@@ -448,6 +454,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
- public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
- return new CraftDamageSourceBuilder(damageType);
- }
-+ // Paper start
-+ @Override
-+ public String getTimingsServerName() {
-+ return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
-+ }
-+ // Paper end
-
- @Override
- public String get(Class<?> aClass, String s) {
-diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
-index 3591b79481ac17bd02e59ac3c623d1c6991abd84..2122e044d99902d2aff86693aaa424a50b9f8a13 100644
---- a/src/main/java/org/spigotmc/ActivationRange.java
-+++ b/src/main/java/org/spigotmc/ActivationRange.java
-@@ -27,7 +27,7 @@ import net.minecraft.world.entity.projectile.ThrownTrident;
- import net.minecraft.world.entity.raid.Raider;
- import net.minecraft.world.level.Level;
- import net.minecraft.world.phys.AABB;
--import org.bukkit.craftbukkit.SpigotTimings;
-+import co.aikar.timings.MinecraftTimings;
-
- public class ActivationRange
- {
-@@ -74,8 +74,8 @@ public class ActivationRange
- /**
- * These entities are excluded from Activation range checks.
- *
-- * @param entity
-- * @param config
-+ * @param entity Entity to initialize
-+ * @param config Spigot config to determine ranges
- * @return boolean If it should always tick.
- */
- public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
-@@ -110,7 +110,7 @@ public class ActivationRange
- */
- public static void activateEntities(Level world)
- {
-- SpigotTimings.entityActivationCheckTimer.startTiming();
-+ MinecraftTimings.entityActivationCheckTimer.startTiming();
- final int miscActivationRange = world.spigotConfig.miscActivationRange;
- final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
- final int animalActivationRange = world.spigotConfig.animalActivationRange;
-@@ -137,7 +137,7 @@ public class ActivationRange
-
- world.getEntities().get(ActivationRange.maxBB, ActivationRange::activateEntity);
- }
-- SpigotTimings.entityActivationCheckTimer.stopTiming();
-+ MinecraftTimings.entityActivationCheckTimer.stopTiming();
- }
-
- /**
-@@ -232,10 +232,8 @@ public class ActivationRange
- */
- public static boolean checkIfActive(Entity entity)
- {
-- SpigotTimings.checkIfActiveTimer.startTiming();
- // Never safe to skip fireworks or entities not yet added to chunk
- if ( entity instanceof FireworkRocketEntity ) {
-- SpigotTimings.checkIfActiveTimer.stopTiming();
- return true;
- }
-
-@@ -259,7 +257,6 @@ public class ActivationRange
- {
- isActive = false;
- }
-- SpigotTimings.checkIfActiveTimer.stopTiming();
- return isActive;
- }
- }
diff --git a/patches/server/0024-Remove-Spigot-timings.patch b/patches/server/0024-Remove-Spigot-timings.patch
new file mode 100644
index 0000000000..6913a8e21f
--- /dev/null
+++ b/patches/server/0024-Remove-Spigot-timings.patch
@@ -0,0 +1,967 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Aikar <[email protected]>
+Date: Thu, 3 Mar 2016 04:00:11 -0600
+Subject: [PATCH] Remove Spigot timings
+
+
+diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
+index 4a573e8b7cd90f65c190982662e92a11f79a1d3e..709c6361aa5eb78071ce9d0f2a65ce8a56af1443 100644
+--- a/src/main/java/net/minecraft/server/MinecraftServer.java
++++ b/src/main/java/net/minecraft/server/MinecraftServer.java
+@@ -203,7 +203,6 @@ import org.bukkit.craftbukkit.Main;
+ import org.bukkit.event.server.ServerLoadEvent;
+ // CraftBukkit end
+
+-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+
+ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource {
+
+@@ -1456,7 +1455,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ }
+ }
+
+- SpigotTimings.serverTickTimer.startTiming(); // Spigot
+ ++this.tickCount;
+ this.tickRateManager.tick();
+ this.tickChildren(shouldKeepTicking);
+@@ -1472,6 +1470,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
++ this.runAllTasks(); // Paper - move runAllTasks() into full server tick (previously for timings)
+ gameprofilerfiller.push("tallying");
+ long k = Util.getNanos() - i;
+ int l = this.tickCount % 100;
+@@ -1482,13 +1481,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) k / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
+ this.logTickMethodTime(i);
+ gameprofilerfiller.pop();
+- SpigotTimings.serverTickTimer.stopTiming(); // Spigot
+- org.spigotmc.CustomTimingsHandler.tick(); // Spigot
+ }
+
+ private void autoSave() {
+ this.ticksUntilAutosave = this.autosavePeriod; // CraftBukkit
+- SpigotTimings.worldSaveTimer.startTiming(); // Spigot
+ MinecraftServer.LOGGER.debug("Autosave started");
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+@@ -1496,7 +1492,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ this.saveEverything(true, false, false);
+ gameprofilerfiller.pop();
+ MinecraftServer.LOGGER.debug("Autosave finished");
+- SpigotTimings.worldSaveTimer.stopTiming(); // Spigot
+ }
+
+ private void logTickMethodTime(long tickStartTime) {
+@@ -1569,26 +1564,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ this.getPlayerList().getPlayers().forEach((entityplayer) -> {
+ entityplayer.connection.suspendFlushing();
+ });
+- SpigotTimings.schedulerTimer.startTiming(); // Spigot
+ this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
+- SpigotTimings.schedulerTimer.stopTiming(); // Spigot
+ io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
+ gameprofilerfiller.push("commandFunctions");
+- SpigotTimings.commandFunctionsTimer.startTiming(); // Spigot
+ this.getFunctions().tick();
+- SpigotTimings.commandFunctionsTimer.stopTiming(); // Spigot
+ gameprofilerfiller.popPush("levels");
+ Iterator iterator = this.getAllLevels().iterator();
+
+ // CraftBukkit start
+ // Run tasks that are waiting on processing
+- SpigotTimings.processQueueTimer.startTiming(); // Spigot
+ while (!this.processQueue.isEmpty()) {
+ this.processQueue.remove().run();
+ }
+- SpigotTimings.processQueueTimer.stopTiming(); // Spigot
+
+- SpigotTimings.timeUpdateTimer.startTiming(); // Spigot
+ // 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) {
+@@ -1596,7 +1584,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
+ }
+ }
+- SpigotTimings.timeUpdateTimer.stopTiming(); // Spigot
+
+ while (iterator.hasNext()) {
+ ServerLevel worldserver = (ServerLevel) iterator.next();
+@@ -1617,9 +1604,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ gameprofilerfiller.push("tick");
+
+ try {
+- worldserver.timings.doTick.startTiming(); // Spigot
+ worldserver.tick(shouldKeepTicking);
+- worldserver.timings.doTick.stopTiming(); // Spigot
+ } catch (Throwable throwable) {
+ CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception ticking world");
+
+@@ -1632,24 +1617,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ }
+
+ gameprofilerfiller.popPush("connection");
+- SpigotTimings.connectionTimer.startTiming(); // Spigot
+ this.tickConnection();
+- SpigotTimings.connectionTimer.stopTiming(); // Spigot
+ gameprofilerfiller.popPush("players");
+- SpigotTimings.playerListTimer.startTiming(); // Spigot
+ this.playerList.tick();
+- SpigotTimings.playerListTimer.stopTiming(); // Spigot
+ if (SharedConstants.IS_RUNNING_IN_IDE && this.tickRateManager.runsNormally()) {
+ GameTestTicker.SINGLETON.tick();
+ }
+
+ gameprofilerfiller.popPush("server gui refresh");
+
+- SpigotTimings.tickablesTimer.startTiming(); // Spigot
+ for (int i = 0; i < this.tickables.size(); ++i) {
+ ((Runnable) this.tickables.get(i)).run();
+ }
+- SpigotTimings.tickablesTimer.stopTiming(); // Spigot
+
+ gameprofilerfiller.popPush("send chunks");
+ iterator = this.playerList.getPlayers().iterator();
+diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+index 9d6be455c3bbcdbcb9d3d24b0bad79f46ba6a8cb..a129ddfe7b00d6abab94437806a5cfb9668e7cc9 100644
+--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
++++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+@@ -64,7 +64,6 @@ import org.apache.logging.log4j.Level;
+ import org.apache.logging.log4j.LogManager;
+ import org.apache.logging.log4j.io.IoBuilder;
+ import org.bukkit.command.CommandSender;
+-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+ import org.bukkit.craftbukkit.util.TerminalCompletionHandler;
+ import org.bukkit.craftbukkit.util.TerminalConsoleWriterThread;
+ import org.bukkit.event.server.ServerCommandEvent;
+@@ -421,7 +420,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+ }
+
+ public void handleConsoleInputs() {
+- SpigotTimings.serverCommandTimer.startTiming(); // Spigot
+ while (!this.consoleInput.isEmpty()) {
+ ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
+
+@@ -436,7 +434,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+ // CraftBukkit end
+ }
+
+- SpigotTimings.serverCommandTimer.stopTiming(); // Spigot
+ }
+
+ @Override
+diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+index c615510f3f59292715bcff1bd9e4e896c9733436..ccb6f28689a3cf7da4ea323c5dd8f595036c4b43 100644
+--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
++++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+@@ -207,13 +207,11 @@ public class ServerChunkCache extends ChunkSource {
+ }
+
+ gameprofilerfiller.incrementCounter("getChunkCacheMiss");
+- this.level.timings.syncChunkLoadTimer.startTiming(); // Spigot
+ CompletableFuture<ChunkResult<ChunkAccess>> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create);
+ ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
+
+ Objects.requireNonNull(completablefuture);
+ chunkproviderserver_b.managedBlock(completablefuture::isDone);
+- this.level.timings.syncChunkLoadTimer.stopTiming(); // Spigot
+ ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
+ ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
+
+@@ -420,25 +418,19 @@ public class ServerChunkCache extends ChunkSource {
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+ gameprofilerfiller.push("purge");
+- this.level.timings.doChunkMap.startTiming(); // Spigot
+ if (this.level.tickRateManager().runsNormally() || !tickChunks || this.level.spigotConfig.unloadFrozenChunks) { // Spigot
+ this.distanceManager.purgeStaleTickets();
+ }
+
+ this.runDistanceManagerUpdates();
+- this.level.timings.doChunkMap.stopTiming(); // Spigot
+ gameprofilerfiller.popPush("chunks");
+ if (tickChunks) {
+ this.tickChunks();
+- this.level.timings.tracker.startTiming(); // Spigot
+ this.chunkMap.tick();
+- this.level.timings.tracker.stopTiming(); // Spigot
+ }
+
+- this.level.timings.doChunkUnload.startTiming(); // Spigot
+ gameprofilerfiller.popPush("unload");
+ this.chunkMap.tick(shouldKeepTicking);
+- this.level.timings.doChunkUnload.stopTiming(); // Spigot
+ gameprofilerfiller.pop();
+ this.clearCache();
+ }
+@@ -531,9 +523,7 @@ public class ServerChunkCache extends ChunkSource {
+ }
+
+ if (this.level.shouldTickBlocksAt(chunkcoordintpair.toLong())) {
+- this.level.timings.doTickTiles.startTiming(); // Spigot
+ this.level.tickChunk(chunk, k);
+- this.level.timings.doTickTiles.stopTiming(); // Spigot
+ }
+ }
+
+diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
+index c6ded1ac73ddbc0336000f77c0f99fa20551a0de..f3633da64f990972cddc03f2fcfd34ced2955a7a 100644
+--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
+@@ -176,7 +176,6 @@ import net.minecraft.world.ticks.LevelTicks;
+ import org.slf4j.Logger;
+ import org.bukkit.Bukkit;
+ import org.bukkit.WeatherType;
+-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+ import org.bukkit.craftbukkit.event.CraftEventFactory;
+ import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
+ import org.bukkit.craftbukkit.util.WorldUUID;
+@@ -469,7 +468,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ }
+
+ gameprofilerfiller.push("tickPending");
+- this.timings.doTickPending.startTiming(); // Spigot
+ if (!this.isDebug() && flag) {
+ j = this.getGameTime();
+ gameprofilerfiller.push("blockTicks");
+@@ -478,7 +476,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ this.fluidTicks.tick(j, 65536, this::tickFluid);
+ gameprofilerfiller.pop();
+ }
+- this.timings.doTickPending.stopTiming(); // Spigot
+
+ gameprofilerfiller.popPush("raid");
+ if (flag) {
+@@ -489,9 +486,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ this.getChunkSource().tick(shouldKeepTicking, true);
+ gameprofilerfiller.popPush("blockEvents");
+ if (flag) {
+- this.timings.doSounds.startTiming(); // Spigot
+ this.runBlockEvents();
+- this.timings.doSounds.stopTiming(); // Spigot
+ }
+
+ this.handlingTick = false;
+@@ -504,7 +499,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+
+ if (flag1 || this.emptyTime++ < 300) {
+ gameprofilerfiller.push("entities");
+- this.timings.tickEntities.startTiming(); // Spigot
+ if (this.dragonFight != null && flag) {
+ gameprofilerfiller.push("dragonFight");
+ this.dragonFight.tick();
+@@ -512,7 +506,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ }
+
+ org.spigotmc.ActivationRange.activateEntities(this); // Spigot
+- this.timings.entityTick.startTiming(); // Spigot
+ this.entityTickList.forEach((entity) -> {
+ if (!entity.isRemoved()) {
+ if (!tickratemanager.isEntityFrozen(entity)) {
+@@ -537,8 +530,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ }
+ }
+ });
+- this.timings.entityTick.stopTiming(); // Spigot
+- this.timings.tickEntities.stopTiming(); // Spigot
+ gameprofilerfiller.pop();
+ this.tickBlockEntities();
+ }
+@@ -951,7 +942,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ return;
+ }
+ // Spigot end
+- entity.tickTimer.startTiming(); // Spigot
+ entity.setOldPosAndRot();
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+@@ -970,7 +960,6 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+
+ this.tickPassenger(entity, entity1);
+ }
+- entity.tickTimer.stopTiming(); // Spigot
+
+ }
+
+diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+index 18d56058073b6cc4f9020f0a6137e4ac26eed0b2..fddc6b5abbad66ebe556ff8565c38c60b7883fce 100644
+--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -339,7 +339,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+
+ @Override
+ public void tick() {
+- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.startTiming(); // Spigot
+ if (this.ackBlockChangesUpTo > -1) {
+ this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
+ this.ackBlockChangesUpTo = -1;
+@@ -395,7 +394,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
+ this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"));
+ }
+- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.stopTiming(); // Spigot
+
+ }
+
+@@ -2122,7 +2120,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ }
+
+ private void handleCommand(String s) {
+- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.startTiming(); // Spigot
+ if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
+ this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
+
+@@ -2132,7 +2129,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ this.cserver.getPluginManager().callEvent(event);
+
+ if (event.isCancelled()) {
+- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
+ return;
+ }
+
+@@ -2145,7 +2141,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+ return;
+ } finally {
+- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
+ }
+ }
+ // CraftBukkit end
+diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
+index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c594f9a88 100644
+--- a/src/main/java/net/minecraft/world/entity/Entity.java
++++ b/src/main/java/net/minecraft/world/entity/Entity.java
+@@ -148,7 +148,6 @@ import org.bukkit.command.CommandSender;
+ import org.bukkit.entity.Hanging;
+ import org.bukkit.entity.LivingEntity;
+ import org.bukkit.entity.Vehicle;
+-import org.spigotmc.CustomTimingsHandler; // Spigot
+ import org.bukkit.event.entity.EntityCombustByEntityEvent;
+ import org.bukkit.event.hanging.HangingBreakByEntityEvent;
+ import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
+@@ -326,7 +325,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ // Marks an entity, that it was removed by a plugin via Entity#remove
+ // Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
+ public boolean pluginRemoved = false;
+- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getEntityTimings(this); // Spigot
+ // Spigot start
+ public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
+ public final boolean defaultActivationState;
+@@ -866,7 +864,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ }
+
+ public void move(MoverType type, Vec3 movement) {
+- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
+ if (this.noPhysics) {
+ this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
+ } else {
+@@ -978,7 +975,6 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
+ gameprofilerfiller.pop();
+ }
+ }
+- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
+ }
+
+ private void applyMovementEmissionAndPlaySound(Entity.MovementEmission moveEffect, Vec3 movement, BlockPos landingPos, BlockState landingState) {
+diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
+index 9aa4e70f1d1c4de2138d31701dceaed25062e69c..6dba567e9f7a197af16598647f216b5323d1b601 100644
+--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
++++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
+@@ -162,8 +162,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
+ import org.bukkit.event.player.PlayerItemConsumeEvent;
+ // CraftBukkit end
+
+-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+-
+ public abstract class LivingEntity extends Entity implements Attackable {
+
+ private static final Logger LOGGER = LogUtils.getLogger();
+@@ -3090,7 +3088,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+
+ @Override
+ public void tick() {
+- SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
+ super.tick();
+ this.updatingUsingItem();
+ this.updateSwimAmount();
+@@ -3132,9 +3129,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ }
+
+ if (!this.isRemoved()) {
+- SpigotTimings.timerEntityBaseTick.stopTiming(); // Spigot
+ this.aiStep();
+- SpigotTimings.timerEntityTickRest.startTiming(); // Spigot
+ }
+
+ double d0 = this.getX() - this.xo;
+@@ -3228,7 +3223,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ }
+
+ this.elytraAnimationState.tick();
+- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
+ }
+
+ public void detectEquipmentUpdatesPublic() { // CraftBukkit
+@@ -3435,7 +3429,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+ gameprofilerfiller.push("ai");
+- SpigotTimings.timerEntityAI.startTiming(); // Spigot
+ if (this.isImmobile()) {
+ this.jumping = false;
+ this.xxa = 0.0F;
+@@ -3445,7 +3438,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ this.serverAiStep();
+ gameprofilerfiller.pop();
+ }
+- SpigotTimings.timerEntityAI.stopTiming(); // Spigot
+
+ gameprofilerfiller.pop();
+ gameprofilerfiller.push("jump");
+@@ -3488,7 +3480,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ this.resetFallDistance();
+ }
+
+- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
+ label112:
+ {
+ LivingEntity entityliving = this.getControllingPassenger();
+@@ -3502,7 +3493,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+
+ this.travel(vec3d1);
+ }
+- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
+
+ if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
+ this.applyEffectsFromBlocks();
+@@ -3538,9 +3528,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+ this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
+ }
+
+- SpigotTimings.timerEntityAICollision.startTiming(); // Spigot
+ this.pushEntities();
+- SpigotTimings.timerEntityAICollision.stopTiming(); // Spigot
+ gameprofilerfiller.pop();
+ world = this.level();
+ if (world instanceof ServerLevel worldserver) {
+diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
+index 3fb17bbcecf6dc4af3b231835adff25f86e1379f..c5e480c43668211a091e44ae50b40b025ff1dca9 100644
+--- a/src/main/java/net/minecraft/world/level/Level.java
++++ b/src/main/java/net/minecraft/world/level/Level.java
+@@ -95,7 +95,6 @@ import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePa
+ import org.bukkit.Bukkit;
+ import org.bukkit.craftbukkit.CraftServer;
+ import org.bukkit.craftbukkit.CraftWorld;
+-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+ import org.bukkit.craftbukkit.block.CapturedBlockState;
+ import org.bukkit.craftbukkit.block.CraftBlockState;
+ import org.bukkit.craftbukkit.block.data.CraftBlockData;
+@@ -165,7 +164,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+ }
+ // Paper end - add paper world config
+
+- public final SpigotTimings.WorldTimingsHandler timings; // Spigot
+ public static BlockPos lastPhysicsProblem; // Spigot
+ private org.spigotmc.TickLimiter entityLimiter;
+ private org.spigotmc.TickLimiter tileLimiter;
+@@ -259,7 +257,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+ public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
+ });
+ // CraftBukkit end
+- this.timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
+ this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
+ this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
+ }
+@@ -692,15 +689,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+ gameprofilerfiller.push("blockEntities");
+- this.timings.tileEntityPending.startTiming(); // Spigot
+ this.tickingBlockEntities = true;
+ if (!this.pendingBlockEntityTickers.isEmpty()) {
+ this.blockEntityTickers.addAll(this.pendingBlockEntityTickers);
+ this.pendingBlockEntityTickers.clear();
+ }
+- this.timings.tileEntityPending.stopTiming(); // Spigot
+
+- this.timings.tileEntityTick.startTiming(); // Spigot
+ // Spigot start
+ // Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
+ boolean flag = this.tickRateManager().runsNormally();
+@@ -723,7 +717,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+ }
+ }
+
+- this.timings.tileEntityTick.stopTiming(); // Spigot
+ this.tickingBlockEntities = false;
+ gameprofilerfiller.pop();
+ this.spigotConfig.currentPrimedTnt = 0; // Spigot
+@@ -731,9 +724,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+
+ public <T extends Entity> void guardEntityTick(Consumer<T> tickConsumer, T entity) {
+ try {
+- SpigotTimings.tickEntityTimer.startTiming(); // Spigot
+ tickConsumer.accept(entity);
+- SpigotTimings.tickEntityTimer.stopTiming(); // Spigot
+ } catch (Throwable throwable) {
+ CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking entity");
+ CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being ticked");
+diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+index 1fe93e01c5e37397aded5d1f99214bf1bffe70b7..9389fd53f2bff0a9ca389694b312dc6da58befaf 100644
+--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
++++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+@@ -148,7 +148,6 @@ public final class NaturalSpawner {
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+ gameprofilerfiller.push("spawner");
+- world.timings.mobSpawn.startTiming(); // Spigot
+ Iterator iterator = spawnableGroups.iterator();
+
+ while (iterator.hasNext()) {
+@@ -163,7 +162,6 @@ public final class NaturalSpawner {
+ }
+ }
+
+- world.timings.mobSpawn.stopTiming(); // Spigot
+ gameprofilerfiller.pop();
+ }
+
+diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+index 4c3bc3a495990bc486fce7ba1758bf731c3baf02..751a5ae04e4de3f5d85eda20092a87ef4f547436 100644
+--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
++++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+@@ -33,11 +33,8 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
+ import org.bukkit.inventory.InventoryHolder;
+ // CraftBukkit end
+
+-import org.spigotmc.CustomTimingsHandler; // Spigot
+-
+ public abstract class BlockEntity {
+
+- public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
+ // CraftBukkit start - data containers
+ private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
+ public CraftPersistentDataContainer persistentDataContainer;
+diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+index d76591694c3b167b8b8f17b61a373a43140a8b68..f63d55bfe42b117c5b437e690124a98d94752a9a 100644
+--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
++++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+@@ -971,7 +971,6 @@ public class LevelChunk extends ChunkAccess {
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+ gameprofilerfiller.push(this::getType);
+- this.blockEntity.tickTimer.startTiming(); // Spigot
+ BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
+
+ if (this.blockEntity.getType().isValid(iblockdata)) {
+@@ -990,9 +989,6 @@ public class LevelChunk extends ChunkAccess {
+ this.blockEntity.fillCrashReportCategory(crashreportsystemdetails);
+ throw new ReportedException(crashreport);
+ // Spigot start
+- } finally {
+- this.blockEntity.tickTimer.stopTiming();
+- // Spigot end
+ }
+ }
+ }
+diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java b/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
+index d1b82dec25069a7027aaf53086b1829e511fc301..4367ccc628bb4f404d6a081083002518442f462b 100644
+--- a/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
++++ b/src/main/java/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
+@@ -576,15 +576,12 @@ public record SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chun
+ @Nullable
+ private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel world, List<CompoundTag> entities, List<CompoundTag> blockEntities) {
+ return entities.isEmpty() && blockEntities.isEmpty() ? null : (chunk) -> {
+- world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
+ if (!entities.isEmpty()) {
+ world.addLegacyChunkEntities(EntityType.loadEntitiesRecursive(entities, world, EntitySpawnReason.LOAD));
+ }
+- world.timings.syncChunkLoadEntitiesTimer.stopTiming(); // Spigot
+
+ Iterator iterator = blockEntities.iterator();
+
+- world.timings.syncChunkLoadTileEntitiesTimer.startTiming(); // Spigot
+ while (iterator.hasNext()) {
+ CompoundTag nbttagcompound = (CompoundTag) iterator.next();
+ boolean flag = nbttagcompound.getBoolean("keepPacked");
+@@ -600,7 +597,6 @@ public record SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chun
+ }
+ }
+ }
+- world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
+
+ };
+ }
+diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+index 7c5b0db8115dc4032a3a364299ca06c88efd9a26..5650b4cfcd4008ac7f351d5bfb1fb8cc81da4caa 100644
+--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
++++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+@@ -379,7 +379,6 @@ public final class CraftServer implements Server {
+ this.saveCommandsConfig();
+ this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
+ this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
+- this.pluginManager.useTimings(this.configuration.getBoolean("settings.plugin-profiling"));
+ this.overrideSpawnLimits();
+ console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
+ this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
+@@ -2636,12 +2635,31 @@ public final class CraftServer implements Server {
+ private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
+ {
+
++ @Deprecated
+ @Override
+ public YamlConfiguration getConfig()
+ {
+ return org.spigotmc.SpigotConfig.config;
+ }
+
++ @Override
++ public YamlConfiguration getBukkitConfig()
++ {
++ return configuration;
++ }
++
++ @Override
++ public YamlConfiguration getSpigotConfig()
++ {
++ return org.spigotmc.SpigotConfig.config;
++ }
++
++ @Override
++ public YamlConfiguration getPaperConfig()
++ {
++ return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
++ }
++
+ @Override
+ public void restart() {
+ org.spigotmc.RestartCommand.restart();
+diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+deleted file mode 100644
+index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..0000000000000000000000000000000000000000
+--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
++++ /dev/null
+@@ -1,163 +0,0 @@
+-package org.bukkit.craftbukkit;
+-
+-import java.util.HashMap;
+-import net.minecraft.world.entity.Entity;
+-import net.minecraft.world.level.Level;
+-import net.minecraft.world.level.block.entity.BlockEntity;
+-import net.minecraft.world.level.storage.PrimaryLevelData;
+-import org.bukkit.craftbukkit.scheduler.CraftTask;
+-import org.bukkit.plugin.java.JavaPluginLoader;
+-import org.bukkit.scheduler.BukkitTask;
+-import org.spigotmc.CustomTimingsHandler;
+-
+-public class SpigotTimings {
+-
+- public static final CustomTimingsHandler serverTickTimer = new CustomTimingsHandler("** Full Server Tick");
+- public static final CustomTimingsHandler playerListTimer = new CustomTimingsHandler("Player List");
+- public static final CustomTimingsHandler commandFunctionsTimer = new CustomTimingsHandler("Command Functions");
+- public static final CustomTimingsHandler connectionTimer = new CustomTimingsHandler("Connection Handler");
+- public static final CustomTimingsHandler playerConnectionTimer = new CustomTimingsHandler("** PlayerConnection");
+- public static final CustomTimingsHandler tickablesTimer = new CustomTimingsHandler("Tickables");
+- public static final CustomTimingsHandler schedulerTimer = new CustomTimingsHandler("Scheduler");
+- public static final CustomTimingsHandler timeUpdateTimer = new CustomTimingsHandler("Time Update");
+- public static final CustomTimingsHandler serverCommandTimer = new CustomTimingsHandler("Server Command");
+- public static final CustomTimingsHandler worldSaveTimer = new CustomTimingsHandler("World Save");
+-
+- public static final CustomTimingsHandler entityMoveTimer = new CustomTimingsHandler("** entityMove");
+- public static final CustomTimingsHandler tickEntityTimer = new CustomTimingsHandler("** tickEntity");
+- public static final CustomTimingsHandler activatedEntityTimer = new CustomTimingsHandler("** activatedTickEntity");
+- public static final CustomTimingsHandler tickTileEntityTimer = new CustomTimingsHandler("** tickTileEntity");
+-
+- public static final CustomTimingsHandler timerEntityBaseTick = new CustomTimingsHandler("** livingEntityBaseTick");
+- public static final CustomTimingsHandler timerEntityAI = new CustomTimingsHandler("** livingEntityAI");
+- public static final CustomTimingsHandler timerEntityAICollision = new CustomTimingsHandler("** livingEntityAICollision");
+- public static final CustomTimingsHandler timerEntityAIMove = new CustomTimingsHandler("** livingEntityAIMove");
+- public static final CustomTimingsHandler timerEntityTickRest = new CustomTimingsHandler("** livingEntityTickRest");
+-
+- public static final CustomTimingsHandler processQueueTimer = new CustomTimingsHandler("processQueue");
+- public static final CustomTimingsHandler schedulerSyncTimer = new CustomTimingsHandler("** Scheduler - Sync Tasks", JavaPluginLoader.pluginParentTimer);
+-
+- public static final CustomTimingsHandler playerCommandTimer = new CustomTimingsHandler("** playerCommand");
+-
+- public static final CustomTimingsHandler entityActivationCheckTimer = new CustomTimingsHandler("entityActivationCheck");
+- public static final CustomTimingsHandler checkIfActiveTimer = new CustomTimingsHandler("** checkIfActive");
+-
+- public static final HashMap<String, CustomTimingsHandler> entityTypeTimingMap = new HashMap<String, CustomTimingsHandler>();
+- public static final HashMap<String, CustomTimingsHandler> tileEntityTypeTimingMap = new HashMap<String, CustomTimingsHandler>();
+- public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = new HashMap<String, CustomTimingsHandler>();
+-
+- /**
+- * Gets a timer associated with a plugins tasks.
+- * @param task
+- * @param period
+- * @return
+- */
+- public static CustomTimingsHandler getPluginTaskTimings(BukkitTask task, long period) {
+- if (!task.isSync()) {
+- return null;
+- }
+- String plugin;
+- final CraftTask ctask = (CraftTask) task;
+-
+- if (task.getOwner() != null) {
+- plugin = task.getOwner().getDescription().getFullName();
+- } else {
+- plugin = "Unknown";
+- }
+- String taskname = ctask.getTaskName();
+-
+- String name = "Task: " + plugin + " Runnable: " + taskname;
+- if (period > 0) {
+- name += "(interval:" + period + ")";
+- } else {
+- name += "(Single)";
+- }
+- CustomTimingsHandler result = SpigotTimings.pluginTaskTimingMap.get(name);
+- if (result == null) {
+- result = new CustomTimingsHandler(name, SpigotTimings.schedulerSyncTimer);
+- SpigotTimings.pluginTaskTimingMap.put(name, result);
+- }
+- return result;
+- }
+-
+- /**
+- * Get a named timer for the specified entity type to track type specific timings.
+- * @param entity
+- * @return
+- */
+- public static CustomTimingsHandler getEntityTimings(Entity entity) {
+- String entityType = entity.getClass().getName();
+- CustomTimingsHandler result = SpigotTimings.entityTypeTimingMap.get(entityType);
+- if (result == null) {
+- result = new CustomTimingsHandler("** tickEntity - " + entity.getClass().getSimpleName(), SpigotTimings.activatedEntityTimer);
+- SpigotTimings.entityTypeTimingMap.put(entityType, result);
+- }
+- return result;
+- }
+-
+- /**
+- * Get a named timer for the specified tile entity type to track type specific timings.
+- * @param entity
+- * @return
+- */
+- public static CustomTimingsHandler getTileEntityTimings(BlockEntity entity) {
+- String entityType = entity.getClass().getName();
+- CustomTimingsHandler result = SpigotTimings.tileEntityTypeTimingMap.get(entityType);
+- if (result == null) {
+- result = new CustomTimingsHandler("** tickTileEntity - " + entity.getClass().getSimpleName(), SpigotTimings.tickTileEntityTimer);
+- SpigotTimings.tileEntityTypeTimingMap.put(entityType, result);
+- }
+- return result;
+- }
+-
+- /**
+- * Set of timers per world, to track world specific timings.
+- */
+- public static class WorldTimingsHandler {
+- public final CustomTimingsHandler mobSpawn;
+- public final CustomTimingsHandler doChunkUnload;
+- public final CustomTimingsHandler doTickPending;
+- public final CustomTimingsHandler doTickTiles;
+- public final CustomTimingsHandler doChunkMap;
+- public final CustomTimingsHandler doSounds;
+- public final CustomTimingsHandler entityTick;
+- public final CustomTimingsHandler tileEntityTick;
+- public final CustomTimingsHandler tileEntityPending;
+- public final CustomTimingsHandler tracker;
+- public final CustomTimingsHandler doTick;
+- public final CustomTimingsHandler tickEntities;
+-
+- public final CustomTimingsHandler syncChunkLoadTimer;
+- public final CustomTimingsHandler syncChunkLoadStructuresTimer;
+- public final CustomTimingsHandler syncChunkLoadEntitiesTimer;
+- public final CustomTimingsHandler syncChunkLoadTileEntitiesTimer;
+- public final CustomTimingsHandler syncChunkLoadTileTicksTimer;
+- public final CustomTimingsHandler syncChunkLoadPostTimer;
+-
+- public WorldTimingsHandler(Level server) {
+- String name = ((PrimaryLevelData) server.levelData).getLevelName() + " - ";
+-
+- this.mobSpawn = new CustomTimingsHandler("** " + name + "mobSpawn");
+- this.doChunkUnload = new CustomTimingsHandler("** " + name + "doChunkUnload");
+- this.doTickPending = new CustomTimingsHandler("** " + name + "doTickPending");
+- this.doTickTiles = new CustomTimingsHandler("** " + name + "doTickTiles");
+- this.doChunkMap = new CustomTimingsHandler("** " + name + "doChunkMap");
+- this.doSounds = new CustomTimingsHandler("** " + name + "doSounds");
+- this.entityTick = new CustomTimingsHandler("** " + name + "entityTick");
+- this.tileEntityTick = new CustomTimingsHandler("** " + name + "tileEntityTick");
+- this.tileEntityPending = new CustomTimingsHandler("** " + name + "tileEntityPending");
+-
+- this.syncChunkLoadTimer = new CustomTimingsHandler("** " + name + "syncChunkLoad");
+- this.syncChunkLoadStructuresTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Structures");
+- this.syncChunkLoadEntitiesTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Entities");
+- this.syncChunkLoadTileEntitiesTimer = new CustomTimingsHandler("** " + name + "chunkLoad - TileEntities");
+- this.syncChunkLoadTileTicksTimer = new CustomTimingsHandler("** " + name + "chunkLoad - TileTicks");
+- this.syncChunkLoadPostTimer = new CustomTimingsHandler("** " + name + "chunkLoad - Post");
+-
+-
+- this.tracker = new CustomTimingsHandler(name + "tracker");
+- this.doTick = new CustomTimingsHandler(name + "doTick");
+- this.tickEntities = new CustomTimingsHandler(name + "tickEntities");
+- }
+- }
+-}
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+index 24631135f90bb74bf829160ed079e152573666a2..f7833cd528797ba46b001db5208c29eb11ae2529 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+@@ -2809,6 +2809,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
+
+ CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
+ }
++
++ // Paper start
++ @Override
++ public int getPing()
++ {
++ return CraftPlayer.this.getPing();
++ }
++ // Paper end
+ };
+
+ public Player.Spigot spigot()
+diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+index 6effe47b32a8551aa6f6b11bc0315714a119e199..2c36d0796714997191c6540c34a9df60718065f6 100644
+--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
++++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+@@ -413,9 +413,7 @@ public class CraftScheduler implements BukkitScheduler {
+ if (task.isSync()) {
+ this.currentTask = task;
+ try {
+- task.timings.startTiming(); // Spigot
+ task.run();
+- task.timings.stopTiming(); // Spigot
+ } catch (final Throwable throwable) {
+ task.getOwner().getLogger().log(
+ Level.WARNING,
+diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+index e4d1eb4a0ce2c9874922585f6bb0d9ead433fde1..17680f112d0c7e7aee07e34477daa21ef2ddaa6f 100644
+--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
++++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+@@ -1,13 +1,11 @@
+ package org.bukkit.craftbukkit.scheduler;
+
+ import java.util.function.Consumer;
++
+ import org.bukkit.Bukkit;
+ import org.bukkit.plugin.Plugin;
+ import org.bukkit.scheduler.BukkitTask;
+
+-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
+-import org.spigotmc.CustomTimingsHandler; // Spigot
+-
+ public class CraftTask implements BukkitTask, Runnable { // Spigot
+
+ private volatile CraftTask next = null;
+@@ -26,13 +24,12 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
+ */
+ private volatile long period;
+ private long nextRun;
+- private final Runnable rTask;
+- private final Consumer<BukkitTask> cTask;
++ public final Runnable rTask;
++ public final Consumer<BukkitTask> cTask;
+ private final Plugin plugin;
+ private final int id;
+ private final long createdAt = System.nanoTime();
+
+- final CustomTimingsHandler timings; // Spigot
+ CraftTask() {
+ this(null, null, CraftTask.NO_REPEATING, CraftTask.NO_REPEATING);
+ }
+@@ -58,7 +55,6 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
+ }
+ this.id = id;
+ this.period = period;
+- this.timings = this.isSync() ? SpigotTimings.getPluginTaskTimings(this, period) : null; // Spigot
+ }
+
+ @Override
+@@ -137,9 +133,4 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
+ return true;
+ }
+
+- // Spigot start
+- public String getTaskName() {
+- return (this.getTaskClass() == null) ? "Unknown" : this.getTaskClass().getName();
+- }
+- // Spigot end
+ }
+diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+index f97eccb6a17c7876e1e002d798eb67bbe80571a0..dba31a2cbcfebe1f28883545ce4a70fcb9251aa6 100644
+--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
++++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+@@ -1,6 +1,7 @@
+ package org.bukkit.craftbukkit.util;
+
+ import org.bukkit.util.CachedServerIcon;
++import org.jetbrains.annotations.Nullable;
+
+ public class CraftIconCache implements CachedServerIcon {
+ public final byte[] value;
+@@ -8,4 +9,12 @@ public class CraftIconCache implements CachedServerIcon {
+ public CraftIconCache(final byte[] value) {
+ this.value = value;
+ }
++
++ @Override
++ public @Nullable String getData() {
++ if (this.value == null) {
++ return null;
++ }
++ return "data:image/png;base64," + new String(java.util.Base64.getEncoder().encode(this.value), java.nio.charset.StandardCharsets.UTF_8);
++ }
+ }
+diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
+index 3591b79481ac17bd02e59ac3c623d1c6991abd84..263df52c7f5e172a6b9118b4bc4672e443adedba 100644
+--- a/src/main/java/org/spigotmc/ActivationRange.java
++++ b/src/main/java/org/spigotmc/ActivationRange.java
+@@ -27,7 +27,6 @@ import net.minecraft.world.entity.projectile.ThrownTrident;
+ import net.minecraft.world.entity.raid.Raider;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.phys.AABB;
+-import org.bukkit.craftbukkit.SpigotTimings;
+
+ public class ActivationRange
+ {
+@@ -110,7 +109,6 @@ public class ActivationRange
+ */
+ public static void activateEntities(Level world)
+ {
+- SpigotTimings.entityActivationCheckTimer.startTiming();
+ final int miscActivationRange = world.spigotConfig.miscActivationRange;
+ final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
+ final int animalActivationRange = world.spigotConfig.animalActivationRange;
+@@ -137,7 +135,6 @@ public class ActivationRange
+
+ world.getEntities().get(ActivationRange.maxBB, ActivationRange::activateEntity);
+ }
+- SpigotTimings.entityActivationCheckTimer.stopTiming();
+ }
+
+ /**
+@@ -232,10 +229,8 @@ public class ActivationRange
+ */
+ public static boolean checkIfActive(Entity entity)
+ {
+- SpigotTimings.checkIfActiveTimer.startTiming();
+ // Never safe to skip fireworks or entities not yet added to chunk
+ if ( entity instanceof FireworkRocketEntity ) {
+- SpigotTimings.checkIfActiveTimer.stopTiming();
+ return true;
+ }
+
+@@ -259,7 +254,6 @@ public class ActivationRange
+ {
+ isActive = false;
+ }
+- SpigotTimings.checkIfActiveTimer.stopTiming();
+ return isActive;
+ }
+ }
diff --git a/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch
index ef3594f354..5e58214e0f 100644
--- a/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch
+++ b/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index f7af198966928ac28bd7e2851caae93a27974e5c..10e1b6bf90b249a5dd04bb10f0a742cdedae0a01 100644
+index 5650b4cfcd4008ac7f351d5bfb1fb8cc81da4caa..db7cad60c8f805dd1b4089673f5f9d073a429a67 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -462,6 +462,35 @@ public final class CraftServer implements Server {
+@@ -461,6 +461,35 @@ public final class CraftServer implements Server {
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
}
diff --git a/patches/server/0033-Expose-server-build-information.patch b/patches/server/0033-Expose-server-build-information.patch
index b560e277bd..83f13af41a 100644
--- a/patches/server/0033-Expose-server-build-information.patch
+++ b/patches/server/0033-Expose-server-build-information.patch
@@ -533,7 +533,7 @@ index 0000000000000000000000000000000000000000..790bad0494454ca12ee152e3de6da3da
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 31582d4f9d52c86cf834b9dc10e58b68c67f1272..5ce80e72ed677b464e7e7b2dcb616cdcb399686b 100644
+index 709c6361aa5eb78071ce9d0f2a65ce8a56af1443..b86d8a3756cb8c1adb1aceda57f60b0ccdb3f659 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -45,7 +45,6 @@ import java.util.Set;
@@ -553,7 +553,7 @@ index 31582d4f9d52c86cf834b9dc10e58b68c67f1272..5ce80e72ed677b464e7e7b2dcb616cdc
import org.bukkit.event.server.ServerLoadEvent;
// CraftBukkit end
-@@ -1784,7 +1781,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1740,7 +1737,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@DontObfuscate
public String getServerModName() {
@@ -563,10 +563,10 @@ index 31582d4f9d52c86cf834b9dc10e58b68c67f1272..5ce80e72ed677b464e7e7b2dcb616cdc
public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index de6cceeec4fc4a64d325b506ae9d9b0e0e0d90ff..8c1442f24a195e78500ad658828982bf2767aebc 100644
+index a129ddfe7b00d6abab94437806a5cfb9668e7cc9..e2cb85c8f121837e8a19e003e1e757f431dfaf2b 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -217,6 +217,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -215,6 +215,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
// Paper end - initialize global and world-defaults configuration
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
@@ -590,7 +590,7 @@ index f077b8ff0bf0d96628db3569132696b68fd79921..5f11f5b16766f9d1d5640ae037e259be
value.append("\n Plugins: {");
for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 10e1b6bf90b249a5dd04bb10f0a742cdedae0a01..9683759c36de3b9d791e56dc1fb993087c1bc37c 100644
+index db7cad60c8f805dd1b4089673f5f9d073a429a67..2bfa790a9f0ca07217c9d9f7dd916950d859530c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -11,8 +11,6 @@ import com.google.common.collect.MapMaker;
@@ -644,7 +644,7 @@ index 10e1b6bf90b249a5dd04bb10f0a742cdedae0a01..9683759c36de3b9d791e56dc1fb99308
this.structureManager = new CraftStructureManager(console.getStructureManager(), console.registryAccess());
this.dataPackManager = new CraftDataPackManager(this.getServer().getPackRepository());
this.serverTickManager = new CraftServerTickManager(console.tickRateManager());
-@@ -610,6 +605,13 @@ public final class CraftServer implements Server {
+@@ -609,6 +604,13 @@ public final class CraftServer implements Server {
return this.bukkitVersion;
}
@@ -692,21 +692,23 @@ index 03790abcc3474999db6d8986e50ebc2caf6eba0c..13f811173c67533ee02f70cc4b6b398c
t.printStackTrace();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 0285349c0e882c1d928240a7ece2f9cc9f4122f2..d22eb174d9c0cc5dd6418c478470c616b75801b2 100644
+index 4b2377a1de608b9142a28c66389d04290f7c0330..2b60572307e3ec23e21e09c34a04de9a1c57f136 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -459,6 +459,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
- public String getTimingsServerName() {
- return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
+@@ -464,6 +464,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+ return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT);
}
-+
+
++ // Paper start
+ @Override
+ public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
+ return new com.destroystokyo.paper.PaperVersionFetcher();
+ }
- // Paper end
-
- @Override
++ // Paper end
++
+ /**
+ * This helper class represents the different NBT Tags.
+ * <p>
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index f697d45e0ac4e9cdc8a46121510a04c0f294d91f..e086765dec32241bc5a77afcf072c77a40c6d785 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
diff --git a/patches/server/0036-Entity-Origin-API.patch b/patches/server/0036-Entity-Origin-API.patch
index e1281dbfae..47721fa03d 100644
--- a/patches/server/0036-Entity-Origin-API.patch
+++ b/patches/server/0036-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 a1565304c436258b561d97a6cc7aacecf68816b7..e2e949dbd8be52dc6a00414f0f79746ee554acd7 100644
+index f3633da64f990972cddc03f2fcfd34ced2955a7a..025363e6b51ff8aa089715b1ec2a0fa1caab65d6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2212,6 +2212,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2182,6 +2182,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit
diff --git a/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch b/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch
index 01c8a71861..7226372683 100644
--- a/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch
+++ b/patches/server/0037-Prevent-block-entity-and-entity-crashes.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent block entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 5df862e026e15e10e2fcc7c5a49e8a8022125579..d15c7ed69068ba5832c92860cae56ff4a96cd398 100644
+index c5e480c43668211a091e44ae50b40b025ff1dca9..071545e60f838fa6c930edc35f46e0ce9b73fb44 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -733,11 +733,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -726,11 +726,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
} catch (Throwable throwable) {
@@ -26,10 +26,10 @@ index 5df862e026e15e10e2fcc7c5a49e8a8022125579..d15c7ed69068ba5832c92860cae56ff4
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 9afe509b3455a7aabd11976fb8a7430d1bce065d..4536632687e71b02d5945cac3816b72ac540935e 100644
+index 751a5ae04e4de3f5d85eda20092a87ef4f547436..3d7c5db5514f9d4401da22d2df88c5614051e568 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -273,7 +273,12 @@ public abstract class BlockEntity {
+@@ -268,7 +268,12 @@ public abstract class BlockEntity {
public void fillCrashReportCategory(CrashReportCategory crashReportSection) {
crashReportSection.setDetail("Name", this::getNameForReporting);
if (this.level != null) {
@@ -44,10 +44,10 @@ index 9afe509b3455a7aabd11976fb8a7430d1bce065d..4536632687e71b02d5945cac3816b72a
}
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 717e4bf9f5ee0ec2c3a0b5cc65a50b0f6d649a8d..e1cd7497b1355030bf44b53aa30400604dff9aca 100644
+index f63d55bfe42b117c5b437e690124a98d94752a9a..79cf3089c128ef3c17d956da1e380670279ee5da 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -986,11 +986,11 @@ public class LevelChunk extends ChunkAccess {
+@@ -983,11 +983,11 @@ public class LevelChunk extends ChunkAccess {
gameprofilerfiller.pop();
} catch (Throwable throwable) {
@@ -62,5 +62,5 @@ index 717e4bf9f5ee0ec2c3a0b5cc65a50b0f6d649a8d..e1cd7497b1355030bf44b53aa3040060
+ LevelChunk.this.removeBlockEntity(this.getPos());
+ // Paper end - Prevent block entity and entity crashes
// Spigot start
- } finally {
- this.blockEntity.tickTimer.stopTiming();
+ }
+ }
diff --git a/patches/server/0040-Add-more-entities-to-activation-range-ignore-list.patch b/patches/server/0040-Add-more-entities-to-activation-range-ignore-list.patch
index 9eaf33d852..2c4e1fe578 100644
--- a/patches/server/0040-Add-more-entities-to-activation-range-ignore-list.patch
+++ b/patches/server/0040-Add-more-entities-to-activation-range-ignore-list.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add more entities to activation range ignore list
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
-index 2122e044d99902d2aff86693aaa424a50b9f8a13..5dac9bdb23de3d143cd678e583eaf6e8095bb209 100644
+index 263df52c7f5e172a6b9118b4bc4672e443adedba..dd1c5bc7522a4710cbfdd4764f6431e1e28d63cc 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
-@@ -92,6 +92,9 @@ public class ActivationRange
+@@ -91,6 +91,9 @@ public class ActivationRange
|| entity instanceof AbstractHurtingProjectile
|| entity instanceof LightningBolt
|| entity instanceof PrimedTnt
diff --git a/patches/server/0043-Optimize-explosions.patch b/patches/server/0043-Optimize-explosions.patch
index 78e4626f21..a5a1950402 100644
--- a/patches/server/0043-Optimize-explosions.patch
+++ b/patches/server/0043-Optimize-explosions.patch
@@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving
an entity's exposure during an explosion.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 5ce80e72ed677b464e7e7b2dcb616cdcb399686b..d04ce36f79523417c7c2b49a8324b52ef6a6f0f4 100644
+index b86d8a3756cb8c1adb1aceda57f60b0ccdb3f659..cc4c5fcbeca4862d8ff78b127cb3f2c07956dfaf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -401,6 +401,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -400,6 +400,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false;
@@ -22,10 +22,10 @@ index 5ce80e72ed677b464e7e7b2dcb616cdcb399686b..d04ce36f79523417c7c2b49a8324b52e
try {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index d15c7ed69068ba5832c92860cae56ff4a96cd398..a0b89abe50f4cea64f29e8957c535400658d4524 100644
+index 071545e60f838fa6c930edc35f46e0ce9b73fb44..e90dac1e46bca60896b027f670ba521d67c02c1e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -169,6 +169,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private org.spigotmc.TickLimiter entityLimiter;
private org.spigotmc.TickLimiter tileLimiter;
private int tileTickPosition;
diff --git a/patches/server/0045-Disable-thunder.patch b/patches/server/0045-Disable-thunder.patch
index b0c60085d2..78a2a9fd6a 100644
--- a/patches/server/0045-Disable-thunder.patch
+++ b/patches/server/0045-Disable-thunder.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index e2e949dbd8be52dc6a00414f0f79746ee554acd7..1e012aef9a515b2e312565e8fe7652f38e080e4b 100644
+index 025363e6b51ff8aa089715b1ec2a0fa1caab65d6..abb819c4263e6ea16152fbf55b044101ec8ec0d6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -603,7 +603,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -589,7 +589,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("thunder");
diff --git a/patches/server/0046-Disable-ice-and-snow.patch b/patches/server/0046-Disable-ice-and-snow.patch
index 8ba40908f9..73dcf9fa47 100644
--- a/patches/server/0046-Disable-ice-and-snow.patch
+++ b/patches/server/0046-Disable-ice-and-snow.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 1e012aef9a515b2e312565e8fe7652f38e080e4b..821df759e3410428b4558e22042c79f29238ebe2 100644
+index abb819c4263e6ea16152fbf55b044101ec8ec0d6..0e967e4c73dabc6cf6580d863c640cf4dff4f3bf 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -633,11 +633,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -619,11 +619,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
gameprofilerfiller.popPush("iceandsnow");
@@ -21,4 +21,4 @@ index 1e012aef9a515b2e312565e8fe7652f38e080e4b..821df759e3410428b4558e22042c79f2
+ } // Paper - Option to disable ice and snow
gameprofilerfiller.popPush("tickBlocks");
- timings.chunkTicksBlocks.startTiming(); // Paper
+ if (randomTickSpeed > 0) {
diff --git a/patches/server/0052-Disable-spigot-tick-limiters.patch b/patches/server/0052-Disable-spigot-tick-limiters.patch
index a588d23369..2872d59fb9 100644
--- a/patches/server/0052-Disable-spigot-tick-limiters.patch
+++ b/patches/server/0052-Disable-spigot-tick-limiters.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index a0b89abe50f4cea64f29e8957c535400658d4524..5fe8726af73eb5334f47046c93096341e987269b 100644
+index e90dac1e46bca60896b027f670ba521d67c02c1e..ed15f5c4a365a199d04e92d688035e4ab755e8db 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -706,9 +706,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -701,9 +701,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
boolean flag = this.tickRateManager().runsNormally();
int tilesThisCycle = 0;
diff --git a/patches/server/0053-Fix-spawn-location-event-changing-location.patch b/patches/server/0053-Fix-spawn-location-event-changing-location.patch
index 07448453cf..15086ed363 100644
--- a/patches/server/0053-Fix-spawn-location-event-changing-location.patch
+++ b/patches/server/0053-Fix-spawn-location-event-changing-location.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Fix spawn location event changing location
public net.minecraft.world.entity.Entity setRot(FF)V
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index b103d49458330be9f7fb3382c764b204a02a925a..2af4b853fde493c1fa5c8d530aae4d68b79f7ba0 100644
+index 56f046bac04205a813441907058c4ce21982d927..50b1e493a9adfa687dc22c66044c6aa243340b3f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -235,7 +235,10 @@ public abstract class PlayerList {
+@@ -234,7 +234,10 @@ public abstract class PlayerList {
player.spawnIn(worldserver1);
player.gameMode.setLevel((ServerLevel) player.level());
diff --git a/patches/server/0055-Improve-Player-chat-API-handling.patch b/patches/server/0055-Improve-Player-chat-API-handling.patch
index c119f32750..8c63e9bdb4 100644
--- a/patches/server/0055-Improve-Player-chat-API-handling.patch
+++ b/patches/server/0055-Improve-Player-chat-API-handling.patch
@@ -17,7 +17,7 @@ Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: SoSeDiK <[email protected]>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index d8fd2103a40d278c7ee4135c19dea3eb4534dda8..ab31b31c61d652275a667f34ab018e4c8d0cdc08 100644
+index fddc6b5abbad66ebe556ff8565c38c60b7883fce..55d61a4c93233c0d3994e75f41e29065c2f1ea93 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2032,7 +2032,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -29,21 +29,19 @@ index d8fd2103a40d278c7ee4135c19dea3eb4534dda8..ab31b31c61d652275a667f34ab018e4c
this.handleCommand(s);
} else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
// Do nothing, this is coming from a plugin
-@@ -2119,7 +2119,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
- }
+@@ -2120,6 +2120,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
-- private void handleCommand(String s) {
-+ public void handleCommand(String s) { // Paper - private -> public
+ private void handleCommand(String s) {
+ org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher
- co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
+
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 9683759c36de3b9d791e56dc1fb993087c1bc37c..3b58cc979c4e2fb5382f0c67ccfaa8440e9c785b 100644
+index 2bfa790a9f0ca07217c9d9f7dd916950d859530c..ec0d7e44235378380b7180ca1a9ca56b14dac1c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -937,7 +937,7 @@ public final class CraftServer implements Server {
+@@ -936,7 +936,7 @@ public final class CraftServer implements Server {
public boolean dispatchCommand(CommandSender sender, String commandLine) {
Preconditions.checkArgument(sender != null, "sender cannot be null");
Preconditions.checkArgument(commandLine != null, "commandLine cannot be null");
diff --git a/patches/server/0057-Expose-server-CommandMap.patch b/patches/server/0057-Expose-server-CommandMap.patch
index b491a42083..bc0e6fd63e 100644
--- a/patches/server/0057-Expose-server-CommandMap.patch
+++ b/patches/server/0057-Expose-server-CommandMap.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 3b58cc979c4e2fb5382f0c67ccfaa8440e9c785b..89778f8df5a4b639bb0fe5e7a0164ef55b96041a 100644
+index ec0d7e44235378380b7180ca1a9ca56b14dac1c7..63573ec7e8f855a1afd892c9615a45c1bc742ac1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2183,6 +2183,7 @@ public final class CraftServer implements Server {
+@@ -2182,6 +2182,7 @@ public final class CraftServer implements Server {
return this.helpMap;
}
diff --git a/patches/server/0061-Add-velocity-warnings.patch b/patches/server/0061-Add-velocity-warnings.patch
index a8358fe2a4..aafd524684 100644
--- a/patches/server/0061-Add-velocity-warnings.patch
+++ b/patches/server/0061-Add-velocity-warnings.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 89778f8df5a4b639bb0fe5e7a0164ef55b96041a..c80fe475edffce53363dfea658b9f13a2c6de1ca 100644
+index 63573ec7e8f855a1afd892c9615a45c1bc742ac1..bb562ada45b828c79d83afdd1687edd32cbaf1dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -305,6 +305,7 @@ public final class CraftServer implements Server {
diff --git a/patches/server/0062-Add-exception-reporting-event.patch b/patches/server/0062-Add-exception-reporting-event.patch
index 17d813039c..52fe575b57 100644
--- a/patches/server/0062-Add-exception-reporting-event.patch
+++ b/patches/server/0062-Add-exception-reporting-event.patch
@@ -91,10 +91,10 @@ index a5b18a04f482d05d3ca74918a580499b21c2fc3c..bd3f71c3eaa33258ff56062ea3a2099c
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 5fe8726af73eb5334f47046c93096341e987269b..574d8d311001ce15c2a2391caaec0a0b0b1653b5 100644
+index ed15f5c4a365a199d04e92d688035e4ab755e8db..f900c86697f5a3da45b724944a663fca8f89413e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -735,6 +735,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -728,6 +728,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start - Prevent block entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);
@@ -103,10 +103,10 @@ index 5fe8726af73eb5334f47046c93096341e987269b..574d8d311001ce15c2a2391caaec0a0b
// Paper end - Prevent block entity and entity crashes
}
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-index 1fe93e01c5e37397aded5d1f99214bf1bffe70b7..400166ad0199dd4b96684904ef4748cdb72381bb 100644
+index 9389fd53f2bff0a9ca389694b312dc6da58befaf..da0ddb8285e157be0cc7b940a9590be5e3061e3d 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-@@ -296,6 +296,7 @@ public final class NaturalSpawner {
+@@ -294,6 +294,7 @@ public final class NaturalSpawner {
NaturalSpawner.LOGGER.warn("Can't spawn entity of type: {}", BuiltInRegistries.ENTITY_TYPE.getKey(type));
} catch (Exception exception) {
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
@@ -114,7 +114,7 @@ index 1fe93e01c5e37397aded5d1f99214bf1bffe70b7..400166ad0199dd4b96684904ef4748cd
}
return null;
-@@ -384,6 +385,7 @@ public final class NaturalSpawner {
+@@ -382,6 +383,7 @@ public final class NaturalSpawner {
entity = biomesettingsmobs_c.type.create(world.getLevel(), EntitySpawnReason.NATURAL);
} catch (Exception exception) {
NaturalSpawner.LOGGER.warn("Failed to create mob", exception);
@@ -123,7 +123,7 @@ index 1fe93e01c5e37397aded5d1f99214bf1bffe70b7..400166ad0199dd4b96684904ef4748cd
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index e1cd7497b1355030bf44b53aa30400604dff9aca..401f18deb9e9f019ea17ad684f2d5c4ea5e7ef97 100644
+index 79cf3089c128ef3c17d956da1e380670279ee5da..96ea7a5d5d4a69c83c2401e64750d41cd70088fc 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -496,8 +496,13 @@ public class LevelChunk extends ChunkAccess {
@@ -142,7 +142,7 @@ index e1cd7497b1355030bf44b53aa30400604dff9aca..401f18deb9e9f019ea17ad684f2d5c4e
} else {
BlockState iblockdata1 = blockEntity.getBlockState();
-@@ -989,6 +994,7 @@ public class LevelChunk extends ChunkAccess {
+@@ -986,6 +991,7 @@ public class LevelChunk extends ChunkAccess {
// Paper start - Prevent block entity and entity crashes
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
@@ -171,10 +171,10 @@ index 15f273aa592828719de6e092d79a407dc8652dfe..b24e8255ab18eb5b2e4968aa62aa3d72
try {
filechannel.close();
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-index 4c376f67ae311b4fedea27b3475f9fb56054aec2..22ddc74d85efb4e80e6f06acdf93341a122804fc 100644
+index 2c36d0796714997191c6540c34a9df60718065f6..0c0115ccd8541ac62975f4759b4e2083ac560332 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-@@ -416,20 +416,25 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -415,20 +415,25 @@ public class CraftScheduler implements BukkitScheduler {
try {
task.run();
} catch (final Throwable throwable) {
diff --git a/patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch
index e5db1eccb0..3d53b13e30 100644
--- a/patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch
+++ b/patches/server/0063-Disable-Scoreboards-for-non-players-by-default.patch
@@ -23,10 +23,10 @@ index 49df5f4b09926556986e3a45d52ff299b878af76..8a61ca3cba2888e03e440519714705fe
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 6cc86412d45186dff312d9b1246fd1d03dbc15d8..b3f7d20c7853afaa396a90fbe23ed33d03fda8eb 100644
+index 6dba567e9f7a197af16598647f216b5323d1b601..47403887721914b632565947efae0dfa7c841588 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -873,6 +873,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -871,6 +871,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
String s = nbt.getString("Team");
Scoreboard scoreboard = this.level().getScoreboard();
PlayerTeam scoreboardteam = scoreboard.getPlayerTeam(s);
diff --git a/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch b/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch
index 8cf22bcec7..e933d73ae3 100644
--- a/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch
+++ b/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch
@@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
A config option has been added for those who depend on the previous behavior, but I don't expect that.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index c80fe475edffce53363dfea658b9f13a2c6de1ca..bd18711474807518ceefa9d097d94a78b9e66158 100644
+index bb562ada45b828c79d83afdd1687edd32cbaf1dc..d581bfad059e60a693bc27285a723979e7d7dd34 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -491,6 +491,7 @@ public final class CraftServer implements Server {
+@@ -490,6 +490,7 @@ public final class CraftServer implements Server {
if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear();
this.helpMap.initializeGeneralTopics();
@@ -27,7 +27,7 @@ index c80fe475edffce53363dfea658b9f13a2c6de1ca..bd18711474807518ceefa9d097d94a78
}
Plugin[] plugins = this.pluginManager.getPlugins();
-@@ -510,7 +511,7 @@ public final class CraftServer implements Server {
+@@ -509,7 +510,7 @@ public final class CraftServer implements Server {
this.commandMap.registerServerAliases();
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
diff --git a/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch
index b7b06d1ab8..8205a118dd 100644
--- a/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch
+++ b/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index bd18711474807518ceefa9d097d94a78b9e66158..2cc9faa6c560ceb8e50984e01a8f5caa042b62ba 100644
+index d581bfad059e60a693bc27285a723979e7d7dd34..2b4c1c3cc4b740d5aceb483c4066f23433c175d9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2809,5 +2809,23 @@ public final class CraftServer implements Server {
+@@ -2808,5 +2808,23 @@ public final class CraftServer implements Server {
}
return this.adventure$audiences;
}
diff --git a/patches/server/0069-Remove-Metadata-on-reload.patch b/patches/server/0069-Remove-Metadata-on-reload.patch
index ec1a1512d4..e5592929ff 100644
--- a/patches/server/0069-Remove-Metadata-on-reload.patch
+++ b/patches/server/0069-Remove-Metadata-on-reload.patch
@@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
This will remove metadata on reload so it does not crash everything if a plugin uses it.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 2cc9faa6c560ceb8e50984e01a8f5caa042b62ba..e9e612581683b27f35c0ef7adaae8e8b7eb677ec 100644
+index 2b4c1c3cc4b740d5aceb483c4066f23433c175d9..c6ea35f752c9a0bf9e5e07e3b501fd3fe8c30084 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1006,8 +1006,16 @@ public final class CraftServer implements Server {
+@@ -1005,8 +1005,16 @@ public final class CraftServer implements Server {
world.spigotConfig.init(); // Spigot
}
diff --git a/patches/server/0072-Add-World-Util-Methods.patch b/patches/server/0072-Add-World-Util-Methods.patch
index 11bb708681..4c7b9c4d27 100644
--- a/patches/server/0072-Add-World-Util-Methods.patch
+++ b/patches/server/0072-Add-World-Util-Methods.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 574d8d311001ce15c2a2391caaec0a0b0b1653b5..b37aeadf48e112170d64adc7587fdacbf6466aee 100644
+index f900c86697f5a3da45b724944a663fca8f89413e..d1b117f25bafb294f00c18be02be593061120956 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -341,6 +341,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -339,6 +339,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return chunk == null ? null : chunk.getFluidState(blockposition);
}
diff --git a/patches/server/0073-Custom-replacement-for-eaten-items.patch b/patches/server/0073-Custom-replacement-for-eaten-items.patch
index 04ecd88925..25ce947852 100644
--- a/patches/server/0073-Custom-replacement-for-eaten-items.patch
+++ b/patches/server/0073-Custom-replacement-for-eaten-items.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index b3f7d20c7853afaa396a90fbe23ed33d03fda8eb..4fa5e7127549e090338b11e6493413a3fab254a0 100644
+index 47403887721914b632565947efae0dfa7c841588..031b7f51959d1b8ca30e4a9fda0a2832516c9c0c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3984,10 +3984,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3982,10 +3982,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@@ -21,7 +21,7 @@ index b3f7d20c7853afaa396a90fbe23ed33d03fda8eb..4fa5e7127549e090338b11e6493413a3
this.level().getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
-@@ -4005,6 +4006,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4003,6 +4004,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else {
itemstack = this.useItem.finishUsingItem(this.level(), this);
}
@@ -34,7 +34,7 @@ index b3f7d20c7853afaa396a90fbe23ed33d03fda8eb..4fa5e7127549e090338b11e6493413a3
// CraftBukkit end
if (itemstack != this.useItem) {
-@@ -4012,6 +4019,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4010,6 +4017,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();
diff --git a/patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch
index b46ff88f53..d019f5b8cb 100644
--- a/patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch
+++ b/patches/server/0074-handle-NaN-health-absorb-values-and-repair-bad-data.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 4fa5e7127549e090338b11e6493413a3fab254a0..14d9e62c86309676ddd7eed19cce2f4b30a59b94 100644
+index 031b7f51959d1b8ca30e4a9fda0a2832516c9c0c..e5d1877f570b302f0b193e77ff5fdd7e89532513 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -833,7 +833,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -831,7 +831,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void readAdditionalSaveData(CompoundTag nbt) {
@@ -23,7 +23,7 @@ index 4fa5e7127549e090338b11e6493413a3fab254a0..14d9e62c86309676ddd7eed19cce2f4b
if (nbt.contains("attributes", 9) && this.level() != null && !this.level().isClientSide) {
this.getAttributes().load(nbt.getList("attributes", 10));
}
-@@ -1373,6 +1379,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1371,6 +1377,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void setHealth(float health) {
@@ -34,7 +34,7 @@ index 4fa5e7127549e090338b11e6493413a3fab254a0..14d9e62c86309676ddd7eed19cce2f4b
// CraftBukkit start - Handle scaled health
if (this instanceof ServerPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
-@@ -3841,7 +3851,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3839,7 +3849,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public final void setAbsorptionAmount(float absorptionAmount) {
diff --git a/patches/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch b/patches/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch
index 2a2c4f2b31..4cf4bf1181 100644
--- a/patches/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch
+++ b/patches/server/0076-Configurable-spawn-chances-for-skeleton-horses.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 821df759e3410428b4558e22042c79f29238ebe2..b80af01529206bf55ed028dac41798f91da22f51 100644
+index 0e967e4c73dabc6cf6580d863c640cf4dff4f3bf..e623f8e75ec895d18d854a1f2c0dbe41a67dffc8 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -608,7 +608,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -594,7 +594,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (this.isRainingAt(blockposition)) {
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
diff --git a/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch
index 58b312e58f..169cb0c090 100644
--- a/patches/server/0077-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch
+++ b/patches/server/0077-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 d04ce36f79523417c7c2b49a8324b52ef6a6f0f4..412f97df192788bf38103a4c1754def47931fad4 100644
+index cc4c5fcbeca4862d8ff78b127cb3f2c07956dfaf..ece7f630937abd6d341a2498bac2f0afcfb1ce0f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1621,6 +1621,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1585,6 +1585,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
@@ -18,10 +18,10 @@ index d04ce36f79523417c7c2b49a8324b52ef6a6f0f4..412f97df192788bf38103a4c1754def4
gameprofilerfiller.push(() -> {
String s = String.valueOf(worldserver);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index b80af01529206bf55ed028dac41798f91da22f51..237a0b4dd0e1c437a021e1d2104e6d523b1f745a 100644
+index e623f8e75ec895d18d854a1f2c0dbe41a67dffc8..50296ff319fd6f97e27ec1cb6bdcd7b85a6ce926 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -230,6 +230,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -228,6 +228,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// CraftBukkit start
public final LevelStorageSource.LevelStorageAccess convertable;
public final UUID uuid;
@@ -30,10 +30,10 @@ index b80af01529206bf55ed028dac41798f91da22f51..237a0b4dd0e1c437a021e1d2104e6d52
public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunk(x, z, false);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index b37aeadf48e112170d64adc7587fdacbf6466aee..9ad531912c4298658915b45b2870539059e8aadd 100644
+index d1b117f25bafb294f00c18be02be593061120956..9e88e9c473d1ab02344afd9634c625b95b5f38ef 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -491,7 +491,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -489,7 +489,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
CraftWorld world = ((ServerLevel) this).getWorld();
diff --git a/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch
index e529f629a6..2c0ae7a0fd 100644
--- a/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch
+++ b/patches/server/0078-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 237a0b4dd0e1c437a021e1d2104e6d523b1f745a..6ec83b72bb9f762d606fcbf4b93c70f2b025f48f 100644
+index 50296ff319fd6f97e27ec1cb6bdcd7b85a6ce926..c36032803e8b7e4a8537f02738075e1a6baed3b1 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2224,6 +2224,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2194,6 +2194,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
}
// Paper end - Entity origin API
@@ -16,7 +16,7 @@ index 237a0b4dd0e1c437a021e1d2104e6d523b1f745a..6ec83b72bb9f762d606fcbf4b93c70f2
}
public void onTrackingEnd(Entity entity) {
-@@ -2294,6 +2295,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2264,6 +2265,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
}
// CraftBukkit end
diff --git a/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch
index 5a4d792994..d5d3a231fc 100644
--- a/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch
+++ b/patches/server/0079-Configurable-Chunk-Inhabited-Time.patch
@@ -11,7 +11,7 @@ For people who want all chunks to be treated equally, you can chose a fixed valu
This allows to fine-tune vanilla gameplay.
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 401f18deb9e9f019ea17ad684f2d5c4ea5e7ef97..add5ec0f8e8bd0b89511dcb656e1d4cda702a86b 100644
+index 96ea7a5d5d4a69c83c2401e64750d41cd70088fc..a1b6c13d496519ef6ce240036cec6642626903b9 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -195,6 +195,13 @@ public class LevelChunk extends ChunkAccess {
diff --git a/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch
index 4f7a58fe85..d895ad4117 100644
--- a/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch
+++ b/patches/server/0083-Add-PlayerUseUnknownEntityEvent.patch
@@ -28,10 +28,10 @@ index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5
+ // Paper end - PlayerUseUnknownEntityEvent
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index ab31b31c61d652275a667f34ab018e4c8d0cdc08..33caf2d025a5770d2e3ebf044562314df6eb2c15 100644
+index 55d61a4c93233c0d3994e75f41e29065c2f1ea93..79db369b905744ab2fd69de1afc34feec589ec82 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2513,7 +2513,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2510,7 +2510,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
});
}
}
diff --git a/patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch b/patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch
index f087a2a35f..6e252c8f8b 100644
--- a/patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch
+++ b/patches/server/0085-Fix-Cancelling-BlockPlaceEvent-triggering-physics.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 6ec83b72bb9f762d606fcbf4b93c70f2b025f48f..5a9c703a252d0c1c57c23ef021e57cdd1de31585 100644
+index c36032803e8b7e4a8537f02738075e1a6baed3b1..828f47c6aadb609402f7237f8c234d595f39c970 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1402,11 +1402,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1372,11 +1372,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@Override
public void updateNeighborsAt(BlockPos pos, Block block) {
diff --git a/patches/server/0088-Configurable-Player-Collision.patch b/patches/server/0088-Configurable-Player-Collision.patch
index fe965dbf88..ef8bb51af9 100644
--- a/patches/server/0088-Configurable-Player-Collision.patch
+++ b/patches/server/0088-Configurable-Player-Collision.patch
@@ -18,10 +18,10 @@ index 9a1a961eabd4362c171da78c6be82c867f3696a4..1d0c473442b5c72245c356054440323e
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.playerPrefix);
ComponentSerialization.TRUSTED_STREAM_CODEC.encode(buf, this.playerSuffix);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 412f97df192788bf38103a4c1754def47931fad4..adab3f49722daa580dbb66012ab654a2a4a8084f 100644
+index ece7f630937abd6d341a2498bac2f0afcfb1ce0f..2e6531f39c6b65d79fc544459629ef61b2ad961a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -655,6 +655,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -654,6 +654,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}
@@ -43,10 +43,10 @@ index 412f97df192788bf38103a4c1754def47931fad4..adab3f49722daa580dbb66012ab654a2
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 2af4b853fde493c1fa5c8d530aae4d68b79f7ba0..04e25dba87cc1531898bdf9640d6da44ee3bf410 100644
+index 50b1e493a9adfa687dc22c66044c6aa243340b3f..d0d2b687ec851e3fa08864897774897a1fcd7df8 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -160,6 +160,7 @@ public abstract class PlayerList {
+@@ -159,6 +159,7 @@ public abstract class PlayerList {
// CraftBukkit start
private CraftServer cserver;
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
@@ -54,7 +54,7 @@ index 2af4b853fde493c1fa5c8d530aae4d68b79f7ba0..04e25dba87cc1531898bdf9640d6da44
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
-@@ -349,6 +350,13 @@ public abstract class PlayerList {
+@@ -348,6 +349,13 @@ public abstract class PlayerList {
player.loadAndSpawnParentVehicle(optional);
player.initInventoryMenu();
// CraftBukkit - Moved from above, added world
@@ -68,7 +68,7 @@ index 2af4b853fde493c1fa5c8d530aae4d68b79f7ba0..04e25dba87cc1531898bdf9640d6da44
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
}
-@@ -471,6 +479,16 @@ public abstract class PlayerList {
+@@ -470,6 +478,16 @@ public abstract class PlayerList {
entityplayer.doTick(); // SPIGOT-924
// CraftBukkit end
@@ -85,7 +85,7 @@ index 2af4b853fde493c1fa5c8d530aae4d68b79f7ba0..04e25dba87cc1531898bdf9640d6da44
this.save(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getRootVehicle();
-@@ -1098,6 +1116,13 @@ public abstract class PlayerList {
+@@ -1096,6 +1114,13 @@ public abstract class PlayerList {
}
// CraftBukkit end
diff --git a/patches/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch b/patches/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch
index b9219fec57..c6c6929c40 100644
--- a/patches/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch
+++ b/patches/server/0091-EntityRegainHealthEvent-isFastRegen-API.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
Don't even get me started
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 14d9e62c86309676ddd7eed19cce2f4b30a59b94..6ea3488a578a7464bd34df265742a777575c9029 100644
+index e5d1877f570b302f0b193e77ff5fdd7e89532513..4a6f9a8b7db8d0e1c3cca5a0a4856d38cb38b94e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1352,10 +1352,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1350,10 +1350,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
diff --git a/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch b/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch
index bc56cf8017..3ebd34b206 100644
--- a/patches/server/0093-remove-null-possibility-for-getServer-singleton.patch
+++ b/patches/server/0093-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 adab3f49722daa580dbb66012ab654a2a4a8084f..55d376d4ddc522cc1a9841471514aa077ebfaac9 100644
+index 2e6531f39c6b65d79fc544459629ef61b2ad961a..bdc4eafcad57bb0073662e904bde87e9ac5ed0f3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -204,6 +204,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
+@@ -203,6 +203,7 @@ import org.bukkit.event.server.ServerLoadEvent;
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource {
@@ -17,7 +17,7 @@ index adab3f49722daa580dbb66012ab654a2a4a8084f..55d376d4ddc522cc1a9841471514aa07
public static final Logger LOGGER = LogUtils.getLogger();
public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
public static final String VANILLA_BRAND = "vanilla";
-@@ -341,6 +342,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -340,6 +341,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server");
@@ -25,7 +25,7 @@ index adab3f49722daa580dbb66012ab654a2a4a8084f..55d376d4ddc522cc1a9841471514aa07
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
this.stopRecordingMetrics();
-@@ -2625,9 +2627,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2581,9 +2583,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return false;
}
diff --git a/patches/server/0097-Async-GameProfileCache-saving.patch b/patches/server/0097-Async-GameProfileCache-saving.patch
index 74a7b3d077..2c6cfabd1c 100644
--- a/patches/server/0097-Async-GameProfileCache-saving.patch
+++ b/patches/server/0097-Async-GameProfileCache-saving.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 55d376d4ddc522cc1a9841471514aa077ebfaac9..d32f0edc31f099f53656fe56dafb98903f132502 100644
+index bdc4eafcad57bb0073662e904bde87e9ac5ed0f3..383808406dd3a6c5b6098db93e638749489b80e3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1014,7 +1014,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1012,7 +1012,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");
@@ -18,10 +18,10 @@ index 55d376d4ddc522cc1a9841471514aa077ebfaac9..d32f0edc31f099f53656fe56dafb9890
// Spigot end
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 8c1442f24a195e78500ad658828982bf2767aebc..07969f82a3df1b71bee275a99ef9170a4f9bbbb0 100644
+index e2cb85c8f121837e8a19e003e1e757f431dfaf2b..5d9772a6c35e8f849e8879f510b2c586b148074c 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -269,7 +269,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -267,7 +267,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
if (this.convertOldUsers()) {
diff --git a/patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch b/patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch
index 8316a2f0e5..9d7f0e9161 100644
--- a/patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch
+++ b/patches/server/0099-Faster-redstone-torch-rapid-clock-removal.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Faster redstone torch rapid clock removal
Only resize the the redstone torch list once, since resizing arrays / lists is costly
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 9ad531912c4298658915b45b2870539059e8aadd..529b6eccb634f1f4677118c48e174b42eead2c0b 100644
+index 9e88e9c473d1ab02344afd9634c625b95b5f38ef..675dcb6eb5c33f6ec582ff20118d2f73745914a9 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -169,6 +169,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private org.spigotmc.TickLimiter tileLimiter;
private int tileTickPosition;
public final Map<ServerExplosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
diff --git a/patches/server/0101-Fix-global-sound-handling.patch b/patches/server/0101-Fix-global-sound-handling.patch
index 1c4cad79e3..8af9a82dea 100644
--- a/patches/server/0101-Fix-global-sound-handling.patch
+++ b/patches/server/0101-Fix-global-sound-handling.patch
@@ -11,10 +11,10 @@ Co-authored-by: lexikiq <[email protected]>
Co-authored-by: Aikar <[email protected]>
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 5a9c703a252d0c1c57c23ef021e57cdd1de31585..022ec2ff1c5a6a1de867b2a6dafb339d55a0905d 100644
+index 828f47c6aadb609402f7237f8c234d595f39c970..88c93a2e67c8d1bc227c7fa35bb919a40009f931 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1335,7 +1335,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1305,7 +1305,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@Override
public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) {
@@ -23,7 +23,7 @@ index 5a9c703a252d0c1c57c23ef021e57cdd1de31585..022ec2ff1c5a6a1de867b2a6dafb339d
}
public int getLogicalHeight() {
-@@ -2152,6 +2152,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2122,6 +2122,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return this.serverLevelData.getGameRules();
}
diff --git a/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch b/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch
index 8158eb6cc7..58541b2ca3 100644
--- a/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch
+++ b/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add setting for proxy online mode status
TODO: Add isProxyOnlineMode check to Metrics
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 07969f82a3df1b71bee275a99ef9170a4f9bbbb0..a5880be1ec88c70f7ee46225036b04dac87943d4 100644
+index 5d9772a6c35e8f849e8879f510b2c586b148074c..7c2b2dbc03bf4c3308a3e2a34260fee56d646488 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -575,7 +575,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -571,7 +571,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
public boolean enforceSecureProfile() {
DedicatedServerProperties dedicatedserverproperties = this.getProperties();
@@ -60,10 +60,10 @@ index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8c
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index e9e612581683b27f35c0ef7adaae8e8b7eb677ec..e04c3f623a316ac3a7b3700cfd5165e799bc0afc 100644
+index c6ea35f752c9a0bf9e5e07e3b501fd3fe8c30084..f970f821f5ac8cbad90ebb8dd8e8bf222ae229ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1892,7 +1892,7 @@ public final class CraftServer implements Server {
+@@ -1891,7 +1891,7 @@ public final class CraftServer implements Server {
if (result == null) {
GameProfile profile = null;
// Only fetch an online UUID in online mode
diff --git a/patches/server/0106-Configurable-packet-in-spam-threshold.patch b/patches/server/0106-Configurable-packet-in-spam-threshold.patch
index 3a0784210e..b28e858037 100644
--- a/patches/server/0106-Configurable-packet-in-spam-threshold.patch
+++ b/patches/server/0106-Configurable-packet-in-spam-threshold.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable packet in spam threshold
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 33caf2d025a5770d2e3ebf044562314df6eb2c15..d5952a0ea86a562cb7ff2e9597260ed9c8ad7192 100644
+index 79db369b905744ab2fd69de1afc34feec589ec82..be690a8a22c126b007e623c8fe627bab00a28bad 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1545,13 +1545,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0107-Configurable-flying-kick-messages.patch b/patches/server/0107-Configurable-flying-kick-messages.patch
index 1c746539c1..00bd532614 100644
--- a/patches/server/0107-Configurable-flying-kick-messages.patch
+++ b/patches/server/0107-Configurable-flying-kick-messages.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flying kick messages
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index d5952a0ea86a562cb7ff2e9597260ed9c8ad7192..d02c743c8a4fe5d640df53dda881e1d1cba05f5f 100644
+index be690a8a22c126b007e623c8fe627bab00a28bad..bc0d7bfb01a613c8fa567238f973f834cf3e3f17 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -355,7 +355,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch b/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch
index a4e93d3f78..aa356f414e 100644
--- a/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch
+++ b/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index e04c3f623a316ac3a7b3700cfd5165e799bc0afc..1f028c40dbe159f836e255ec52287903bca9fab8 100644
+index f970f821f5ac8cbad90ebb8dd8e8bf222ae229ae..c36bba560d5b17c69c2034cd1fcd711234c13414 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2835,5 +2835,24 @@ public final class CraftServer implements Server {
+@@ -2834,5 +2834,24 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
}
diff --git a/patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch b/patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch
index 2fc9b6d341..526301e39d 100644
--- a/patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch
+++ b/patches/server/0115-Optimize-Level.hasChunkAt-BlockPosition-Z.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Optimize Level.hasChunkAt(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 529b6eccb634f1f4677118c48e174b42eead2c0b..658ceb9c43bb48f88596cd7270e276a369a3937e 100644
+index 675dcb6eb5c33f6ec582ff20118d2f73745914a9..943c14b26cf5b1c9f9ea1acec058cecac3b93bf7 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -342,6 +342,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -340,6 +340,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return chunk == null ? null : chunk.getFluidState(blockposition);
}
diff --git a/patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch b/patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch
index ad688961b8..96ee3335c0 100644
--- a/patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch
+++ b/patches/server/0123-Provide-E-TE-Chunk-count-stat-methods.patch
@@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 658ceb9c43bb48f88596cd7270e276a369a3937e..b34663ba24a0925c7fe65b354f4029c51ecc3bd1 100644
+index 943c14b26cf5b1c9f9ea1acec058cecac3b93bf7..e5eac1977f77b7ce1112bfe7ac1b77d9ef4d90f4 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -116,7 +116,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/0124-Enforce-Sync-Player-Saves.patch b/patches/server/0124-Enforce-Sync-Player-Saves.patch
index 7278b20368..bbf020dcb3 100644
--- a/patches/server/0124-Enforce-Sync-Player-Saves.patch
+++ b/patches/server/0124-Enforce-Sync-Player-Saves.patch
@@ -7,20 +7,18 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 04e25dba87cc1531898bdf9640d6da44ee3bf410..18d4ee1e1fb37848ac6587a0a68785be1851b1e8 100644
+index d0d2b687ec851e3fa08864897774897a1fcd7df8..f9ffae36beb13db416432068d8ee00de21d0c1fe 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -998,11 +998,13 @@ public abstract class PlayerList {
+@@ -997,10 +997,12 @@ public abstract class PlayerList {
}
public void saveAll() {
+ io.papermc.paper.util.MCUtil.ensureMain("Save Players" , () -> { // Paper - Ensure main
- MinecraftTimings.savePlayers.startTiming(); // Paper
for (int i = 0; i < this.players.size(); ++i) {
-- this.save((ServerPlayer) this.players.get(i));
-+ this.save(this.players.get(i));
+ this.save((ServerPlayer) this.players.get(i));
}
- MinecraftTimings.savePlayers.stopTiming(); // Paper
+
+ return null; }); // Paper - ensure main
}
diff --git a/patches/server/0125-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/server/0125-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
index 6f2899e0db..122c225e01 100644
--- a/patches/server/0125-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
+++ b/patches/server/0125-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
@@ -127,10 +127,10 @@ index 7f3ac3e8631e30c968ef664f994ad208d05eb4a3..b9160ebca0d11dbbf96da5f0f5810d30
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 6ea3488a578a7464bd34df265742a777575c9029..237025be183b3cc93920430075edcc0bb2899b68 100644
+index 4a6f9a8b7db8d0e1c3cca5a0a4856d38cb38b94e..7a648a8c3f25397e1c883a42648b21a05901513f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1837,7 +1837,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1835,7 +1835,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void dropExperience(ServerLevel world, @Nullable Entity attacker) {
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
if (!(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
@@ -285,10 +285,10 @@ index 56d8ed71861b0a47692fde4c5acc97aaba8166da..13bc52bc856031c930370828b0381e43
world.levelEvent(1042, blockposition, 0);
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index 3cefda12d4c2ca2c4e9ef97eff961a55af164d6b..43c2b411115d3a8a0e47d3e2277789b2667897af 100644
+index 27cbec37c6ea278232970ae035795fdecca71735..f1711f774f844024ca7b678385daaace6cda9f46 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -363,8 +363,13 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -354,8 +354,13 @@ public class Block extends BlockBehaviour implements ItemLike {
}
public void popExperience(ServerLevel world, BlockPos pos, int size) {
diff --git a/patches/server/0126-Cap-Entity-Collisions.patch b/patches/server/0126-Cap-Entity-Collisions.patch
index c5acd9fe9a..0a1d097e37 100644
--- a/patches/server/0126-Cap-Entity-Collisions.patch
+++ b/patches/server/0126-Cap-Entity-Collisions.patch
@@ -24,10 +24,10 @@ index 847fd720f11e89d906430c820bc92afe0454761d..b1b26e7c0f66f0697bcfe9eb045d45f3
@javax.annotation.Nullable
private org.bukkit.util.Vector origin;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 237025be183b3cc93920430075edcc0bb2899b68..f2f8fbc8a8cf32bcba0ad7ac9b6cdd75468e062a 100644
+index 7a648a8c3f25397e1c883a42648b21a05901513f..bcc0137fec45406e70231b4e2a5bd69dc08ffb5a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3642,10 +3642,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3640,10 +3640,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
Iterator iterator1 = list.iterator();
diff --git a/patches/server/0127-Remove-CraftScheduler-Async-Task-Debugger.patch b/patches/server/0127-Remove-CraftScheduler-Async-Task-Debugger.patch
index 8c7d283f77..15ad3dc3e2 100644
--- a/patches/server/0127-Remove-CraftScheduler-Async-Task-Debugger.patch
+++ b/patches/server/0127-Remove-CraftScheduler-Async-Task-Debugger.patch
@@ -9,10 +9,10 @@ One report of a suspected memory leak with the system.
This adds additional overhead to asynchronous task dispatching
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-index 22ddc74d85efb4e80e6f06acdf93341a122804fc..0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6 100644
+index 0c0115ccd8541ac62975f4759b4e2083ac560332..300d31e31a55dbee3489320e21e42f14ac429478 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-@@ -433,7 +433,7 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -432,7 +432,7 @@ public class CraftScheduler implements BukkitScheduler {
}
this.parsePending();
} else {
@@ -21,16 +21,16 @@ index 22ddc74d85efb4e80e6f06acdf93341a122804fc..0e7f402a7b841c5f6f5a4b699b7bb3d9
this.executor.execute(new com.destroystokyo.paper.ServerSchedulerReportingWrapper(task)); // Paper
// We don't need to parse pending
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
-@@ -450,7 +450,7 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -447,7 +447,7 @@ public class CraftScheduler implements BukkitScheduler {
+ }
this.pending.addAll(temp);
temp.clear();
- MinecraftTimings.bukkitSchedulerFinishTimer.stopTiming(); // Paper
- this.debugHead = this.debugHead.getNextHead(this.currentTick);
+ //this.debugHead = this.debugHead.getNextHead(this.currentTick); // Paper
}
private void addTask(final CraftTask task) {
-@@ -514,10 +514,15 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -509,10 +509,15 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public String toString() {
diff --git a/patches/server/0128-Properly-handle-async-calls-to-restart-the-server.patch b/patches/server/0128-Properly-handle-async-calls-to-restart-the-server.patch
index f34ed462be..2c9eb1dd3c 100644
--- a/patches/server/0128-Properly-handle-async-calls-to-restart-the-server.patch
+++ b/patches/server/0128-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 d32f0edc31f099f53656fe56dafb98903f132502..5e9b85a46708cfe297533f13255629d72cd09c73 100644
+index 383808406dd3a6c5b6098db93e638749489b80e3..0adba72139779a20eed8f489f7cfaff9e84e24f4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -248,6 +248,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -247,6 +247,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private Map<ResourceKey<Level>, ServerLevel> levels;
private PlayerList playerList;
private volatile boolean running;
@@ -41,7 +41,7 @@ index d32f0edc31f099f53656fe56dafb98903f132502..5e9b85a46708cfe297533f13255629d7
private boolean stopped;
private int tickCount;
private int ticksUntilAutosave;
-@@ -953,7 +954,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -951,7 +952,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 d32f0edc31f099f53656fe56dafb98903f132502..5e9b85a46708cfe297533f13255629d7
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
}
-@@ -1033,6 +1034,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1031,6 +1032,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void halt(boolean waitForShutdown) {
@@ -64,10 +64,10 @@ index d32f0edc31f099f53656fe56dafb98903f132502..5e9b85a46708cfe297533f13255629d7
if (waitForShutdown) {
try {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 18d4ee1e1fb37848ac6587a0a68785be1851b1e8..0a63e32b4e51500dd808ad2360d0521bf9632180 100644
+index f9ffae36beb13db416432068d8ee00de21d0c1fe..1f3dc7f2376854be577cb6742aa5d87d898b9882 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1112,8 +1112,15 @@ public abstract class PlayerList {
+@@ -1110,8 +1110,15 @@ public abstract class PlayerList {
}
public void removeAll() {
diff --git a/patches/server/0129-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/0129-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
index 90926803a2..7160cf1fcd 100644
--- a/patches/server/0129-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
+++ b/patches/server/0129-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
@@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index d02c743c8a4fe5d640df53dda881e1d1cba05f5f..74aef01b0b46050f87fd670c435b54e9b98037e1 100644
+index bc0d7bfb01a613c8fa567238f973f834cf3e3f17..7be9c0054ae3bf0d9b9327271a4ddf56a81d6448 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2276,6 +2276,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2273,6 +2273,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
switch (packet.getAction()) {
case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true);
diff --git a/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch b/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch
index af19ed2453..3f1a854c8e 100644
--- a/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch
+++ b/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 1f028c40dbe159f836e255ec52287903bca9fab8..271f299823495fd92c49a1fbb04e1daa501fafb0 100644
+index c36bba560d5b17c69c2034cd1fcd711234c13414..3f14b4bf9b986cce9abded06d1cfe72ca3c9bcaf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2854,5 +2854,10 @@ public final class CraftServer implements Server {
+@@ -2853,5 +2853,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases();
return true;
}
diff --git a/patches/server/0136-Basic-PlayerProfile-API.patch b/patches/server/0136-Basic-PlayerProfile-API.patch
index b9e446f056..44c9e746de 100644
--- a/patches/server/0136-Basic-PlayerProfile-API.patch
+++ b/patches/server/0136-Basic-PlayerProfile-API.patch
@@ -626,7 +626,7 @@ index 416b26c2ab62b29d640169166980e398d5824b14..774d81c702edb76a2f6184d4dc53687d
String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 271f299823495fd92c49a1fbb04e1daa501fafb0..d18228961bfd201e922e1bd1ab41bb6b53124c5c 100644
+index 3f14b4bf9b986cce9abded06d1cfe72ca3c9bcaf..cc71aac4de75eafd7b7128b06b46d0439b77c486 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -265,6 +265,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@@ -647,7 +647,7 @@ index 271f299823495fd92c49a1fbb04e1daa501fafb0..d18228961bfd201e922e1bd1ab41bb6b
CraftItemFactory.instance();
CraftEntityFactory.instance();
}
-@@ -2859,5 +2863,39 @@ public final class CraftServer implements Server {
+@@ -2858,5 +2862,39 @@ public final class CraftServer implements Server {
public boolean suggestPlayerNamesWhenNullTabCompletions() {
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
}
diff --git a/patches/server/0137-Add-UnknownCommandEvent.patch b/patches/server/0137-Add-UnknownCommandEvent.patch
index a49ad284ae..652711b606 100644
--- a/patches/server/0137-Add-UnknownCommandEvent.patch
+++ b/patches/server/0137-Add-UnknownCommandEvent.patch
@@ -78,10 +78,10 @@ index 603d0fa7f9690a09dca3c744bc4f90ac31132b90..2008fd542eaf1c2fac776ae1751c227a
return null;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index d18228961bfd201e922e1bd1ab41bb6b53124c5c..fa6284ebe3bdbf97b40a2ab61ba94062cdcf045e 100644
+index cc71aac4de75eafd7b7128b06b46d0439b77c486..2d1f92f75e83aacd39440d2619befdf6cd545af4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -951,7 +951,13 @@ public final class CraftServer implements Server {
+@@ -950,7 +950,13 @@ public final class CraftServer implements Server {
// Spigot start
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
diff --git a/patches/server/0145-ProfileWhitelistVerifyEvent.patch b/patches/server/0145-ProfileWhitelistVerifyEvent.patch
index 9f002f8ecd..988ef567ab 100644
--- a/patches/server/0145-ProfileWhitelistVerifyEvent.patch
+++ b/patches/server/0145-ProfileWhitelistVerifyEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 0a63e32b4e51500dd808ad2360d0521bf9632180..61687b2dce3964afc588e792cf765717b6d066dc 100644
+index 1f3dc7f2376854be577cb6742aa5d87d898b9882..5cb84271abdabc0f2d44ad9425828431f8818a47 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -591,9 +591,9 @@ public abstract class PlayerList {
+@@ -590,9 +590,9 @@ public abstract class PlayerList {
// return chatmessage;
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
@@ -21,7 +21,7 @@ index 0a63e32b4e51500dd808ad2360d0521bf9632180..61687b2dce3964afc588e792cf765717
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
-@@ -962,7 +962,25 @@ public abstract class PlayerList {
+@@ -961,7 +961,25 @@ public abstract class PlayerList {
}
public boolean isWhiteListed(GameProfile profile) {
diff --git a/patches/server/0151-Add-PlayerJumpEvent.patch b/patches/server/0151-Add-PlayerJumpEvent.patch
index 1a5ee572ed..6e1404774e 100644
--- a/patches/server/0151-Add-PlayerJumpEvent.patch
+++ b/patches/server/0151-Add-PlayerJumpEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 74aef01b0b46050f87fd670c435b54e9b98037e1..1140eac4bb9443508df61e7a50d54add4b206654 100644
+index 7be9c0054ae3bf0d9b9327271a4ddf56a81d6448..414077a1fed2955bd64ac7091af1daeda2a92e2c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1209,7 +1209,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0156-Add-PlayerArmorChangeEvent.patch b/patches/server/0156-Add-PlayerArmorChangeEvent.patch
index 3655d4701a..1f465410c3 100644
--- a/patches/server/0156-Add-PlayerArmorChangeEvent.patch
+++ b/patches/server/0156-Add-PlayerArmorChangeEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index f2f8fbc8a8cf32bcba0ad7ac9b6cdd75468e062a..76b71af07a311bc415b36f517afab31505a14483 100644
+index bcc0137fec45406e70231b4e2a5bd69dc08ffb5a..84e11e2c62e643f959f1a570a27f6ad07df165d4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3285,6 +3285,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3283,6 +3283,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
itemstack = this.getItemBySlot(enumitemslot);
if (this.equipmentHasChanged(itemstack2, itemstack)) {
diff --git a/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch b/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch
index c3de85edca..12f777016d 100644
--- a/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch
+++ b/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: Block entity unload lag spike
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index b34663ba24a0925c7fe65b354f4029c51ecc3bd1..106f4dd7f49d3b81a9bc08cd034cccac90042f84 100644
+index e5eac1977f77b7ce1112bfe7ac1b77d9ef4d90f4..b8a3116ab104405c26d97f4103eb426f5367071a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -728,6 +728,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -723,6 +723,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
boolean flag = this.tickRateManager().runsNormally();
int tilesThisCycle = 0;
@@ -17,7 +17,7 @@ index b34663ba24a0925c7fe65b354f4029c51ecc3bd1..106f4dd7f49d3b81a9bc08cd034cccac
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
-@@ -736,12 +738,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -731,12 +733,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity.isRemoved()) {
// Spigot start
tilesThisCycle--;
@@ -30,5 +30,5 @@ index b34663ba24a0925c7fe65b354f4029c51ecc3bd1..106f4dd7f49d3b81a9bc08cd034cccac
}
+ this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
- this.timings.tileEntityTick.stopTiming(); // Spigot
this.tickingBlockEntities = false;
+ gameprofilerfiller.pop();
diff --git a/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch b/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch
index a31f1f1496..983ff7742b 100644
--- a/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch
+++ b/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch
@@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 106f4dd7f49d3b81a9bc08cd034cccac90042f84..c628524274110bcad175472dbcb82e6c62476a12 100644
+index b8a3116ab104405c26d97f4103eb426f5367071a..e0986a141384de0ede38c88c2b116e083c63efe4 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -151,7 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -30,7 +30,7 @@ index 106f4dd7f49d3b81a9bc08cd034cccac90042f84..c628524274110bcad175472dbcb82e6c
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
public List<ItemEntity> captureDrops;
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
-@@ -384,7 +384,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -382,7 +382,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
@@ -39,7 +39,7 @@ index 106f4dd7f49d3b81a9bc08cd034cccac90042f84..c628524274110bcad175472dbcb82e6c
if (blockstate == null) {
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
this.capturedBlockStates.put(pos.immutable(), blockstate);
-@@ -405,7 +405,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -403,7 +403,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start - capture blockstates
boolean captured = false;
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
@@ -49,7 +49,7 @@ index 106f4dd7f49d3b81a9bc08cd034cccac90042f84..c628524274110bcad175472dbcb82e6c
this.capturedBlockStates.put(pos.immutable(), blockstate);
captured = true;
}
-@@ -608,7 +609,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -606,7 +607,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public BlockState getBlockState(BlockPos pos) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
diff --git a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
index 3b12a52009..97e12295c9 100644
--- a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
+++ b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
@@ -13,10 +13,10 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
If Tile Entity was null, correct Sign to return empty lines instead of null
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 4536632687e71b02d5945cac3816b72ac540935e..46a831f86b512f4228be8ccee40fb0f7bf0d6df6 100644
+index 3d7c5db5514f9d4401da22d2df88c5614051e568..50413d317ce0282752c57535637f87d529f4c09f 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -59,6 +59,7 @@ public abstract class BlockEntity {
+@@ -54,6 +54,7 @@ public abstract class BlockEntity {
this.worldPosition = pos.immutable();
this.validateBlockState(state);
this.blockState = state;
@@ -24,7 +24,7 @@ index 4536632687e71b02d5945cac3816b72ac540935e..46a831f86b512f4228be8ccee40fb0f7
}
private void validateBlockState(BlockState state) {
-@@ -92,7 +93,7 @@ public abstract class BlockEntity {
+@@ -87,7 +88,7 @@ public abstract class BlockEntity {
// CraftBukkit start - read container
protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registries) {
@@ -33,7 +33,7 @@ index 4536632687e71b02d5945cac3816b72ac540935e..46a831f86b512f4228be8ccee40fb0f7
net.minecraft.nbt.Tag persistentDataTag = nbt.get("PublicBukkitValues");
if (persistentDataTag instanceof CompoundTag) {
-@@ -380,8 +381,15 @@ public abstract class BlockEntity {
+@@ -375,8 +376,15 @@ public abstract class BlockEntity {
// CraftBukkit start - add method
public InventoryHolder getOwner() {
diff --git a/patches/server/0161-AsyncTabCompleteEvent.patch b/patches/server/0161-AsyncTabCompleteEvent.patch
index 8bf913b966..2436de2911 100644
--- a/patches/server/0161-AsyncTabCompleteEvent.patch
+++ b/patches/server/0161-AsyncTabCompleteEvent.patch
@@ -16,7 +16,7 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent
Co-authored-by: Aikar <[email protected]>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 1140eac4bb9443508df61e7a50d54add4b206654..752460c4650bebb2860bea82ca186a0f97b1692b 100644
+index 414077a1fed2955bd64ac7091af1daeda2a92e2c..79d9a58c66382fd94ab5f6020285e341b0114f6a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -722,21 +722,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -80,10 +80,10 @@ index 1140eac4bb9443508df61e7a50d54add4b206654..752460c4650bebb2860bea82ca186a0f
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index fa6284ebe3bdbf97b40a2ab61ba94062cdcf045e..367ecbb023ddfbadb92aa4351ff601a3ed58a358 100644
+index 2d1f92f75e83aacd39440d2619befdf6cd545af4..1dd440057cb1d8acce7bfaa7ab1814937a4c63af 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2298,7 +2298,7 @@ public final class CraftServer implements Server {
+@@ -2297,7 +2297,7 @@ public final class CraftServer implements Server {
offers = this.tabCompleteChat(player, message);
}
diff --git a/patches/server/0164-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0164-PlayerNaturallySpawnCreaturesEvent.patch
index 176e327764..f61ad3434c 100644
--- a/patches/server/0164-PlayerNaturallySpawnCreaturesEvent.patch
+++ b/patches/server/0164-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 30b28d9523820ed138c837ab9ee9bbb23c0dd285..01c32ed14b1047671883911f8606ef2924ebee73 100644
+index 3bb6eaabe8f62b556a52b83227b48f8324a9d0f0..b8aff86c8533ea92b0244ea85ed786073c4053a8 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1100,7 +1100,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1098,7 +1098,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
@@ -23,7 +23,7 @@ index 30b28d9523820ed138c837ab9ee9bbb23c0dd285..01c32ed14b1047671883911f8606ef29
// Spigot end
Iterator iterator = this.playerMap.getAllPlayers().iterator();
-@@ -1112,6 +1114,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1110,6 +1112,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
entityplayer = (ServerPlayer) iterator.next();
@@ -40,10 +40,10 @@ index 30b28d9523820ed138c837ab9ee9bbb23c0dd285..01c32ed14b1047671883911f8606ef29
return true;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index 93422468474189343cdc1e29f06f6dfb12e4760a..fef86453d5cf0fe0f11a2a061169cd301b777434 100644
+index ccb6f28689a3cf7da4ea323c5dd8f595036c4b43..d4eb7608a3e40d2da4c427e9b3a2ce916be86df1 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -520,6 +520,15 @@ public class ServerChunkCache extends ChunkSource {
+@@ -504,6 +504,15 @@ public class ServerChunkCache extends ChunkSource {
List list1;
if (flag && (this.spawnEnemies || this.spawnFriendlies)) {
diff --git a/patches/server/0166-PreCreatureSpawnEvent.patch b/patches/server/0166-PreCreatureSpawnEvent.patch
index 8c22573ffb..0f7306bfc5 100644
--- a/patches/server/0166-PreCreatureSpawnEvent.patch
+++ b/patches/server/0166-PreCreatureSpawnEvent.patch
@@ -55,10 +55,10 @@ index e139ed6bc6f2dd07fe546588b31309ba30ed9755..34c3bf85473b3ad89355ebc21b68c59b
if (t0 != null) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index 970161efa46b3a71ddae665f9df5966c70fd3471..5fe268b5c3297de7650f5d1f310cdf8ac231de75 100644
+index 17ab230c95901f0533997ac117d5b3d852fcd467..8f4ec4f0ea7ff2f9a952120785aea65f6559f897 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -506,6 +506,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
+@@ -497,6 +497,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@Nullable
public T spawn(ServerLevel worldserver, @Nullable Consumer<T> consumer, BlockPos blockposition, EntitySpawnReason entityspawnreason, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
// CraftBukkit end
@@ -114,10 +114,10 @@ index 6c29e55239fdcf8df3b9dc012aa80cebcd3a837a..bb3f3bec350dda43dbf5eda0a8c8057a
Entity entity = EntityType.loadEntityRecursive(nbttagcompound, world, EntitySpawnReason.SPAWNER, (entity1) -> {
entity1.moveTo(d0, d1, d2, entity1.getYRot(), entity1.getXRot());
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-index 400166ad0199dd4b96684904ef4748cdb72381bb..0b41149ae134084cef4016241ce923dac0349846 100644
+index da0ddb8285e157be0cc7b940a9590be5e3061e3d..5a0ea71dc39c582ef6c843dc0532adb04ba120ce 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-@@ -230,7 +230,13 @@ public final class NaturalSpawner {
+@@ -228,7 +228,13 @@ public final class NaturalSpawner {
j1 = biomesettingsmobs_c.minCount + world.random.nextInt(1 + biomesettingsmobs_c.maxCount - biomesettingsmobs_c.minCount);
}
@@ -132,7 +132,7 @@ index 400166ad0199dd4b96684904ef4748cdb72381bb..0b41149ae134084cef4016241ce923da
Mob entityinsentient = NaturalSpawner.getMobForSpawn(world, biomesettingsmobs_c.type);
if (entityinsentient == null) {
-@@ -278,10 +284,31 @@ public final class NaturalSpawner {
+@@ -276,10 +282,31 @@ public final class NaturalSpawner {
return squaredDistance <= 576.0D ? false : (world.getSharedSpawnPos().closerToCenterThan(new Vec3((double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D), 24.0D) ? false : Objects.equals(new ChunkPos(pos), chunk.getPos()) || world.isNaturalSpawningAllowed((BlockPos) pos));
}
diff --git a/patches/server/0174-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0174-Implement-extended-PaperServerListPingEvent.patch
index caa788dc53..e0dbee4fe8 100644
--- a/patches/server/0174-Implement-extended-PaperServerListPingEvent.patch
+++ b/patches/server/0174-Implement-extended-PaperServerListPingEvent.patch
@@ -170,7 +170,7 @@ index 0000000000000000000000000000000000000000..30a19d10869f73d67b794e8e4c035bc5
+
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 5e9b85a46708cfe297533f13255629d72cd09c73..fe981e45b3b61f24da3e137c68312e98977dad73 100644
+index 0adba72139779a20eed8f489f7cfaff9e84e24f4..260d755666efc94e2ea2c8fdb38d7deddda82c08 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -3,6 +3,9 @@ package net.minecraft.server;
@@ -183,7 +183,7 @@ index 5e9b85a46708cfe297533f13255629d72cd09c73..fe981e45b3b61f24da3e137c68312e98
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
-@@ -1592,7 +1595,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1564,7 +1567,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hidesOnlinePlayers()) {
return new ServerStatus.Players(i, list.size(), List.of());
} else {
diff --git a/patches/server/0176-Player.setPlayerProfile-API.patch b/patches/server/0176-Player.setPlayerProfile-API.patch
index 4f18504a3f..d971b0d455 100644
--- a/patches/server/0176-Player.setPlayerProfile-API.patch
+++ b/patches/server/0176-Player.setPlayerProfile-API.patch
@@ -27,10 +27,10 @@ index 4a62c1abc6f3c48bbda40325b4ce46632db3f28d..bab8c53041afb9606db55923e5466eab
playerName = gameprofile.getName();
uniqueId = gameprofile.getId();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 61687b2dce3964afc588e792cf765717b6d066dc..95b9341859ba6da6945faebf8430a044cc1ee828 100644
+index 5cb84271abdabc0f2d44ad9425828431f8818a47..a929c809dc1dcb2bdab4db0d2a8ca794189e93d9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -800,10 +800,16 @@ public abstract class PlayerList {
+@@ -799,10 +799,16 @@ public abstract class PlayerList {
}
public void sendPlayerPermissionLevel(ServerPlayer player) {
diff --git a/patches/server/0177-getPlayerUniqueId-API.patch b/patches/server/0177-getPlayerUniqueId-API.patch
index 1b24d383a2..c4f1f1285d 100644
--- a/patches/server/0177-getPlayerUniqueId-API.patch
+++ b/patches/server/0177-getPlayerUniqueId-API.patch
@@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 367ecbb023ddfbadb92aa4351ff601a3ed58a358..b4f8482dd92f33111600ae64834abefbda9e696d 100644
+index 1dd440057cb1d8acce7bfaa7ab1814937a4c63af..6bb1d3f3548c382379323059457844978438f802 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1892,6 +1892,25 @@ public final class CraftServer implements Server {
+@@ -1891,6 +1891,25 @@ public final class CraftServer implements Server {
return recipients.size();
}
diff --git a/patches/server/0178-Improved-Async-Task-Scheduler.patch b/patches/server/0178-Improved-Async-Task-Scheduler.patch
index 40c95c4539..d53657768c 100644
--- a/patches/server/0178-Improved-Async-Task-Scheduler.patch
+++ b/patches/server/0178-Improved-Async-Task-Scheduler.patch
@@ -159,10 +159,10 @@ index 0000000000000000000000000000000000000000..0ca279fb71d39c81b1f608e0ee9ba3e4
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f08329df9e99 100644
+index 300d31e31a55dbee3489320e21e42f14ac429478..7de4db0099b380c81d6a809a298d580f0f6e4acc 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-@@ -76,7 +76,7 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -75,7 +75,7 @@ public class CraftScheduler implements BukkitScheduler {
/**
* Main thread logic only
*/
@@ -171,7 +171,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
new Comparator<CraftTask>() {
@Override
public int compare(final CraftTask o1, final CraftTask o2) {
-@@ -93,12 +93,13 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -92,12 +92,13 @@ public class CraftScheduler implements BukkitScheduler {
/**
* These are tasks that are currently active. It's provided for 'viewing' the current state.
*/
@@ -187,7 +187,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
private final Executor executor = Executors.newCachedThreadPool(new ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %d").build());
private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {
@Override
-@@ -107,12 +108,31 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -106,12 +107,31 @@ public class CraftScheduler implements BukkitScheduler {
}
};
private CraftAsyncDebugger debugTail = this.debugHead;
@@ -219,7 +219,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
@Override
public int scheduleSyncDelayedTask(final Plugin plugin, final Runnable task) {
return this.scheduleSyncDelayedTask(plugin, task, 0L);
-@@ -229,7 +249,7 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -228,7 +248,7 @@ public class CraftScheduler implements BukkitScheduler {
} else if (period < CraftTask.NO_REPEATING) {
period = CraftTask.NO_REPEATING;
}
@@ -228,7 +228,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
}
@Override
-@@ -245,6 +265,11 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -244,6 +264,11 @@ public class CraftScheduler implements BukkitScheduler {
if (taskId <= 0) {
return;
}
@@ -240,7 +240,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
CraftTask task = this.runners.get(taskId);
if (task != null) {
task.cancel0();
-@@ -287,6 +312,11 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -286,6 +311,11 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public void cancelTasks(final Plugin plugin) {
Preconditions.checkArgument(plugin != null, "Cannot cancel tasks of null plugin");
@@ -252,7 +252,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
final CraftTask task = new CraftTask(
new Runnable() {
@Override
-@@ -326,6 +356,13 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -325,6 +355,13 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public boolean isCurrentlyRunning(final int taskId) {
@@ -266,7 +266,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
final CraftTask task = this.runners.get(taskId);
if (task == null) {
return false;
-@@ -344,6 +381,11 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -343,6 +380,11 @@ public class CraftScheduler implements BukkitScheduler {
if (taskId <= 0) {
return false;
}
@@ -278,7 +278,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
for (CraftTask task = this.head.getNext(); task != null; task = task.getNext()) {
if (task.getTaskId() == taskId) {
return task.getPeriod() >= CraftTask.NO_REPEATING; // The task will run
-@@ -355,6 +397,12 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -354,6 +396,12 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public List<BukkitWorker> getActiveWorkers() {
@@ -291,7 +291,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
final ArrayList<BukkitWorker> workers = new ArrayList<BukkitWorker>();
for (final CraftTask taskObj : this.runners.values()) {
// Iterator will be a best-effort (may fail to grab very new values) if called from an async thread
-@@ -392,6 +440,11 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -391,6 +439,11 @@ public class CraftScheduler implements BukkitScheduler {
pending.add(task);
}
}
@@ -303,7 +303,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
return pending;
}
-@@ -400,6 +453,11 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -399,6 +452,11 @@ public class CraftScheduler implements BukkitScheduler {
*/
public void mainThreadHeartbeat() {
this.currentTick++;
@@ -315,7 +315,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
final List<CraftTask> temp = this.temp;
this.parsePending();
while (this.isReady(this.currentTick)) {
-@@ -434,7 +492,7 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -433,7 +491,7 @@ public class CraftScheduler implements BukkitScheduler {
this.parsePending();
} else {
// this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(this.currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass())); // Paper
@@ -324,7 +324,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
// We don't need to parse pending
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
-@@ -453,7 +511,7 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -450,7 +508,7 @@ public class CraftScheduler implements BukkitScheduler {
//this.debugHead = this.debugHead.getNextHead(this.currentTick); // Paper
}
@@ -333,7 +333,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
final AtomicReference<CraftTask> tail = this.tail;
CraftTask tailTask = tail.get();
while (!tail.compareAndSet(tailTask, task)) {
-@@ -462,7 +520,13 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -459,7 +517,13 @@ public class CraftScheduler implements BukkitScheduler {
tailTask.setNext(task);
}
@@ -348,23 +348,12 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083
task.setNextRun(this.currentTick + delay);
this.addTask(task);
return task;
-@@ -485,8 +549,8 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -482,7 +546,7 @@ public class CraftScheduler implements BukkitScheduler {
return id;
}
- private void parsePending() {
-- MinecraftTimings.bukkitSchedulerPendingTimer.startTiming();
+ void parsePending() { // Paper
-+ if (!this.isAsyncScheduler) MinecraftTimings.bukkitSchedulerPendingTimer.startTiming(); // Paper
CraftTask head = this.head;
CraftTask task = head.getNext();
CraftTask lastTask = head;
-@@ -505,7 +569,7 @@ public class CraftScheduler implements BukkitScheduler {
- task.setNext(null);
- }
- this.head = lastTask;
-- MinecraftTimings.bukkitSchedulerPendingTimer.stopTiming();
-+ if (!this.isAsyncScheduler) MinecraftTimings.bukkitSchedulerPendingTimer.stopTiming(); // Paper
- }
-
- private boolean isReady(final int currentTick) {
diff --git a/patches/server/0186-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0186-Expand-World.spawnParticle-API-and-add-Builder.patch
index 8fcc3562f2..da14ccdaa5 100644
--- a/patches/server/0186-Expand-World.spawnParticle-API-and-add-Builder.patch
+++ b/patches/server/0186-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 022ec2ff1c5a6a1de867b2a6dafb339d55a0905d..17cb827bc90d980d73719776fca967a1d307ce0a 100644
+index 88c93a2e67c8d1bc227c7fa35bb919a40009f931..0c0d19708832a49734ea08ae05696e0cb20616e4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1566,12 +1566,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1536,12 +1536,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
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/0198-Make-shield-blocking-delay-configurable.patch b/patches/server/0198-Make-shield-blocking-delay-configurable.patch
index 8bd30c1391..0c056446f0 100644
--- a/patches/server/0198-Make-shield-blocking-delay-configurable.patch
+++ b/patches/server/0198-Make-shield-blocking-delay-configurable.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 76b71af07a311bc415b36f517afab31505a14483..0a4d2abc5b70c5e4e93dc06fe112e2398d9916e7 100644
+index 84e11e2c62e643f959f1a570a27f6ad07df165d4..08a2fbca50e26938e46e49dae7b101cfc375b02e 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4103,12 +4103,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4101,12 +4101,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.isUsingItem() && !this.useItem.isEmpty()) {
Item item = this.useItem.getItem();
diff --git a/patches/server/0201-Add-entity-knockback-events.patch b/patches/server/0201-Add-entity-knockback-events.patch
index c41689a196..8615d22e3d 100644
--- a/patches/server/0201-Add-entity-knockback-events.patch
+++ b/patches/server/0201-Add-entity-knockback-events.patch
@@ -38,10 +38,10 @@ index 087f030985180b91a809fb45244e23106da62e34..011006bc2e88a9fec98796f939c07d88
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 0a4d2abc5b70c5e4e93dc06fe112e2398d9916e7..c9d7589a18e9cee204f4e52368a60aa421c1e150 100644
+index 08a2fbca50e26938e46e49dae7b101cfc375b02e..cfff596d720efe5f5ee4ad1990c3ee0fd6e4e836 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1565,7 +1565,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1563,7 +1563,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
d1 = source.getSourcePosition().z() - this.getZ();
}
@@ -50,7 +50,7 @@ index 0a4d2abc5b70c5e4e93dc06fe112e2398d9916e7..c9d7589a18e9cee204f4e52368a60aa4
if (!flag) {
this.indicateDamage(d0, d1);
}
-@@ -1622,7 +1622,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1620,7 +1620,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
protected void blockedByShield(LivingEntity target) {
@@ -59,7 +59,7 @@ index 0a4d2abc5b70c5e4e93dc06fe112e2398d9916e7..c9d7589a18e9cee204f4e52368a60aa4
}
private boolean checkTotemDeathProtection(DamageSource source) {
-@@ -1908,10 +1908,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1906,10 +1906,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
public void knockback(double strength, double x, double z) {
// CraftBukkit start - EntityKnockbackEvent
@@ -72,7 +72,7 @@ index 0a4d2abc5b70c5e4e93dc06fe112e2398d9916e7..c9d7589a18e9cee204f4e52368a60aa4
d0 *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
if (true || d0 > 0.0D) { // CraftBukkit - Call event even when force is 0
//this.hasImpulse = true; // CraftBukkit - Move down
-@@ -1924,13 +1924,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1922,13 +1922,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
Vec3 vec3d1 = (new Vec3(d1, 0.0D, d2)).normalize().scale(d0);
diff --git a/patches/server/0202-Expand-Explosions-API.patch b/patches/server/0202-Expand-Explosions-API.patch
index b9a5452eb8..1952633714 100644
--- a/patches/server/0202-Expand-Explosions-API.patch
+++ b/patches/server/0202-Expand-Explosions-API.patch
@@ -9,10 +9,10 @@ Co-authored-by: Esoteric Enderman <[email protected]
Co-authored-by: Bjarne Koll <[email protected]>
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 17cb827bc90d980d73719776fca967a1d307ce0a..6283f3496f122d4b0c4ac297943baf469e44aee3 100644
+index 0c0d19708832a49734ea08ae05696e0cb20616e4..3324156c004e0506df8be23050f497d462b4b9c1 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1449,6 +1449,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1419,6 +1419,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
public ServerExplosion explode0(@Nullable Entity entity, @Nullable DamageSource damagesource, @Nullable ExplosionDamageCalculator explosiondamagecalculator, double d0, double d1, double d2, float f, boolean flag, Level.ExplosionInteraction world_a, ParticleOptions particleparam, ParticleOptions particleparam1, Holder<SoundEvent> holder) {
@@ -24,7 +24,7 @@ index 17cb827bc90d980d73719776fca967a1d307ce0a..6283f3496f122d4b0c4ac297943baf46
// CraftBukkit end
Explosion.BlockInteraction explosion_effect;
-@@ -1480,6 +1485,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1450,6 +1455,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
Explosion.BlockInteraction explosion_effect1 = explosion_effect;
Vec3 vec3d = new Vec3(d0, d1, d2);
ServerExplosion serverexplosion = new ServerExplosion(this, entity, damagesource, explosiondamagecalculator, vec3d, f, flag, explosion_effect1);
diff --git a/patches/server/0207-InventoryCloseEvent-Reason-API.patch b/patches/server/0207-InventoryCloseEvent-Reason-API.patch
index 968d1a87f8..8e60427648 100644
--- a/patches/server/0207-InventoryCloseEvent-Reason-API.patch
+++ b/patches/server/0207-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 6283f3496f122d4b0c4ac297943baf469e44aee3..425c22fe94e83d880b331cbfb16dc67f22def1c7 100644
+index 3324156c004e0506df8be23050f497d462b4b9c1..75b2caba214c312f9afdd231ee3d75689380a5f3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1234,7 +1234,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1204,7 +1204,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
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 6283f3496f122d4b0c4ac297943baf469e44aee3..425c22fe94e83d880b331cbfb16dc67f
}
}
}
-@@ -2279,7 +2279,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2249,7 +2249,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// 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())) {
@@ -75,10 +75,10 @@ index 98aeafcc51e23a7534c8d57e4db0eb58abb3f30b..29b836a75b835f0d5233db419fc5ca8d
this.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 752460c4650bebb2860bea82ca186a0f97b1692b..5f514f87b171c5c845d5d7714d2d2179fbb0c1a1 100644
+index 79d9a58c66382fd94ab5f6020285e341b0114f6a..f36d72153c1ec0426790ed3033500c3cb766af2d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2641,10 +2641,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2638,10 +2638,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleContainerClose(ServerboundContainerClosePacket packet) {
@@ -96,10 +96,10 @@ index 752460c4650bebb2860bea82ca186a0f97b1692b..5f514f87b171c5c845d5d7714d2d2179
this.player.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 95b9341859ba6da6945faebf8430a044cc1ee828..038c5f16e60f0e182774e6df5b6c5359153a4b07 100644
+index a929c809dc1dcb2bdab4db0d2a8ca794189e93d9..c9c3ebcb7239bf01617a89f03cd0ad12dd0b2c34 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -469,7 +469,7 @@ public abstract class PlayerList {
+@@ -468,7 +468,7 @@ public abstract class PlayerList {
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
// See SPIGOT-5799, SPIGOT-6145
if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
diff --git a/patches/server/0214-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0214-Option-to-prevent-armor-stands-from-doing-entity-loo.patch
index db5ae6ef64..8f032f18fa 100644
--- a/patches/server/0214-Option-to-prevent-armor-stands-from-doing-entity-loo.patch
+++ b/patches/server/0214-Option-to-prevent-armor-stands-from-doing-entity-loo.patch
@@ -17,10 +17,10 @@ index aea97a30a9226275f8fbf9cb2c15d5ddf36371ac..e9d6211eb0f955eb95d2f73ad96799ef
Iterator iterator = list.iterator();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index c628524274110bcad175472dbcb82e6c62476a12..3ccd28193bec6363eb87f916589310ee8b45dd3a 100644
+index e0986a141384de0ede38c88c2b116e083c63efe4..fb68aff87670f545ae5ba26db9f074a34375031e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -766,6 +766,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -759,6 +759,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end - Prevent block entity and entity crashes
}
}
diff --git a/patches/server/0215-Vanished-players-don-t-have-rights.patch b/patches/server/0215-Vanished-players-don-t-have-rights.patch
index 3bdc5087c3..dd1cb5bca9 100644
--- a/patches/server/0215-Vanished-players-don-t-have-rights.patch
+++ b/patches/server/0215-Vanished-players-don-t-have-rights.patch
@@ -39,10 +39,10 @@ index 752929f3bcd6404b08dad1c67e9a0023b671f10d..407f5db0a4b3884440bc49bf4f00d9c0
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 3ccd28193bec6363eb87f916589310ee8b45dd3a..cf422de89f0ed81e7c9759328e28ca6b190283ef 100644
+index fb68aff87670f545ae5ba26db9f074a34375031e..924b496aaaa19c7ef69498730725ae9287e46e28 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -265,6 +265,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -263,6 +263,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
}
diff --git a/patches/server/0221-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0221-Break-up-and-make-tab-spam-limits-configurable.patch
index ceaa06bf27..92f889e9c0 100644
--- a/patches/server/0221-Break-up-and-make-tab-spam-limits-configurable.patch
+++ b/patches/server/0221-Break-up-and-make-tab-spam-limits-configurable.patch
@@ -22,7 +22,7 @@ to take the burden of this into their own hand without having to rely on
plugins doing unsafe things.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 5f514f87b171c5c845d5d7714d2d2179fbb0c1a1..4f6985d4458cfba8fd8323d06363763871da2fa0 100644
+index f36d72153c1ec0426790ed3033500c3cb766af2d..af519e9914bae40fa1605b0cd4cf02ca1d44f0e8 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -274,6 +274,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0224-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0224-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
index 4338c3faf2..6cd73f5ba7 100644
--- a/patches/server/0224-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
+++ b/patches/server/0224-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 425c22fe94e83d880b331cbfb16dc67f22def1c7..a12d5de8834bbc3176be3d2c8353b2d4372dbc1d 100644
+index 75b2caba214c312f9afdd231ee3d75689380a5f3..0635e7ed67d45abb7c419cf4ebda0e64718b630e 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1196,6 +1196,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1166,6 +1166,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// CraftBukkit start
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
diff --git a/patches/server/0225-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0225-Add-Early-Warning-Feature-to-WatchDog.patch
index f6b02a9c46..685cfead73 100644
--- a/patches/server/0225-Add-Early-Warning-Feature-to-WatchDog.patch
+++ b/patches/server/0225-Add-Early-Warning-Feature-to-WatchDog.patch
@@ -9,10 +9,10 @@ thread dumps at an interval until the point of crash.
This will help diagnose what was going on in that time before the crash.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index fe981e45b3b61f24da3e137c68312e98977dad73..87cfbc87198209acfe4354424974afc3cd33f5cd 100644
+index 260d755666efc94e2ea2c8fdb38d7deddda82c08..eb0adba0178a88243946e0c7f39503aa8c7d8feb 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1123,6 +1123,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1121,6 +1121,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.status = this.buildServerStatus();
// Spigot start
@@ -21,10 +21,10 @@ index fe981e45b3b61f24da3e137c68312e98977dad73..87cfbc87198209acfe4354424974afc3
// Paper start - further improve server tick loop
long tickSection = Util.getNanos();
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index a5880be1ec88c70f7ee46225036b04dac87943d4..ff0b610cae7e9e0eb83bf95f350fd9ba7477535a 100644
+index 7c2b2dbc03bf4c3308a3e2a34260fee56d646488..5080c8296112aa093ca5450cad1d54c447ed8214 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -215,6 +215,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -213,6 +213,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
// Paper end - initialize global and world-defaults configuration
@@ -33,10 +33,10 @@ index a5880be1ec88c70f7ee46225036b04dac87943d4..ff0b610cae7e9e0eb83bf95f350fd9ba
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b4f8482dd92f33111600ae64834abefbda9e696d..d7e944c9f688221958bdd78913ddc649b21d714e 100644
+index 6bb1d3f3548c382379323059457844978438f802..6d08b753c04a78e4ec07eaf8ff6c3b9daaf91f64 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -966,6 +966,7 @@ public final class CraftServer implements Server {
+@@ -965,6 +965,7 @@ public final class CraftServer implements Server {
@Override
public void reload() {
@@ -44,7 +44,7 @@ index b4f8482dd92f33111600ae64834abefbda9e696d..d7e944c9f688221958bdd78913ddc649
this.reloadCount++;
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
-@@ -1058,6 +1059,7 @@ public final class CraftServer implements Server {
+@@ -1057,6 +1058,7 @@ public final class CraftServer implements Server {
this.enablePlugins(PluginLoadOrder.POSTWORLD);
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
diff --git a/patches/server/0226-Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/0226-Use-ConcurrentHashMap-in-JsonList.patch
index 6bb7a31bf5..657e75580e 100644
--- a/patches/server/0226-Use-ConcurrentHashMap-in-JsonList.patch
+++ b/patches/server/0226-Use-ConcurrentHashMap-in-JsonList.patch
@@ -23,10 +23,10 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s
The point of this is readability, but does have a side-benefit of a small microptimization
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 038c5f16e60f0e182774e6df5b6c5359153a4b07..9294ab23940cb2a822ba760052e3ad369abdfed6 100644
+index c9c3ebcb7239bf01617a89f03cd0ad12dd0b2c34..f2c7fba1f474618eb68a804d2dc7fc8d70c8ff6f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -594,7 +594,7 @@ public abstract class PlayerList {
+@@ -593,7 +593,7 @@ public abstract class PlayerList {
} else if (!this.isWhiteListed(gameprofile, event)) { // Paper - ProfileWhitelistVerifyEvent
//ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted
diff --git a/patches/server/0227-Use-a-Queue-for-Queueing-Commands.patch b/patches/server/0227-Use-a-Queue-for-Queueing-Commands.patch
index c1c7e7bdd2..8ee1b6a200 100644
--- a/patches/server/0227-Use-a-Queue-for-Queueing-Commands.patch
+++ b/patches/server/0227-Use-a-Queue-for-Queueing-Commands.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Use a Queue for Queueing Commands
Lists are bad as Queues mmmkay.
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index ff0b610cae7e9e0eb83bf95f350fd9ba7477535a..6d36c02d42e0b6e667d3076b1b455ba3adfde65b 100644
+index 5080c8296112aa093ca5450cad1d54c447ed8214..417c8bf97c5f5b7d127ac7d496b86882d75ff354 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -77,7 +77,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -75,7 +75,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
static final Logger LOGGER = LogUtils.getLogger();
private static final int CONVERSION_RETRY_DELAY_MS = 5000;
private static final int CONVERSION_RETRIES = 2;
@@ -18,7 +18,7 @@ index ff0b610cae7e9e0eb83bf95f350fd9ba7477535a..6d36c02d42e0b6e667d3076b1b455ba3
@Nullable
private QueryThreadGs4 queryThreadGs4;
// private final RemoteControlCommandListener rconConsoleSource; // CraftBukkit - remove field
-@@ -420,13 +420,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -418,12 +418,14 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
public void handleConsoleInput(String command, CommandSourceStack commandSource) {
@@ -27,7 +27,6 @@ index ff0b610cae7e9e0eb83bf95f350fd9ba7477535a..6d36c02d42e0b6e667d3076b1b455ba3
}
public void handleConsoleInputs() {
- MinecraftTimings.serverCommandTimer.startTiming(); // Spigot
- while (!this.consoleInput.isEmpty()) {
- ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
+ // Paper start - Perf: use proper queue
diff --git a/patches/server/0239-Add-ray-tracing-methods-to-LivingEntity.patch b/patches/server/0239-Add-ray-tracing-methods-to-LivingEntity.patch
index 8ec63c01c8..4ad440ffa3 100644
--- a/patches/server/0239-Add-ray-tracing-methods-to-LivingEntity.patch
+++ b/patches/server/0239-Add-ray-tracing-methods-to-LivingEntity.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index c9d7589a18e9cee204f4e52368a60aa421c1e150..35dfaf46429f5478049835e1a5e4b03c362a64e8 100644
+index cfff596d720efe5f5ee4ad1990c3ee0fd6e4e836..5b8e0931be2acb1eb4ac6f399ecc0a5ebc5db586 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4114,6 +4114,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4112,6 +4112,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
// Paper start - Make shield blocking delay configurable
diff --git a/patches/server/0241-Improve-death-events.patch b/patches/server/0241-Improve-death-events.patch
index 642cd86423..0dd8702773 100644
--- a/patches/server/0241-Improve-death-events.patch
+++ b/patches/server/0241-Improve-death-events.patch
@@ -79,10 +79,10 @@ index 29b836a75b835f0d5233db419fc5ca8dde885fdb..2bd97344502a63173de923542f27759d
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 35dfaf46429f5478049835e1a5e4b03c362a64e8..a7e950bc5aa827c1b137a12c9eaaf7eac867bdc3 100644
+index 5b8e0931be2acb1eb4ac6f399ecc0a5ebc5db586..7a89c25fcd1c76e4b176c257600db89788aa0f21 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -297,6 +297,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -295,6 +295,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public Set<UUID> collidableExemptions = new HashSet<>();
public boolean bukkitPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
@@ -90,7 +90,7 @@ index 35dfaf46429f5478049835e1a5e4b03c362a64e8..a7e950bc5aa827c1b137a12c9eaaf7ea
@Override
public float getBukkitYaw() {
-@@ -1574,11 +1575,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1572,11 +1573,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.isDeadOrDying()) {
if (!this.checkTotemDeathProtection(source)) {
@@ -106,7 +106,7 @@ index 35dfaf46429f5478049835e1a5e4b03c362a64e8..a7e950bc5aa827c1b137a12c9eaaf7ea
}
} else if (flag1) {
this.playHurtSound(source);
-@@ -1740,6 +1742,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1738,6 +1740,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Entity entity = damageSource.getEntity();
LivingEntity entityliving = this.getKillCredit();
@@ -114,7 +114,7 @@ index 35dfaf46429f5478049835e1a5e4b03c362a64e8..a7e950bc5aa827c1b137a12c9eaaf7ea
if (this.deathScore >= 0 && entityliving != null) {
entityliving.awardKillScore(this, this.deathScore, damageSource);
}
-@@ -1751,24 +1754,59 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1749,24 +1752,59 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!this.level().isClientSide && this.hasCustomName()) {
if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
}
@@ -178,7 +178,7 @@ index 35dfaf46429f5478049835e1a5e4b03c362a64e8..a7e950bc5aa827c1b137a12c9eaaf7ea
}
}
-@@ -1778,7 +1816,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1776,7 +1814,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (world instanceof ServerLevel worldserver) {
boolean flag = false;
@@ -187,7 +187,7 @@ index 35dfaf46429f5478049835e1a5e4b03c362a64e8..a7e950bc5aa827c1b137a12c9eaaf7ea
if (worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
BlockPos blockposition = this.blockPosition();
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
-@@ -1807,24 +1845,37 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1805,24 +1843,37 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}
diff --git a/patches/server/0245-Prevent-mob-spawning-from-loading-generating-chunks.patch b/patches/server/0245-Prevent-mob-spawning-from-loading-generating-chunks.patch
index 1908c1da0c..e9d396eb02 100644
--- a/patches/server/0245-Prevent-mob-spawning-from-loading-generating-chunks.patch
+++ b/patches/server/0245-Prevent-mob-spawning-from-loading-generating-chunks.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks
also prevents if out of world border bounds
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-index 0b41149ae134084cef4016241ce923dac0349846..be2412ef8f8c331a881e442577cf05aec43f52bb 100644
+index 5a0ea71dc39c582ef6c843dc0532adb04ba120ce..c826bd20d1ba32ebb9069737ede88e122294ea7a 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-@@ -187,9 +187,9 @@ public final class NaturalSpawner {
+@@ -185,9 +185,9 @@ public final class NaturalSpawner {
StructureManager structuremanager = world.structureManager();
ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator();
int i = pos.getY();
@@ -21,7 +21,7 @@ index 0b41149ae134084cef4016241ce923dac0349846..be2412ef8f8c331a881e442577cf05ae
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
int j = 0;
int k = 0;
-@@ -218,7 +218,7 @@ public final class NaturalSpawner {
+@@ -216,7 +216,7 @@ public final class NaturalSpawner {
if (entityhuman != null) {
double d2 = entityhuman.distanceToSqr(d0, (double) i, d1);
diff --git a/patches/server/0251-Add-LivingEntity-getTargetEntity.patch b/patches/server/0251-Add-LivingEntity-getTargetEntity.patch
index 5b17b5d4ff..8f5a3aa5fa 100644
--- a/patches/server/0251-Add-LivingEntity-getTargetEntity.patch
+++ b/patches/server/0251-Add-LivingEntity-getTargetEntity.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index a7e950bc5aa827c1b137a12c9eaaf7eac867bdc3..b87b59a2ead87b6bda8a8c5bcfd63b128c88f626 100644
+index 7a89c25fcd1c76e4b176c257600db89788aa0f21..3bcf2ba5f065d946ded4020b9882bc4e19af0e08 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4178,6 +4178,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4176,6 +4176,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.level().clip(raytrace);
}
diff --git a/patches/server/0257-Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/0257-Add-option-to-prevent-players-from-moving-into-unloa.patch
index 33cebcaddb..a382aa3965 100644
--- a/patches/server/0257-Add-option-to-prevent-players-from-moving-into-unloa.patch
+++ b/patches/server/0257-Add-option-to-prevent-players-from-moving-into-unloa.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 4f6985d4458cfba8fd8323d06363763871da2fa0..b15cd1b5b4e4e20a70099acd351e3ac1025a6f31 100644
+index af519e9914bae40fa1605b0cd4cf02ca1d44f0e8..f57c133de5e974d2c86145f697d3636347a29d65 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -498,9 +498,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0260-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/0260-Improve-Server-Thread-Pool-and-Thread-Priorities.patch
index 6a48c451fb..71b311db27 100644
--- a/patches/server/0260-Improve-Server-Thread-Pool-and-Thread-Priorities.patch
+++ b/patches/server/0260-Improve-Server-Thread-Pool-and-Thread-Priorities.patch
@@ -94,10 +94,10 @@ index 8cac2075077b1d9c2b01e09c99780ff9e204abb2..bf2833c92eca6491699b4a89410e4e46
return new TracingExecutor(executorService);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 87cfbc87198209acfe4354424974afc3cd33f5cd..3c5c3d6d3f95378181a2316337e6f9b910c19003 100644
+index eb0adba0178a88243946e0c7f39503aa8c7d8feb..3669a2943b01e0e9add41df1ff38afd1cd40e96b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -333,6 +333,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -332,6 +332,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
thread.setUncaughtExceptionHandler((thread1, throwable) -> {
MinecraftServer.LOGGER.error("Uncaught exception in server thread", throwable);
});
diff --git a/patches/server/0261-Optimize-World-Time-Updates.patch b/patches/server/0261-Optimize-World-Time-Updates.patch
index 96a00b7577..15bcb78943 100644
--- a/patches/server/0261-Optimize-World-Time-Updates.patch
+++ b/patches/server/0261-Optimize-World-Time-Updates.patch
@@ -8,12 +8,12 @@ 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 3c5c3d6d3f95378181a2316337e6f9b910c19003..2011ffeeee5815f667f585d94c5ffdf52ff94884 100644
+index 3669a2943b01e0e9add41df1ff38afd1cd40e96b..a4c897000a5e70e64b5fe4306581b04d8d38bce2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1639,12 +1639,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1604,10 +1604,22 @@ 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.
- if (this.tickCount % 20 == 0) {
- for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@@ -34,9 +34,7 @@ index 3c5c3d6d3f95378181a2316337e6f9b910c19003..2011ffeeee5815f667f585d94c5ffdf5
+ ClientboundSetTimePacket packet = (playerTime == dayTime) ? worldPacket :
+ new ClientboundSetTimePacket(worldTime, playerTime, doDaylight);
+ entityplayer.connection.send(packet); // Add support for per player time
++ // Paper end - Perf: Optimize time updates
}
}
-+ // Paper end - Perf: Optimize time updates
- MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
- while (iterator.hasNext()) {
diff --git a/patches/server/0264-Don-t-allow-digging-into-unloaded-chunks.patch b/patches/server/0264-Don-t-allow-digging-into-unloaded-chunks.patch
index ccd3f8c7b2..3c5725587c 100644
--- a/patches/server/0264-Don-t-allow-digging-into-unloaded-chunks.patch
+++ b/patches/server/0264-Don-t-allow-digging-into-unloaded-chunks.patch
@@ -59,7 +59,7 @@ index 4c8189a2a7edea824545a24dccb376b8eceac001..4623c8acd125dff4919c4e2045b84831
this.level.destroyBlockProgress(this.player.getId(), pos, -1);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index b15cd1b5b4e4e20a70099acd351e3ac1025a6f31..7edc3590c43ba51a4b3ec7e089d32f7dfab411dd 100644
+index f57c133de5e974d2c86145f697d3636347a29d65..c3e281754a1cd9d5ce5f4aab36822f9f5d34be39 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1606,6 +1606,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0265-Make-the-default-permission-message-configurable.patch b/patches/server/0265-Make-the-default-permission-message-configurable.patch
index 9705f52a0b..6aedb7eff8 100644
--- a/patches/server/0265-Make-the-default-permission-message-configurable.patch
+++ b/patches/server/0265-Make-the-default-permission-message-configurable.patch
@@ -18,10 +18,10 @@ index 5b070d158760789bbcaa984426a55d20767abe4a..e1820a339452cd3388dd7cbb928c5f58
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index d7e944c9f688221958bdd78913ddc649b21d714e..cd60f4db64b709c5ae23cafa45b8c0422e6c1c85 100644
+index 6d08b753c04a78e4ec07eaf8ff6c3b9daaf91f64..e7dbb7a6e0e6bb9c42e72531f4cf337abb7090ee 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2891,6 +2891,16 @@ public final class CraftServer implements Server {
+@@ -2890,6 +2890,16 @@ public final class CraftServer implements Server {
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
}
diff --git a/patches/server/0266-force-entity-dismount-during-teleportation.patch b/patches/server/0266-force-entity-dismount-during-teleportation.patch
index 4db1978c18..e01ab14535 100644
--- a/patches/server/0266-force-entity-dismount-during-teleportation.patch
+++ b/patches/server/0266-force-entity-dismount-during-teleportation.patch
@@ -106,10 +106,10 @@ index 79a3d586ddf404c449b7c0aa1996e9b9897b2383..5d551a50e1043e369ebf3ddfe181be1e
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index b87b59a2ead87b6bda8a8c5bcfd63b128c88f626..34f66931dec00809ed58569e24431762a1acd56f 100644
+index 3bcf2ba5f065d946ded4020b9882bc4e19af0e08..63d1c5e8441eb5a32fc298ff2d2f3157cbd19557 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3758,9 +3758,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3756,9 +3756,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void stopRiding() {
diff --git a/patches/server/0268-Book-size-limits.patch b/patches/server/0268-Book-size-limits.patch
index 92491902e4..8e4d723b12 100644
--- a/patches/server/0268-Book-size-limits.patch
+++ b/patches/server/0268-Book-size-limits.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Book size limits
Puts some limits on the size of books.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 7edc3590c43ba51a4b3ec7e089d32f7dfab411dd..2c0ebe9f37233877d6507e05bf1db0b5c01f6c35 100644
+index c3e281754a1cd9d5ce5f4aab36822f9f5d34be39..542899c382309986f3aaa16bf534b677aaac82f5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1056,6 +1056,44 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch
index cc33312338..ccda773898 100644
--- a/patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch
+++ b/patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch
@@ -28,10 +28,10 @@ index 8d958ac09bd9484d879eee6acb6aaea20f4f8339..3e0ddfe11d74ce47a023837b2ee472f0
public boolean queueHealthUpdatePacket;
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 9294ab23940cb2a822ba760052e3ad369abdfed6..d013e72511d1763a55e5e0837b682d02f87aff63 100644
+index f2c7fba1f474618eb68a804d2dc7fc8d70c8ff6f..f56ef720a74611ffef314553f4f785ea5cf086ac 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -183,6 +183,7 @@ public abstract class PlayerList {
+@@ -182,6 +182,7 @@ public abstract class PlayerList {
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
player.isRealPlayer = true; // Paper
diff --git a/patches/server/0273-BlockDestroyEvent.patch b/patches/server/0273-BlockDestroyEvent.patch
index 90ba6f9a11..6e560f06f5 100644
--- a/patches/server/0273-BlockDestroyEvent.patch
+++ b/patches/server/0273-BlockDestroyEvent.patch
@@ -11,7 +11,7 @@ floating in the air.
This can replace many uses of BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index cf422de89f0ed81e7c9759328e28ca6b190283ef..70b6d75daa9a9305041a565808f0dae84696d10f 100644
+index 924b496aaaa19c7ef69498730725ae9287e46e28..0f4b9b5d3e34b5e08f9ca2f78c5e8bcec9f5a85e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -24,6 +24,7 @@ import net.minecraft.core.registries.Registries;
@@ -22,7 +22,7 @@ index cf422de89f0ed81e7c9759328e28ca6b190283ef..70b6d75daa9a9305041a565808f0dae8
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.server.level.ServerLevel;
-@@ -576,9 +577,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -574,9 +575,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return false;
} else {
FluidState fluid = this.getFluidState(pos);
diff --git a/patches/server/0274-Async-command-map-building.patch b/patches/server/0274-Async-command-map-building.patch
index 6a84bf092e..4de7f1039f 100644
--- a/patches/server/0274-Async-command-map-building.patch
+++ b/patches/server/0274-Async-command-map-building.patch
@@ -53,14 +53,14 @@ index 2008fd542eaf1c2fac776ae1751c227a3b6dde4b..e812cc865baaa1ee03872f7969ee9860
event.getPlayer().getServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 2011ffeeee5815f667f585d94c5ffdf52ff94884..7f511a811a73a092ea6a27e4f8afef58dd83b50a 100644
+index a4c897000a5e70e64b5fe4306581b04d8d38bce2..8f427475f7418bbfb8121dbd3e25e7827775ea41 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -946,6 +946,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -945,6 +945,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
MinecraftServer.LOGGER.info("Stopping server");
+ Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
- MinecraftTimings.stopServer(); // Paper
// CraftBukkit start
if (this.server != null) {
+ this.server.disablePlugins();
diff --git a/patches/server/0275-Brigadier-Mojang-API.patch b/patches/server/0275-Brigadier-Mojang-API.patch
index 2c5c3190ef..de560b4742 100644
--- a/patches/server/0275-Brigadier-Mojang-API.patch
+++ b/patches/server/0275-Brigadier-Mojang-API.patch
@@ -119,7 +119,7 @@ index e812cc865baaa1ee03872f7969ee98600b82483b..c847fbdb6f52386570eb4c070fcc01d3
if (commandnode2.canUse(source)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 2c0ebe9f37233877d6507e05bf1db0b5c01f6c35..4592ac291b6a80785157b7909ad8e249f06e25f5 100644
+index 542899c382309986f3aaa16bf534b677aaac82f5..b234957d0563f1ccf533f927e60d8b6b77c33a25 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -780,19 +780,34 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0276-Limit-Client-Sign-length-more.patch b/patches/server/0276-Limit-Client-Sign-length-more.patch
index c6ce69862e..adfa39c698 100644
--- a/patches/server/0276-Limit-Client-Sign-length-more.patch
+++ b/patches/server/0276-Limit-Client-Sign-length-more.patch
@@ -22,7 +22,7 @@ it only impacts data sent from the client.
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 4592ac291b6a80785157b7909ad8e249f06e25f5..df2718d7e7dd7969f49b3467347fa2adcf60132a 100644
+index b234957d0563f1ccf533f927e60d8b6b77c33a25..8a58c1bdda065edd7b8560cd43e805de3fe0b178 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -308,6 +308,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -33,7 +33,7 @@ index 4592ac291b6a80785157b7909ad8e249f06e25f5..df2718d7e7dd7969f49b3467347fa2ad
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
super(server, connection, clientData, player); // CraftBukkit
-@@ -3204,7 +3205,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3201,7 +3202,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleSignUpdate(ServerboundSignUpdatePacket packet) {
diff --git a/patches/server/0277-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/0277-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
index 9ca53b7c59..b24ebf2018 100644
--- a/patches/server/0277-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
+++ b/patches/server/0277-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index d013e72511d1763a55e5e0837b682d02f87aff63..ceaf7bfbe4bf686780135c5c5dfe75d852fcb6cf 100644
+index f56ef720a74611ffef314553f4f785ea5cf086ac..c75bc7427bd818e9d23ca0af2b08cb160f3c432e 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1097,6 +1097,7 @@ public abstract class PlayerList {
+@@ -1095,6 +1095,7 @@ public abstract class PlayerList {
}
public void setUsingWhiteList(boolean whitelistEnabled) {
diff --git a/patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch b/patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch
index 206e8d576d..51eb46f125 100644
--- a/patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch
+++ b/patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch
@@ -26,10 +26,10 @@ index f55832ce841621daab4d3a910650ab6562cefcda..f635da34335cd2901adf975fcd74c5c6
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index a12d5de8834bbc3176be3d2c8353b2d4372dbc1d..1976acc359d03447507b32c9032700f4603628f0 100644
+index 0635e7ed67d45abb7c419cf4ebda0e64718b630e..91e462544b82e0fe41851fa0fa3f6d6f08ac490d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1202,6 +1202,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1172,6 +1172,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return true;
}
// Paper end - extra debug info
@@ -51,10 +51,10 @@ index 9cfd0b457f6c462921667b9439a7b3e32d019758..62412b37d4f7d37b3fec0966ab700c2a
if (entity == null) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index ceaf7bfbe4bf686780135c5c5dfe75d852fcb6cf..dffc7f0c9c730bc629ee169eca3a7a997c2cc7b1 100644
+index c75bc7427bd818e9d23ca0af2b08cb160f3c432e..fd1fe9a72a1d4e87b97a34fc79ab1429d31207e5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -224,6 +224,11 @@ public abstract class PlayerList {
+@@ -223,6 +223,11 @@ public abstract class PlayerList {
worldserver1 = worldserver;
}
@@ -116,10 +116,10 @@ index 5d551a50e1043e369ebf3ddfe181be1e24cfd068..463d34e7b54efd503c4879d1386b2439
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index 5fe268b5c3297de7650f5d1f310cdf8ac231de75..e5dc6f868f090d1957306a6389d85cf9dbbc444d 100644
+index 8f4ec4f0ea7ff2f9a952120785aea65f6559f897..989b766bc166141a391e0a7c1a5eb815e20acfac 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -442,7 +442,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
+@@ -433,7 +433,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
@Nullable
public T spawn(ServerLevel world, @Nullable ItemStack stack, @Nullable Player player, BlockPos pos, EntitySpawnReason spawnReason, boolean alignPosition, boolean invertY) {
// CraftBukkit start
diff --git a/patches/server/0280-Add-PlayerPostRespawnEvent.patch b/patches/server/0280-Add-PlayerPostRespawnEvent.patch
index 5adb0c50ef..a887fd9918 100644
--- a/patches/server/0280-Add-PlayerPostRespawnEvent.patch
+++ b/patches/server/0280-Add-PlayerPostRespawnEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerPostRespawnEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index dffc7f0c9c730bc629ee169eca3a7a997c2cc7b1..29110c0b950c3073ab699d8ad1523ece2e8d3408 100644
+index fd1fe9a72a1d4e87b97a34fc79ab1429d31207e5..2cfc2213e3036585dc4723eecf747e1c37d53b72 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -705,6 +705,10 @@ public abstract class PlayerList {
+@@ -704,6 +704,10 @@ public abstract class PlayerList {
entityplayer1.addTag(s);
}
@@ -19,7 +19,7 @@ index dffc7f0c9c730bc629ee169eca3a7a997c2cc7b1..29110c0b950c3073ab699d8ad1523ece
// CraftBukkit start - fire PlayerRespawnEvent
TeleportTransition teleporttransition;
-@@ -712,11 +716,16 @@ public abstract class PlayerList {
+@@ -711,11 +715,16 @@ public abstract class PlayerList {
teleporttransition = entityplayer.findRespawnPositionAndUseSpawnBlock(!flag, TeleportTransition.DO_NOTHING, reason);
if (!flag) entityplayer.reset(); // SPIGOT-4785
@@ -37,7 +37,7 @@ index dffc7f0c9c730bc629ee169eca3a7a997c2cc7b1..29110c0b950c3073ab699d8ad1523ece
return entityplayer;
}
// Spigot End
-@@ -764,6 +773,11 @@ public abstract class PlayerList {
+@@ -763,6 +772,11 @@ public abstract class PlayerList {
if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
entityplayer1.connection.send(new ClientboundSoundPacket(SoundEvents.RESPAWN_ANCHOR_DEPLETE, SoundSource.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F, worldserver.getRandom().nextLong()));
}
@@ -49,7 +49,7 @@ index dffc7f0c9c730bc629ee169eca3a7a997c2cc7b1..29110c0b950c3073ab699d8ad1523ece
}
// Added from changeDimension
this.sendAllPlayerInfo(entityplayer); // Update health, etc...
-@@ -785,6 +799,13 @@ public abstract class PlayerList {
+@@ -784,6 +798,13 @@ public abstract class PlayerList {
if (entityplayer.connection.isDisconnected()) {
this.save(entityplayer);
}
diff --git a/patches/server/0281-Server-Tick-Events.patch b/patches/server/0281-Server-Tick-Events.patch
index 597da613b9..5e04076791 100644
--- a/patches/server/0281-Server-Tick-Events.patch
+++ b/patches/server/0281-Server-Tick-Events.patch
@@ -6,21 +6,21 @@ 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 7f511a811a73a092ea6a27e4f8afef58dd83b50a..f245b10bc2931ab165057f27a8ff79ea77ea726e 100644
+index 8f427475f7418bbfb8121dbd3e25e7827775ea41..447b8f9ede3f57c6c5f968a0d25153c5c8770c5a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1504,6 +1504,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- });
- isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
- // Paper end
-+ new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
+@@ -1482,6 +1482,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ }
+ }
++ new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
++this.tickCount;
this.tickRateManager.tick();
-@@ -1525,6 +1526,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- this.runAllTasks();
- }
- // Paper end
+ this.tickChildren(shouldKeepTicking);
+@@ -1498,6 +1499,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+ this.runAllTasks(); // Paper - move runAllTasks() into full server tick (previously for timings)
+ // Paper start - Server Tick Events
+ long endTime = System.nanoTime();
+ long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
diff --git a/patches/server/0283-Optimize-Captured-BlockEntity-Lookup.patch b/patches/server/0283-Optimize-Captured-BlockEntity-Lookup.patch
index 216045db20..4dedbb8d9c 100644
--- a/patches/server/0283-Optimize-Captured-BlockEntity-Lookup.patch
+++ b/patches/server/0283-Optimize-Captured-BlockEntity-Lookup.patch
@@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 70b6d75daa9a9305041a565808f0dae84696d10f..dc38a23f027b4fe516f3963632d01f66c02b0681 100644
+index 0f4b9b5d3e34b5e08f9ca2f78c5e8bcec9f5a85e..1e22ee380237a33c506316e3cfe3f6efb7f9ae4a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -872,9 +872,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -865,9 +865,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Nullable
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {
diff --git a/patches/server/0288-Expose-the-internal-current-tick.patch b/patches/server/0288-Expose-the-internal-current-tick.patch
index f68483ce4e..f9e040e4f2 100644
--- a/patches/server/0288-Expose-the-internal-current-tick.patch
+++ b/patches/server/0288-Expose-the-internal-current-tick.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index cd60f4db64b709c5ae23cafa45b8c0422e6c1c85..0a4cb8376d23e07e4b7a0620e536d87fef0cab11 100644
+index e7dbb7a6e0e6bb9c42e72531f4cf337abb7090ee..90dc5b52c07b40c317e13eebebf84dfe9fefde27 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2934,5 +2934,10 @@ public final class CraftServer implements Server {
+@@ -2933,5 +2933,10 @@ public final class CraftServer implements Server {
profile.getGameProfile().getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
return profile;
}
diff --git a/patches/server/0290-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/0290-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
index 6f292a58b4..9b920bb3ec 100644
--- a/patches/server/0290-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
+++ b/patches/server/0290-Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch
@@ -17,7 +17,7 @@ This should fully solve all of the issues around it so that only natural
influences natural spawns.
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-index be2412ef8f8c331a881e442577cf05aec43f52bb..485c6044d603f15878f9413a644a538dab68db3e 100644
+index c826bd20d1ba32ebb9069737ede88e122294ea7a..606a60fe273974b71ed2bd40be819d848627e777 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -87,6 +87,13 @@ public final class NaturalSpawner {
diff --git a/patches/server/0293-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0293-Prevent-consuming-the-wrong-itemstack.patch
index 87d7bf2e28..ec94a92f4d 100644
--- a/patches/server/0293-Prevent-consuming-the-wrong-itemstack.patch
+++ b/patches/server/0293-Prevent-consuming-the-wrong-itemstack.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 34f66931dec00809ed58569e24431762a1acd56f..f720d4d93ed13b1b9287a1ee7dc8bc4794834e1a 100644
+index 63d1c5e8441eb5a32fc298ff2d2f3157cbd19557..ebfea3adbedd2695f645421019a276efbc73ee63 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3995,9 +3995,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3993,9 +3993,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void startUsingItem(InteractionHand hand) {
@@ -24,7 +24,7 @@ index 34f66931dec00809ed58569e24431762a1acd56f..f720d4d93ed13b1b9287a1ee7dc8bc47
this.useItem = itemstack;
this.useItemRemaining = itemstack.getUseDuration(this);
if (!this.level().isClientSide) {
-@@ -4068,6 +4073,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4066,6 +4071,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@@ -32,7 +32,7 @@ index 34f66931dec00809ed58569e24431762a1acd56f..f720d4d93ed13b1b9287a1ee7dc8bc47
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
PlayerItemConsumeEvent event = null; // Paper
-@@ -4105,8 +4111,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4103,8 +4109,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();
diff --git a/patches/server/0301-Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/0301-Optimise-EntityGetter-getPlayerByUUID.patch
index 30f3d7dfdc..26d9943b72 100644
--- a/patches/server/0301-Optimise-EntityGetter-getPlayerByUUID.patch
+++ b/patches/server/0301-Optimise-EntityGetter-getPlayerByUUID.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Optimise EntityGetter#getPlayerByUUID
Use the PlayerList map instead of iterating over all players
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 1976acc359d03447507b32c9032700f4603628f0..a0a38a78987f05fe47b5a85a49659e7469674210 100644
+index 91e462544b82e0fe41851fa0fa3f6d6f08ac490d..800dd7338d77289b7d0e6e126342eaea184d3e43 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -333,6 +333,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -331,6 +331,15 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
// Paper end
diff --git a/patches/server/0302-Fix-items-not-falling-correctly.patch b/patches/server/0302-Fix-items-not-falling-correctly.patch
index d7e28fecdf..bc379f9af2 100644
--- a/patches/server/0302-Fix-items-not-falling-correctly.patch
+++ b/patches/server/0302-Fix-items-not-falling-correctly.patch
@@ -28,10 +28,10 @@ index 75ebf09777e19645eee296a9edabac39c858ffb9..c390d8b3a706d0177b9f3105a7b9a842
this.applyEffectsFromBlocks();
float f = 0.98F;
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
-index 5dac9bdb23de3d143cd678e583eaf6e8095bb209..ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55 100644
+index dd1c5bc7522a4710cbfdd4764f6431e1e28d63cc..f8387277d915460d755bdd35198d2547d1a49bde 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
-@@ -256,7 +256,7 @@ public class ActivationRange
+@@ -253,7 +253,7 @@ public class ActivationRange
isActive = true;
}
// Add a little performance juice to active entities. Skip 1/4 if not immune.
diff --git a/patches/server/0306-Tracking-Range-Improvements.patch b/patches/server/0306-Tracking-Range-Improvements.patch
index a7cfc3f988..620c26dc99 100644
--- a/patches/server/0306-Tracking-Range-Improvements.patch
+++ b/patches/server/0306-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 01c32ed14b1047671883911f8606ef2924ebee73..f8decd2f1841da947a3cff5b275efff63ba37def 100644
+index b8aff86c8533ea92b0244ea85ed786073c4053a8..0c5eb6ee56710b1ff71714b2090fbccd6da8456b 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1604,6 +1604,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1598,6 +1598,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/0309-Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/0309-Optimise-getChunkAt-calls-for-loaded-chunks.patch
index 32dde0f0e4..314e598d7b 100644
--- a/patches/server/0309-Optimise-getChunkAt-calls-for-loaded-chunks.patch
+++ b/patches/server/0309-Optimise-getChunkAt-calls-for-loaded-chunks.patch
@@ -7,7 +7,7 @@ bypass the need to get a player chunk, then get the either,
then unwrap it...
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index fef86453d5cf0fe0f11a2a061169cd301b777434..9ab43b4273975d7599f8eee2f95773f2984b7c37 100644
+index d4eb7608a3e40d2da4c427e9b3a2ce916be86df1..43e01db5314452c194d2809fdc6a71c6fb42d8d2 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -191,6 +191,12 @@ public class ServerChunkCache extends ChunkSource {
@@ -23,7 +23,7 @@ index fef86453d5cf0fe0f11a2a061169cd301b777434..9ab43b4273975d7599f8eee2f95773f2
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.incrementCounter("getChunk");
-@@ -234,33 +240,7 @@ public class ServerChunkCache extends ChunkSource {
+@@ -230,33 +236,7 @@ public class ServerChunkCache extends ChunkSource {
if (Thread.currentThread() != this.mainThread) {
return null;
} else {
diff --git a/patches/server/0310-Add-debug-for-sync-chunk-loads.patch b/patches/server/0310-Add-debug-for-sync-chunk-loads.patch
index 3bdd0ab20d..7dc3e61f51 100644
--- a/patches/server/0310-Add-debug-for-sync-chunk-loads.patch
+++ b/patches/server/0310-Add-debug-for-sync-chunk-loads.patch
@@ -302,22 +302,22 @@ index 0000000000000000000000000000000000000000..95d6022c9cfb2e36ec5a71be6e343540
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index 9ab43b4273975d7599f8eee2f95773f2984b7c37..350bfa9c891130b1aa2ab973e86668de187ee1e0 100644
+index 43e01db5314452c194d2809fdc6a71c6fb42d8d2..76cb7ffad02dcc27966ca13da6552edbb696e41f 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -218,6 +218,7 @@ public class ServerChunkCache extends ChunkSource {
Objects.requireNonNull(completablefuture);
- if (!completablefuture.isDone()) { // Paper
-+ com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x, z); // Paper - Add debug for sync chunk loads
- this.level.timings.syncChunkLoad.startTiming(); // Paper
chunkproviderserver_b.managedBlock(completablefuture::isDone);
- this.level.timings.syncChunkLoad.stopTiming(); // Paper
++ // com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x, z); // Paper - Add debug for sync chunk loads
+ ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
+ ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
+
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index a0a38a78987f05fe47b5a85a49659e7469674210..6e3765b00272548318fca647a80c56ad634b7ecc 100644
+index 800dd7338d77289b7d0e6e126342eaea184d3e43..ecb9f6f0c9b24313b9e55b3a4c4f4bba40bc8fb3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -412,6 +412,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -410,6 +410,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
}
diff --git a/patches/server/0313-Entity-Jump-API.patch b/patches/server/0313-Entity-Jump-API.patch
index 290c2cea30..66167bd061 100644
--- a/patches/server/0313-Entity-Jump-API.patch
+++ b/patches/server/0313-Entity-Jump-API.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API
public net.minecraft.world.entity.LivingEntity jumping
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index f720d4d93ed13b1b9287a1ee7dc8bc4794834e1a..304a401fb1f378ff2cbfd888acf56a8516f79310 100644
+index ebfea3adbedd2695f645421019a276efbc73ee63..724fe482f1711008dc43fef96c4512a18ed54a48 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3539,8 +3539,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3537,8 +3537,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
this.jumpInLiquid(FluidTags.LAVA);
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
diff --git a/patches/server/0320-Optimise-Chunk-getFluid.patch b/patches/server/0320-Optimise-Chunk-getFluid.patch
index 1126b881da..b81a71067c 100644
--- a/patches/server/0320-Optimise-Chunk-getFluid.patch
+++ b/patches/server/0320-Optimise-Chunk-getFluid.patch
@@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it
easier to inline due to code size
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index add5ec0f8e8bd0b89511dcb656e1d4cda702a86b..7181acfafad91aa5f6ab7ce663d9be4a1b65b02a 100644
+index a1b6c13d496519ef6ce240036cec6642626903b9..d4bd4cbc5c4773659662a6d7a09b21a99463c1fb 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -293,18 +293,20 @@ public class LevelChunk extends ChunkAccess {
diff --git a/patches/server/0322-Add-tick-times-API-and-mspt-command.patch b/patches/server/0322-Add-tick-times-API-and-mspt-command.patch
index 9426f15bec..cbef136961 100644
--- a/patches/server/0322-Add-tick-times-API-and-mspt-command.patch
+++ b/patches/server/0322-Add-tick-times-API-and-mspt-command.patch
@@ -125,10 +125,10 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7
public static void registerCommands(final MinecraftServer server) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index f245b10bc2931ab165057f27a8ff79ea77ea726e..5cc5f4c0a91e7c667e9271de17ffa845f566bd4d 100644
+index 447b8f9ede3f57c6c5f968a0d25153c5c8770c5a..652626c30a5e25ada797ec01273f1e016798aae1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -264,6 +264,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -263,6 +263,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private int playerIdleTimeout;
private final long[] tickTimesNanos;
private long aggregatedTickTimesNanos;
@@ -140,7 +140,7 @@ index f245b10bc2931ab165057f27a8ff79ea77ea726e..5cc5f4c0a91e7c667e9271de17ffa845
@Nullable
private KeyPair keyPair;
@Nullable
-@@ -1539,6 +1544,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1512,6 +1517,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.aggregatedTickTimesNanos += k;
this.tickTimesNanos[l] = k;
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) k / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
@@ -151,8 +151,8 @@ index f245b10bc2931ab165057f27a8ff79ea77ea726e..5cc5f4c0a91e7c667e9271de17ffa845
+ // Paper end - Add tick times API and /mspt command
this.logTickMethodTime(i);
gameprofilerfiller.pop();
- co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
-@@ -2945,4 +2955,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ }
+@@ -2901,4 +2911,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
}
@@ -184,10 +184,10 @@ index f245b10bc2931ab165057f27a8ff79ea77ea726e..5cc5f4c0a91e7c667e9271de17ffa845
+ // Paper end - Add tick times API and /mspt command
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 0a4cb8376d23e07e4b7a0620e536d87fef0cab11..daa2def7026579d75899cce6d33b91b7649ee076 100644
+index 90dc5b52c07b40c317e13eebebf84dfe9fefde27..ff6bac3e53795c427719900428a56a0e505f6ec2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2705,6 +2705,18 @@ public final class CraftServer implements Server {
+@@ -2704,6 +2704,18 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}
diff --git a/patches/server/0323-Expose-MinecraftServer-isRunning.patch b/patches/server/0323-Expose-MinecraftServer-isRunning.patch
index 80af8f4bf9..1f82adb8b4 100644
--- a/patches/server/0323-Expose-MinecraftServer-isRunning.patch
+++ b/patches/server/0323-Expose-MinecraftServer-isRunning.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index daa2def7026579d75899cce6d33b91b7649ee076..f5b0aa5ee92b24fd53d83eb45df1a5dece10733f 100644
+index ff6bac3e53795c427719900428a56a0e505f6ec2..c40331c2be3a3cfb156c3faa5f6a9fd3cb237077 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2951,5 +2951,10 @@ public final class CraftServer implements Server {
+@@ -2950,5 +2950,10 @@ public final class CraftServer implements Server {
public int getCurrentTick() {
return net.minecraft.server.MinecraftServer.currentTick;
}
diff --git a/patches/server/0324-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0324-Add-Raw-Byte-ItemStack-Serialization.patch
index 62d4045771..3895429c44 100644
--- a/patches/server/0324-Add-Raw-Byte-ItemStack-Serialization.patch
+++ b/patches/server/0324-Add-Raw-Byte-ItemStack-Serialization.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index d22eb174d9c0cc5dd6418c478470c616b75801b2..f78459e65fd27a5fd9839d2ad1c95758c8d95489 100644
+index 2b60572307e3ec23e21e09c34a04de9a1c57f136..150ab63f231fc3c39661ab876a8c90d608ee8568 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -464,6 +464,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -469,6 +469,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.PaperVersionFetcher();
}
@@ -62,4 +62,4 @@ index d22eb174d9c0cc5dd6418c478470c616b75801b2..f78459e65fd27a5fd9839d2ad1c95758
+ }
// Paper end
- @Override
+ /**
diff --git a/patches/server/0326-Remote-Connections-shouldn-t-hold-up-shutdown.patch b/patches/server/0326-Remote-Connections-shouldn-t-hold-up-shutdown.patch
index 5241dc1064..b9679f9f48 100644
--- a/patches/server/0326-Remote-Connections-shouldn-t-hold-up-shutdown.patch
+++ b/patches/server/0326-Remote-Connections-shouldn-t-hold-up-shutdown.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Remote Connections shouldn't hold up shutdown
Bugs in the connection logic appears to leave stale connections even, preventing shutdown
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 6d36c02d42e0b6e667d3076b1b455ba3adfde65b..82d5f1235d158326ce6fb1eb6d481c00f57467d3 100644
+index 417c8bf97c5f5b7d127ac7d496b86882d75ff354..fe1975675189c6d1a63c42b7959fa40b5ac95ef8 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -398,11 +398,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -396,11 +396,11 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
}
if (this.rconThread != null) {
diff --git a/patches/server/0328-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0328-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
index 9607433b9d..e085f84be1 100644
--- a/patches/server/0328-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch
+++ b/patches/server/0328-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 f8decd2f1841da947a3cff5b275efff63ba37def..926e1ebfe3a011a28fb82b855511aaabca0c4072 100644
+index 0c5eb6ee56710b1ff71714b2090fbccd6da8456b..5963f38e050c1ea5c77dde91028d306dfe9b94ba 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1300,6 +1300,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1298,6 +1298,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public void addEntity(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity track"); // Spigot
@@ -25,10 +25,10 @@ index f8decd2f1841da947a3cff5b275efff63ba37def..926e1ebfe3a011a28fb82b855511aaab
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 6e3765b00272548318fca647a80c56ad634b7ecc..609c2e1946c86deabb885d7d703cf42273839f1e 100644
+index ecb9f6f0c9b24313b9e55b3a4c4f4bba40bc8fb3..0995a3a274df988a5c63c813de8213019a7c47c4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2232,7 +2232,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2202,7 +2202,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public void onTrackingStart(Entity entity) {
org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot
@@ -37,7 +37,7 @@ index 6e3765b00272548318fca647a80c56ad634b7ecc..609c2e1946c86deabb885d7d703cf422
if (entity instanceof ServerPlayer entityplayer) {
ServerLevel.this.players.add(entityplayer);
ServerLevel.this.updateSleepingPlayerList();
-@@ -2262,6 +2262,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2232,6 +2232,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit
diff --git a/patches/server/0331-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0331-Don-t-move-existing-players-to-world-spawn.patch
index 6750b4fb1a..4c51963248 100644
--- a/patches/server/0331-Don-t-move-existing-players-to-world-spawn.patch
+++ b/patches/server/0331-Don-t-move-existing-players-to-world-spawn.patch
@@ -35,10 +35,10 @@ index 965ca28a8877f5e541741c45bace7075d15a77d7..adbc8e74f0b454403bc682de11bd0342
this.gameMode.setLevel((ServerLevel) world);
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 29110c0b950c3073ab699d8ad1523ece2e8d3408..074f3518b060c4aa079b1d311b7fcb10d4a95981 100644
+index 2cfc2213e3036585dc4723eecf747e1c37d53b72..ad4f5a4e00b9b517841acd0b4ff5088e45451bf4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -227,6 +227,7 @@ public abstract class PlayerList {
+@@ -226,6 +226,7 @@ public abstract class PlayerList {
// Paper start - Entity#getEntitySpawnReason
if (optional.isEmpty()) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
diff --git a/patches/server/0336-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0336-Don-t-run-entity-collision-code-if-not-needed.patch
index e0919bb4b1..543230b850 100644
--- a/patches/server/0336-Don-t-run-entity-collision-code-if-not-needed.patch
+++ b/patches/server/0336-Don-t-run-entity-collision-code-if-not-needed.patch
@@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
Co-authored-by: Owen1212055 <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 304a401fb1f378ff2cbfd888acf56a8516f79310..ecf188d659c8542ca2b52c5e7ec779bfacb5614c 100644
+index 724fe482f1711008dc43fef96c4512a18ed54a48..4fb99e3ee14d2e7fe2720e25af1c890004b0c250 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3683,10 +3683,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3681,10 +3681,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!(world instanceof ServerLevel worldserver)) {
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
} else {
diff --git a/patches/server/0339-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch b/patches/server/0339-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
index 0863194ba3..d7a416c036 100644
--- a/patches/server/0339-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
+++ b/patches/server/0339-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
@@ -31,10 +31,10 @@ delays anymore.
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 926e1ebfe3a011a28fb82b855511aaabca0c4072..4d8dcc47b39d28ab715110e55110869fe3c9b456 100644
+index 5963f38e050c1ea5c77dde91028d306dfe9b94ba..352675e0b835d5f04576db6599e8840754a40340 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1307,6 +1307,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1305,6 +1305,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
return;
}
// Paper end - ignore and warn about illegal addEntity calls instead of crashing server
@@ -55,10 +55,10 @@ index 9911e231ad021286f2da90057b06874f7b4e3b4d..807068fc6065f71961d34cb4f18b6eb3
// CraftBukkit end
public boolean isRealPlayer; // Paper
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 074f3518b060c4aa079b1d311b7fcb10d4a95981..ec5673ff22706006a2bcfb5f5a9e8840ee27ac45 100644
+index ad4f5a4e00b9b517841acd0b4ff5088e45451bf4..4ff14dc6996634b0fcd365f76055023601ad2be0 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -300,6 +300,13 @@ public abstract class PlayerList {
+@@ -299,6 +299,13 @@ public abstract class PlayerList {
this.playersByUUID.put(player.getUUID(), player);
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
@@ -72,7 +72,7 @@ index 074f3518b060c4aa079b1d311b7fcb10d4a95981..ec5673ff22706006a2bcfb5f5a9e8840
// CraftBukkit start
CraftPlayer bukkitPlayer = player.getBukkitEntity();
-@@ -338,6 +345,8 @@ public abstract class PlayerList {
+@@ -337,6 +344,8 @@ public abstract class PlayerList {
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
}
player.sentListPacket = true;
@@ -81,7 +81,7 @@ index 074f3518b060c4aa079b1d311b7fcb10d4a95981..ec5673ff22706006a2bcfb5f5a9e8840
// CraftBukkit end
player.refreshEntityData(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
-@@ -353,8 +362,7 @@ public abstract class PlayerList {
+@@ -352,8 +361,7 @@ public abstract class PlayerList {
worldserver1 = player.serverLevel(); // CraftBukkit - Update in case join event changed it
// CraftBukkit end
this.sendActivePlayerEffects(player);
diff --git a/patches/server/0340-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/0340-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
index 270260266e..3dae78af46 100644
--- a/patches/server/0340-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
+++ b/patches/server/0340-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
@@ -10,10 +10,10 @@ Co-authored-by: Wyatt Childers <[email protected]>
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index ec5673ff22706006a2bcfb5f5a9e8840ee27ac45..c8c27311ade7d4a70d5398b3a4cb50eedd02a2f9 100644
+index 4ff14dc6996634b0fcd365f76055023601ad2be0..530369764cad77466995f8f65070eec6a5de74f2 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -198,6 +198,7 @@ public abstract class PlayerList {
+@@ -197,6 +197,7 @@ public abstract class PlayerList {
}
Optional<CompoundTag> optional = this.load(player); // CraftBukkit - decompile error
@@ -21,7 +21,7 @@ index ec5673ff22706006a2bcfb5f5a9e8840ee27ac45..c8c27311ade7d4a70d5398b3a4cb50ee
// CraftBukkit start - Better rename detection
if (optional.isPresent()) {
CompoundTag nbttagcompound = optional.get();
-@@ -207,19 +208,47 @@ public abstract class PlayerList {
+@@ -206,19 +207,47 @@ public abstract class PlayerList {
}
}
// CraftBukkit end
@@ -72,7 +72,7 @@ index ec5673ff22706006a2bcfb5f5a9e8840ee27ac45..c8c27311ade7d4a70d5398b3a4cb50ee
} else {
worldserver1 = worldserver;
}
-@@ -227,6 +256,10 @@ public abstract class PlayerList {
+@@ -226,6 +255,10 @@ public abstract class PlayerList {
// Paper start - Entity#getEntitySpawnReason
if (optional.isEmpty()) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
diff --git a/patches/server/0341-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0341-Add-PlayerAttackEntityCooldownResetEvent.patch
index ce70659c90..620e81e210 100644
--- a/patches/server/0341-Add-PlayerAttackEntityCooldownResetEvent.patch
+++ b/patches/server/0341-Add-PlayerAttackEntityCooldownResetEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index ecf188d659c8542ca2b52c5e7ec779bfacb5614c..324d654420c3d11f0695fdf029fde0300a865317 100644
+index 4fb99e3ee14d2e7fe2720e25af1c890004b0c250..25a2085ed68d393afbb658b63a1cd39af98f39fa 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2354,7 +2354,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2352,7 +2352,17 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {
diff --git a/patches/server/0344-Fix-item-duplication-and-teleport-issues.patch b/patches/server/0344-Fix-item-duplication-and-teleport-issues.patch
index 77d7c3a5b2..d818b547f1 100644
--- a/patches/server/0344-Fix-item-duplication-and-teleport-issues.patch
+++ b/patches/server/0344-Fix-item-duplication-and-teleport-issues.patch
@@ -68,10 +68,10 @@ index 5b8e264098f1b713de15f714bae59d3efda365cf..d5f96ed753e8298085e40c6181285cd6
Iterator iterator = this.getPassengers().iterator();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 324d654420c3d11f0695fdf029fde0300a865317..f7323f54b2ac7236d26da8998a88432f9776e1ea 100644
+index 25a2085ed68d393afbb658b63a1cd39af98f39fa..718ccabb46d4520ba363d21a33e06eb2c9ff62ee 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1767,9 +1767,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1765,9 +1765,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(worldserver, damageSource);
if (deathEvent == null || !deathEvent.isCancelled()) {
@@ -84,7 +84,7 @@ index 324d654420c3d11f0695fdf029fde0300a865317..f7323f54b2ac7236d26da8998a88432f
// Paper start - clear equipment if event is not cancelled
if (this instanceof Mob) {
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
-@@ -1863,8 +1863,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1861,8 +1861,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropCustomDeathLoot(world, damageSource, flag);
this.clearEquipmentSlots = prev; // Paper
}
diff --git a/patches/server/0346-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0346-Validate-PickItem-Packet-and-kick-for-invalid.patch
index cc98d91687..6b1b7c3df3 100644
--- a/patches/server/0346-Validate-PickItem-Packet-and-kick-for-invalid.patch
+++ b/patches/server/0346-Validate-PickItem-Packet-and-kick-for-invalid.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index df2718d7e7dd7969f49b3467347fa2adcf60132a..1b82e733c107540618cb1f69511ea9e1a4a13fc8 100644
+index 8a58c1bdda065edd7b8560cd43e805de3fe0b178..59c12f6d5d96835b4b37ed5a761f25f8f147c54a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -906,7 +906,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0348-misc-debugging-dumps.patch b/patches/server/0348-misc-debugging-dumps.patch
index c11d5f369e..64ee1d9744 100644
--- a/patches/server/0348-misc-debugging-dumps.patch
+++ b/patches/server/0348-misc-debugging-dumps.patch
@@ -49,10 +49,10 @@ index c847fbdb6f52386570eb4c070fcc01d39cc52151..a7eb2a37a81a414dcb19319c075faefe
StackTraceElement[] astacktraceelement = exception.getStackTrace();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 5cc5f4c0a91e7c667e9271de17ffa845f566bd4d..07045495e7d3f7e256bf30a777a5a7536dfe2446 100644
+index 652626c30a5e25ada797ec01273f1e016798aae1..909302aa0afc082a2d0bf55fd31ff9c510e8c3c5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -931,6 +931,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -930,6 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
@@ -60,7 +60,7 @@ index 5cc5f4c0a91e7c667e9271de17ffa845f566bd4d..07045495e7d3f7e256bf30a777a5a753
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (this.stopLock) {
-@@ -945,6 +946,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -944,6 +945,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hasStopped) return;
this.hasStopped = true;
}
@@ -68,7 +68,7 @@ index 5cc5f4c0a91e7c667e9271de17ffa845f566bd4d..07045495e7d3f7e256bf30a777a5a753
// CraftBukkit end
if (this.metricsRecorder.isRecording()) {
this.cancelRecordingMetrics();
-@@ -1049,6 +1051,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1047,6 +1049,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
this.isRestarting = isRestarting;
@@ -105,10 +105,10 @@ index 5457358bc76889153036818fdfd70a043ec4e40f..880e5c52746e9e3a9a1f42ec6461be54
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index f5b0aa5ee92b24fd53d83eb45df1a5dece10733f..0d36eb7ae9d07d51449a4a15a6474c3f4befec94 100644
+index c40331c2be3a3cfb156c3faa5f6a9fd3cb237077..6b042419af11730b0159c030ea1881dcfbb37dcd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1052,6 +1052,7 @@ public final class CraftServer implements Server {
+@@ -1051,6 +1051,7 @@ public final class CraftServer implements Server {
plugin.getDescription().getFullName(),
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
));
diff --git a/patches/server/0349-Prevent-teleporting-dead-entities.patch b/patches/server/0349-Prevent-teleporting-dead-entities.patch
index ee1f3e1a97..3f17b011a4 100644
--- a/patches/server/0349-Prevent-teleporting-dead-entities.patch
+++ b/patches/server/0349-Prevent-teleporting-dead-entities.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleporting dead entities
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 1b82e733c107540618cb1f69511ea9e1a4a13fc8..9286012c7a07e1a621035b0563cb06a3421ea945 100644
+index 59c12f6d5d96835b4b37ed5a761f25f8f147c54a..6c9f7a4d3c7551157d22f17e8a66ada2c50c0550 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1571,6 +1571,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0350-Implement-Mob-Goal-API.patch b/patches/server/0350-Implement-Mob-Goal-API.patch
index 445aa535d1..b1e4b0cf0d 100644
--- a/patches/server/0350-Implement-Mob-Goal-API.patch
+++ b/patches/server/0350-Implement-Mob-Goal-API.patch
@@ -785,10 +785,10 @@ index a8d6d7054110b5d95830296699f004418dae10db..acc25b08ed3b9f978229fa017d23f9fa
LOOK,
JUMP,
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 0d36eb7ae9d07d51449a4a15a6474c3f4befec94..aa7e0c08552ba476cfb266ad474eaecb9cc21a96 100644
+index 6b042419af11730b0159c030ea1881dcfbb37dcd..8339da59b7a73411f45b77f6eb93e8ad65a1ef48 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2957,5 +2957,11 @@ public final class CraftServer implements Server {
+@@ -2956,5 +2956,11 @@ public final class CraftServer implements Server {
public boolean isStopping() {
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
}
diff --git a/patches/server/0355-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0355-Wait-for-Async-Tasks-during-shutdown.patch
index 18ea2be07f..1dd08c6eab 100644
--- a/patches/server/0355-Wait-for-Async-Tasks-during-shutdown.patch
+++ b/patches/server/0355-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 07045495e7d3f7e256bf30a777a5a7536dfe2446..075928ac5095f95789839c82b528f60b356918b3 100644
+index 909302aa0afc082a2d0bf55fd31ff9c510e8c3c5..03d6045fd5721b32852a357f1f2e3d2e16efb85b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -958,6 +958,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -956,6 +956,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
@@ -22,10 +22,10 @@ index 07045495e7d3f7e256bf30a777a5a7536dfe2446..075928ac5095f95789839c82b528f60b
// CraftBukkit end
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.shutdown(); // Paper - Plugin remapping
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index aa7e0c08552ba476cfb266ad474eaecb9cc21a96..f80164bf8fde13a8702f09e1e1d8aab3ba075e42 100644
+index 8339da59b7a73411f45b77f6eb93e8ad65a1ef48..d1be64bec1985ff04bf61ed65f18b043e771657c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1063,6 +1063,32 @@ public final class CraftServer implements Server {
+@@ -1062,6 +1062,32 @@ public final class CraftServer implements Server {
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
}
diff --git a/patches/server/0361-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/0361-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch
index 906b73e477..72996a4bdc 100644
--- a/patches/server/0361-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch
+++ b/patches/server/0361-Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Fix CraftScheduler#runTaskTimerAsynchronously(Plugin,
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-index fd5a058dd802599598a64467cf25f08329df9e99..fdfdcac6644e5343fb1f1cbe5d9aa76a79627046 100644
+index 7de4db0099b380c81d6a809a298d580f0f6e4acc..a700dac93499650fdaa0af06ff77607ffa4dbbb2 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-@@ -197,7 +197,7 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -196,7 +196,7 @@ public class CraftScheduler implements BukkitScheduler {
@Override
public void runTaskTimerAsynchronously(Plugin plugin, Consumer<? super BukkitTask> task, long delay, long period) throws IllegalArgumentException {
diff --git a/patches/server/0364-Prevent-position-desync-causing-tp-exploit.patch b/patches/server/0364-Prevent-position-desync-causing-tp-exploit.patch
index ebbd08637a..8b73d196cf 100644
--- a/patches/server/0364-Prevent-position-desync-causing-tp-exploit.patch
+++ b/patches/server/0364-Prevent-position-desync-causing-tp-exploit.patch
@@ -13,7 +13,7 @@ behaviour, we need to move all of this dangerous logic outside
of the move call and into an appropriate place in the tick method.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 9286012c7a07e1a621035b0563cb06a3421ea945..f4f2b6733780312c289af96ec8ffe1fbf732651e 100644
+index 6c9f7a4d3c7551157d22f17e8a66ada2c50c0550..12827fdd39bb7571739efa482ceb1e32f64ea982 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1359,6 +1359,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0366-Add-PlayerRecipeBookClickEvent.patch b/patches/server/0366-Add-PlayerRecipeBookClickEvent.patch
index 504a8bac86..8083914a42 100644
--- a/patches/server/0366-Add-PlayerRecipeBookClickEvent.patch
+++ b/patches/server/0366-Add-PlayerRecipeBookClickEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index f4f2b6733780312c289af96ec8ffe1fbf732651e..09b478545ab5eed86dda17c5c74c585c7d3e6df8 100644
+index 12827fdd39bb7571739efa482ceb1e32f64ea982..300f543913979427b28578e5bb3270b20065098c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -199,6 +199,7 @@ import net.minecraft.world.phys.Vec3;
@@ -16,7 +16,7 @@ index f4f2b6733780312c289af96ec8ffe1fbf732651e..09b478545ab5eed86dda17c5c74c585c
import org.slf4j.Logger;
// CraftBukkit start
-@@ -3093,21 +3094,41 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3090,21 +3091,41 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
ServerGamePacketListenerImpl.LOGGER.debug("Player {} tried to place impossible recipe {}", this.player, recipeholder.id().location());
return;
}
diff --git a/patches/server/0368-Add-permission-for-command-blocks.patch b/patches/server/0368-Add-permission-for-command-blocks.patch
index f971d5b25a..0a7fb386cc 100644
--- a/patches/server/0368-Add-permission-for-command-blocks.patch
+++ b/patches/server/0368-Add-permission-for-command-blocks.patch
@@ -18,7 +18,7 @@ index 4623c8acd125dff4919c4e2045b848310d785da5..86e4559da2344f228ef4d1c4ac3c115f
return false;
} else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 09b478545ab5eed86dda17c5c74c585c7d3e6df8..acf13898f316c0ddf3c31c0ac716322c23234318 100644
+index 300f543913979427b28578e5bb3270b20065098c..0884f71d3264c2a09d2a0958d4751962e4156526 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -818,7 +818,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0370-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0370-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
index feb2f98133..95cf927bee 100644
--- a/patches/server/0370-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
+++ b/patches/server/0370-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 075928ac5095f95789839c82b528f60b356918b3..1be085de963e1c4e5b5b1902f8dc46b120846226 100644
+index 03d6045fd5721b32852a357f1f2e3d2e16efb85b..fce70aa2b0d92c6291720b75a07a6472eb55855b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -852,7 +852,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -851,7 +851,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldloadlistener.stop();
// CraftBukkit start
// this.updateMobSpawningFlags();
@@ -20,7 +20,7 @@ index 075928ac5095f95789839c82b528f60b356918b3..1be085de963e1c4e5b5b1902f8dc46b1
this.forceTicks = false;
// CraftBukkit end
-@@ -1934,11 +1934,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1890,11 +1890,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@@ -40,7 +40,7 @@ index 075928ac5095f95789839c82b528f60b356918b3..1be085de963e1c4e5b5b1902f8dc46b1
}
}
-@@ -1952,7 +1955,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1908,7 +1911,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
@@ -63,10 +63,10 @@ index 997a96a21440ae72696d68f8031ece4ba487d3ef..3d8584929cee000ae7df10c5bd94f358
return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
}, true);
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 82d5f1235d158326ce6fb1eb6d481c00f57467d3..20a3138c6c2a6c8ada8b6008913abae0eea76f2d 100644
+index fe1975675189c6d1a63c42b7959fa40b5ac95ef8..9a3e73a5c206b78dfcf6f41a47b614342e52acc8 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -339,7 +339,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -337,7 +337,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@Override
public void forceDifficulty() {
@@ -76,10 +76,10 @@ index 82d5f1235d158326ce6fb1eb6d481c00f57467d3..20a3138c6c2a6c8ada8b6008913abae0
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index acf13898f316c0ddf3c31c0ac716322c23234318..fa25c989433379b3be384f08b7e3cf47a8eac9b7 100644
+index 0884f71d3264c2a09d2a0958d4751962e4156526..8bb1b0e7caa938170169379ce22f21c1c772db60 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3311,7 +3311,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3308,7 +3308,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
@@ -89,10 +89,10 @@ index acf13898f316c0ddf3c31c0ac716322c23234318..fa25c989433379b3be384f08b7e3cf47
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index f80164bf8fde13a8702f09e1e1d8aab3ba075e42..acf213f47aea597824e2301e422435fbb77098fb 100644
+index d1be64bec1985ff04bf61ed65f18b043e771657c..c52d550ebc7eb9aca2c2e109b2982cad7cb9ac4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1001,8 +1001,8 @@ public final class CraftServer implements Server {
+@@ -1000,8 +1000,8 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
for (ServerLevel world : this.console.getAllLevels()) {
diff --git a/patches/server/0373-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0373-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
index 1d3e93eeab..81762652ca 100644
--- a/patches/server/0373-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
+++ b/patches/server/0373-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
@@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index acf213f47aea597824e2301e422435fbb77098fb..dfe625f406ac323ede270d3773e71b09a3ba0054 100644
+index c52d550ebc7eb9aca2c2e109b2982cad7cb9ac4f..134cd194962be898253e034b19524fad0d48ada5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -383,7 +383,7 @@ public final class CraftServer implements Server {
+@@ -382,7 +382,7 @@ public final class CraftServer implements Server {
this.overrideSpawnLimits();
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
@@ -34,7 +34,7 @@ index acf213f47aea597824e2301e422435fbb77098fb..dfe625f406ac323ede270d3773e71b09
this.minimumAPI = ApiVersion.getOrCreateVersion(this.configuration.getString("settings.minimum-api"));
this.loadIcon();
this.loadCompatibilities();
-@@ -979,7 +979,7 @@ public final class CraftServer implements Server {
+@@ -978,7 +978,7 @@ public final class CraftServer implements Server {
this.console.setMotd(config.motd);
this.overrideSpawnLimits();
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
diff --git a/patches/server/0376-Do-not-accept-invalid-client-settings.patch b/patches/server/0376-Do-not-accept-invalid-client-settings.patch
index b3c22c0c65..ba6f03a6ba 100644
--- a/patches/server/0376-Do-not-accept-invalid-client-settings.patch
+++ b/patches/server/0376-Do-not-accept-invalid-client-settings.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index fa25c989433379b3be384f08b7e3cf47a8eac9b7..49039d929681891beb76b8c7f6e6d8bb614a7bf0 100644
+index 8bb1b0e7caa938170169379ce22f21c1c772db60..00ce20359f6d73acf3f1016806e5f4f3b6d01bcd 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3303,6 +3303,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3300,6 +3300,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleClientInformation(ServerboundClientInformationPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
diff --git a/patches/server/0380-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0380-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch
index de62fde367..c46cb6a919 100644
--- a/patches/server/0380-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch
+++ b/patches/server/0380-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index f7323f54b2ac7236d26da8998a88432f9776e1ea..e0ccdbcdbc33d378ebe41e3741137b15ff9fd80a 100644
+index 718ccabb46d4520ba363d21a33e06eb2c9ff62ee..7e3670bee52407d768d1f7c0be66d7c0d0f72c46 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3798,7 +3798,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3796,7 +3796,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Entity entity = this.getVehicle();
super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation
diff --git a/patches/server/0392-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0392-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch
index 1f69764500..b664948634 100644
--- a/patches/server/0392-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch
+++ b/patches/server/0392-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 609c2e1946c86deabb885d7d703cf42273839f1e..97ce1e1d877d34581f0475066f604d5a1f349d90 100644
+index 0995a3a274df988a5c63c813de8213019a7c47c4..17725a575a29aa8076582e1b8c644ffd928cfaae 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1730,7 +1730,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1700,7 +1700,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
float f1 = this.levelData.getSpawnAngle();
if (!blockposition1.equals(pos) || f1 != angle) {
diff --git a/patches/server/0403-Cache-block-data-strings.patch b/patches/server/0403-Cache-block-data-strings.patch
index 2e99489f44..4c26cbbfcd 100644
--- a/patches/server/0403-Cache-block-data-strings.patch
+++ b/patches/server/0403-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 1be085de963e1c4e5b5b1902f8dc46b120846226..ad234d7d364706e40d2965ea1f3ee57b3c058bdc 100644
+index fce70aa2b0d92c6291720b75a07a6472eb55855b..b9acf51e30839447cb7fc48e202321ed4bb2b7ea 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2228,6 +2228,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2184,6 +2184,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
this.fuelValues = FuelValues.vanillaBurnTimes(this.registries.compositeAccess(), this.worldData.enabledFeatures());
diff --git a/patches/server/0404-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0404-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
index b792cb8eef..4545d0671c 100644
--- a/patches/server/0404-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
+++ b/patches/server/0404-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
@@ -9,7 +9,7 @@ as this is how Vanilla teleports entities.
Cancel any pending motion when teleported.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 49039d929681891beb76b8c7f6e6d8bb614a7bf0..b634a90e87f52c79b74c256c13b659b51556f7fe 100644
+index 00ce20359f6d73acf3f1016806e5f4f3b6d01bcd..1754e413dc1b7a18b3fc0b981eae11283b2106e5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -685,7 +685,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0407-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0407-Extend-block-drop-capture-to-capture-all-items-added.patch
index 29e625b195..304750f90e 100644
--- a/patches/server/0407-Extend-block-drop-capture-to-capture-all-items-added.patch
+++ b/patches/server/0407-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 97ce1e1d877d34581f0475066f604d5a1f349d90..ca1c8cc67fe00dc7ad5e942a387f95cbad415e86 100644
+index 17725a575a29aa8076582e1b8c644ffd928cfaae..c5029210d059a62577ede8b6e944e2f4dcbac420 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1223,6 +1223,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1193,6 +1193,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
} else {
diff --git a/patches/server/0408-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0408-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
index f7644c3d37..4a538824cb 100644
--- a/patches/server/0408-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
+++ b/patches/server/0408-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
@@ -21,10 +21,10 @@ index 2c9e57436469f94beb45f656a1df71aba7b1e408..c3e28cc070993be5afe9323c2c2d54ff
+ // Paper end - Expose entity id counter
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index f78459e65fd27a5fd9839d2ad1c95758c8d95489..249c0f717a80b9ca8e200ebdbf72a0dc4c3730cc 100644
+index 150ab63f231fc3c39661ab876a8c90d608ee8568..93505eba28d9fb20ce25866e932fc1cdcb006db8 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -511,6 +511,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -516,6 +516,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
return compound;
}
@@ -35,4 +35,4 @@ index f78459e65fd27a5fd9839d2ad1c95758c8d95489..249c0f717a80b9ca8e200ebdbf72a0dc
+ }
// Paper end
- @Override
+ /**
diff --git a/patches/server/0411-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0411-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch
index 8228adc178..0dc0df3b45 100644
--- a/patches/server/0411-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch
+++ b/patches/server/0411-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 ad234d7d364706e40d2965ea1f3ee57b3c058bdc..a26e3620346b80b00e2ca29e7f393bca404d8a50 100644
+index b9acf51e30839447cb7fc48e202321ed4bb2b7ea..f6667d9f514a821fd539e193dde1f78e77ca0fbf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2353,13 +2353,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2309,13 +2309,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/0414-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0414-Fix-for-large-move-vectors-crashing-server.patch
index 7e52db071f..82dc6a2eef 100644
--- a/patches/server/0414-Fix-for-large-move-vectors-crashing-server.patch
+++ b/patches/server/0414-Fix-for-large-move-vectors-crashing-server.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Fix for large move vectors crashing server
Check movement distance also based on current position.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index b634a90e87f52c79b74c256c13b659b51556f7fe..a45078fc6a63742682040518e419fe0e2f704065 100644
+index 1754e413dc1b7a18b3fc0b981eae11283b2106e5..fc06281b6d37d72a0a333343fc800bd388713a5f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -497,9 +497,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0417-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0417-Retain-block-place-order-when-capturing-blockstates.patch
index 7bb12e9275..6da68ddaf2 100644
--- a/patches/server/0417-Retain-block-place-order-when-capturing-blockstates.patch
+++ b/patches/server/0417-Retain-block-place-order-when-capturing-blockstates.patch
@@ -10,7 +10,7 @@ In general, look at making this logic more robust (i.e properly handling
cases where a captured entry is overriden) - but for now this will do.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index dc38a23f027b4fe516f3963632d01f66c02b0681..aff89d2e3274b91238989fc1e7d8c119c2a3c097 100644
+index 1e22ee380237a33c506316e3cfe3f6efb7f9ae4a..71e9c1504d4b85ffb695401974748d56fefb66e6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -153,7 +153,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/0421-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0421-Add-getOfflinePlayerIfCached-String.patch
index 83fd69cf3d..d20fbc6b6d 100644
--- a/patches/server/0421-Add-getOfflinePlayerIfCached-String.patch
+++ b/patches/server/0421-Add-getOfflinePlayerIfCached-String.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index dfe625f406ac323ede270d3773e71b09a3ba0054..dd3940c2aacfa835b528a882f3ec5dd4d98bd59f 100644
+index 134cd194962be898253e034b19524fad0d48ada5..30675a23a25dc065e09d97b9b08386c9f41989d8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1969,6 +1969,28 @@ public final class CraftServer implements Server {
+@@ -1968,6 +1968,28 @@ public final class CraftServer implements Server {
return result;
}
diff --git a/patches/server/0424-Fix-client-lag-on-advancement-loading.patch b/patches/server/0424-Fix-client-lag-on-advancement-loading.patch
index ecae324f16..67c377a6f1 100644
--- a/patches/server/0424-Fix-client-lag-on-advancement-loading.patch
+++ b/patches/server/0424-Fix-client-lag-on-advancement-loading.patch
@@ -15,10 +15,10 @@ manually reload the advancement data for all players, which
normally takes place as a part of the datapack reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 249c0f717a80b9ca8e200ebdbf72a0dc4c3730cc..6e8351363af9aea752286311074d53f245196e8d 100644
+index 93505eba28d9fb20ce25866e932fc1cdcb006db8..af8fde74b3162d2de740ecae1122b4f2115baeb6 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -323,7 +323,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -317,7 +317,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex);
}
diff --git a/patches/server/0427-Add-API-for-quit-reason.patch b/patches/server/0427-Add-API-for-quit-reason.patch
index fe4c28762d..b6a32be1b4 100644
--- a/patches/server/0427-Add-API-for-quit-reason.patch
+++ b/patches/server/0427-Add-API-for-quit-reason.patch
@@ -52,10 +52,10 @@ index 9a8b08d4b70b8890961e4af7ce6e870aa1c7c810..f8ae8c8eff73e4e87eb34d0f2635517f
this.connection.disconnect(disconnectiondetails);
}));
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index c8c27311ade7d4a70d5398b3a4cb50eedd02a2f9..4975b4222d52eddbb42e9c9cd08eef56859080c8 100644
+index 530369764cad77466995f8f65070eec6a5de74f2..819fb4ef54dce33ec91604491132771f157c8d83 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -520,7 +520,7 @@ public abstract class PlayerList {
+@@ -519,7 +519,7 @@ public abstract class PlayerList {
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper - Inventory close reason
}
diff --git a/patches/server/0435-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0435-Climbing-should-not-bypass-cramming-gamerule.patch
index cd37306a92..cb1a5d5b2a 100644
--- a/patches/server/0435-Climbing-should-not-bypass-cramming-gamerule.patch
+++ b/patches/server/0435-Climbing-should-not-bypass-cramming-gamerule.patch
@@ -44,10 +44,10 @@ index b8d57e25851dd7da905100dfd4022e4b99fd7f02..721321a19ce056f82de2bef44a8791dc
} else if (entity1 instanceof Player && entity instanceof Player && !io.papermc.paper.configuration.GlobalConfiguration.get().collisions.enablePlayerCollisions) { // Paper - Configurable player collision
return false;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index e0ccdbcdbc33d378ebe41e3741137b15ff9fd80a..5a551e24be8d4d8157adb0f20f8e7bd3c5c61854 100644
+index 7e3670bee52407d768d1f7c0be66d7c0d0f72c46..d361e39ba50958e7bdaea0b95c37d13f48a89771 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3712,7 +3712,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3710,7 +3710,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
return;
}
// Paper end - don't run getEntities if we're not going to use its result
@@ -56,7 +56,7 @@ index e0ccdbcdbc33d378ebe41e3741137b15ff9fd80a..5a551e24be8d4d8157adb0f20f8e7bd3
if (!list.isEmpty()) {
// Paper - don't run getEntities if we're not going to use its result; moved up
-@@ -3917,9 +3917,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3915,9 +3915,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
return !this.isRemoved() && this.collides; // CraftBukkit
}
diff --git a/patches/server/0438-Limit-recipe-packets.patch b/patches/server/0438-Limit-recipe-packets.patch
index d227002698..5b0badbbe1 100644
--- a/patches/server/0438-Limit-recipe-packets.patch
+++ b/patches/server/0438-Limit-recipe-packets.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index a45078fc6a63742682040518e419fe0e2f704065..bca6e44c6a6584be2537d8be1279497b3394c447 100644
+index fc06281b6d37d72a0a333343fc800bd388713a5f..f2c1893677004b1699beb16ebfcbe9816aad2a78 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -277,6 +277,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -24,7 +24,7 @@ index a45078fc6a63742682040518e419fe0e2f704065..bca6e44c6a6584be2537d8be1279497b
this.dropSpamThrottler.tick();
if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) this.server.getPlayerIdleTimeout() * 1000L * 60L) {
this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
-@@ -3091,6 +3093,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3088,6 +3090,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
diff --git a/patches/server/0452-Fix-interact-event-not-being-called-sometimes.patch b/patches/server/0452-Fix-interact-event-not-being-called-sometimes.patch
index aba682dc6c..72c54e87a3 100644
--- a/patches/server/0452-Fix-interact-event-not-being-called-sometimes.patch
+++ b/patches/server/0452-Fix-interact-event-not-being-called-sometimes.patch
@@ -11,7 +11,7 @@ Subject: [PATCH] Fix interact event not being called sometimes
Co-authored-by: Moulberry <[email protected]>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index bca6e44c6a6584be2537d8be1279497b3394c447..0254ca5ed57de292ecd17900bb4f3d2874e12556 100644
+index f2c1893677004b1699beb16ebfcbe9816aad2a78..03e87e35f4478d948602569c319a7b5a0e938cd5 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1785,7 +1785,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -23,7 +23,7 @@ index bca6e44c6a6584be2537d8be1279497b3394c447..0254ca5ed57de292ecd17900bb4f3d28
this.player.swing(enumhand, true);
}
}
-@@ -2409,13 +2409,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2406,13 +2406,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d3 = Math.max(this.player.blockInteractionRange(), this.player.entityInteractionRange());
// SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time
// SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities
diff --git a/patches/server/0457-Add-ServerResourcesReloadedEvent.patch b/patches/server/0457-Add-ServerResourcesReloadedEvent.patch
index efe5237d8b..71fc31fbfd 100644
--- a/patches/server/0457-Add-ServerResourcesReloadedEvent.patch
+++ b/patches/server/0457-Add-ServerResourcesReloadedEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add ServerResourcesReloadedEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index a26e3620346b80b00e2ca29e7f393bca404d8a50..c4882d30b64c3dd7efe44c38ff130c045d5549d8 100644
+index f6667d9f514a821fd539e193dde1f78e77ca0fbf..264d0f57422b4fc03c5845d7456b22c9a48dd7ae 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2194,7 +2194,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2150,7 +2150,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.functionManager;
}
@@ -22,7 +22,7 @@ index a26e3620346b80b00e2ca29e7f393bca404d8a50..c4882d30b64c3dd7efe44c38ff130c04
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
PackRepository resourcepackrepository = this.packRepository;
-@@ -2229,6 +2235,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2185,6 +2191,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
this.fuelValues = FuelValues.vanillaBurnTimes(this.registries.compositeAccess(), this.worldData.enabledFeatures());
org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings; they can be defined by datapacks so refresh it here
diff --git a/patches/server/0464-Remove-stale-POIs.patch b/patches/server/0464-Remove-stale-POIs.patch
index 1574ebae11..8c0a881067 100644
--- a/patches/server/0464-Remove-stale-POIs.patch
+++ b/patches/server/0464-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 ca1c8cc67fe00dc7ad5e942a387f95cbad415e86..840651df480dfc6e494240aaa46ea4063171c0de 100644
+index c5029210d059a62577ede8b6e944e2f4dcbac420..0e984f3521b578779dd9d0142bce7db433b78f07 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1805,6 +1805,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1775,6 +1775,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
});
optional1.ifPresent((holder) -> {
this.getServer().execute(() -> {
diff --git a/patches/server/0465-Fix-villager-boat-exploit.patch b/patches/server/0465-Fix-villager-boat-exploit.patch
index f35fe8a11e..adb461e1ed 100644
--- a/patches/server/0465-Fix-villager-boat-exploit.patch
+++ b/patches/server/0465-Fix-villager-boat-exploit.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 4975b4222d52eddbb42e9c9cd08eef56859080c8..70b7871091ab9b64d2a5503620a71c3d5585c25d 100644
+index 819fb4ef54dce33ec91604491132771f157c8d83..1e5cc810748af34f591d305055fe00a688213617 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -545,6 +545,14 @@ public abstract class PlayerList {
+@@ -544,6 +544,14 @@ public abstract class PlayerList {
PlayerList.LOGGER.debug("Removing player mount");
entityplayer.stopRiding();
entity.getPassengersAndSelf().forEach((entity1) -> {
diff --git a/patches/server/0466-Add-sendOpLevel-API.patch b/patches/server/0466-Add-sendOpLevel-API.patch
index fde6ae317a..c938f70a51 100644
--- a/patches/server/0466-Add-sendOpLevel-API.patch
+++ b/patches/server/0466-Add-sendOpLevel-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 70b7871091ab9b64d2a5503620a71c3d5585c25d..7676dbe55b4bf6e0472dc0190c01e6ecfcbb464e 100644
+index 1e5cc810748af34f591d305055fe00a688213617..240a0e487ede08d1dd5050812ca4f68db4cd2dd1 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1026,6 +1026,11 @@ public abstract class PlayerList {
+@@ -1025,6 +1025,11 @@ public abstract class PlayerList {
}
private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) {
@@ -20,7 +20,7 @@ index 70b7871091ab9b64d2a5503620a71c3d5585c25d..7676dbe55b4bf6e0472dc0190c01e6ec
if (player.connection != null) {
byte b0;
-@@ -1040,8 +1045,10 @@ public abstract class PlayerList {
+@@ -1039,8 +1044,10 @@ public abstract class PlayerList {
player.connection.send(new ClientboundEntityEventPacket(player, b0));
}
diff --git a/patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch
index 2f3085960e..ccdf448b22 100644
--- a/patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch
+++ b/patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch
@@ -861,7 +861,7 @@ index b4ed857f2437759b71b75d7ab36c986a2fd71dbc..09929f580164abcd1c04061d04c6aa99
@Override
public B get(NamespacedKey namespacedKey) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index dd3940c2aacfa835b528a882f3ec5dd4d98bd59f..ee231d93d216571a45b11b49663b2ea91c47a1c7 100644
+index 30675a23a25dc065e09d97b9b08386c9f41989d8..a12dc990a9094e964be2af26a5135e3b798f9666 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -284,7 +284,7 @@ public final class CraftServer implements Server {
@@ -873,7 +873,7 @@ index dd3940c2aacfa835b528a882f3ec5dd4d98bd59f..ee231d93d216571a45b11b49663b2ea9
private YamlConfiguration configuration;
private YamlConfiguration commandsConfiguration;
private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
-@@ -432,6 +432,7 @@ public final class CraftServer implements Server {
+@@ -431,6 +431,7 @@ public final class CraftServer implements Server {
}
private void loadCompatibilities() {
@@ -881,7 +881,7 @@ index dd3940c2aacfa835b528a882f3ec5dd4d98bd59f..ee231d93d216571a45b11b49663b2ea9
ConfigurationSection compatibilities = this.configuration.getConfigurationSection("settings.compatibility");
if (compatibilities == null) {
this.activeCompatibilities = Collections.emptySet();
-@@ -2745,7 +2746,7 @@ public final class CraftServer implements Server {
+@@ -2744,7 +2745,7 @@ public final class CraftServer implements Server {
@Override
public <T extends Keyed> Registry<T> getRegistry(Class<T> aClass) {
diff --git a/patches/server/0480-Add-EntityMoveEvent.patch b/patches/server/0480-Add-EntityMoveEvent.patch
index 977aa2c046..6dfa7990a6 100644
--- a/patches/server/0480-Add-EntityMoveEvent.patch
+++ b/patches/server/0480-Add-EntityMoveEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityMoveEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index c4882d30b64c3dd7efe44c38ff130c045d5549d8..a6435cc675bca502994a31d2f2d91257c8c1fa2f 100644
+index 264d0f57422b4fc03c5845d7456b22c9a48dd7ae..a200aacb1eaa749baa36be8be63b3f1421913b60 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1684,6 +1684,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1648,6 +1648,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 - BlockPhysicsEvent
@@ -17,10 +17,10 @@ index c4882d30b64c3dd7efe44c38ff130c045d5549d8..a6435cc675bca502994a31d2f2d91257
gameprofilerfiller.push(() -> {
String s = String.valueOf(worldserver);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 840651df480dfc6e494240aaa46ea4063171c0de..12f46c94710830f464ff27a3d415140c36065e10 100644
+index 0e984f3521b578779dd9d0142bce7db433b78f07..1c3f41d7ed7320342fe68c5ab6eb57dbdfd4bf69 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -231,6 +231,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -229,6 +229,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public final LevelStorageSource.LevelStorageAccess convertable;
public final UUID uuid;
public boolean hasPhysicsEvent = true; // Paper - BlockPhysicsEvent
@@ -29,10 +29,10 @@ index 840651df480dfc6e494240aaa46ea4063171c0de..12f46c94710830f464ff27a3d415140c
public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunk(x, z, false);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 5a551e24be8d4d8157adb0f20f8e7bd3c5c61854..8bb10bcc26577ff7b806fbcc48c3d71b241c5963 100644
+index d361e39ba50958e7bdaea0b95c37d13f48a89771..ce9369e730ba8862cd1e6e26f8825c35b16fcfb9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3628,6 +3628,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3626,6 +3626,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.pushEntities();
gameprofilerfiller.pop();
diff --git a/patches/server/0481-added-option-to-disable-pathfinding-updates-on-block.patch b/patches/server/0481-added-option-to-disable-pathfinding-updates-on-block.patch
index c2bfd19f14..d10ca06ced 100644
--- a/patches/server/0481-added-option-to-disable-pathfinding-updates-on-block.patch
+++ b/patches/server/0481-added-option-to-disable-pathfinding-updates-on-block.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 12f46c94710830f464ff27a3d415140c36065e10..8352e42a3dceb33477c5885433d24840e1332b87 100644
+index 1c3f41d7ed7320342fe68c5ab6eb57dbdfd4bf69..cefd68cd2f28e5c14dba99b31d9a88125f169337 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1387,6 +1387,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1357,6 +1357,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.getChunkSource().blockChanged(pos);
this.pathTypesByPosCache.invalidate(pos);
@@ -16,7 +16,7 @@ index 12f46c94710830f464ff27a3d415140c36065e10..8352e42a3dceb33477c5885433d24840
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
-@@ -1428,6 +1429,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1398,6 +1399,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
}
diff --git a/patches/server/0484-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/0484-Add-getMainThreadExecutor-to-BukkitScheduler.patch
index e2b8629ca8..ead28f59cb 100644
--- a/patches/server/0484-Add-getMainThreadExecutor-to-BukkitScheduler.patch
+++ b/patches/server/0484-Add-getMainThreadExecutor-to-BukkitScheduler.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add getMainThreadExecutor to BukkitScheduler
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-index fdfdcac6644e5343fb1f1cbe5d9aa76a79627046..5fc88196b2c873427c817e9802ad3b12009f265f 100644
+index a700dac93499650fdaa0af06ff77607ffa4dbbb2..6fef86e47e37eab6721cfd67d494afb25a2ded68 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
-@@ -642,4 +642,15 @@ public class CraftScheduler implements BukkitScheduler {
+@@ -637,4 +637,15 @@ public class CraftScheduler implements BukkitScheduler {
public BukkitTask runTaskTimerAsynchronously(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException {
throw new UnsupportedOperationException("Use BukkitRunnable#runTaskTimerAsynchronously(Plugin, long, long)");
}
diff --git a/patches/server/0490-fix-converting-txt-to-json-file.patch b/patches/server/0490-fix-converting-txt-to-json-file.patch
index 19ad568347..130584b001 100644
--- a/patches/server/0490-fix-converting-txt-to-json-file.patch
+++ b/patches/server/0490-fix-converting-txt-to-json-file.patch
@@ -21,10 +21,10 @@ index 929f59bce01c8e6ed4b0b551744d42e131b8fc80..22c4f8dea99f92a1eb3da2baf0a15bf9
this.saveUserBanList();
this.loadIpBanList();
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 20a3138c6c2a6c8ada8b6008913abae0eea76f2d..e95d592b6001dd4320c58133d841359f99c2d9c4 100644
+index 9a3e73a5c206b78dfcf6f41a47b614342e52acc8..9d05e998d6df1069c2de69478a1f9688ac435e67 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -215,6 +215,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -213,6 +213,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
// Paper end - initialize global and world-defaults configuration
@@ -37,7 +37,7 @@ index 20a3138c6c2a6c8ada8b6008913abae0eea76f2d..e95d592b6001dd4320c58133d841359f
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
-@@ -269,9 +275,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -267,9 +273,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("To change this, set \"online-mode\" to \"true\" in the server.properties file.");
}
@@ -48,10 +48,10 @@ index 20a3138c6c2a6c8ada8b6008913abae0eea76f2d..e95d592b6001dd4320c58133d841359f
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 7676dbe55b4bf6e0472dc0190c01e6ecfcbb464e..26e0414645f7ab11ca3e77c7c5e458612625aee9 100644
+index 240a0e487ede08d1dd5050812ca4f68db4cd2dd1..82f5451add3652d9f1afba4f809f30ceaa1b2951 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -180,6 +180,7 @@ public abstract class PlayerList {
+@@ -179,6 +179,7 @@ public abstract class PlayerList {
this.maxPlayers = maxPlayers;
this.playerIo = saveHandler;
}
diff --git a/patches/server/0495-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0495-Allow-using-signs-inside-spawn-protection.patch
index 09955d8b69..cbb5462bf6 100644
--- a/patches/server/0495-Allow-using-signs-inside-spawn-protection.patch
+++ b/patches/server/0495-Allow-using-signs-inside-spawn-protection.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Allow using signs inside spawn protection
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 0254ca5ed57de292ecd17900bb4f3d2874e12556..d93dfaf50c48b1975d59f9aa24b895f151d2e1b1 100644
+index 03e87e35f4478d948602569c319a7b5a0e938cd5..03ab4e27e141716e1c9ae92d41f42cfb7a48db66 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1770,7 +1770,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0496-Expand-world-key-API.patch b/patches/server/0496-Expand-world-key-API.patch
index da317765ce..80f4011a34 100644
--- a/patches/server/0496-Expand-world-key-API.patch
+++ b/patches/server/0496-Expand-world-key-API.patch
@@ -20,10 +20,10 @@ index 15da29058f80a2d7cf2be26c48421c1746815a10..a070b2a83edaa702b13bc6d302691412
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ee231d93d216571a45b11b49663b2ea91c47a1c7..dc20a383950a72aba5d056912d257912d3c0e808 100644
+index a12dc990a9094e964be2af26a5135e3b798f9666..85b2298efface87ee97e0f996d939cc135ca981d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1186,9 +1186,15 @@ public final class CraftServer implements Server {
+@@ -1185,9 +1185,15 @@ public final class CraftServer implements Server {
File folder = new File(this.getWorldContainer(), name);
World world = this.getWorld(name);
@@ -41,7 +41,7 @@ index ee231d93d216571a45b11b49663b2ea91c47a1c7..dc20a383950a72aba5d056912d257912
if (folder.exists()) {
Preconditions.checkArgument(folder.isDirectory(), "File (%s) exists and isn't a folder", name);
-@@ -1314,7 +1320,7 @@ public final class CraftServer implements Server {
+@@ -1313,7 +1319,7 @@ public final class CraftServer implements Server {
} else if (name.equals(levelName + "_the_end")) {
worldKey = net.minecraft.world.level.Level.END;
} else {
@@ -50,7 +50,7 @@ index ee231d93d216571a45b11b49663b2ea91c47a1c7..dc20a383950a72aba5d056912d257912
}
// If set to not keep spawn in memory (changed from default) then adjust rule accordingly
-@@ -1410,6 +1416,15 @@ public final class CraftServer implements Server {
+@@ -1409,6 +1415,15 @@ public final class CraftServer implements Server {
return null;
}
@@ -67,10 +67,10 @@ index ee231d93d216571a45b11b49663b2ea91c47a1c7..dc20a383950a72aba5d056912d257912
// Check if a World already exists with the UID.
if (this.getWorld(world.getUID()) != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 6e8351363af9aea752286311074d53f245196e8d..e53610ac0ef0c80932e6e50f0c3971938b4bcf9b 100644
+index af8fde74b3162d2de740ecae1122b4f2115baeb6..77f0d6c44c3773968b1e858d02cfc4ffb25fe99b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -522,6 +522,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -527,6 +527,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public int nextEntityId() {
return net.minecraft.world.entity.Entity.nextEntityId();
}
@@ -81,4 +81,4 @@ index 6e8351363af9aea752286311074d53f245196e8d..e53610ac0ef0c80932e6e50f0c397193
+ }
// Paper end
- @Override
+ /**
diff --git a/patches/server/0498-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0498-Drop-carried-item-when-player-has-disconnected.patch
index a13f458eea..bebcb8d121 100644
--- a/patches/server/0498-Drop-carried-item-when-player-has-disconnected.patch
+++ b/patches/server/0498-Drop-carried-item-when-player-has-disconnected.patch
@@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
Closes #5036
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 26e0414645f7ab11ca3e77c7c5e458612625aee9..6f7807cc0da427485037b3a72a9c60c81a858294 100644
+index 82f5451add3652d9f1afba4f809f30ceaa1b2951..7a18061834096a73b140bee37b55b3c1724b51ef 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -538,6 +538,14 @@ public abstract class PlayerList {
+@@ -537,6 +537,14 @@ public abstract class PlayerList {
}
// Paper end - Configurable player collision
diff --git a/patches/server/0499-forced-whitelist-use-configurable-kick-message.patch b/patches/server/0499-forced-whitelist-use-configurable-kick-message.patch
index 6dcbff2ff8..e3d3ef89a7 100644
--- a/patches/server/0499-forced-whitelist-use-configurable-kick-message.patch
+++ b/patches/server/0499-forced-whitelist-use-configurable-kick-message.patch
@@ -5,10 +5,10 @@ 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 a6435cc675bca502994a31d2f2d91257c8c1fa2f..1cf78a61a5737aafd4e9384dc76af1a9fbc98621 100644
+index a200aacb1eaa749baa36be8be63b3f1421913b60..67a9bc450f545dd7b05398968a278a14f1e518fe 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2369,7 +2369,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2325,7 +2325,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/0500-Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/0500-Don-t-ignore-result-of-PlayerEditBookEvent.patch
index 17de34812a..6363109547 100644
--- a/patches/server/0500-Don-t-ignore-result-of-PlayerEditBookEvent.patch
+++ b/patches/server/0500-Don-t-ignore-result-of-PlayerEditBookEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index d93dfaf50c48b1975d59f9aa24b895f151d2e1b1..c753af9216fae7aa78247f18c064aa2f0f579fcf 100644
+index 03ab4e27e141716e1c9ae92d41f42cfb7a48db66..1b4a19eb510c3efa2f2459554bed5e16bcb23430 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1165,7 +1165,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0501-Expose-protocol-version.patch b/patches/server/0501-Expose-protocol-version.patch
index 2dcd012c6c..13133988e5 100644
--- a/patches/server/0501-Expose-protocol-version.patch
+++ b/patches/server/0501-Expose-protocol-version.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index e53610ac0ef0c80932e6e50f0c3971938b4bcf9b..e546cf93d79b109d50840ebf1fb133ad3c9331d3 100644
+index 77f0d6c44c3773968b1e858d02cfc4ffb25fe99b..ada83b5e843f761837a7510112162c6954ab4260 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -527,6 +527,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -532,6 +532,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getMainLevelName() {
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
}
@@ -19,4 +19,4 @@ index e53610ac0ef0c80932e6e50f0c3971938b4bcf9b..e546cf93d79b109d50840ebf1fb133ad
+ }
// Paper end
- @Override
+ /**
diff --git a/patches/server/0502-Enhance-console-tab-completions-for-brigadier-comman.patch b/patches/server/0502-Enhance-console-tab-completions-for-brigadier-comman.patch
index 15098cf64c..3d1a0fb945 100644
--- a/patches/server/0502-Enhance-console-tab-completions-for-brigadier-comman.patch
+++ b/patches/server/0502-Enhance-console-tab-completions-for-brigadier-comman.patch
@@ -358,10 +358,10 @@ index 0000000000000000000000000000000000000000..8239a8ba57f856cbbee237a601b3cabf
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index e95d592b6001dd4320c58133d841359f99c2d9c4..17b15bef9ad8edddc2e1f2a617a1ab4bd5b53347 100644
+index 9d05e998d6df1069c2de69478a1f9688ac435e67..7c92b2f0a59fe222ad13a998476e312bf571a1bf 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -189,7 +189,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -187,7 +187,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
thread.setDaemon(true);
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
@@ -370,7 +370,7 @@ index e95d592b6001dd4320c58133d841359f99c2d9c4..17b15bef9ad8edddc2e1f2a617a1ab4b
DedicatedServer.LOGGER.info("Starting minecraft server version {}", SharedConstants.getCurrentVersion().getName());
if (Runtime.getRuntime().maxMemory() / 1024L / 1024L < 512L) {
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
-@@ -222,6 +222,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -220,6 +220,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.getPlayerList().loadAndSaveFiles(); // Must be after convertNames
// Paper end - fix converting txt to json file
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
diff --git a/patches/server/0503-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0503-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
index fc40a810f1..85bf38a0c7 100644
--- a/patches/server/0503-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
+++ b/patches/server/0503-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
@@ -9,10 +9,10 @@ till their item is switched.
This patch clears the active item when the event is cancelled
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 8bb10bcc26577ff7b806fbcc48c3d71b241c5963..9829419d3531ed6af55e37ac253903975c648a3e 100644
+index ce9369e730ba8862cd1e6e26f8825c35b16fcfb9..9d56e7d4185401767359907337d5891ff0058abb 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4136,6 +4136,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4134,6 +4134,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
diff --git a/patches/server/0510-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0510-fix-PlayerItemHeldEvent-firing-twice.patch
index 33e91362d9..5732fc5af6 100644
--- a/patches/server/0510-fix-PlayerItemHeldEvent-firing-twice.patch
+++ b/patches/server/0510-fix-PlayerItemHeldEvent-firing-twice.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index c753af9216fae7aa78247f18c064aa2f0f579fcf..e6a927e991779bad84a02d81010057a4e36b9c95 100644
+index 1b4a19eb510c3efa2f2459554bed5e16bcb23430..2bd2f1cdf3467cacee55094d43bd3eccf61b9aa7 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1954,6 +1954,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0514-Implement-methods-to-convert-between-Component-and-B.patch b/patches/server/0514-Implement-methods-to-convert-between-Component-and-B.patch
index 648d3ec285..c5765e9de7 100644
--- a/patches/server/0514-Implement-methods-to-convert-between-Component-and-B.patch
+++ b/patches/server/0514-Implement-methods-to-convert-between-Component-and-B.patch
@@ -42,10 +42,10 @@ index 0000000000000000000000000000000000000000..dd6012b6a097575b2d1471be5069ecce
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 17b15bef9ad8edddc2e1f2a617a1ab4bd5b53347..cbff8de02006b65f6d58416fc0950741cc14908d 100644
+index 7c92b2f0a59fe222ad13a998476e312bf571a1bf..761663514b98a1c0a0a905150411aff450a0cc50 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -226,6 +226,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -224,6 +224,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
diff --git a/patches/server/0525-Add-basic-Datapack-API.patch b/patches/server/0525-Add-basic-Datapack-API.patch
index 7dda1478e1..4c4f291ca5 100644
--- a/patches/server/0525-Add-basic-Datapack-API.patch
+++ b/patches/server/0525-Add-basic-Datapack-API.patch
@@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..caa41c525d2b36b5a9f9942380f06c97
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index dc20a383950a72aba5d056912d257912d3c0e808..d921b15100b83cb7073d79f2a1b2bfbdc7b745ca 100644
+index 85b2298efface87ee97e0f996d939cc135ca981d..a17b26dadbbbf6e6c84f80f6fe8293d87ca19d0a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -308,6 +308,7 @@ public final class CraftServer implements Server {
@@ -187,7 +187,7 @@ index dc20a383950a72aba5d056912d257912d3c0e808..d921b15100b83cb7073d79f2a1b2bfbd
public static Exception excessiveVelEx; // Paper - Velocity warnings
static {
-@@ -393,6 +394,7 @@ public final class CraftServer implements Server {
+@@ -392,6 +393,7 @@ public final class CraftServer implements Server {
if (this.configuration.getBoolean("settings.use-map-color-cache")) {
MapPalette.setMapColorCache(new CraftMapColorCache(this.logger));
}
@@ -195,7 +195,7 @@ index dc20a383950a72aba5d056912d257912d3c0e808..d921b15100b83cb7073d79f2a1b2bfbd
}
public boolean getCommandBlockOverride(String command) {
-@@ -3027,5 +3029,11 @@ public final class CraftServer implements Server {
+@@ -3026,5 +3028,11 @@ public final class CraftServer implements Server {
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
return mobGoals;
}
diff --git a/patches/server/0527-Expand-PlayerGameModeChangeEvent.patch b/patches/server/0527-Expand-PlayerGameModeChangeEvent.patch
index aac8a279c5..26fc7358be 100644
--- a/patches/server/0527-Expand-PlayerGameModeChangeEvent.patch
+++ b/patches/server/0527-Expand-PlayerGameModeChangeEvent.patch
@@ -134,10 +134,10 @@ index 546be40a8e4470fb5a6686072cdd342cdaa6fe15..e000a918230187f6841b03b7b0dd7368
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index e6a927e991779bad84a02d81010057a4e36b9c95..9007a0f01b823c613c39c974d9e0f5858cd40d15 100644
+index 2bd2f1cdf3467cacee55094d43bd3eccf61b9aa7..c3b4b800c5a34afa03ed7c31e14f26ca16109982 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2754,7 +2754,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2751,7 +2751,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player = this.server.getPlayerList().respawn(this.player, false, Entity.RemovalReason.KILLED, RespawnReason.DEATH); // CraftBukkit
this.resetPosition();
if (this.server.isHardcore()) {
diff --git a/patches/server/0528-ItemStack-repair-check-API.patch b/patches/server/0528-ItemStack-repair-check-API.patch
index 46a3c41921..b016fcc18d 100644
--- a/patches/server/0528-ItemStack-repair-check-API.patch
+++ b/patches/server/0528-ItemStack-repair-check-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index e546cf93d79b109d50840ebf1fb133ad3c9331d3..844dbd996858aa02e81a4256383df6992b87bde2 100644
+index ada83b5e843f761837a7510112162c6954ab4260..02306ed81a67faa94d98070d3e7c9044cb5d2825 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -532,6 +532,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -537,6 +537,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
public int getProtocolVersion() {
return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
}
@@ -22,7 +22,7 @@ index e546cf93d79b109d50840ebf1fb133ad3c9331d3..844dbd996858aa02e81a4256383df699
+ }
// Paper end
- @Override
+ /**
diff --git a/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java b/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..04e2568816f1fbe090b40e5a55d8d4effc045740
diff --git a/patches/server/0530-Move-range-check-for-block-placing-up.patch b/patches/server/0530-Move-range-check-for-block-placing-up.patch
index 4cedf6b84b..b93574bed6 100644
--- a/patches/server/0530-Move-range-check-for-block-placing-up.patch
+++ b/patches/server/0530-Move-range-check-for-block-placing-up.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Move range check for block placing up
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 9007a0f01b823c613c39c974d9e0f5858cd40d15..6839d13bc5cfad7c408d55e0cd477085333c7e41 100644
+index c3b4b800c5a34afa03ed7c31e14f26ca16109982..cad988c90749183e3af01b319206d49a8734ac15 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1757,6 +1757,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0533-Add-Unix-domain-socket-support.patch b/patches/server/0533-Add-Unix-domain-socket-support.patch
index a2359131a0..34dd3ee134 100644
--- a/patches/server/0533-Add-Unix-domain-socket-support.patch
+++ b/patches/server/0533-Add-Unix-domain-socket-support.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Unix domain socket support
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index cbff8de02006b65f6d58416fc0950741cc14908d..e30a5ad17d7ba8bcec8911a72281830c419b0288 100644
+index 761663514b98a1c0a0a905150411aff450a0cc50..21d6f728d6ecd35a05933e9406a386c36135a456 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -235,6 +235,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -233,6 +233,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.setEnforceWhitelist(dedicatedserverproperties.enforceWhitelist);
// this.worldData.setGameType(dedicatedserverproperties.gamemode); // CraftBukkit - moved to world loading
DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode);
@@ -29,7 +29,7 @@ index cbff8de02006b65f6d58416fc0950741cc14908d..e30a5ad17d7ba8bcec8911a72281830c
InetAddress inetaddress = null;
if (!this.getLocalIp().isEmpty()) {
-@@ -244,12 +258,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -242,12 +256,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
if (this.getPort() < 0) {
this.setPort(dedicatedserverproperties.serverPort);
}
@@ -87,10 +87,10 @@ index d6d7f1c446ba5507f67038ff27775ba75156f4a7..c63c194c44646e6bc1a5942655278701
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 6839d13bc5cfad7c408d55e0cd477085333c7e41..674149f3a392a600a506e55f20db044619328cd2 100644
+index cad988c90749183e3af01b319206d49a8734ac15..34258a58ea7b75363eff825e3db27832d3559557 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2569,6 +2569,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2566,6 +2566,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Spigot Start
public SocketAddress getRawAddress()
{
diff --git a/patches/server/0535-Improve-item-default-attribute-API.patch b/patches/server/0535-Improve-item-default-attribute-API.patch
index b970088c75..6f2c104c78 100644
--- a/patches/server/0535-Improve-item-default-attribute-API.patch
+++ b/patches/server/0535-Improve-item-default-attribute-API.patch
@@ -62,10 +62,10 @@ index 68756419ac6ee292db9569eab380a5c14d748002..6d76cc1db3ac3f1ae74c13511937fb86
return defaultAttributes.build();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 844dbd996858aa02e81a4256383df6992b87bde2..7e33f55e4a269fd8e96080776c97f49d65e895c4 100644
+index 02306ed81a67faa94d98070d3e7c9044cb5d2825..ffc98d8ed238cc653a7a6518a46c4e45a1b3682c 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -391,7 +391,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -385,7 +385,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot) {
diff --git a/patches/server/0536-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0536-Add-cause-to-Weather-ThunderChangeEvents.patch
index 9e50f7f9b7..ef0b70b8d8 100644
--- a/patches/server/0536-Add-cause-to-Weather-ThunderChangeEvents.patch
+++ b/patches/server/0536-Add-cause-to-Weather-ThunderChangeEvents.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 8352e42a3dceb33477c5885433d24840e1332b87..1be314ed35d07e6db9a3f6a4f493b0f4bb59a45f 100644
+index cefd68cd2f28e5c14dba99b31d9a88125f169337..f58069f0c9d836cb33f3ea09c562708951a91797 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -431,8 +431,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -429,8 +429,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.serverLevelData.setClearWeatherTime(clearDuration);
this.serverLevelData.setRainTime(rainDuration);
this.serverLevelData.setThunderTime(rainDuration);
@@ -19,7 +19,7 @@ index 8352e42a3dceb33477c5885433d24840e1332b87..1be314ed35d07e6db9a3f6a4f493b0f4
}
@Override
-@@ -862,8 +862,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -846,8 +846,8 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.serverLevelData.setThunderTime(j);
this.serverLevelData.setRainTime(k);
this.serverLevelData.setClearWeatherTime(i);
@@ -30,7 +30,7 @@ index 8352e42a3dceb33477c5885433d24840e1332b87..1be314ed35d07e6db9a3f6a4f493b0f4
}
this.oThunderLevel = this.thunderLevel;
-@@ -930,14 +930,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -914,14 +914,14 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@VisibleForTesting
public void resetWeatherCycle() {
// CraftBukkit start
diff --git a/patches/server/0539-Add-PlayerKickEvent-causes.patch b/patches/server/0539-Add-PlayerKickEvent-causes.patch
index 1ba9b46938..7c4ea36fb3 100644
--- a/patches/server/0539-Add-PlayerKickEvent-causes.patch
+++ b/patches/server/0539-Add-PlayerKickEvent-causes.patch
@@ -43,10 +43,10 @@ index dbcf183483766f39334d7f7e8336033906625f3f..300929a406905f5ff1ede664d5b99fb0
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 1cf78a61a5737aafd4e9384dc76af1a9fbc98621..f191209b9a1d581235a638bd89ee2eb4050d5cb0 100644
+index 67a9bc450f545dd7b05398968a278a14f1e518fe..7ab9a9c04f94a68dccb5ec9bfc8171bfc02927a2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2369,7 +2369,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2325,7 +2325,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)
@@ -229,7 +229,7 @@ index f8ae8c8eff73e4e87eb34d0f2635517f1688a6f1..59d20fd62e850a38380d877cef95ed69
if (this.cserver.getServer().isRunning()) {
this.cserver.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbfd01fdfcd 100644
+index 34258a58ea7b75363eff825e3db27832d3559557..36127f7c9ae50a628e88e7b456889a8f259b06da 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -359,7 +359,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -357,7 +357,7 @@ index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbf
}
return optional;
-@@ -2381,7 +2381,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2378,7 +2378,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// this.chatSpamThrottler.increment();
if (!this.chatSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) {
// CraftBukkit end
@@ -366,7 +366,7 @@ index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbf
}
}
-@@ -2393,7 +2393,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2390,7 +2390,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
synchronized (this.lastSeenMessages) {
if (!this.lastSeenMessages.applyOffset(packet.offset())) {
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
@@ -375,7 +375,7 @@ index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbf
}
}
-@@ -2541,7 +2541,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2538,7 +2538,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
if (i > 4096) {
@@ -384,7 +384,7 @@ index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbf
}
}
-@@ -2599,7 +2599,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2596,7 +2596,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Spigot Start
if ( entity == this.player && !this.player.isSpectator() )
{
@@ -393,7 +393,7 @@ index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbf
return;
}
// Spigot End
-@@ -2715,7 +2715,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2712,7 +2712,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}
@@ -402,7 +402,7 @@ index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbf
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
}
});
-@@ -3114,7 +3114,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3111,7 +3111,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Paper start - auto recipe limit
if (!org.bukkit.Bukkit.isPrimaryThread()) {
if (!this.recipeSpamPackets.isIncrementAndUnderThreshold()) {
@@ -411,7 +411,7 @@ index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbf
return;
}
}
-@@ -3385,7 +3385,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3382,7 +3382,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (!Objects.equals(profilepublickey_a, profilepublickey_a1)) {
if (profilepublickey_a != null && profilepublickey_a1.expiresAt().isBefore(profilepublickey_a.expiresAt())) {
@@ -420,7 +420,7 @@ index 674149f3a392a600a506e55f20db044619328cd2..0fb16f3193c88c5f58d16aaf85129bbf
} else {
try {
SignatureValidator signaturevalidator = this.server.getProfileKeySignatureValidator();
-@@ -3398,7 +3398,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3395,7 +3395,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage());
@@ -443,10 +443,10 @@ index 9d5723cdfdbf6257a71e57842aea9ba317fc049a..1e4b288f20153ce0c91fabf164c5c832
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 6f7807cc0da427485037b3a72a9c60c81a858294..3ec8d38ca514048d94d24424d2132a90c10f529f 100644
+index 7a18061834096a73b140bee37b55b3c1724b51ef..e6b92f085291aaf4fa78d96f8379aeef2200592b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -633,7 +633,7 @@ public abstract class PlayerList {
+@@ -632,7 +632,7 @@ public abstract class PlayerList {
while (iterator.hasNext()) {
entityplayer = (ServerPlayer) iterator.next();
this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
@@ -455,7 +455,7 @@ index 6f7807cc0da427485037b3a72a9c60c81a858294..3ec8d38ca514048d94d24424d2132a90
}
// Instead of kicking then returning, we need to store the kick reason
-@@ -1238,7 +1238,7 @@ public abstract class PlayerList {
+@@ -1236,7 +1236,7 @@ public abstract class PlayerList {
// Paper end
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
diff --git a/patches/server/0548-Line-Of-Sight-Changes.patch b/patches/server/0548-Line-Of-Sight-Changes.patch
index d8a956a309..0b72d78709 100644
--- a/patches/server/0548-Line-Of-Sight-Changes.patch
+++ b/patches/server/0548-Line-Of-Sight-Changes.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Line Of Sight Changes
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 9829419d3531ed6af55e37ac253903975c648a3e..1cb118c12e1b09cb6ae8d3b6949212b46c91b85b 100644
+index 9d56e7d4185401767359907337d5891ff0058abb..8939ce9fed5d935cec31c9a27833d1cec4de7b01 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3907,7 +3907,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3905,7 +3905,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ());
Vec3 vec3d1 = new Vec3(entity.getX(), entityY.getAsDouble(), entity.getZ());
diff --git a/patches/server/0555-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0555-Use-getChunkIfLoadedImmediately-in-places.patch
index a5b4d06295..99a97d953d 100644
--- a/patches/server/0555-Use-getChunkIfLoadedImmediately-in-places.patch
+++ b/patches/server/0555-Use-getChunkIfLoadedImmediately-in-places.patch
@@ -8,10 +8,10 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
load in that case).
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 1be314ed35d07e6db9a3f6a4f493b0f4bb59a45f..d8f7d7512db9432f67b07e7d64a6a9349dfab245 100644
+index f58069f0c9d836cb33f3ea09c562708951a91797..91fb83761885752743adb53cc9ed30ddc879263d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -234,7 +234,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -232,7 +232,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public boolean hasEntityMoveEvent; // Paper - Add EntityMoveEvent
public LevelChunk getChunkIfLoaded(int x, int z) {
@@ -21,10 +21,10 @@ index 1be314ed35d07e6db9a3f6a4f493b0f4bb59a45f..d8f7d7512db9432f67b07e7d64a6a934
@Override
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index aff89d2e3274b91238989fc1e7d8c119c2a3c097..560777a99b58c4f82cc0e8fb087de04a564163b5 100644
+index 71e9c1504d4b85ffb695401974748d56fefb66e6..9536e127ff4d45ca59b74fe0f3dbde9a18c04f42 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -180,6 +180,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -179,6 +179,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public CraftServer getCraftServer() {
return (CraftServer) Bukkit.getServer();
}
diff --git a/patches/server/0557-Add-PlayerArmSwingEvent.patch b/patches/server/0557-Add-PlayerArmSwingEvent.patch
index c334885378..5b14fa047d 100644
--- a/patches/server/0557-Add-PlayerArmSwingEvent.patch
+++ b/patches/server/0557-Add-PlayerArmSwingEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerArmSwingEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 0fb16f3193c88c5f58d16aaf85129bbfd01fdfcd..7e11789a8d64b112c5eb354a30ae9618722526b1 100644
+index 36127f7c9ae50a628e88e7b456889a8f259b06da..e48c6f37ba0ebe698e28042e9331ab2ec0c39e7c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2431,7 +2431,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2428,7 +2428,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} // Paper end - Call interact event
// Arm swing animation
diff --git a/patches/server/0558-Fix-kick-event-leave-message-not-being-sent.patch b/patches/server/0558-Fix-kick-event-leave-message-not-being-sent.patch
index 0068fffc6e..170b51853d 100644
--- a/patches/server/0558-Fix-kick-event-leave-message-not-being-sent.patch
+++ b/patches/server/0558-Fix-kick-event-leave-message-not-being-sent.patch
@@ -55,7 +55,7 @@ index 59d20fd62e850a38380d877cef95ed69cb46ecbd..fc242acade3ff06c9213428cde103cf0
MinecraftServer minecraftserver = this.server;
Connection networkmanager = this.connection;
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 7e11789a8d64b112c5eb354a30ae9618722526b1..a550f23227770001862e5e837ab2f09e746d76f1 100644
+index e48c6f37ba0ebe698e28042e9331ab2ec0c39e7c..0229b3e6c27b142ff726de8e2e15104a6acbc1f0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1915,6 +1915,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -101,10 +101,10 @@ index 7e11789a8d64b112c5eb354a30ae9618722526b1..a550f23227770001862e5e837ab2f09e
this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
// Paper end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 3ec8d38ca514048d94d24424d2132a90c10f529f..55e1e8ab83e8ca44735a0b1a7365526d0a3b24e7 100644
+index e6b92f085291aaf4fa78d96f8379aeef2200592b..adba2f7632df2e876c22ebe3a5232d93f6581282 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -511,6 +511,11 @@ public abstract class PlayerList {
+@@ -510,6 +510,11 @@ public abstract class PlayerList {
}
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // CraftBukkit - return string // Paper - return Component
diff --git a/patches/server/0560-Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/0560-Rate-options-and-timings-for-sensors-and-behaviors.patch
index 3f0d6720ed..3473ea4ceb 100644
--- a/patches/server/0560-Rate-options-and-timings-for-sensors-and-behaviors.patch
+++ b/patches/server/0560-Rate-options-and-timings-for-sensors-and-behaviors.patch
@@ -8,41 +8,21 @@ This adds config options to specify the tick rate for sensors
for those in order to be able to have some metrics as to which
ones might need tweaking.
-diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
-index 4bd813161a5d76a83cdbd0a9209b9ea9e60ffe1b..e2764186bd6b838ed5cd86c15597a08d079ef984 100644
---- a/src/main/java/co/aikar/timings/MinecraftTimings.java
-+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
-@@ -115,6 +115,14 @@ public final class MinecraftTimings {
- return Timings.ofSafe("Minecraft", "## tickEntity - " + entityType + " - " + type, tickEntityTimer);
- }
-
-+ public static Timing getBehaviorTimings(String type) {
-+ return Timings.ofSafe("## Behavior - " + type);
-+ }
-+
-+ public static Timing getSensorTimings(String type, int rate) {
-+ return Timings.ofSafe("## Sensor - " + type + " (Default rate: " + rate + ")");
-+ }
-+
- /**
- * Get a named timer for the specified tile entity type to track type specific timings.
- * @param entity
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
-index f639cafa64d98a001e622882c647701547f5c3ac..9379dd4056018b52c93ed4888dcdc94579bd9691 100644
+index f639cafa64d98a001e622882c647701547f5c3ac..ba951cc1aaa94b58ee7985f197d41cc8be747fc8 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/Behavior.java
-@@ -14,6 +14,10 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
+@@ -14,6 +14,9 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
private long endTimestamp;
private final int minDuration;
private final int maxDuration;
+ // Paper start - configurable behavior tick rate and timings
+ private final String configKey;
-+ private final co.aikar.timings.Timing timing;
+ // Paper end - configurable behavior tick rate and timings
public Behavior(Map<MemoryModuleType<?>, MemoryStatus> requiredMemoryState) {
this(requiredMemoryState, 60);
-@@ -27,6 +31,15 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
+@@ -27,6 +30,14 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
this.minDuration = minRunTime;
this.maxDuration = maxRunTime;
this.entryCondition = requiredMemoryState;
@@ -53,12 +33,11 @@ index f639cafa64d98a001e622882c647701547f5c3ac..9379dd4056018b52c93ed4888dcdc945
+ key = key.substring(lastSeparator + 1);
+ }
+ this.configKey = key.toLowerCase(java.util.Locale.ROOT);
-+ this.timing = co.aikar.timings.MinecraftTimings.getBehaviorTimings(configKey);
+ // Paper end - configurable behavior tick rate and timings
}
@Override
-@@ -36,11 +49,19 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
+@@ -36,6 +47,12 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
@Override
public final boolean tryStart(ServerLevel world, E entity, long time) {
@@ -71,38 +50,16 @@ index f639cafa64d98a001e622882c647701547f5c3ac..9379dd4056018b52c93ed4888dcdc945
if (this.hasRequiredMemories(entity) && this.checkExtraStartConditions(world, entity)) {
this.status = Behavior.Status.RUNNING;
int i = this.minDuration + world.getRandom().nextInt(this.maxDuration + 1 - this.minDuration);
- this.endTimestamp = time + (long)i;
-+ this.timing.startTiming(); // Paper - behavior timings
- this.start(world, entity, time);
-+ this.timing.stopTiming(); // Paper - behavior timings
- return true;
- } else {
- return false;
-@@ -52,11 +73,13 @@ public abstract class Behavior<E extends LivingEntity> implements BehaviorContro
-
- @Override
- public final void tickOrStop(ServerLevel world, E entity, long time) {
-+ this.timing.startTiming(); // Paper - behavior timings
- if (!this.timedOut(time) && this.canStillUse(world, entity, time)) {
- this.tick(world, entity, time);
- } else {
- this.doStop(world, entity, time);
- }
-+ this.timing.stopTiming(); // Paper - behavior timings
- }
-
- protected void tick(ServerLevel world, E entity, long time) {
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
-index 4d451f6cb5862411848bb9b6b5692ab512dcaa25..8bc7979fb9c2a796921a2a279b78294809f2ed03 100644
+index 4d451f6cb5862411848bb9b6b5692ab512dcaa25..fb1f5375eafb030ae08c735a80e9c8149726cda4 100644
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/Sensor.java
-@@ -29,8 +29,21 @@ public abstract class Sensor<E extends LivingEntity> {
+@@ -29,8 +29,19 @@ public abstract class Sensor<E extends LivingEntity> {
.ignoreInvisibilityTesting();
private final int scanRate;
private long timeToTick;
+ // Paper start - configurable sensor tick rate and timings
+ private final String configKey;
-+ private final co.aikar.timings.Timing timing;
+ // Paper end
public Sensor(int senseInterval) {
@@ -113,23 +70,19 @@ index 4d451f6cb5862411848bb9b6b5692ab512dcaa25..8bc7979fb9c2a796921a2a279b782948
+ key = key.substring(lastSeparator + 1);
+ }
+ this.configKey = key.toLowerCase(java.util.Locale.ROOT);
-+ this.timing = co.aikar.timings.MinecraftTimings.getSensorTimings(configKey, senseInterval);
+ // Paper end
this.scanRate = senseInterval;
this.timeToTick = (long)RANDOM.nextInt(senseInterval);
}
-@@ -41,9 +54,13 @@ public abstract class Sensor<E extends LivingEntity> {
+@@ -41,8 +52,10 @@ public abstract class Sensor<E extends LivingEntity> {
public final void tick(ServerLevel world, E entity) {
if (--this.timeToTick <= 0L) {
- this.timeToTick = (long)this.scanRate;
+ // Paper start - configurable sensor tick rate and timings
+ this.timeToTick = java.util.Objects.requireNonNullElse(world.paperConfig().tickRates.sensor.get(entity.getType(), this.configKey), this.scanRate);
-+ this.timing.startTiming();
this.updateTargetingConditionRanges(entity);
+ // Paper end
this.doTick(world, entity);
-+ this.timing.stopTiming(); // Paper - sensor timings
}
}
-
diff --git a/patches/server/0563-Add-System.out-err-catcher.patch b/patches/server/0563-Add-System.out-err-catcher.patch
index c975b94d8f..1904f817de 100644
--- a/patches/server/0563-Add-System.out-err-catcher.patch
+++ b/patches/server/0563-Add-System.out-err-catcher.patch
@@ -105,7 +105,7 @@ index 0000000000000000000000000000000000000000..a8e813ca89b033f061e695288b3383bd
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index d921b15100b83cb7073d79f2a1b2bfbdc7b745ca..35e5a3dc58f93b85f93ec5301cc9b5c7505503bc 100644
+index a17b26dadbbbf6e6c84f80f6fe8293d87ca19d0a..ecf7ee1ca39d58f1780580bd24366fc8037df34a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -310,6 +310,7 @@ public final class CraftServer implements Server {
diff --git a/patches/server/0564-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0564-Prevent-AFK-kick-while-watching-end-credits.patch
index 3413c09bda..dc3eed68eb 100644
--- a/patches/server/0564-Prevent-AFK-kick-while-watching-end-credits.patch
+++ b/patches/server/0564-Prevent-AFK-kick-while-watching-end-credits.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Prevent AFK kick while watching end credits
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index a550f23227770001862e5e837ab2f09e746d76f1..ea793f9ccf3082a7abcb003b9df03901f9b4c0f0 100644
+index 0229b3e6c27b142ff726de8e2e15104a6acbc1f0..70b891bd018029eda8cda4fb9f919e77524dbc5e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -396,7 +396,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0566-Add-PlayerSetSpawnEvent.patch b/patches/server/0566-Add-PlayerSetSpawnEvent.patch
index 6c4f8f48bc..d290efd766 100644
--- a/patches/server/0566-Add-PlayerSetSpawnEvent.patch
+++ b/patches/server/0566-Add-PlayerSetSpawnEvent.patch
@@ -154,10 +154,10 @@ index 94cc69ed1ccbcfcc8f431762fef641c313b2f634..c680b311760601bb539d685bceddba67
public SectionPos getLastSectionPos() {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 55e1e8ab83e8ca44735a0b1a7365526d0a3b24e7..1b6540ae28d73501c59581b1864f0e01ab53e365 100644
+index adba2f7632df2e876c22ebe3a5232d93f6581282..dd7b19a7762b91a8b27717098cebd2c48cb96f68 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -803,7 +803,7 @@ public abstract class PlayerList {
+@@ -802,7 +802,7 @@ public abstract class PlayerList {
// CraftBukkit end
if (teleporttransition.missingRespawnBlock()) {
entityplayer1.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
diff --git a/patches/server/0574-Add-BlockBreakBlockEvent.patch b/patches/server/0574-Add-BlockBreakBlockEvent.patch
index 4a3af0251e..fbd3627b5c 100644
--- a/patches/server/0574-Add-BlockBreakBlockEvent.patch
+++ b/patches/server/0574-Add-BlockBreakBlockEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockBreakBlockEvent
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index 43c2b411115d3a8a0e47d3e2277789b2667897af..4d140bd83ca0e1554afad80ec4fc6186188a79d8 100644
+index f1711f774f844024ca7b678385daaace6cda9f46..9d8c4ecd89b05a0e5d4ebb5e686eba5d899765f2 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -304,6 +304,24 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -295,6 +295,24 @@ public class Block extends BlockBehaviour implements ItemLike {
}
diff --git a/patches/server/0579-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0579-Add-methods-to-find-targets-for-lightning-strikes.patch
index 6727d31ea6..0a2ba7ccde 100644
--- a/patches/server/0579-Add-methods-to-find-targets-for-lightning-strikes.patch
+++ b/patches/server/0579-Add-methods-to-find-targets-for-lightning-strikes.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index d8f7d7512db9432f67b07e7d64a6a9349dfab245..3137738307bb7b43190fa65da26e0b038012a9f4 100644
+index 91fb83761885752743adb53cc9ed30ddc879263d..3c281cdd24acbc9484c968c07f737d50be2deced 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -751,6 +751,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -735,6 +735,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
protected BlockPos findLightningTargetAround(BlockPos pos) {
@@ -22,7 +22,7 @@ index d8f7d7512db9432f67b07e7d64a6a9349dfab245..3137738307bb7b43190fa65da26e0b03
BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos);
Optional<BlockPos> optional = this.findLightningRod(blockposition1);
-@@ -765,6 +770,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -749,6 +754,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (!list.isEmpty()) {
return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition();
} else {
diff --git a/patches/server/0580-Get-entity-default-attributes.patch b/patches/server/0580-Get-entity-default-attributes.patch
index ef862f64a6..6d512ca637 100644
--- a/patches/server/0580-Get-entity-default-attributes.patch
+++ b/patches/server/0580-Get-entity-default-attributes.patch
@@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..ec9ebd2d539333293c51b7edfa18f18b
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 7e33f55e4a269fd8e96080776c97f49d65e895c4..c9e0a2a4c7c8ab50f6dbb6079f2cba06652a92a3 100644
+index ffc98d8ed238cc653a7a6518a46c4e45a1b3682c..31b625779dfe27602ac198259258e64195c1796d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -544,6 +544,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -549,6 +549,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
return CraftItemStack.unwrap(itemToBeRepaired).isValidRepairItem(CraftItemStack.unwrap(repairMaterial));
}
@@ -102,7 +102,7 @@ index 7e33f55e4a269fd8e96080776c97f49d65e895c4..c9e0a2a4c7c8ab50f6dbb6079f2cba06
+ }
// Paper end
- @Override
+ /**
diff --git a/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java b/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..f512d416df883036965ff6c802fd242a4c9c8079
diff --git a/patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch
index 5a6f0f6000..0b866c52fb 100644
--- a/patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch
@@ -50,10 +50,10 @@ index 0c1c9033646dedcf1d11dee74d6965683adadf0a..1ed01978611cddb2558e441863dadc46
@Override
public boolean isInvisible() { // Paper - moved up from LivingEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index c9e0a2a4c7c8ab50f6dbb6079f2cba06652a92a3..8d51786837448db1a96d0071293025d07e14c225 100644
+index 31b625779dfe27602ac198259258e64195c1796d..1ab160c3d042be43df3bd19d095534b91c4c2f71 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -494,7 +494,33 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -499,7 +499,33 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow());
}
diff --git a/patches/server/0591-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0591-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
index 8404f01faa..27c3f61502 100644
--- a/patches/server/0591-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
+++ b/patches/server/0591-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 3137738307bb7b43190fa65da26e0b038012a9f4..0485312d40dca972d2477b8d4a4725ff25deacbc 100644
+index 3c281cdd24acbc9484c968c07f737d50be2deced..ecb4dc0642685d67621c82bb24fb0e939c805ce4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1269,9 +1269,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1239,9 +1239,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Spigot Start
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
if (tileentity instanceof net.minecraft.world.Container) {
diff --git a/patches/server/0593-Improve-and-expand-AsyncCatcher.patch b/patches/server/0593-Improve-and-expand-AsyncCatcher.patch
index 921cb5a829..0e27a17c00 100644
--- a/patches/server/0593-Improve-and-expand-AsyncCatcher.patch
+++ b/patches/server/0593-Improve-and-expand-AsyncCatcher.patch
@@ -17,7 +17,7 @@ Async catch modifications to critical entity state
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index ea793f9ccf3082a7abcb003b9df03901f9b4c0f0..8084bf547a52f3e5c890d2be3757acb364370d34 100644
+index 70b891bd018029eda8cda4fb9f919e77524dbc5e..a4abcbc69ccd023a936d02d359ba4c08198ed31e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1597,6 +1597,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -29,10 +29,10 @@ index ea793f9ccf3082a7abcb003b9df03901f9b4c0f0..8084bf547a52f3e5c890d2be3757acb3
if (player.isRemoved()) {
LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 1cb118c12e1b09cb6ae8d3b6949212b46c91b85b..21f9fc5c3111dc126d0197a02bb61541fc422933 100644
+index 8939ce9fed5d935cec31c9a27833d1cec4de7b01..564024738cc346abc024967c2d55f2553af3e660 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1145,7 +1145,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1143,7 +1143,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public boolean addEffect(MobEffectInstance mobeffect, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause) {
diff --git a/patches/server/0594-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0594-Add-paper-mobcaps-and-paper-playermobcaps.patch
index b998ef75b4..2eb0c23389 100644
--- a/patches/server/0594-Add-paper-mobcaps-and-paper-playermobcaps.patch
+++ b/patches/server/0594-Add-paper-mobcaps-and-paper-playermobcaps.patch
@@ -257,10 +257,10 @@ index 0000000000000000000000000000000000000000..d3b39d88a72ca25057fd8574d32f28db
+ }
+}
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-index 485c6044d603f15878f9413a644a538dab68db3e..6eb69ebe688c1c52d5a5986dfc63cdd42e66687e 100644
+index 606a60fe273974b71ed2bd40be819d848627e777..bf943feca387b77a3154773a59da7190d38d8621 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-@@ -174,6 +174,16 @@ public final class NaturalSpawner {
+@@ -172,6 +172,16 @@ public final class NaturalSpawner {
gameprofilerfiller.pop();
}
@@ -278,10 +278,10 @@ index 485c6044d603f15878f9413a644a538dab68db3e..6eb69ebe688c1c52d5a5986dfc63cdd4
BlockPos blockposition = NaturalSpawner.getRandomPosWithin(world, chunk);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 35e5a3dc58f93b85f93ec5301cc9b5c7505503bc..f69504676d2f48f3778f489ec1e08e2b3dec85cc 100644
+index ecf7ee1ca39d58f1780580bd24366fc8037df34a..1c72862b3167acc05f06b44cd9a0929ad8d2b9c8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2335,6 +2335,11 @@ public final class CraftServer implements Server {
+@@ -2334,6 +2334,11 @@ public final class CraftServer implements Server {
@Override
public int getSpawnLimit(SpawnCategory spawnCategory) {
diff --git a/patches/server/0598-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0598-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch
index e87128411d..9efbcafadb 100644
--- a/patches/server/0598-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch
+++ b/patches/server/0598-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch
@@ -10,10 +10,10 @@ chunks did get inlined, but the standard CPS.getChunkAt
method was not inlined.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 560777a99b58c4f82cc0e8fb087de04a564163b5..8269bf24f5e17f9e3936659aa0cbc9d4f95fb665 100644
+index 9536e127ff4d45ca59b74fe0f3dbde9a18c04f42..9afc0eaaca5ab7b6445d90ce53e31a6ae76f8848 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -352,7 +352,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -350,7 +350,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Override
public final LevelChunk getChunk(int chunkX, int chunkZ) { // Paper - final to help inline
diff --git a/patches/server/0602-Oprimise-map-impl-for-tracked-players.patch b/patches/server/0601-Oprimise-map-impl-for-tracked-players.patch
index c0bbabf27c..026136cdd5 100644
--- a/patches/server/0602-Oprimise-map-impl-for-tracked-players.patch
+++ b/patches/server/0601-Oprimise-map-impl-for-tracked-players.patch
@@ -7,10 +7,10 @@ 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 4d8dcc47b39d28ab715110e55110869fe3c9b456..75854574aa8d4aef35d84ba4c0fc7df9a67ae48c 100644
+index 352675e0b835d5f04576db6599e8840754a40340..b92a889d0b0c46c1fa247d770f303d7d37dfc36c 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1520,7 +1520,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1514,7 +1514,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
final Entity entity;
private final int range;
SectionPos lastSectionPos;
diff --git a/patches/server/0601-Time-scoreboard-search.patch b/patches/server/0601-Time-scoreboard-search.patch
deleted file mode 100644
index 8d15084758..0000000000
--- a/patches/server/0601-Time-scoreboard-search.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Spottedleaf <[email protected]>
-Date: Tue, 21 Apr 2020 01:53:22 -0700
-Subject: [PATCH] Time scoreboard search
-
-Plugins leaking scoreboards will make this very expensive,
-let server owners debug it easily
-
-diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
-index e2764186bd6b838ed5cd86c15597a08d079ef984..6b3cde6d4d1e63bec01f502f2027ee9fddac08aa 100644
---- a/src/main/java/co/aikar/timings/MinecraftTimings.java
-+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
-@@ -46,6 +46,7 @@ public final class MinecraftTimings {
-
- public static final Timing antiXrayUpdateTimer = Timings.ofSafe("anti-xray - update");
- public static final Timing antiXrayObfuscateTimer = Timings.ofSafe("anti-xray - obfuscate");
-+ public static final Timing scoreboardScoreSearch = Timings.ofSafe("Scoreboard score search"); // Paper - add timings for scoreboard search
-
- private static final Map<Class<?>, String> taskNameCache = new MapMaker().weakKeys().makeMap();
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
-index c7ca6210d6ae37fe95068c9baa5fb654f95307e0..cad42a0f3c016bf65181e50d139ae4e2fb9158a5 100644
---- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
-+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
-@@ -113,9 +113,18 @@ public final class CraftScoreboardManager implements ScoreboardManager {
-
- // CraftBukkit method
- public void forAllObjectives(ObjectiveCriteria criteria, ScoreHolder holder, Consumer<ScoreAccess> consumer) {
-+ // Paper start - add timings for scoreboard search
-+ // plugins leaking scoreboards will make this very expensive, let server owners debug it easily
-+ co.aikar.timings.MinecraftTimings.scoreboardScoreSearch.startTimingIfSync();
-+ try {
-+ // Paper end - add timings for scoreboard search
- for (CraftScoreboard scoreboard : this.scoreboards) {
- Scoreboard board = scoreboard.board;
- board.forAllObjectives(criteria, holder, (score) -> consumer.accept(score));
- }
-+ } finally { // Paper start - add timings for scoreboard search
-+ co.aikar.timings.MinecraftTimings.scoreboardScoreSearch.stopTimingIfSync();
-+ }
-+ // Paper end - add timings for scoreboard search
- }
- }
diff --git a/patches/server/0603-Add-missing-InventoryType.patch b/patches/server/0602-Add-missing-InventoryType.patch
index a49bdf073d..a49bdf073d 100644
--- a/patches/server/0603-Add-missing-InventoryType.patch
+++ b/patches/server/0602-Add-missing-InventoryType.patch
diff --git a/patches/server/0604-Optimise-BlockSoil-nearby-water-lookup.patch b/patches/server/0603-Optimise-BlockSoil-nearby-water-lookup.patch
index 4a5d6c5b9d..4a5d6c5b9d 100644
--- a/patches/server/0604-Optimise-BlockSoil-nearby-water-lookup.patch
+++ b/patches/server/0603-Optimise-BlockSoil-nearby-water-lookup.patch
diff --git a/patches/server/0605-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0604-Fix-merchant-inventory-not-closing-on-entity-removal.patch
index 4b017db5b6..87e006c31f 100644
--- a/patches/server/0605-Fix-merchant-inventory-not-closing-on-entity-removal.patch
+++ b/patches/server/0604-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 0485312d40dca972d2477b8d4a4725ff25deacbc..3ca2c0d937dc840ac64fb1efd73dbc5b045bc77d 100644
+index ecb4dc0642685d67621c82bb24fb0e939c805ce4..3b3024fcf39266cc6ae61fb77dbffb391dc96c92 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2328,6 +2328,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2298,6 +2298,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// 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/0606-Check-requirement-before-suggesting-root-nodes.patch b/patches/server/0605-Check-requirement-before-suggesting-root-nodes.patch
index fce5e326f9..fce5e326f9 100644
--- a/patches/server/0606-Check-requirement-before-suggesting-root-nodes.patch
+++ b/patches/server/0605-Check-requirement-before-suggesting-root-nodes.patch
diff --git a/patches/server/0607-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0606-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch
index 60d634041c..db870d4240 100644
--- a/patches/server/0607-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch
+++ b/patches/server/0606-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Don't respond to ServerboundCommandSuggestionPacket when
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 8084bf547a52f3e5c890d2be3757acb364370d34..0790d904a408652c593dc8d87b1b2087169e7490 100644
+index a4abcbc69ccd023a936d02d359ba4c08198ed31e..7f1e0c6801a1d8b0857fba9826fc56e30bd41497 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -760,6 +760,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0608-Add-packet-limiter-config.patch b/patches/server/0607-Add-packet-limiter-config.patch
index a6bd6521f4..a6bd6521f4 100644
--- a/patches/server/0608-Add-packet-limiter-config.patch
+++ b/patches/server/0607-Add-packet-limiter-config.patch
diff --git a/patches/server/0609-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0608-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
index c313451894..c313451894 100644
--- a/patches/server/0609-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
+++ b/patches/server/0608-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
diff --git a/patches/server/0610-Ensure-valid-vehicle-status.patch b/patches/server/0609-Ensure-valid-vehicle-status.patch
index c4359b2054..c4359b2054 100644
--- a/patches/server/0610-Ensure-valid-vehicle-status.patch
+++ b/patches/server/0609-Ensure-valid-vehicle-status.patch
diff --git a/patches/server/0611-Prevent-softlocked-end-exit-portal-generation.patch b/patches/server/0610-Prevent-softlocked-end-exit-portal-generation.patch
index 4c54f27f94..4c54f27f94 100644
--- a/patches/server/0611-Prevent-softlocked-end-exit-portal-generation.patch
+++ b/patches/server/0610-Prevent-softlocked-end-exit-portal-generation.patch
diff --git a/patches/server/0612-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch b/patches/server/0611-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch
index 4fac0c1ab3..4fac0c1ab3 100644
--- a/patches/server/0612-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch
+++ b/patches/server/0611-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch
diff --git a/patches/server/0613-Don-t-log-debug-logging-being-disabled.patch b/patches/server/0612-Don-t-log-debug-logging-being-disabled.patch
index 8e733b1cea..8e733b1cea 100644
--- a/patches/server/0613-Don-t-log-debug-logging-being-disabled.patch
+++ b/patches/server/0612-Don-t-log-debug-logging-being-disabled.patch
diff --git a/patches/server/0614-fix-various-menus-with-empty-level-accesses.patch b/patches/server/0613-fix-various-menus-with-empty-level-accesses.patch
index efe5d1ddce..efe5d1ddce 100644
--- a/patches/server/0614-fix-various-menus-with-empty-level-accesses.patch
+++ b/patches/server/0613-fix-various-menus-with-empty-level-accesses.patch
diff --git a/patches/server/0615-Preserve-overstacked-loot.patch b/patches/server/0614-Preserve-overstacked-loot.patch
index db50d2fd8a..db50d2fd8a 100644
--- a/patches/server/0615-Preserve-overstacked-loot.patch
+++ b/patches/server/0614-Preserve-overstacked-loot.patch
diff --git a/patches/server/0616-Update-head-rotation-in-missing-places.patch b/patches/server/0615-Update-head-rotation-in-missing-places.patch
index c1f529129d..c1f529129d 100644
--- a/patches/server/0616-Update-head-rotation-in-missing-places.patch
+++ b/patches/server/0615-Update-head-rotation-in-missing-places.patch
diff --git a/patches/server/0617-prevent-unintended-light-block-manipulation.patch b/patches/server/0616-prevent-unintended-light-block-manipulation.patch
index b8ca205064..b8ca205064 100644
--- a/patches/server/0617-prevent-unintended-light-block-manipulation.patch
+++ b/patches/server/0616-prevent-unintended-light-block-manipulation.patch
diff --git a/patches/server/0618-Fix-CraftCriteria-defaults-map.patch b/patches/server/0617-Fix-CraftCriteria-defaults-map.patch
index 3e79bd7fb7..3e79bd7fb7 100644
--- a/patches/server/0618-Fix-CraftCriteria-defaults-map.patch
+++ b/patches/server/0617-Fix-CraftCriteria-defaults-map.patch
diff --git a/patches/server/0619-Fix-upstreams-block-state-factories.patch b/patches/server/0618-Fix-upstreams-block-state-factories.patch
index bca94bd673..93376fc4b1 100644
--- a/patches/server/0619-Fix-upstreams-block-state-factories.patch
+++ b/patches/server/0618-Fix-upstreams-block-state-factories.patch
@@ -13,10 +13,10 @@ the material type of the block at that location.
public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 46a831f86b512f4228be8ccee40fb0f7bf0d6df6..3de01d92e1c97e287a1f0d1f8de81b4f530b4a84 100644
+index 50413d317ce0282752c57535637f87d529f4c09f..09b85c4caa4ebaae1e8c2910b090c40a039a1be7 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -388,7 +388,7 @@ public abstract class BlockEntity {
+@@ -383,7 +383,7 @@ public abstract class BlockEntity {
// Paper end
if (this.level == null) return null;
org.bukkit.block.Block block = this.level.getWorld().getBlockAt(this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
diff --git a/patches/server/0620-Configurable-feature-seeds.patch b/patches/server/0619-Configurable-feature-seeds.patch
index ffca9db1e2..b374cbddbf 100644
--- a/patches/server/0620-Configurable-feature-seeds.patch
+++ b/patches/server/0619-Configurable-feature-seeds.patch
@@ -5,19 +5,6 @@ Subject: [PATCH] Configurable feature seeds
Co-authored-by: Thonk <[email protected]>
-diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
-index 49028463ba47e760281545c2f7597e3db8d6c453..7620c72a4c243cbeea245203ce03a97cbfa7d922 100644
---- a/src/main/java/co/aikar/timings/TimingsExport.java
-+++ b/src/main/java/co/aikar/timings/TimingsExport.java
-@@ -286,7 +286,7 @@ public class TimingsExport extends Thread {
- JSONObject object = new JSONObject();
- for (String key : config.getKeys(false)) {
- String fullKey = (parentKey != null ? parentKey + "." + key : key);
-- if (fullKey.equals("database") || fullKey.equals("settings.bungeecord-addresses") || TimingsManager.hiddenConfigs.contains(fullKey) || key.startsWith("seed-") || key.equals("worldeditregentempworld")) {
-+ if (fullKey.equals("database") || fullKey.equals("settings.bungeecord-addresses") || TimingsManager.hiddenConfigs.contains(fullKey) || key.startsWith("seed-") || key.equals("worldeditregentempworld") || key.equals("feature-seeds")) {
- continue;
- }
- final Object val = config.get(key);
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index e3c5a49611d584fbd19a44da5aa78ff6d7c43881..fc8e3edd9734fa7b69f0fc6b4eefd8a704e451cf 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
diff --git a/patches/server/0621-Add-root-admin-user-detection.patch b/patches/server/0620-Add-root-admin-user-detection.patch
index af7475ee7f..df739cc33c 100644
--- a/patches/server/0621-Add-root-admin-user-detection.patch
+++ b/patches/server/0620-Add-root-admin-user-detection.patch
@@ -40,10 +40,10 @@ index 0000000000000000000000000000000000000000..68098dfe716e93aafcca4d8d5b5a81d8
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index e30a5ad17d7ba8bcec8911a72281830c419b0288..3c3be48b29fcd38c5dea1bfca8d8690850aa948e 100644
+index 21d6f728d6ecd35a05933e9406a386c36135a456..ac7fc2497b860a143ef08498f5f477a373a29be7 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -195,6 +195,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -193,6 +193,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
diff --git a/patches/server/0622-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0621-don-t-attempt-to-teleport-dead-entities.patch
index 89c8f26c2c..89c8f26c2c 100644
--- a/patches/server/0622-don-t-attempt-to-teleport-dead-entities.patch
+++ b/patches/server/0621-don-t-attempt-to-teleport-dead-entities.patch
diff --git a/patches/server/0623-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0622-Prevent-excessive-velocity-through-repeated-crits.patch
index 9db70149e6..d7f8266ad6 100644
--- a/patches/server/0623-Prevent-excessive-velocity-through-repeated-crits.patch
+++ b/patches/server/0622-Prevent-excessive-velocity-through-repeated-crits.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent excessive velocity through repeated crits
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 21f9fc5c3111dc126d0197a02bb61541fc422933..8c7ffa884f64a4263c9399953a7cfca6e35aab61 100644
+index 564024738cc346abc024967c2d55f2553af3e660..8e0805bf6d330717f7555fbdb28d416295f8495a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2865,17 +2865,29 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2863,17 +2863,29 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.hasEffect(MobEffects.JUMP) ? 0.1F * ((float) this.getEffect(MobEffects.JUMP).getAmplifier() + 1.0F) : 0.0F;
}
diff --git a/patches/server/0624-Remove-client-side-code-using-deprecated-for-removal.patch b/patches/server/0623-Remove-client-side-code-using-deprecated-for-removal.patch
index 1a9d2657f1..1a9d2657f1 100644
--- a/patches/server/0624-Remove-client-side-code-using-deprecated-for-removal.patch
+++ b/patches/server/0623-Remove-client-side-code-using-deprecated-for-removal.patch
diff --git a/patches/server/0625-Fix-Spigot-growth-modifiers.patch b/patches/server/0624-Fix-Spigot-growth-modifiers.patch
index 6a24adf1c8..6a24adf1c8 100644
--- a/patches/server/0625-Fix-Spigot-growth-modifiers.patch
+++ b/patches/server/0624-Fix-Spigot-growth-modifiers.patch
diff --git a/patches/server/0626-Prevent-ContainerOpenersCounter-openCount-from-going.patch b/patches/server/0625-Prevent-ContainerOpenersCounter-openCount-from-going.patch
index b017de75d1..b017de75d1 100644
--- a/patches/server/0626-Prevent-ContainerOpenersCounter-openCount-from-going.patch
+++ b/patches/server/0625-Prevent-ContainerOpenersCounter-openCount-from-going.patch
diff --git a/patches/server/0627-Add-PlayerItemFrameChangeEvent.patch b/patches/server/0626-Add-PlayerItemFrameChangeEvent.patch
index b7e908ab6e..b7e908ab6e 100644
--- a/patches/server/0627-Add-PlayerItemFrameChangeEvent.patch
+++ b/patches/server/0626-Add-PlayerItemFrameChangeEvent.patch
diff --git a/patches/server/0628-Optimize-HashMapPalette.patch b/patches/server/0627-Optimize-HashMapPalette.patch
index a490eb0c20..a490eb0c20 100644
--- a/patches/server/0628-Optimize-HashMapPalette.patch
+++ b/patches/server/0627-Optimize-HashMapPalette.patch
diff --git a/patches/server/0629-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch b/patches/server/0628-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch
index 50968cdc50..50968cdc50 100644
--- a/patches/server/0629-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch
+++ b/patches/server/0628-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch
diff --git a/patches/server/0630-Add-more-Campfire-API.patch b/patches/server/0629-Add-more-Campfire-API.patch
index c490c151c3..c490c151c3 100644
--- a/patches/server/0630-Add-more-Campfire-API.patch
+++ b/patches/server/0629-Add-more-Campfire-API.patch
diff --git a/patches/server/0631-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch b/patches/server/0630-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch
index 80c053acc6..80c053acc6 100644
--- a/patches/server/0631-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch
+++ b/patches/server/0630-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch
diff --git a/patches/server/0632-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0631-Forward-CraftEntity-in-teleport-command.patch
index 908c465129..908c465129 100644
--- a/patches/server/0632-Forward-CraftEntity-in-teleport-command.patch
+++ b/patches/server/0631-Forward-CraftEntity-in-teleport-command.patch
diff --git a/patches/server/0633-Improve-scoreboard-entries.patch b/patches/server/0632-Improve-scoreboard-entries.patch
index 8acac86ce3..8acac86ce3 100644
--- a/patches/server/0633-Improve-scoreboard-entries.patch
+++ b/patches/server/0632-Improve-scoreboard-entries.patch
diff --git a/patches/server/0634-Entity-powdered-snow-API.patch b/patches/server/0633-Entity-powdered-snow-API.patch
index 09c93986c1..09c93986c1 100644
--- a/patches/server/0634-Entity-powdered-snow-API.patch
+++ b/patches/server/0633-Entity-powdered-snow-API.patch
diff --git a/patches/server/0635-Add-API-for-item-entity-health.patch b/patches/server/0634-Add-API-for-item-entity-health.patch
index cd2757b544..cd2757b544 100644
--- a/patches/server/0635-Add-API-for-item-entity-health.patch
+++ b/patches/server/0634-Add-API-for-item-entity-health.patch
diff --git a/patches/server/0636-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0635-Configurable-max-block-light-for-monster-spawning.patch
index 8c19486a5f..8c19486a5f 100644
--- a/patches/server/0636-Configurable-max-block-light-for-monster-spawning.patch
+++ b/patches/server/0635-Configurable-max-block-light-for-monster-spawning.patch
diff --git a/patches/server/0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0636-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch
index b239d74e25..b239d74e25 100644
--- a/patches/server/0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch
+++ b/patches/server/0636-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch
diff --git a/patches/server/0638-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/0637-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
index cfaa295706..cfaa295706 100644
--- a/patches/server/0638-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
+++ b/patches/server/0637-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
diff --git a/patches/server/0639-Bucketable-API.patch b/patches/server/0638-Bucketable-API.patch
index 274ccde059..274ccde059 100644
--- a/patches/server/0639-Bucketable-API.patch
+++ b/patches/server/0638-Bucketable-API.patch
diff --git a/patches/server/0640-Validate-usernames.patch b/patches/server/0639-Validate-usernames.patch
index 74facbf238..89dbf3385d 100644
--- a/patches/server/0640-Validate-usernames.patch
+++ b/patches/server/0639-Validate-usernames.patch
@@ -32,10 +32,10 @@ index 1e4b288f20153ce0c91fabf164c5c8320c90ba7d..cb5dd77892283a1aaec45434fb99bb7f
GameProfile gameprofile = this.server.getSingleplayerProfile();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 1b6540ae28d73501c59581b1864f0e01ab53e365..f34cad30c982f2bb563f0deab030111720858fa8 100644
+index dd7b19a7762b91a8b27717098cebd2c48cb96f68..2497aeb46ff4188948e9253c21d83a218fd73e85 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -628,7 +628,7 @@ public abstract class PlayerList {
+@@ -627,7 +627,7 @@ public abstract class PlayerList {
for (int i = 0; i < this.players.size(); ++i) {
entityplayer = (ServerPlayer) this.players.get(i);
diff --git a/patches/server/0641-Make-water-animal-spawn-height-configurable.patch b/patches/server/0640-Make-water-animal-spawn-height-configurable.patch
index 341b55b1f6..341b55b1f6 100644
--- a/patches/server/0641-Make-water-animal-spawn-height-configurable.patch
+++ b/patches/server/0640-Make-water-animal-spawn-height-configurable.patch
diff --git a/patches/server/0642-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0641-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
index ecf4c51174..b09fd4e699 100644
--- a/patches/server/0642-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
+++ b/patches/server/0641-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 f191209b9a1d581235a638bd89ee2eb4050d5cb0..ac9b2eb3fadc2aa6f740a53b13029aa65724a37a 100644
+index 7ab9a9c04f94a68dccb5ec9bfc8171bfc02927a2..8cbc8eeaa8719f8bb136543e80ec85248c90e154 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -627,7 +627,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -626,7 +626,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver));
LevelStem worlddimension = (LevelStem) dimensions.getValue(dimensionKey);
@@ -18,10 +18,10 @@ index f191209b9a1d581235a638bd89ee2eb4050d5cb0..ac9b2eb3fadc2aa6f740a53b13029aa6
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 3ca2c0d937dc840ac64fb1efd73dbc5b045bc77d..9ac6d2e87bbad00c9b97028b0e9c2a42cf29801b 100644
+index 3b3024fcf39266cc6ae61fb77dbffb391dc96c92..2d77e9526917a83987ae0486a669538d5417b781 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -359,7 +359,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -357,7 +357,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.serverLevelData.setWorld(this);
if (biomeProvider != null) {
@@ -31,10 +31,10 @@ index 3ca2c0d937dc840ac64fb1efd73dbc5b045bc77d..9ac6d2e87bbad00c9b97028b0e9c2a42
chunkgenerator = new NoiseBasedChunkGenerator(worldChunkManager, cga.settings);
} else if (chunkgenerator instanceof FlatLevelSource cpf) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index f69504676d2f48f3778f489ec1e08e2b3dec85cc..d30c1e853bb2e27922a00d890dffca153cdcbe97 100644
+index 1c72862b3167acc05f06b44cd9a0929ad8d2b9c8..6d32505266fef119289bcf6761c1948368238eb9 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1311,7 +1311,7 @@ public final class CraftServer implements Server {
+@@ -1310,7 +1310,7 @@ public final class CraftServer implements Server {
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata));
LevelStem worlddimension = iregistry.getValue(actualDimension);
diff --git a/patches/server/0643-Add-config-option-for-worlds-affected-by-time-cmd.patch b/patches/server/0642-Add-config-option-for-worlds-affected-by-time-cmd.patch
index 156eacada9..156eacada9 100644
--- a/patches/server/0643-Add-config-option-for-worlds-affected-by-time-cmd.patch
+++ b/patches/server/0642-Add-config-option-for-worlds-affected-by-time-cmd.patch
diff --git a/patches/server/0644-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch b/patches/server/0643-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch
index be0eedab93..be0eedab93 100644
--- a/patches/server/0644-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch
+++ b/patches/server/0643-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch
diff --git a/patches/server/0645-Multiple-Entries-with-Scoreboards.patch b/patches/server/0644-Multiple-Entries-with-Scoreboards.patch
index 558cc93da5..558cc93da5 100644
--- a/patches/server/0645-Multiple-Entries-with-Scoreboards.patch
+++ b/patches/server/0644-Multiple-Entries-with-Scoreboards.patch
diff --git a/patches/server/0646-Reset-placed-block-on-exception.patch b/patches/server/0645-Reset-placed-block-on-exception.patch
index 327d98e291..327d98e291 100644
--- a/patches/server/0646-Reset-placed-block-on-exception.patch
+++ b/patches/server/0645-Reset-placed-block-on-exception.patch
diff --git a/patches/server/0647-Add-configurable-height-for-slime-spawn.patch b/patches/server/0646-Add-configurable-height-for-slime-spawn.patch
index dfc8ecb349..dfc8ecb349 100644
--- a/patches/server/0647-Add-configurable-height-for-slime-spawn.patch
+++ b/patches/server/0646-Add-configurable-height-for-slime-spawn.patch
diff --git a/patches/server/0648-Fix-xp-reward-for-baby-zombies.patch b/patches/server/0647-Fix-xp-reward-for-baby-zombies.patch
index 3ec320760f..3ec320760f 100644
--- a/patches/server/0648-Fix-xp-reward-for-baby-zombies.patch
+++ b/patches/server/0647-Fix-xp-reward-for-baby-zombies.patch
diff --git a/patches/server/0649-Multi-Block-Change-API-Implementation.patch b/patches/server/0648-Multi-Block-Change-API-Implementation.patch
index 9edd052d01..9edd052d01 100644
--- a/patches/server/0649-Multi-Block-Change-API-Implementation.patch
+++ b/patches/server/0648-Multi-Block-Change-API-Implementation.patch
diff --git a/patches/server/0650-Fix-NotePlayEvent.patch b/patches/server/0649-Fix-NotePlayEvent.patch
index cdffcd6f0f..cdffcd6f0f 100644
--- a/patches/server/0650-Fix-NotePlayEvent.patch
+++ b/patches/server/0649-Fix-NotePlayEvent.patch
diff --git a/patches/server/0651-Freeze-Tick-Lock-API.patch b/patches/server/0650-Freeze-Tick-Lock-API.patch
index 0244ffe420..f658b3b299 100644
--- a/patches/server/0651-Freeze-Tick-Lock-API.patch
+++ b/patches/server/0650-Freeze-Tick-Lock-API.patch
@@ -46,10 +46,10 @@ index 3df8cfccba9bc4420b37dcbdfc4a12c720b51205..4f9ebf7a577223d85ceaad0babd2d0b4
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 8c7ffa884f64a4263c9399953a7cfca6e35aab61..0aa7291b3c28c58767fed5f9f01e381b671b5d27 100644
+index 8e0805bf6d330717f7555fbdb28d416295f8495a..8b454382f59ee36ec6f45ca8445b3f1a956ff668 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3611,7 +3611,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3609,7 +3609,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.calculateEntityAnimation(this instanceof FlyingAnimal);
gameprofilerfiller.pop();
gameprofilerfiller.push("freezing");
diff --git a/patches/server/0652-More-PotionEffectType-API.patch b/patches/server/0651-More-PotionEffectType-API.patch
index 2773c98338..2773c98338 100644
--- a/patches/server/0652-More-PotionEffectType-API.patch
+++ b/patches/server/0651-More-PotionEffectType-API.patch
diff --git a/patches/server/0653-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/0652-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch
index 027285c2b1..027285c2b1 100644
--- a/patches/server/0653-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch
+++ b/patches/server/0652-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch
diff --git a/patches/server/0654-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0653-API-for-creating-command-sender-which-forwards-feedb.patch
index de6e7d2811..76a09348af 100644
--- a/patches/server/0654-API-for-creating-command-sender-which-forwards-feedb.patch
+++ b/patches/server/0653-API-for-creating-command-sender-which-forwards-feedb.patch
@@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index d30c1e853bb2e27922a00d890dffca153cdcbe97..93811e7770546c202085487642699e0c74b9f498 100644
+index 6d32505266fef119289bcf6761c1948368238eb9..9de7978c7383f8364feba82e9cd3efbfcce00e3c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2166,6 +2166,13 @@ public final class CraftServer implements Server {
+@@ -2165,6 +2165,13 @@ public final class CraftServer implements Server {
return this.console.console;
}
diff --git a/patches/server/0655-Add-missing-structure-set-seed-configs.patch b/patches/server/0654-Add-missing-structure-set-seed-configs.patch
index 8677197bdc..8677197bdc 100644
--- a/patches/server/0655-Add-missing-structure-set-seed-configs.patch
+++ b/patches/server/0654-Add-missing-structure-set-seed-configs.patch
diff --git a/patches/server/0656-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0655-Fix-cancelled-powdered-snow-bucket-placement.patch
index d1a867e605..d1a867e605 100644
--- a/patches/server/0656-Fix-cancelled-powdered-snow-bucket-placement.patch
+++ b/patches/server/0655-Fix-cancelled-powdered-snow-bucket-placement.patch
diff --git a/patches/server/0657-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0656-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
index f3ca4340b0..3f4362495a 100644
--- a/patches/server/0657-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
+++ b/patches/server/0656-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit
Copies appropriate checks from CraftWorld#getSpawnLimit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 93811e7770546c202085487642699e0c74b9f498..8d9816f84e551f1257972f467352e9c9ee09473e 100644
+index 9de7978c7383f8364feba82e9cd3efbfcce00e3c..c1bdefbad35fd259e3d90c6e330da14c9d072090 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2343,6 +2343,8 @@ public final class CraftServer implements Server {
+@@ -2342,6 +2342,8 @@ public final class CraftServer implements Server {
@Override
public int getSpawnLimit(SpawnCategory spawnCategory) {
// Paper start - Add mobcaps commands
diff --git a/patches/server/0658-Add-GameEvent-tags.patch b/patches/server/0657-Add-GameEvent-tags.patch
index 34a9b8a43e..0f1b9f52d2 100644
--- a/patches/server/0658-Add-GameEvent-tags.patch
+++ b/patches/server/0657-Add-GameEvent-tags.patch
@@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..874c420e60b6be09c806d64f40cf6366
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 8d9816f84e551f1257972f467352e9c9ee09473e..db6b4ec0cfbda7a65cebaa50d16f038916886475 100644
+index c1bdefbad35fd259e3d90c6e330da14c9d072090..59690263f1cb27f2289b027ffd31c1e1ac4f2e69 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2700,6 +2700,15 @@ public final class CraftServer implements Server {
+@@ -2699,6 +2699,15 @@ public final class CraftServer implements Server {
return (org.bukkit.Tag<T>) new CraftDamageTag(damageRegistry, damageTagKey);
}
}
@@ -65,7 +65,7 @@ index 8d9816f84e551f1257972f467352e9c9ee09473e..db6b4ec0cfbda7a65cebaa50d16f0389
default -> throw new IllegalArgumentException();
}
-@@ -2737,6 +2746,13 @@ public final class CraftServer implements Server {
+@@ -2736,6 +2745,13 @@ public final class CraftServer implements Server {
net.minecraft.core.Registry<DamageType> damageTags = CraftRegistry.getMinecraftRegistry(Registries.DAMAGE_TYPE);
return damageTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftDamageTag(damageTags, pair.key())).collect(ImmutableList.toImmutableList());
}
diff --git a/patches/server/0659-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0658-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch
index 3b556cd312..7d399f3858 100644
--- a/patches/server/0659-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch
+++ b/patches/server/0658-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 ac9b2eb3fadc2aa6f740a53b13029aa65724a37a..ff75c95f13b18171064f521f7c3b4367d9a5b9b8 100644
+index 8cbc8eeaa8719f8bb136543e80ec85248c90e154..3cd23d329fae0a6a4eff36510edc5d9bd27c804e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1419,6 +1419,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1405,6 +1405,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (super.pollTask()) {
return true;
} else {
@@ -20,7 +20,7 @@ index ac9b2eb3fadc2aa6f740a53b13029aa65724a37a..ff75c95f13b18171064f521f7c3b4367
if (this.tickRateManager.isSprinting() || this.haveTime()) {
Iterator iterator = this.getAllLevels().iterator();
-@@ -1426,12 +1427,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1412,12 +1413,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerLevel worldserver = (ServerLevel) iterator.next();
if (worldserver.getChunkSource().pollTask()) {
diff --git a/patches/server/0660-Furnace-RecipesUsed-API.patch b/patches/server/0659-Furnace-RecipesUsed-API.patch
index 5b19cd68c0..5b19cd68c0 100644
--- a/patches/server/0660-Furnace-RecipesUsed-API.patch
+++ b/patches/server/0659-Furnace-RecipesUsed-API.patch
diff --git a/patches/server/0661-Configurable-sculk-sensor-listener-range.patch b/patches/server/0660-Configurable-sculk-sensor-listener-range.patch
index 3dd1324354..3dd1324354 100644
--- a/patches/server/0661-Configurable-sculk-sensor-listener-range.patch
+++ b/patches/server/0660-Configurable-sculk-sensor-listener-range.patch
diff --git a/patches/server/0662-Add-missing-block-data-API.patch b/patches/server/0661-Add-missing-block-data-API.patch
index ace8c632a6..ace8c632a6 100644
--- a/patches/server/0662-Add-missing-block-data-API.patch
+++ b/patches/server/0661-Add-missing-block-data-API.patch
diff --git a/patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0662-Option-to-have-default-CustomSpawners-in-custom-worl.patch
index 0ee3311bc7..622b090c3c 100644
--- a/patches/server/0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch
+++ b/patches/server/0662-Option-to-have-default-CustomSpawners-in-custom-worl.patch
@@ -10,10 +10,10 @@ just looking at the LevelStem key, look at the DimensionType key which
is one level below that. Defaults to off to keep vanilla behavior.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index ff75c95f13b18171064f521f7c3b4367d9a5b9b8..c5ee4c255ae7a1f0dc662f0d375607935e5e097a 100644
+index 3cd23d329fae0a6a4eff36510edc5d9bd27c804e..6fdc5be323833c4ca2722b695fe790ea2ecc53d5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -647,7 +647,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -646,7 +646,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.commandStorage = new CommandStorage(worldpersistentdata);
} else {
ChunkProgressListener worldloadlistener = this.progressListenerFactory.create(this.worldData.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS));
diff --git a/patches/server/0664-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0663-Put-world-into-worldlist-before-initing-the-world.patch
index 9dff7a427d..1820be4ba9 100644
--- a/patches/server/0664-Put-world-into-worldlist-before-initing-the-world.patch
+++ b/patches/server/0663-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 c5ee4c255ae7a1f0dc662f0d375607935e5e097a..7aef3396a3580996044cd15d2ca26c11327513a1 100644
+index 6fdc5be323833c4ca2722b695fe790ea2ecc53d5..88d4021bc4f9ab7c9ee33a5a5c2326b7c628f4a4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -659,9 +659,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -658,9 +658,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
@@ -23,10 +23,10 @@ index c5ee4c255ae7a1f0dc662f0d375607935e5e097a..7aef3396a3580996044cd15d2ca26c11
if (worlddata.getCustomBossEvents() != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index db6b4ec0cfbda7a65cebaa50d16f038916886475..ba4c184e25fa1c288e70815b760d3ef1b364d9fd 100644
+index 59690263f1cb27f2289b027ffd31c1e1ac4f2e69..fcd8b3ce258bdb12a87d41d348ac847d5dc603f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1337,10 +1337,11 @@ public final class CraftServer implements Server {
+@@ -1336,10 +1336,11 @@ public final class CraftServer implements Server {
return null;
}
diff --git a/patches/server/0665-Custom-Potion-Mixes.patch b/patches/server/0664-Custom-Potion-Mixes.patch
index 7dfebd47b4..72080135b1 100644
--- a/patches/server/0665-Custom-Potion-Mixes.patch
+++ b/patches/server/0664-Custom-Potion-Mixes.patch
@@ -96,10 +96,10 @@ index 0000000000000000000000000000000000000000..7ea357ac2f3a93db4ebdf24b5072be7d
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 7aef3396a3580996044cd15d2ca26c11327513a1..3b0f7e7a5bea786f1189d6e47d8dfd7107d66a53 100644
+index 88d4021bc4f9ab7c9ee33a5a5c2326b7c628f4a4..a836ea518bc6d8ddd7c6484038d3d712b3fb13cf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2240,6 +2240,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2196,6 +2196,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.worldData.setDataConfiguration(worlddataconfiguration);
this.resources.managers.updateStaticRegistryTags();
this.resources.managers.getRecipeManager().finalizeRecipeLoading(this.worldData.enabledFeatures());
@@ -282,7 +282,7 @@ index e167c2834f1b7899a7d11cef782940deeb739a9c..2bafacd7bc56186d9105d2031180f8c4
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ba4c184e25fa1c288e70815b760d3ef1b364d9fd..b3e5fc3a417be2af8ed6591f67f8d56c4ca86d74 100644
+index fcd8b3ce258bdb12a87d41d348ac847d5dc603f8..3b48a8107bf0b4326b86ee08bb54341825be81c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -311,6 +311,7 @@ public final class CraftServer implements Server {
@@ -293,7 +293,7 @@ index ba4c184e25fa1c288e70815b760d3ef1b364d9fd..b3e5fc3a417be2af8ed6591f67f8d56c
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
-@@ -395,6 +396,7 @@ public final class CraftServer implements Server {
+@@ -394,6 +395,7 @@ public final class CraftServer implements Server {
if (this.configuration.getBoolean("settings.use-map-color-cache")) {
MapPalette.setMapColorCache(new CraftMapColorCache(this.logger));
}
@@ -301,7 +301,7 @@ index ba4c184e25fa1c288e70815b760d3ef1b364d9fd..b3e5fc3a417be2af8ed6591f67f8d56c
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
}
-@@ -3067,5 +3069,9 @@ public final class CraftServer implements Server {
+@@ -3066,5 +3068,9 @@ public final class CraftServer implements Server {
return datapackManager;
}
diff --git a/patches/server/0666-Force-close-world-loading-screen.patch b/patches/server/0665-Force-close-world-loading-screen.patch
index edae404607..481f82aff5 100644
--- a/patches/server/0666-Force-close-world-loading-screen.patch
+++ b/patches/server/0665-Force-close-world-loading-screen.patch
@@ -10,10 +10,10 @@ so we do not need that. The client only needs the chunk it is currently in to
be loaded to close the loading screen, so we just send an empty one.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index f34cad30c982f2bb563f0deab030111720858fa8..215a3c9839d664f6cfd4c9360338abcf5863799a 100644
+index 2497aeb46ff4188948e9253c21d83a218fd73e85..f1530fbcaf9913e43143b40117fb7fe63b326d1d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -407,6 +407,16 @@ public abstract class PlayerList {
+@@ -406,6 +406,16 @@ public abstract class PlayerList {
}
// Paper end - Configurable player collision
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
diff --git a/patches/server/0667-Fix-falling-block-spawn-methods.patch b/patches/server/0666-Fix-falling-block-spawn-methods.patch
index 771588bb12..771588bb12 100644
--- a/patches/server/0667-Fix-falling-block-spawn-methods.patch
+++ b/patches/server/0666-Fix-falling-block-spawn-methods.patch
diff --git a/patches/server/0668-Expose-furnace-minecart-push-values.patch b/patches/server/0667-Expose-furnace-minecart-push-values.patch
index fb48aabb5f..fb48aabb5f 100644
--- a/patches/server/0668-Expose-furnace-minecart-push-values.patch
+++ b/patches/server/0667-Expose-furnace-minecart-push-values.patch
diff --git a/patches/server/0669-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0668-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
index 7a72849b26..7a72849b26 100644
--- a/patches/server/0669-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
+++ b/patches/server/0668-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
diff --git a/patches/server/0670-More-Projectile-API.patch b/patches/server/0669-More-Projectile-API.patch
index 9f9c1e0dd4..9f9c1e0dd4 100644
--- a/patches/server/0670-More-Projectile-API.patch
+++ b/patches/server/0669-More-Projectile-API.patch
diff --git a/patches/server/0671-Fix-swamp-hut-cat-generation-deadlock.patch b/patches/server/0670-Fix-swamp-hut-cat-generation-deadlock.patch
index 24bfbc0dc7..24bfbc0dc7 100644
--- a/patches/server/0671-Fix-swamp-hut-cat-generation-deadlock.patch
+++ b/patches/server/0670-Fix-swamp-hut-cat-generation-deadlock.patch
diff --git a/patches/server/0672-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0671-Don-t-allow-vehicle-movement-from-players-while-tele.patch
index c8f2f8a3b8..cb7a4055d9 100644
--- a/patches/server/0672-Don-t-allow-vehicle-movement-from-players-while-tele.patch
+++ b/patches/server/0671-Don-t-allow-vehicle-movement-from-players-while-tele.patch
@@ -7,7 +7,7 @@ Bring the vehicle move packet behavior in line with the
regular player move packet.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 0790d904a408652c593dc8d87b1b2087169e7490..65e0ad4cae47a1912ad12ea1e6eaa3672d4f12e8 100644
+index 7f1e0c6801a1d8b0857fba9826fc56e30bd41497..9656e15aa15735e9bd6ac4e2ad7aa8aa66140b9a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -489,6 +489,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0673-Implement-getComputedBiome-API.patch b/patches/server/0672-Implement-getComputedBiome-API.patch
index dab55a6218..dab55a6218 100644
--- a/patches/server/0673-Implement-getComputedBiome-API.patch
+++ b/patches/server/0672-Implement-getComputedBiome-API.patch
diff --git a/patches/server/0674-Make-some-itemstacks-nonnull.patch b/patches/server/0673-Make-some-itemstacks-nonnull.patch
index 20944d9088..20944d9088 100644
--- a/patches/server/0674-Make-some-itemstacks-nonnull.patch
+++ b/patches/server/0673-Make-some-itemstacks-nonnull.patch
diff --git a/patches/server/0675-Implement-enchantWithLevels-API.patch b/patches/server/0674-Implement-enchantWithLevels-API.patch
index 45f1f704ca..45f1f704ca 100644
--- a/patches/server/0675-Implement-enchantWithLevels-API.patch
+++ b/patches/server/0674-Implement-enchantWithLevels-API.patch
diff --git a/patches/server/0676-Fix-saving-in-unloadWorld.patch b/patches/server/0675-Fix-saving-in-unloadWorld.patch
index f2d01904b1..a715afca0e 100644
--- a/patches/server/0676-Fix-saving-in-unloadWorld.patch
+++ b/patches/server/0675-Fix-saving-in-unloadWorld.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix saving in unloadWorld
Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b3e5fc3a417be2af8ed6591f67f8d56c4ca86d74..2860aa8f75ec5901023f88047cb4cb96298a99e0 100644
+index 3b48a8107bf0b4326b86ee08bb54341825be81c1..a504a6458423a997e703e95356dd2058d6c164e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1386,7 +1386,7 @@ public final class CraftServer implements Server {
+@@ -1385,7 +1385,7 @@ public final class CraftServer implements Server {
try {
if (save) {
diff --git a/patches/server/0677-Buffer-OOB-setBlock-calls.patch b/patches/server/0676-Buffer-OOB-setBlock-calls.patch
index 1b7ba291c4..1b7ba291c4 100644
--- a/patches/server/0677-Buffer-OOB-setBlock-calls.patch
+++ b/patches/server/0676-Buffer-OOB-setBlock-calls.patch
diff --git a/patches/server/0678-Add-TameableDeathMessageEvent.patch b/patches/server/0677-Add-TameableDeathMessageEvent.patch
index 641b0b0e37..641b0b0e37 100644
--- a/patches/server/0678-Add-TameableDeathMessageEvent.patch
+++ b/patches/server/0677-Add-TameableDeathMessageEvent.patch
diff --git a/patches/server/0679-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0678-Fix-new-block-data-for-EntityChangeBlockEvent.patch
index fce021dda2..fce021dda2 100644
--- a/patches/server/0679-Fix-new-block-data-for-EntityChangeBlockEvent.patch
+++ b/patches/server/0678-Fix-new-block-data-for-EntityChangeBlockEvent.patch
diff --git a/patches/server/0680-fix-player-loottables-running-when-mob-loot-gamerule.patch b/patches/server/0679-fix-player-loottables-running-when-mob-loot-gamerule.patch
index 7a7f077e66..7a7f077e66 100644
--- a/patches/server/0680-fix-player-loottables-running-when-mob-loot-gamerule.patch
+++ b/patches/server/0679-fix-player-loottables-running-when-mob-loot-gamerule.patch
diff --git a/patches/server/0681-Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/0680-Ensure-entity-passenger-world-matches-ridden-entity.patch
index 62372a6087..62372a6087 100644
--- a/patches/server/0681-Ensure-entity-passenger-world-matches-ridden-entity.patch
+++ b/patches/server/0680-Ensure-entity-passenger-world-matches-ridden-entity.patch
diff --git a/patches/server/0682-Cache-resource-keys-and-optimize-reference-Holder-ta.patch b/patches/server/0681-Cache-resource-keys-and-optimize-reference-Holder-ta.patch
index 263f5852b3..263f5852b3 100644
--- a/patches/server/0682-Cache-resource-keys-and-optimize-reference-Holder-ta.patch
+++ b/patches/server/0681-Cache-resource-keys-and-optimize-reference-Holder-ta.patch
diff --git a/patches/server/0683-Allow-changing-the-EnderDragon-podium.patch b/patches/server/0682-Allow-changing-the-EnderDragon-podium.patch
index 5cbce2b4ec..5cbce2b4ec 100644
--- a/patches/server/0683-Allow-changing-the-EnderDragon-podium.patch
+++ b/patches/server/0682-Allow-changing-the-EnderDragon-podium.patch
diff --git a/patches/server/0684-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch b/patches/server/0683-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch
index f885dbe8b4..f885dbe8b4 100644
--- a/patches/server/0684-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch
+++ b/patches/server/0683-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch
diff --git a/patches/server/0685-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0684-Prevent-tile-entity-copies-loading-chunks.patch
index e679734f77..d690eb7288 100644
--- a/patches/server/0685-Prevent-tile-entity-copies-loading-chunks.patch
+++ b/patches/server/0684-Prevent-tile-entity-copies-loading-chunks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 65e0ad4cae47a1912ad12ea1e6eaa3672d4f12e8..ac2ad33a44ce04d9673adc08ff21a167d606e4db 100644
+index 9656e15aa15735e9bd6ac4e2ad7aa8aa66140b9a..bc8f9bd50de3894e6262e13ed55252c98f22ed8a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3248,7 +3248,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3245,7 +3245,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
BlockPos blockposition = BlockEntity.getPosFromTag(customdata.getUnsafe());
if (this.player.level().isLoaded(blockposition)) {
diff --git a/patches/server/0686-Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/0685-Use-username-instead-of-display-name-in-PlayerList-g.patch
index b4d6c33900..5603d7b000 100644
--- a/patches/server/0686-Use-username-instead-of-display-name-in-PlayerList-g.patch
+++ b/patches/server/0685-Use-username-instead-of-display-name-in-PlayerList-g.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 215a3c9839d664f6cfd4c9360338abcf5863799a..0646e435e869b5cc067968feb09ff5c6a979a8a7 100644
+index f1530fbcaf9913e43143b40117fb7fe63b326d1d..3d741bd09cd2086aa63b77636fe3ecfc55577aad 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1354,7 +1354,7 @@ public abstract class PlayerList {
+@@ -1352,7 +1352,7 @@ public abstract class PlayerList {
// CraftBukkit start
public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
diff --git a/patches/server/0687-Expand-PlayerItemDamageEvent.patch b/patches/server/0686-Expand-PlayerItemDamageEvent.patch
index 9659c38659..9659c38659 100644
--- a/patches/server/0687-Expand-PlayerItemDamageEvent.patch
+++ b/patches/server/0686-Expand-PlayerItemDamageEvent.patch
diff --git a/patches/server/0688-WorldCreator-keepSpawnLoaded.patch b/patches/server/0687-WorldCreator-keepSpawnLoaded.patch
index 2b6c3f2d6e..6712b0e0a3 100644
--- a/patches/server/0688-WorldCreator-keepSpawnLoaded.patch
+++ b/patches/server/0687-WorldCreator-keepSpawnLoaded.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 2860aa8f75ec5901023f88047cb4cb96298a99e0..d0a72476d36294792550425a8c0646a7c0be75a7 100644
+index a504a6458423a997e703e95356dd2058d6c164e2..6ba912570ea66c3b0747beb4c168e351904cc31e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1329,7 +1329,7 @@ public final class CraftServer implements Server {
+@@ -1328,7 +1328,7 @@ public final class CraftServer implements Server {
}
// If set to not keep spawn in memory (changed from default) then adjust rule accordingly
diff --git a/patches/server/0689-Fix-CME-in-CraftPersistentDataTypeRegistry.patch b/patches/server/0688-Fix-CME-in-CraftPersistentDataTypeRegistry.patch
index ed8adb4503..ed8adb4503 100644
--- a/patches/server/0689-Fix-CME-in-CraftPersistentDataTypeRegistry.patch
+++ b/patches/server/0688-Fix-CME-in-CraftPersistentDataTypeRegistry.patch
diff --git a/patches/server/0690-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch b/patches/server/0689-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch
index 3ecc56a332..3ecc56a332 100644
--- a/patches/server/0690-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch
+++ b/patches/server/0689-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch
diff --git a/patches/server/0691-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/server/0690-Add-EntityDyeEvent-and-CollarColorable-interface.patch
index d50c55e4e3..d50c55e4e3 100644
--- a/patches/server/0691-Add-EntityDyeEvent-and-CollarColorable-interface.patch
+++ b/patches/server/0690-Add-EntityDyeEvent-and-CollarColorable-interface.patch
diff --git a/patches/server/0692-Fire-CauldronLevelChange-on-initial-fill.patch b/patches/server/0691-Fire-CauldronLevelChange-on-initial-fill.patch
index 86520e0647..86520e0647 100644
--- a/patches/server/0692-Fire-CauldronLevelChange-on-initial-fill.patch
+++ b/patches/server/0691-Fire-CauldronLevelChange-on-initial-fill.patch
diff --git a/patches/server/0693-fix-powder-snow-cauldrons-not-turning-to-water.patch b/patches/server/0692-fix-powder-snow-cauldrons-not-turning-to-water.patch
index 201c323a35..201c323a35 100644
--- a/patches/server/0693-fix-powder-snow-cauldrons-not-turning-to-water.patch
+++ b/patches/server/0692-fix-powder-snow-cauldrons-not-turning-to-water.patch
diff --git a/patches/server/0694-Add-PlayerStopUsingItemEvent.patch b/patches/server/0693-Add-PlayerStopUsingItemEvent.patch
index c7cab9712f..2e1c8f29d0 100644
--- a/patches/server/0694-Add-PlayerStopUsingItemEvent.patch
+++ b/patches/server/0693-Add-PlayerStopUsingItemEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 0aa7291b3c28c58767fed5f9f01e381b671b5d27..d41c0f1aa501cbe17c88029bafbe034901f6d562 100644
+index 8b454382f59ee36ec6f45ca8445b3f1a956ff668..786ac2127bc743cf2a33776314a4b5c197f35538 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4204,6 +4204,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4202,6 +4202,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public void releaseUsingItem() {
if (!this.useItem.isEmpty()) {
diff --git a/patches/server/0695-Don-t-tick-markers.patch b/patches/server/0694-Don-t-tick-markers.patch
index c20ce60044..e5c290a988 100644
--- a/patches/server/0695-Don-t-tick-markers.patch
+++ b/patches/server/0694-Don-t-tick-markers.patch
@@ -23,10 +23,10 @@ index 67fcba634f8183bb33834ac3b2c3dcfb8d87129e..777b789fdcdf297309cfb36fc7f77e3f
}
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 9ac6d2e87bbad00c9b97028b0e9c2a42cf29801b..cb33c53d441d2d535b48cb80f5ac445b52cd98be 100644
+index 2d77e9526917a83987ae0486a669538d5417b781..f4b1b5f1903015b3c4650186466c8183560c9de0 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2249,6 +2249,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2219,6 +2219,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
public void onTickingStart(Entity entity) {
diff --git a/patches/server/0696-Expand-FallingBlock-API.patch b/patches/server/0695-Expand-FallingBlock-API.patch
index 7992fef972..7992fef972 100644
--- a/patches/server/0696-Expand-FallingBlock-API.patch
+++ b/patches/server/0695-Expand-FallingBlock-API.patch
diff --git a/patches/server/0697-Add-support-for-Proxy-Protocol.patch b/patches/server/0696-Add-support-for-Proxy-Protocol.patch
index 5d35c10858..5d35c10858 100644
--- a/patches/server/0697-Add-support-for-Proxy-Protocol.patch
+++ b/patches/server/0696-Add-support-for-Proxy-Protocol.patch
diff --git a/patches/server/0698-Fix-OfflinePlayer-getBedSpawnLocation.patch b/patches/server/0697-Fix-OfflinePlayer-getBedSpawnLocation.patch
index 4726c2f65c..4726c2f65c 100644
--- a/patches/server/0698-Fix-OfflinePlayer-getBedSpawnLocation.patch
+++ b/patches/server/0697-Fix-OfflinePlayer-getBedSpawnLocation.patch
diff --git a/patches/server/0699-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch b/patches/server/0698-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch
index 7158b83635..7158b83635 100644
--- a/patches/server/0699-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch
+++ b/patches/server/0698-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch
diff --git a/patches/server/0700-Sanitize-sent-BlockEntity-NBT.patch b/patches/server/0699-Sanitize-sent-BlockEntity-NBT.patch
index e9d1e188af..60a49fa4ef 100644
--- a/patches/server/0700-Sanitize-sent-BlockEntity-NBT.patch
+++ b/patches/server/0699-Sanitize-sent-BlockEntity-NBT.patch
@@ -30,10 +30,10 @@ index ac900dfdc5c90e9e60d47efa734be8f0a5b20dca..ec1cb034d840633240f2b379b09f7d2f
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 3de01d92e1c97e287a1f0d1f8de81b4f530b4a84..63e234fb72952dcede4eeaa5d3d3390d137d88a2 100644
+index 09b85c4caa4ebaae1e8c2910b090c40a039a1be7..645a7ec0709cbd3c0cfbf75f7b8622a67515f74c 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -395,6 +395,14 @@ public abstract class BlockEntity {
+@@ -390,6 +390,14 @@ public abstract class BlockEntity {
}
// CraftBukkit end
diff --git a/patches/server/0701-Disable-component-selector-resolving-in-books-by-def.patch b/patches/server/0700-Disable-component-selector-resolving-in-books-by-def.patch
index 7231198032..7231198032 100644
--- a/patches/server/0701-Disable-component-selector-resolving-in-books-by-def.patch
+++ b/patches/server/0700-Disable-component-selector-resolving-in-books-by-def.patch
diff --git a/patches/server/0702-Prevent-entity-loading-causing-async-lookups.patch b/patches/server/0701-Prevent-entity-loading-causing-async-lookups.patch
index 97d528c05a..97d528c05a 100644
--- a/patches/server/0702-Prevent-entity-loading-causing-async-lookups.patch
+++ b/patches/server/0701-Prevent-entity-loading-causing-async-lookups.patch
diff --git a/patches/server/0703-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0702-Throw-exception-on-world-create-while-being-ticked.patch
index 8b66f840f1..75ec8c003c 100644
--- a/patches/server/0703-Throw-exception-on-world-create-while-being-ticked.patch
+++ b/patches/server/0702-Throw-exception-on-world-create-while-being-ticked.patch
@@ -7,10 +7,10 @@ There are no plans to support creating worlds while worlds are
being ticked themselvess.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 3b0f7e7a5bea786f1189d6e47d8dfd7107d66a53..8fe1514bdc6b2e81a10e445952bd71afa5892552 100644
+index a836ea518bc6d8ddd7c6484038d3d712b3fb13cf..aa9a4a0f35d0200777bdc83520ba82a970bfa900 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -328,6 +328,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -327,6 +327,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final double[] recentTps = new double[ 3 ];
// Spigot end
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
@@ -18,37 +18,37 @@ index 3b0f7e7a5bea786f1189d6e47d8dfd7107d66a53..8fe1514bdc6b2e81a10e445952bd71af
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
-@@ -1659,7 +1660,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1627,7 +1628,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ gameprofilerfiller.push("commandFunctions");
this.getFunctions().tick();
- MinecraftTimings.commandFunctionsTimer.stopTiming(); // Spigot // Paper
gameprofilerfiller.popPush("levels");
- Iterator iterator = this.getAllLevels().iterator();
+ //Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
// CraftBukkit start
// Run tasks that are waiting on processing
-@@ -1691,6 +1692,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- // Paper end - Perf: Optimize time updates
- MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
+@@ -1655,6 +1656,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ }
+ }
+ this.isIteratingOverLevels = true; // Paper - Throw exception on world create while being ticked
+ Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; move down
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
-@@ -1725,6 +1728,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1687,6 +1690,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
gameprofilerfiller.pop();
gameprofilerfiller.pop();
}
+ this.isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
gameprofilerfiller.popPush("connection");
- MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
+ this.tickConnection();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index d0a72476d36294792550425a8c0646a7c0be75a7..f2898c356182fee8a1f525ab762d9c126d2108fc 100644
+index 6ba912570ea66c3b0747beb4c168e351904cc31e..2d16e96c7c329cde6369f1d5b739f60f1776bb4b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -920,6 +920,11 @@ public final class CraftServer implements Server {
+@@ -919,6 +919,11 @@ public final class CraftServer implements Server {
return new ArrayList<World>(this.worlds.values());
}
@@ -60,7 +60,7 @@ index d0a72476d36294792550425a8c0646a7c0be75a7..f2898c356182fee8a1f525ab762d9c12
public DedicatedPlayerList getHandle() {
return this.playerList;
}
-@@ -1183,6 +1188,7 @@ public final class CraftServer implements Server {
+@@ -1182,6 +1187,7 @@ public final class CraftServer implements Server {
@Override
public World createWorld(WorldCreator creator) {
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
@@ -68,7 +68,7 @@ index d0a72476d36294792550425a8c0646a7c0be75a7..f2898c356182fee8a1f525ab762d9c12
Preconditions.checkArgument(creator != null, "WorldCreator cannot be null");
String name = creator.name();
-@@ -1359,6 +1365,7 @@ public final class CraftServer implements Server {
+@@ -1358,6 +1364,7 @@ public final class CraftServer implements Server {
@Override
public boolean unloadWorld(World world, boolean save) {
diff --git a/patches/server/0704-Dont-resent-entity-on-art-update.patch b/patches/server/0703-Dont-resent-entity-on-art-update.patch
index 38d1a4ca58..38d1a4ca58 100644
--- a/patches/server/0704-Dont-resent-entity-on-art-update.patch
+++ b/patches/server/0703-Dont-resent-entity-on-art-update.patch
diff --git a/patches/server/0705-Add-WardenAngerChangeEvent.patch b/patches/server/0704-Add-WardenAngerChangeEvent.patch
index ca2817ab51..ca2817ab51 100644
--- a/patches/server/0705-Add-WardenAngerChangeEvent.patch
+++ b/patches/server/0704-Add-WardenAngerChangeEvent.patch
diff --git a/patches/server/0706-Add-option-for-strict-advancement-dimension-checks.patch b/patches/server/0705-Add-option-for-strict-advancement-dimension-checks.patch
index ca19dca53f..ca19dca53f 100644
--- a/patches/server/0706-Add-option-for-strict-advancement-dimension-checks.patch
+++ b/patches/server/0705-Add-option-for-strict-advancement-dimension-checks.patch
diff --git a/patches/server/0707-Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/0706-Add-missing-important-BlockStateListPopulator-method.patch
index e0b94dc4ac..e0b94dc4ac 100644
--- a/patches/server/0707-Add-missing-important-BlockStateListPopulator-method.patch
+++ b/patches/server/0706-Add-missing-important-BlockStateListPopulator-method.patch
diff --git a/patches/server/0708-Nameable-Banner-API.patch b/patches/server/0707-Nameable-Banner-API.patch
index aab360dbed..aab360dbed 100644
--- a/patches/server/0708-Nameable-Banner-API.patch
+++ b/patches/server/0707-Nameable-Banner-API.patch
diff --git a/patches/server/0709-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0708-Don-t-broadcast-messages-to-command-blocks.patch
index dc36254227..428c5de1aa 100644
--- a/patches/server/0709-Don-t-broadcast-messages-to-command-blocks.patch
+++ b/patches/server/0708-Don-t-broadcast-messages-to-command-blocks.patch
@@ -20,10 +20,10 @@ index a0e59b236dff1f861a0e987764a77ee203504412..5cb39f95bd2d45b6c18554605f01d2eb
Date date = new Date();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index f2898c356182fee8a1f525ab762d9c126d2108fc..0c037618005265ed6b9533ea60848753141d8e0b 100644
+index 2d16e96c7c329cde6369f1d5b739f60f1776bb4b..3deb58f3cd2e29b51944ac81cb3e0e52ec496242 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1929,7 +1929,7 @@ public final class CraftServer implements Server {
+@@ -1928,7 +1928,7 @@ public final class CraftServer implements Server {
// Paper end
Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
diff --git a/patches/server/0710-Prevent-empty-items-from-being-added-to-world.patch b/patches/server/0709-Prevent-empty-items-from-being-added-to-world.patch
index 9c65327919..4b6241c770 100644
--- a/patches/server/0710-Prevent-empty-items-from-being-added-to-world.patch
+++ b/patches/server/0709-Prevent-empty-items-from-being-added-to-world.patch
@@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca
Just simply prevent them from being added to the world instead.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index cb33c53d441d2d535b48cb80f5ac445b52cd98be..f9f00a3862ab829e7695b1da484cb752bdef5c4f 100644
+index f4b1b5f1903015b3c4650186466c8183560c9de0..f3f93e8cbc2a5c9d0a3841ec7de010477bfd976a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1230,6 +1230,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1200,6 +1200,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
} else {
diff --git a/patches/server/0711-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch b/patches/server/0710-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch
index c2e21a749e..c2e21a749e 100644
--- a/patches/server/0711-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch
+++ b/patches/server/0710-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch
diff --git a/patches/server/0712-Add-Player-getFishHook.patch b/patches/server/0711-Add-Player-getFishHook.patch
index b2f8e7f0eb..b2f8e7f0eb 100644
--- a/patches/server/0712-Add-Player-getFishHook.patch
+++ b/patches/server/0711-Add-Player-getFishHook.patch
diff --git a/patches/server/0713-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch b/patches/server/0712-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch
index 32aaf6dc6e..32aaf6dc6e 100644
--- a/patches/server/0713-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch
+++ b/patches/server/0712-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch
diff --git a/patches/server/0714-Add-various-missing-EntityDropItemEvent-calls.patch b/patches/server/0713-Add-various-missing-EntityDropItemEvent-calls.patch
index 8e1fc7a091..8e1fc7a091 100644
--- a/patches/server/0714-Add-various-missing-EntityDropItemEvent-calls.patch
+++ b/patches/server/0713-Add-various-missing-EntityDropItemEvent-calls.patch
diff --git a/patches/server/0715-Fix-Bee-flower-NPE.patch b/patches/server/0714-Fix-Bee-flower-NPE.patch
index d84bd3a355..d84bd3a355 100644
--- a/patches/server/0715-Fix-Bee-flower-NPE.patch
+++ b/patches/server/0714-Fix-Bee-flower-NPE.patch
diff --git a/patches/server/0716-More-Teleport-API.patch b/patches/server/0715-More-Teleport-API.patch
index c2d39bdc63..7f4fab5c30 100644
--- a/patches/server/0716-More-Teleport-API.patch
+++ b/patches/server/0715-More-Teleport-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] More Teleport API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index ac2ad33a44ce04d9673adc08ff21a167d606e4db..349da8b85b7a122977fcad80a399605109b88db2 100644
+index bc8f9bd50de3894e6262e13ed55252c98f22ed8a..4d64eedfbe5b967572b7140ddfb55efa1ccc3650 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1585,11 +1585,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0717-Add-EntityPortalReadyEvent.patch b/patches/server/0716-Add-EntityPortalReadyEvent.patch
index 46f19b8cc8..46f19b8cc8 100644
--- a/patches/server/0717-Add-EntityPortalReadyEvent.patch
+++ b/patches/server/0716-Add-EntityPortalReadyEvent.patch
diff --git a/patches/server/0718-Don-t-use-level-random-in-entity-constructors.patch b/patches/server/0717-Don-t-use-level-random-in-entity-constructors.patch
index 9ec489bd3e..9ec489bd3e 100644
--- a/patches/server/0718-Don-t-use-level-random-in-entity-constructors.patch
+++ b/patches/server/0717-Don-t-use-level-random-in-entity-constructors.patch
diff --git a/patches/server/0719-Send-block-entities-after-destroy-prediction.patch b/patches/server/0718-Send-block-entities-after-destroy-prediction.patch
index 2742769b83..6fcd859761 100644
--- a/patches/server/0719-Send-block-entities-after-destroy-prediction.patch
+++ b/patches/server/0718-Send-block-entities-after-destroy-prediction.patch
@@ -57,7 +57,7 @@ index 5c3e5c348e6fececccd8097355f423b9e7ad982b..064a7a3e1c4d192010e072a5e985a541
}
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 349da8b85b7a122977fcad80a399605109b88db2..32ed76fca856b7d121e2215748be4f6d1b18791a 100644
+index 4d64eedfbe5b967572b7140ddfb55efa1ccc3650..b48966424fb8e937552c0e7bffaedaefc63ef77f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1723,8 +1723,28 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0720-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0719-Warn-on-plugins-accessing-faraway-chunks.patch
index c1e4213d1c..2b2ca909d0 100644
--- a/patches/server/0720-Warn-on-plugins-accessing-faraway-chunks.patch
+++ b/patches/server/0719-Warn-on-plugins-accessing-faraway-chunks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 8269bf24f5e17f9e3936659aa0cbc9d4f95fb665..a6f538372830f3f80740ef503733736e0561d1bd 100644
+index 9afc0eaaca5ab7b6445d90ce53e31a6ae76f8848..f0c2187a92de633a1d4cc7e71ff62cbe30ce8774 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -339,7 +339,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -337,7 +337,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
private static boolean isInWorldBoundsHorizontal(BlockPos pos) {
diff --git a/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch b/patches/server/0720-Custom-Chat-Completion-Suggestions-API.patch
index 9908dc279c..9908dc279c 100644
--- a/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch
+++ b/patches/server/0720-Custom-Chat-Completion-Suggestions-API.patch
diff --git a/patches/server/0722-Add-and-fix-missing-BlockFadeEvents.patch b/patches/server/0721-Add-and-fix-missing-BlockFadeEvents.patch
index 1ac5d1e5ab..1ac5d1e5ab 100644
--- a/patches/server/0722-Add-and-fix-missing-BlockFadeEvents.patch
+++ b/patches/server/0721-Add-and-fix-missing-BlockFadeEvents.patch
diff --git a/patches/server/0723-Collision-API.patch b/patches/server/0722-Collision-API.patch
index 6f4b6366a8..6f4b6366a8 100644
--- a/patches/server/0723-Collision-API.patch
+++ b/patches/server/0722-Collision-API.patch
diff --git a/patches/server/0724-Fix-suggest-command-message-for-brigadier-syntax-exc.patch b/patches/server/0723-Fix-suggest-command-message-for-brigadier-syntax-exc.patch
index 34f5fa3e3d..34f5fa3e3d 100644
--- a/patches/server/0724-Fix-suggest-command-message-for-brigadier-syntax-exc.patch
+++ b/patches/server/0723-Fix-suggest-command-message-for-brigadier-syntax-exc.patch
diff --git a/patches/server/0725-Block-Ticking-API.patch b/patches/server/0724-Block-Ticking-API.patch
index c2a5c23d6c..c2a5c23d6c 100644
--- a/patches/server/0725-Block-Ticking-API.patch
+++ b/patches/server/0724-Block-Ticking-API.patch
diff --git a/patches/server/0726-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0725-Add-Velocity-IP-Forwarding-Support.patch
index cba81cdb0f..d5eb9544e5 100644
--- a/patches/server/0726-Add-Velocity-IP-Forwarding-Support.patch
+++ b/patches/server/0725-Add-Velocity-IP-Forwarding-Support.patch
@@ -106,10 +106,10 @@ index 0000000000000000000000000000000000000000..1b797955357612a4319452de7461ba04
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 3c3be48b29fcd38c5dea1bfca8d8690850aa948e..4037a1057ebc87e3df6333e0d546fc85b5148d2a 100644
+index ac7fc2497b860a143ef08498f5f477a373a29be7..4e47611f85f3db6a638d0fc6a0dd712b245cf229 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -290,13 +290,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -288,13 +288,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.STARTUP);
// CraftBukkit end
@@ -228,10 +228,10 @@ index cb5dd77892283a1aaec45434fb99bb7f08ee5394..4a89b73d972f366e70f4d2bd96c6ee41
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 0c037618005265ed6b9533ea60848753141d8e0b..ff7bd67f593bbaabb5eb4c2b845acb2d428f1670 100644
+index 3deb58f3cd2e29b51944ac81cb3e0e52ec496242..b84dc11212aba4c06375cdbefa91c09d86a2b957 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -849,7 +849,7 @@ public final class CraftServer implements Server {
+@@ -848,7 +848,7 @@ public final class CraftServer implements Server {
@Override
public long getConnectionThrottle() {
// Spigot Start - Automatically set connection throttle for bungee configurations
diff --git a/patches/server/0727-Add-NamespacedKey-biome-methods.patch b/patches/server/0726-Add-NamespacedKey-biome-methods.patch
index 547d0fb0b7..015b2064d9 100644
--- a/patches/server/0727-Add-NamespacedKey-biome-methods.patch
+++ b/patches/server/0726-Add-NamespacedKey-biome-methods.patch
@@ -6,14 +6,14 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 8d51786837448db1a96d0071293025d07e14c225..9e0af05e066132b66fafff84ff0a0957c1a44f9f 100644
+index 1ab160c3d042be43df3bd19d095534b91c4c2f71..9f4124485dac3d029ec8247b64098042aa1a48d2 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -584,6 +584,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -587,6 +587,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
+ var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.getValue(CraftNamespacedKey.toMinecraft(bukkitEntityKey)));
+ return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier);
}
- // Paper end
-
-+ // Paper start - namespaced key biome methods
++
+ @Override
+ public org.bukkit.NamespacedKey getBiomeKey(org.bukkit.RegionAccessor accessor, int x, int y, int z) {
+ org.bukkit.craftbukkit.CraftRegionAccessor cra = (org.bukkit.craftbukkit.CraftRegionAccessor) accessor;
@@ -26,8 +26,6 @@ index 8d51786837448db1a96d0071293025d07e14c225..9e0af05e066132b66fafff84ff0a0957
+ net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biomeBase = cra.getHandle().registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME).getOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey)));
+ cra.setBiome(x, y, z, biomeBase);
+ }
-+ // Paper end - namespaced key biome methods
-+
- @Override
- public String get(Class<?> aClass, String s) {
- if (aClass == Enchantment.class) {
+ // Paper end
+
+ /**
diff --git a/patches/server/0728-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0727-Fix-plugin-loggers-on-server-shutdown.patch
index 5e13337ca6..7f6f4755d1 100644
--- a/patches/server/0728-Fix-plugin-loggers-on-server-shutdown.patch
+++ b/patches/server/0727-Fix-plugin-loggers-on-server-shutdown.patch
@@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 8fe1514bdc6b2e81a10e445952bd71afa5892552..57080f1343aa5408d70b320375813b00b205aafa 100644
+index aa9a4a0f35d0200777bdc83520ba82a970bfa900..cb40a2d855e7ac8c1c8b4ec679fd057a31f3fc6f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1279,6 +1279,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1277,6 +1277,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} catch (Exception ignored) {
}
// CraftBukkit end
diff --git a/patches/server/0729-Stop-large-look-changes-from-crashing-the-server.patch b/patches/server/0728-Stop-large-look-changes-from-crashing-the-server.patch
index 712c234903..028287678e 100644
--- a/patches/server/0729-Stop-large-look-changes-from-crashing-the-server.patch
+++ b/patches/server/0728-Stop-large-look-changes-from-crashing-the-server.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Stop large look changes from crashing the server
Co-authored-by: Jaren Knodel <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index d41c0f1aa501cbe17c88029bafbe034901f6d562..7705c791bfbb386f0b9f326c4b0ee0057ed0e6f5 100644
+index 786ac2127bc743cf2a33776314a4b5c197f35538..b367f6e329f44801c6f0d34f447497093d86ae3b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3272,37 +3272,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3270,37 +3270,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
gameprofilerfiller.pop();
gameprofilerfiller.push("rangeChecks");
diff --git a/patches/server/0730-Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/0729-Fire-EntityChangeBlockEvent-in-more-places.patch
index 1d46619357..1d46619357 100644
--- a/patches/server/0730-Fire-EntityChangeBlockEvent-in-more-places.patch
+++ b/patches/server/0729-Fire-EntityChangeBlockEvent-in-more-places.patch
diff --git a/patches/server/0731-Missing-eating-regain-reason.patch b/patches/server/0730-Missing-eating-regain-reason.patch
index 38626b6352..38626b6352 100644
--- a/patches/server/0731-Missing-eating-regain-reason.patch
+++ b/patches/server/0730-Missing-eating-regain-reason.patch
diff --git a/patches/server/0732-Missing-effect-cause.patch b/patches/server/0731-Missing-effect-cause.patch
index 6157121022..6157121022 100644
--- a/patches/server/0732-Missing-effect-cause.patch
+++ b/patches/server/0731-Missing-effect-cause.patch
diff --git a/patches/server/0733-Added-byte-array-serialization-deserialization-for-P.patch b/patches/server/0732-Added-byte-array-serialization-deserialization-for-P.patch
index f2a4d437f0..f2a4d437f0 100644
--- a/patches/server/0733-Added-byte-array-serialization-deserialization-for-P.patch
+++ b/patches/server/0732-Added-byte-array-serialization-deserialization-for-P.patch
diff --git a/patches/server/0734-Call-BlockPhysicsEvent-more-often.patch b/patches/server/0733-Call-BlockPhysicsEvent-more-often.patch
index ad24091f87..ad24091f87 100644
--- a/patches/server/0734-Call-BlockPhysicsEvent-more-often.patch
+++ b/patches/server/0733-Call-BlockPhysicsEvent-more-often.patch
diff --git a/patches/server/0735-Configurable-chat-thread-limit.patch b/patches/server/0734-Configurable-chat-thread-limit.patch
index 1432c06594..a02e95e2bf 100644
--- a/patches/server/0735-Configurable-chat-thread-limit.patch
+++ b/patches/server/0734-Configurable-chat-thread-limit.patch
@@ -22,10 +22,10 @@ is actually processed, this is honestly really just exposed for the misnomers or
who just wanna ensure that this won't grow over a specific size if chat gets stupidly active
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-index 904d2f96a60e72aa089fdfe6be08044b04f995c1..36b96e0ed5c0d25068ec4678eddd8a19a020d345 100644
+index c3fe4481dd35f80815716e48beeeb07b1f51e30b..56798215644d8bca1695856b3a941e8089f49e48 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-@@ -327,7 +327,18 @@ public class GlobalConfiguration extends ConfigurationPart {
+@@ -302,7 +302,18 @@ public class GlobalConfiguration extends ConfigurationPart {
@PostProcess
private void postProcess() {
diff --git a/patches/server/0736-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0735-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
index fb6e8b07ea..fb6e8b07ea 100644
--- a/patches/server/0736-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
+++ b/patches/server/0735-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
diff --git a/patches/server/0737-fix-Jigsaw-block-kicking-user.patch b/patches/server/0736-fix-Jigsaw-block-kicking-user.patch
index 749d498f57..749d498f57 100644
--- a/patches/server/0737-fix-Jigsaw-block-kicking-user.patch
+++ b/patches/server/0736-fix-Jigsaw-block-kicking-user.patch
diff --git a/patches/server/0738-use-BlockFormEvent-for-mud-converting-into-clay.patch b/patches/server/0737-use-BlockFormEvent-for-mud-converting-into-clay.patch
index 3159c4b594..3159c4b594 100644
--- a/patches/server/0738-use-BlockFormEvent-for-mud-converting-into-clay.patch
+++ b/patches/server/0737-use-BlockFormEvent-for-mud-converting-into-clay.patch
diff --git a/patches/server/0739-Add-getDrops-to-BlockState.patch b/patches/server/0738-Add-getDrops-to-BlockState.patch
index ea12f69bde..ea12f69bde 100644
--- a/patches/server/0739-Add-getDrops-to-BlockState.patch
+++ b/patches/server/0738-Add-getDrops-to-BlockState.patch
diff --git a/patches/server/0740-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch
index 69ca61a6dc..93ef32db8a 100644
--- a/patches/server/0740-Fix-a-bunch-of-vanilla-bugs.patch
+++ b/patches/server/0739-Fix-a-bunch-of-vanilla-bugs.patch
@@ -91,10 +91,10 @@ index 6854ca4d4fec2b4fa541c3fabf63787665572609..e7b444a10b244828827b3c66c5346520
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 75854574aa8d4aef35d84ba4c0fc7df9a67ae48c..3f3124bbb5077a18c3d3afac7748a47e84b8fe35 100644
+index b92a889d0b0c46c1fa247d770f303d7d37dfc36c..e1c69c3c8e4809c7ccd2e1e12ee8538ab4bd3d5c 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1080,7 +1080,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1078,7 +1078,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
@@ -104,10 +104,10 @@ index 75854574aa8d4aef35d84ba4c0fc7df9a67ae48c..3f3124bbb5077a18c3d3afac7748a47e
return this.anyPlayerCloseEnoughForSpawning(pos, false);
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index f9f00a3862ab829e7695b1da484cb752bdef5c4f..fbee72c0b6e7d73cb0a999330ac7871bb8a7d7e4 100644
+index f3f93e8cbc2a5c9d0a3841ec7de010477bfd976a..d01f42aad003c7b0ea5700d32109eed4a264fa4c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -764,7 +764,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -748,7 +748,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
} else {
AABB axisalignedbb = AABB.encapsulatingFullBlocks(blockposition1, blockposition1.atY(this.getMaxY() + 1)).inflate(3.0D);
List<LivingEntity> list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> {
@@ -130,7 +130,7 @@ index 064a7a3e1c4d192010e072a5e985a54135748d87..a706f0855fdf88cc9aece3ba00ef574b
this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit
this.level.updateSleepingPlayerList();
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 32ed76fca856b7d121e2215748be4f6d1b18791a..72ac67c6d42a1763fd63bd0d0db18ba709f48314 100644
+index b48966424fb8e937552c0e7bffaedaefc63ef77f..79eceb995f92b3f3d7b695dc6d2a0a4a824ce871 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1831,7 +1831,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -143,10 +143,10 @@ index 32ed76fca856b7d121e2215748be4f6d1b18791a..72ac67c6d42a1763fd63bd0d0db18ba7
MutableComponent ichatmutablecomponent1 = Component.translatable("build.tooHigh", i).withStyle(ChatFormatting.RED);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 0646e435e869b5cc067968feb09ff5c6a979a8a7..61c37bf5f75207085f22093e48986dab8231e1c1 100644
+index 3d741bd09cd2086aa63b77636fe3ecfc55577aad..6332d5e281bb355bee1a112d11e96ee26e337ebf 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -261,7 +261,7 @@ public abstract class PlayerList {
+@@ -260,7 +260,7 @@ public abstract class PlayerList {
}
if (optional.isEmpty() || invalidPlayerWorld[0]) {
// Paper end - reset to main world spawn if first spawn or invalid world
@@ -155,7 +155,7 @@ index 0646e435e869b5cc067968feb09ff5c6a979a8a7..61c37bf5f75207085f22093e48986dab
}
// Paper end - Entity#getEntitySpawnReason
player.setServerLevel(worldserver1);
-@@ -661,8 +661,10 @@ public abstract class PlayerList {
+@@ -660,8 +660,10 @@ public abstract class PlayerList {
Player player = entity.getBukkitEntity();
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress());
diff --git a/patches/server/0741-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0740-Remove-unnecessary-onTrackingStart-during-navigation.patch
index b26563ecdf..ad0baf535f 100644
--- a/patches/server/0741-Remove-unnecessary-onTrackingStart-during-navigation.patch
+++ b/patches/server/0740-Remove-unnecessary-onTrackingStart-during-navigation.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index fbee72c0b6e7d73cb0a999330ac7871bb8a7d7e4..18d39f4a8b1b15960a9b8351d46a62bea848f9c8 100644
+index d01f42aad003c7b0ea5700d32109eed4a264fa4c..45e61a08152517a61260e662764d8bb0335537e3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2267,7 +2267,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2237,7 +2237,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
if (entity instanceof Mob entityinsentient) {
@@ -17,7 +17,7 @@ index fbee72c0b6e7d73cb0a999330ac7871bb8a7d7e4..18d39f4a8b1b15960a9b8351d46a62be
String s = "onTrackingStart called during navigation iteration";
Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration"));
-@@ -2347,7 +2347,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2317,7 +2317,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
if (entity instanceof Mob entityinsentient) {
diff --git a/patches/server/0742-Fix-custom-piglin-loved-items.patch b/patches/server/0741-Fix-custom-piglin-loved-items.patch
index 358bd47f1e..358bd47f1e 100644
--- a/patches/server/0742-Fix-custom-piglin-loved-items.patch
+++ b/patches/server/0741-Fix-custom-piglin-loved-items.patch
diff --git a/patches/server/0743-EntityPickupItemEvent-fixes.patch b/patches/server/0742-EntityPickupItemEvent-fixes.patch
index 839a01673d..839a01673d 100644
--- a/patches/server/0743-EntityPickupItemEvent-fixes.patch
+++ b/patches/server/0742-EntityPickupItemEvent-fixes.patch
diff --git a/patches/server/0744-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0743-Correctly-handle-interactions-with-items-on-cooldown.patch
index a86affadb8..a86affadb8 100644
--- a/patches/server/0744-Correctly-handle-interactions-with-items-on-cooldown.patch
+++ b/patches/server/0743-Correctly-handle-interactions-with-items-on-cooldown.patch
diff --git a/patches/server/0745-Add-PlayerInventorySlotChangeEvent.patch b/patches/server/0744-Add-PlayerInventorySlotChangeEvent.patch
index cca34b90d0..cca34b90d0 100644
--- a/patches/server/0745-Add-PlayerInventorySlotChangeEvent.patch
+++ b/patches/server/0744-Add-PlayerInventorySlotChangeEvent.patch
diff --git a/patches/server/0746-Elder-Guardian-appearance-API.patch b/patches/server/0745-Elder-Guardian-appearance-API.patch
index 772a3c2cd3..772a3c2cd3 100644
--- a/patches/server/0746-Elder-Guardian-appearance-API.patch
+++ b/patches/server/0745-Elder-Guardian-appearance-API.patch
diff --git a/patches/server/0747-Add-entity-knockback-API.patch b/patches/server/0746-Add-entity-knockback-API.patch
index 71f4427274..71f4427274 100644
--- a/patches/server/0747-Add-entity-knockback-API.patch
+++ b/patches/server/0746-Add-entity-knockback-API.patch
diff --git a/patches/server/0748-Detect-headless-JREs.patch b/patches/server/0747-Detect-headless-JREs.patch
index e680b6146f..e680b6146f 100644
--- a/patches/server/0748-Detect-headless-JREs.patch
+++ b/patches/server/0747-Detect-headless-JREs.patch
diff --git a/patches/server/0749-fix-entity-vehicle-collision-event-not-called.patch b/patches/server/0748-fix-entity-vehicle-collision-event-not-called.patch
index 9b38b32086..9b38b32086 100644
--- a/patches/server/0749-fix-entity-vehicle-collision-event-not-called.patch
+++ b/patches/server/0748-fix-entity-vehicle-collision-event-not-called.patch
diff --git a/patches/server/0750-Add-EntityToggleSitEvent.patch b/patches/server/0749-Add-EntityToggleSitEvent.patch
index 7bab6af93d..7bab6af93d 100644
--- a/patches/server/0750-Add-EntityToggleSitEvent.patch
+++ b/patches/server/0749-Add-EntityToggleSitEvent.patch
diff --git a/patches/server/0751-Add-fire-tick-delay-option.patch b/patches/server/0750-Add-fire-tick-delay-option.patch
index 7db107dee9..7db107dee9 100644
--- a/patches/server/0751-Add-fire-tick-delay-option.patch
+++ b/patches/server/0750-Add-fire-tick-delay-option.patch
diff --git a/patches/server/0752-Add-Moving-Piston-API.patch b/patches/server/0751-Add-Moving-Piston-API.patch
index e3d3955822..e3d3955822 100644
--- a/patches/server/0752-Add-Moving-Piston-API.patch
+++ b/patches/server/0751-Add-Moving-Piston-API.patch
diff --git a/patches/server/0753-Ignore-impossible-spawn-tick.patch b/patches/server/0752-Ignore-impossible-spawn-tick.patch
index ee2750f36d..ee2750f36d 100644
--- a/patches/server/0753-Ignore-impossible-spawn-tick.patch
+++ b/patches/server/0752-Ignore-impossible-spawn-tick.patch
diff --git a/patches/server/0754-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch b/patches/server/0753-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch
index 2fe35c8b32..2fe35c8b32 100644
--- a/patches/server/0754-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch
+++ b/patches/server/0753-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch
diff --git a/patches/server/0755-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0754-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch
index ab6fac6da3..ab6fac6da3 100644
--- a/patches/server/0755-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch
+++ b/patches/server/0754-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch
diff --git a/patches/server/0756-Add-PrePlayerAttackEntityEvent.patch b/patches/server/0755-Add-PrePlayerAttackEntityEvent.patch
index 5a925374e5..5a925374e5 100644
--- a/patches/server/0756-Add-PrePlayerAttackEntityEvent.patch
+++ b/patches/server/0755-Add-PrePlayerAttackEntityEvent.patch
diff --git a/patches/server/0757-ensure-reset-EnderDragon-boss-event-name.patch b/patches/server/0756-ensure-reset-EnderDragon-boss-event-name.patch
index 4c5db1221b..4c5db1221b 100644
--- a/patches/server/0757-ensure-reset-EnderDragon-boss-event-name.patch
+++ b/patches/server/0756-ensure-reset-EnderDragon-boss-event-name.patch
diff --git a/patches/server/0758-Add-Player-Warden-Warning-API.patch b/patches/server/0757-Add-Player-Warden-Warning-API.patch
index 2ce951d036..2ce951d036 100644
--- a/patches/server/0758-Add-Player-Warden-Warning-API.patch
+++ b/patches/server/0757-Add-Player-Warden-Warning-API.patch
diff --git a/patches/server/0759-More-vanilla-friendly-methods-to-update-trades.patch b/patches/server/0758-More-vanilla-friendly-methods-to-update-trades.patch
index b3901a0ae7..b3901a0ae7 100644
--- a/patches/server/0759-More-vanilla-friendly-methods-to-update-trades.patch
+++ b/patches/server/0758-More-vanilla-friendly-methods-to-update-trades.patch
diff --git a/patches/server/0760-Add-paper-dumplisteners-command.patch b/patches/server/0759-Add-paper-dumplisteners-command.patch
index aabb60033d..aabb60033d 100644
--- a/patches/server/0760-Add-paper-dumplisteners-command.patch
+++ b/patches/server/0759-Add-paper-dumplisteners-command.patch
diff --git a/patches/server/0761-check-global-player-list-where-appropriate.patch b/patches/server/0760-check-global-player-list-where-appropriate.patch
index e96a666062..393c169165 100644
--- a/patches/server/0761-check-global-player-list-where-appropriate.patch
+++ b/patches/server/0760-check-global-player-list-where-appropriate.patch
@@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player
instead of just checking players in their world.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 18d39f4a8b1b15960a9b8351d46a62bea848f9c8..79acbaf880d5f47efd210627a60ce1e930b63e39 100644
+index 45e61a08152517a61260e662764d8bb0335537e3..b81d814619e4175f42aee397811b07cae420c2e8 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2383,4 +2383,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2353,4 +2353,12 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
entity.updateDynamicGameEventListener(DynamicGameEventListener::move);
}
}
@@ -24,10 +24,10 @@ index 18d39f4a8b1b15960a9b8351d46a62bea848f9c8..79acbaf880d5f47efd210627a60ce1e9
+ // Paper end - check global player list where appropriate
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 7705c791bfbb386f0b9f326c4b0ee0057ed0e6f5..2c343617f9467bbef03f4d131ce94b1f1a090a80 100644
+index b367f6e329f44801c6f0d34f447497093d86ae3b..5330f6315cecfa6afd04b711a5b8656717cb5ede 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3867,7 +3867,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3865,7 +3865,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void onItemPickup(ItemEntity item) {
diff --git a/patches/server/0762-Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/0761-Fix-async-entity-add-due-to-fungus-trees.patch
index 009feeb37a..009feeb37a 100644
--- a/patches/server/0762-Fix-async-entity-add-due-to-fungus-trees.patch
+++ b/patches/server/0761-Fix-async-entity-add-due-to-fungus-trees.patch
diff --git a/patches/server/0763-ItemStack-damage-API.patch b/patches/server/0762-ItemStack-damage-API.patch
index 55e7f06af1..55e7f06af1 100644
--- a/patches/server/0763-ItemStack-damage-API.patch
+++ b/patches/server/0762-ItemStack-damage-API.patch
diff --git a/patches/server/0764-Friction-API.patch b/patches/server/0763-Friction-API.patch
index 469868818a..25f88d845f 100644
--- a/patches/server/0764-Friction-API.patch
+++ b/patches/server/0763-Friction-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Friction API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 2c343617f9467bbef03f4d131ce94b1f1a090a80..5520d0cdd5af75a6188a68f809aafb6c5880878a 100644
+index 5330f6315cecfa6afd04b711a5b8656717cb5ede..8b0a764984f886b711cb337a7f70608167916bf3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -298,6 +298,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -296,6 +296,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public boolean bukkitPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event
@@ -16,7 +16,7 @@ index 2c343617f9467bbef03f4d131ce94b1f1a090a80..5520d0cdd5af75a6188a68f809aafb6c
@Override
public float getBukkitYaw() {
-@@ -724,7 +725,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -722,7 +723,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public boolean shouldDiscardFriction() {
@@ -25,7 +25,7 @@ index 2c343617f9467bbef03f4d131ce94b1f1a090a80..5520d0cdd5af75a6188a68f809aafb6c
}
public void setDiscardFriction(boolean noDrag) {
-@@ -798,6 +799,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -796,6 +797,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
@@ -37,7 +37,7 @@ index 2c343617f9467bbef03f4d131ce94b1f1a090a80..5520d0cdd5af75a6188a68f809aafb6c
nbt.putFloat("Health", this.getHealth());
nbt.putShort("HurtTime", (short) this.hurtTime);
nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp);
-@@ -841,6 +847,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -839,6 +845,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.internalSetAbsorptionAmount(absorptionAmount);
// Paper end - Check for NaN
diff --git a/patches/server/0765-Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/0764-Ability-to-control-player-s-insomnia-and-phantoms.patch
index 0b482955d5..0b482955d5 100644
--- a/patches/server/0765-Ability-to-control-player-s-insomnia-and-phantoms.patch
+++ b/patches/server/0764-Ability-to-control-player-s-insomnia-and-phantoms.patch
diff --git a/patches/server/0766-Fix-premature-player-kicks-on-shutdown.patch b/patches/server/0765-Fix-premature-player-kicks-on-shutdown.patch
index 2c4fc7c2c0..5a0d9d65c0 100644
--- a/patches/server/0766-Fix-premature-player-kicks-on-shutdown.patch
+++ b/patches/server/0765-Fix-premature-player-kicks-on-shutdown.patch
@@ -47,10 +47,10 @@ index 4d9f1fc884050993287adfa4578a87da710623fb..a8dfe7a4b3d01bf75587be078f471d1e
this.disconnect((Component) Component.translatable("multiplayer.disconnect.server_shutdown"));
} catch (ClassCastException classcastexception) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 57080f1343aa5408d70b320375813b00b205aafa..736ff3988d66b8694475d5f62673da61fcb76179 100644
+index cb40a2d855e7ac8c1c8b4ec679fd057a31f3fc6f..8f7a808b0c89953a7f2932e68e2c85f9330469f2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2171,7 +2171,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2127,7 +2127,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public void executeIfPossible(Runnable runnable) {
if (this.isStopped()) {
diff --git a/patches/server/0767-Sync-offhand-slot-in-menus.patch b/patches/server/0766-Sync-offhand-slot-in-menus.patch
index b8a6ce0108..b8a6ce0108 100644
--- a/patches/server/0767-Sync-offhand-slot-in-menus.patch
+++ b/patches/server/0766-Sync-offhand-slot-in-menus.patch
diff --git a/patches/server/0768-Player-Entity-Tracking-Events.patch b/patches/server/0767-Player-Entity-Tracking-Events.patch
index e3837eb40f..8010e7f0d6 100644
--- a/patches/server/0768-Player-Entity-Tracking-Events.patch
+++ b/patches/server/0767-Player-Entity-Tracking-Events.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 3f3124bbb5077a18c3d3afac7748a47e84b8fe35..7810df9c5045a78c2731ee416366da4f973e5d29 100644
+index e1c69c3c8e4809c7ccd2e1e12ee8538ab4bd3d5c..53e180e230d5a1652f3e19193243c37095d6b39e 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1592,7 +1592,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1586,7 +1586,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// CraftBukkit end
if (flag) {
if (this.seenBy.add(player.connection)) {
diff --git a/patches/server/0769-Limit-pet-look-distance.patch b/patches/server/0768-Limit-pet-look-distance.patch
index 983f861539..983f861539 100644
--- a/patches/server/0769-Limit-pet-look-distance.patch
+++ b/patches/server/0768-Limit-pet-look-distance.patch
diff --git a/patches/server/0770-fix-Instruments.patch b/patches/server/0769-fix-Instruments.patch
index ff46175c0f..ff46175c0f 100644
--- a/patches/server/0770-fix-Instruments.patch
+++ b/patches/server/0769-fix-Instruments.patch
diff --git a/patches/server/0771-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/0770-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch
index 6825374465..6825374465 100644
--- a/patches/server/0771-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch
+++ b/patches/server/0770-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch
diff --git a/patches/server/0772-Add-BlockLockCheckEvent.patch b/patches/server/0771-Add-BlockLockCheckEvent.patch
index b06f734eb2..b06f734eb2 100644
--- a/patches/server/0772-Add-BlockLockCheckEvent.patch
+++ b/patches/server/0771-Add-BlockLockCheckEvent.patch
diff --git a/patches/server/0773-Add-Sneaking-API-for-Entities.patch b/patches/server/0772-Add-Sneaking-API-for-Entities.patch
index 40141ca398..40141ca398 100644
--- a/patches/server/0773-Add-Sneaking-API-for-Entities.patch
+++ b/patches/server/0772-Add-Sneaking-API-for-Entities.patch
diff --git a/patches/server/0774-Improve-logging-and-errors.patch b/patches/server/0773-Improve-logging-and-errors.patch
index d8fff73a33..1388f4a8b5 100644
--- a/patches/server/0774-Improve-logging-and-errors.patch
+++ b/patches/server/0773-Improve-logging-and-errors.patch
@@ -40,10 +40,10 @@ index 0828deee077a08db8e3fe5c870f9c242b4c550cf..5c8cf225d936617b6c8d265527a19bdf
while (iterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 4037a1057ebc87e3df6333e0d546fc85b5148d2a..eb9dab7be7da11ab1c4046a7fc4a29d5bddf31d2 100644
+index 4e47611f85f3db6a638d0fc6a0dd712b245cf229..ebe6a002d883721d80cbfcc004064e8a57934a56 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -281,6 +281,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -279,6 +279,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!");
DedicatedServer.LOGGER.warn("The exception was: {}", ioexception.toString());
DedicatedServer.LOGGER.warn("Perhaps a server is already running on that port?");
@@ -52,10 +52,10 @@ index 4037a1057ebc87e3df6333e0d546fc85b5148d2a..eb9dab7be7da11ab1c4046a7fc4a29d5
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 72ac67c6d42a1763fd63bd0d0db18ba709f48314..6f3e25d41420b5e54721e88c84fd3194d6170b9a 100644
+index 79eceb995f92b3f3d7b695dc6d2a0a4a824ce871..345d5069d0ebb8ad74158334fd230d0ea64b909d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3451,7 +3451,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3448,7 +3448,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator));
} catch (ProfilePublicKey.ValidationException profilepublickey_b) {
diff --git a/patches/server/0775-Improve-PortalEvents.patch b/patches/server/0774-Improve-PortalEvents.patch
index a4cf96f882..a4cf96f882 100644
--- a/patches/server/0775-Improve-PortalEvents.patch
+++ b/patches/server/0774-Improve-PortalEvents.patch
diff --git a/patches/server/0776-Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/0775-Add-config-option-for-spider-worldborder-climbing.patch
index 6d4efc38b6..6d4efc38b6 100644
--- a/patches/server/0776-Add-config-option-for-spider-worldborder-climbing.patch
+++ b/patches/server/0775-Add-config-option-for-spider-worldborder-climbing.patch
diff --git a/patches/server/0777-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0776-Add-missing-SpigotConfig-logCommands-check.patch
index 1bd83dc7d8..73e77aed11 100644
--- a/patches/server/0777-Add-missing-SpigotConfig-logCommands-check.patch
+++ b/patches/server/0776-Add-missing-SpigotConfig-logCommands-check.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
Co-authored-by: david <[email protected]>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 6f3e25d41420b5e54721e88c84fd3194d6170b9a..59b64ea82c84ff7d9b9123473b4466ec01918cd2 100644
+index 345d5069d0ebb8ad74158334fd230d0ea64b909d..af8a513c2692b71ad56abce24048b61eb78d41c4 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2078,7 +2078,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0778-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch b/patches/server/0777-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch
index 581ad00ec1..581ad00ec1 100644
--- a/patches/server/0778-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch
+++ b/patches/server/0777-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch
diff --git a/patches/server/0779-Flying-Fall-Damage.patch b/patches/server/0778-Flying-Fall-Damage.patch
index a09b209fd2..a09b209fd2 100644
--- a/patches/server/0779-Flying-Fall-Damage.patch
+++ b/patches/server/0778-Flying-Fall-Damage.patch
diff --git a/patches/server/0780-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0779-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
index c08dab2b2d..c08dab2b2d 100644
--- a/patches/server/0780-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
+++ b/patches/server/0779-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
diff --git a/patches/server/0781-config-for-disabling-entity-tag-tags.patch b/patches/server/0780-config-for-disabling-entity-tag-tags.patch
index f1526d5e31..59c33843ce 100644
--- a/patches/server/0781-config-for-disabling-entity-tag-tags.patch
+++ b/patches/server/0780-config-for-disabling-entity-tag-tags.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] config for disabling entity tag tags
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index e5dc6f868f090d1957306a6389d85cf9dbbc444d..ca9e63942f3cb8986456410b2a77aafc6541aad2 100644
+index 989b766bc166141a391e0a7c1a5eb815e20acfac..64dc0bd1900575e40ac72a98c6df371223bd244c 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -578,6 +578,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
+@@ -569,6 +569,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
if (minecraftserver != null && entity != null) {
if (world.isClientSide || !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) {
diff --git a/patches/server/0782-Use-single-player-info-update-packet-on-join.patch b/patches/server/0781-Use-single-player-info-update-packet-on-join.patch
index 68e488cbf6..c1e89be3e8 100644
--- a/patches/server/0782-Use-single-player-info-update-packet-on-join.patch
+++ b/patches/server/0781-Use-single-player-info-update-packet-on-join.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 59b64ea82c84ff7d9b9123473b4466ec01918cd2..51f4d1e5c02c516b5c57095d35348ba53f5b3193 100644
+index af8a513c2692b71ad56abce24048b61eb78d41c4..5802bca38fdeccbc1353990ecb425034f86e8332 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3489,7 +3489,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3486,7 +3486,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID());
this.chatMessageChain.append(() -> {
this.player.setChatSession(session);
@@ -18,10 +18,10 @@ index 59b64ea82c84ff7d9b9123473b4466ec01918cd2..51f4d1e5c02c516b5c57095d35348ba5
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 61c37bf5f75207085f22093e48986dab8231e1c1..f9212fc2db00531da1618780e231e8ad21285907 100644
+index 6332d5e281bb355bee1a112d11e96ee26e337ebf..af0ea5b5bbc35cced959beb3ecb576fff46c6a51 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -365,6 +365,7 @@ public abstract class PlayerList {
+@@ -364,6 +364,7 @@ public abstract class PlayerList {
// CraftBukkit start - sendAll above replaced with this loop
ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player));
@@ -29,7 +29,7 @@ index 61c37bf5f75207085f22093e48986dab8231e1c1..f9212fc2db00531da1618780e231e8ad
for (int i = 0; i < this.players.size(); ++i) {
ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i);
-@@ -372,12 +373,17 @@ public abstract class PlayerList {
+@@ -371,12 +372,17 @@ public abstract class PlayerList {
entityplayer1.connection.send(packet);
}
diff --git a/patches/server/0783-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0782-Correctly-shrink-items-during-EntityResurrectEvent.patch
index c14b325882..b778104720 100644
--- a/patches/server/0783-Correctly-shrink-items-during-EntityResurrectEvent.patch
+++ b/patches/server/0782-Correctly-shrink-items-during-EntityResurrectEvent.patch
@@ -22,10 +22,10 @@ This patch corrects this behaviour by only shrinking the item if a totem
of undying was found and the event was called uncancelled.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 5520d0cdd5af75a6188a68f809aafb6c5880878a..da42691504177e1e2614db777cbe346f73725eda 100644
+index 8b0a764984f886b711cb337a7f70608167916bf3..9ef5c617cb05f08758105772b9124f6c318b5c17 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1674,7 +1674,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1672,7 +1672,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getCraftServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
diff --git a/patches/server/0784-Win-Screen-API.patch b/patches/server/0783-Win-Screen-API.patch
index 8412d997bc..8412d997bc 100644
--- a/patches/server/0784-Win-Screen-API.patch
+++ b/patches/server/0783-Win-Screen-API.patch
diff --git a/patches/server/0785-Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/0784-Remove-CraftItemStack-setAmount-null-assignment.patch
index aa0acd564f..aa0acd564f 100644
--- a/patches/server/0785-Remove-CraftItemStack-setAmount-null-assignment.patch
+++ b/patches/server/0784-Remove-CraftItemStack-setAmount-null-assignment.patch
diff --git a/patches/server/0786-Fix-force-opening-enchantment-tables.patch b/patches/server/0785-Fix-force-opening-enchantment-tables.patch
index 6ddc05bd3f..6ddc05bd3f 100644
--- a/patches/server/0786-Fix-force-opening-enchantment-tables.patch
+++ b/patches/server/0785-Fix-force-opening-enchantment-tables.patch
diff --git a/patches/server/0787-Add-Entity-Body-Yaw-API.patch b/patches/server/0786-Add-Entity-Body-Yaw-API.patch
index 2a926f1388..2a926f1388 100644
--- a/patches/server/0787-Add-Entity-Body-Yaw-API.patch
+++ b/patches/server/0786-Add-Entity-Body-Yaw-API.patch
diff --git a/patches/server/0788-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch b/patches/server/0787-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch
index 9c1f7e2d47..9c1f7e2d47 100644
--- a/patches/server/0788-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch
+++ b/patches/server/0787-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch
diff --git a/patches/server/0789-Add-EntityFertilizeEggEvent.patch b/patches/server/0788-Add-EntityFertilizeEggEvent.patch
index ea7e33d8b0..ea7e33d8b0 100644
--- a/patches/server/0789-Add-EntityFertilizeEggEvent.patch
+++ b/patches/server/0788-Add-EntityFertilizeEggEvent.patch
diff --git a/patches/server/0790-Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/0789-Fix-HumanEntity-drop-not-updating-the-client-inv.patch
index 21d4d0ad65..21d4d0ad65 100644
--- a/patches/server/0790-Fix-HumanEntity-drop-not-updating-the-client-inv.patch
+++ b/patches/server/0789-Fix-HumanEntity-drop-not-updating-the-client-inv.patch
diff --git a/patches/server/0791-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0790-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
index 2e105236ee..2e105236ee 100644
--- a/patches/server/0791-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
+++ b/patches/server/0790-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
diff --git a/patches/server/0792-Correctly-handle-ArmorStand-invisibility.patch b/patches/server/0791-Correctly-handle-ArmorStand-invisibility.patch
index 4c4c5048be..4c4c5048be 100644
--- a/patches/server/0792-Correctly-handle-ArmorStand-invisibility.patch
+++ b/patches/server/0791-Correctly-handle-ArmorStand-invisibility.patch
diff --git a/patches/server/0793-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0792-Fix-advancement-triggers-for-entity-damage.patch
index d85577a078..c7075265f1 100644
--- a/patches/server/0793-Fix-advancement-triggers-for-entity-damage.patch
+++ b/patches/server/0792-Fix-advancement-triggers-for-entity-damage.patch
@@ -23,10 +23,10 @@ index 821bb93e1b055ba38fafe3b7079d79aa062ebe8a..221d73676fe2fd240a47cf312c1179e0
return !this.getResponse();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index da42691504177e1e2614db777cbe346f73725eda..a4d24269c1365f32f232116f1530ac75b096c6ab 100644
+index 9ef5c617cb05f08758105772b9124f6c318b5c17..24245cfb160dc990b3661388c2f95b9383f98428 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2465,7 +2465,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2463,7 +2463,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Duplicate triggers if blocking
if (event.getDamage(DamageModifier.BLOCKING) < 0) {
if (this instanceof ServerPlayer) {
@@ -35,7 +35,7 @@ index da42691504177e1e2614db777cbe346f73725eda..a4d24269c1365f32f232116f1530ac75
f2 = (float) -event.getDamage(DamageModifier.BLOCKING);
if (f2 > 0.0F && f2 < 3.4028235E37F) {
((ServerPlayer) this).awardStat(Stats.DAMAGE_BLOCKED_BY_SHIELD, Math.round(originalDamage * 10.0F));
-@@ -2473,7 +2473,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2471,7 +2471,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (damagesource.getEntity() instanceof ServerPlayer) {
diff --git a/patches/server/0794-Fix-text-display-error-on-spawn.patch b/patches/server/0793-Fix-text-display-error-on-spawn.patch
index d783ac8eee..d783ac8eee 100644
--- a/patches/server/0794-Fix-text-display-error-on-spawn.patch
+++ b/patches/server/0793-Fix-text-display-error-on-spawn.patch
diff --git a/patches/server/0795-Fix-inventories-returning-null-Locations.patch b/patches/server/0794-Fix-inventories-returning-null-Locations.patch
index 1a65689fad..1a65689fad 100644
--- a/patches/server/0795-Fix-inventories-returning-null-Locations.patch
+++ b/patches/server/0794-Fix-inventories-returning-null-Locations.patch
diff --git a/patches/server/0796-Add-Shearable-API.patch b/patches/server/0795-Add-Shearable-API.patch
index 302cec90c2..302cec90c2 100644
--- a/patches/server/0796-Add-Shearable-API.patch
+++ b/patches/server/0795-Add-Shearable-API.patch
diff --git a/patches/server/0797-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0796-Fix-SpawnEggMeta-get-setSpawnedType.patch
index 254a94df3a..254a94df3a 100644
--- a/patches/server/0797-Fix-SpawnEggMeta-get-setSpawnedType.patch
+++ b/patches/server/0796-Fix-SpawnEggMeta-get-setSpawnedType.patch
diff --git a/patches/server/0798-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/0797-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch
index 72035f8c0e..72035f8c0e 100644
--- a/patches/server/0798-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch
+++ b/patches/server/0797-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch
diff --git a/patches/server/0799-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0798-Treat-sequence-violations-like-they-should-be.patch
index 387f4dcf4f..2a7a2399bc 100644
--- a/patches/server/0799-Treat-sequence-violations-like-they-should-be.patch
+++ b/patches/server/0798-Treat-sequence-violations-like-they-should-be.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Treat sequence violations like they should be
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 51f4d1e5c02c516b5c57095d35348ba53f5b3193..c2328bc821730dd829440ab17b7c8b1800a1f5ca 100644
+index 5802bca38fdeccbc1353990ecb425034f86e8332..3e9247f662afde4dcca900b69b6a78140f9566fa 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1997,6 +1997,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0800-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0799-Prevent-causing-expired-keys-from-impacting-new-join.patch
index 2001b0974c..7a5bcdc7de 100644
--- a/patches/server/0800-Prevent-causing-expired-keys-from-impacting-new-join.patch
+++ b/patches/server/0799-Prevent-causing-expired-keys-from-impacting-new-join.patch
@@ -26,7 +26,7 @@ index d0b2a8b5ded71a9a41753f4addea1c49826b34a3..29b465fc1dc50e0e84ddb889c5303e80
UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())),
UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())),
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index c2328bc821730dd829440ab17b7c8b1800a1f5ca..60d58622fd568932c019ba6a4e4070a881fdda53 100644
+index 3e9247f662afde4dcca900b69b6a78140f9566fa..919b0ffb69720b3edeb9d25c7f41291a09976505 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -305,6 +305,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -51,7 +51,7 @@ index c2328bc821730dd829440ab17b7c8b1800a1f5ca..60d58622fd568932c019ba6a4e4070a8
}
private int getMaximumFlyingTicks(Entity vehicle) {
-@@ -3487,6 +3495,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3484,6 +3492,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void resetPlayerChatState(RemoteChatSession session) {
this.chatSession = session;
diff --git a/patches/server/0801-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0800-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch
index bb2d2b2c31..5ddc60ef91 100644
--- a/patches/server/0801-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch
+++ b/patches/server/0800-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 79acbaf880d5f47efd210627a60ce1e930b63e39..537a755d097d7713404d83dc47cd17828b15a906 100644
+index b81d814619e4175f42aee397811b07cae420c2e8..e9096a138175448279a03a55043982b6d83fbe12 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1385,6 +1385,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1355,6 +1355,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@Override
public void gameEvent(Holder<GameEvent> event, Vec3 emitterPos, GameEvent.Context emitter) {
diff --git a/patches/server/0802-Use-array-for-gamerule-storage.patch b/patches/server/0801-Use-array-for-gamerule-storage.patch
index efb6cfeb50..efb6cfeb50 100644
--- a/patches/server/0802-Use-array-for-gamerule-storage.patch
+++ b/patches/server/0801-Use-array-for-gamerule-storage.patch
diff --git a/patches/server/0803-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0802-Fix-a-couple-of-upstream-bed-issues.patch
index 76cfa7bc0d..76cfa7bc0d 100644
--- a/patches/server/0803-Fix-a-couple-of-upstream-bed-issues.patch
+++ b/patches/server/0802-Fix-a-couple-of-upstream-bed-issues.patch
diff --git a/patches/server/0804-Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/0803-Fix-demo-flag-not-enabling-demo-mode.patch
index 1a72571965..1a72571965 100644
--- a/patches/server/0804-Fix-demo-flag-not-enabling-demo-mode.patch
+++ b/patches/server/0803-Fix-demo-flag-not-enabling-demo-mode.patch
diff --git a/patches/server/0805-Add-Mob-Experience-reward-API.patch b/patches/server/0804-Add-Mob-Experience-reward-API.patch
index 9e59c458f8..9e59c458f8 100644
--- a/patches/server/0805-Add-Mob-Experience-reward-API.patch
+++ b/patches/server/0804-Add-Mob-Experience-reward-API.patch
diff --git a/patches/server/0806-Break-redstone-on-top-of-trap-doors-early.patch b/patches/server/0805-Break-redstone-on-top-of-trap-doors-early.patch
index ded460b32b..ded460b32b 100644
--- a/patches/server/0806-Break-redstone-on-top-of-trap-doors-early.patch
+++ b/patches/server/0805-Break-redstone-on-top-of-trap-doors-early.patch
diff --git a/patches/server/0807-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0806-Avoid-Lazy-Initialization-for-Enum-Fields.patch
index becde16ce8..becde16ce8 100644
--- a/patches/server/0807-Avoid-Lazy-Initialization-for-Enum-Fields.patch
+++ b/patches/server/0806-Avoid-Lazy-Initialization-for-Enum-Fields.patch
diff --git a/patches/server/0808-More-accurate-isInOpenWater-impl.patch b/patches/server/0807-More-accurate-isInOpenWater-impl.patch
index 6e110094dd..6e110094dd 100644
--- a/patches/server/0808-More-accurate-isInOpenWater-impl.patch
+++ b/patches/server/0807-More-accurate-isInOpenWater-impl.patch
diff --git a/patches/server/0809-Expand-PlayerItemMendEvent.patch b/patches/server/0808-Expand-PlayerItemMendEvent.patch
index 7c61c0095c..7c61c0095c 100644
--- a/patches/server/0809-Expand-PlayerItemMendEvent.patch
+++ b/patches/server/0808-Expand-PlayerItemMendEvent.patch
diff --git a/patches/server/0810-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0809-Refresh-ProjectileSource-for-projectiles.patch
index eee4855e6b..eee4855e6b 100644
--- a/patches/server/0810-Refresh-ProjectileSource-for-projectiles.patch
+++ b/patches/server/0809-Refresh-ProjectileSource-for-projectiles.patch
diff --git a/patches/server/0811-Add-transient-modifier-API.patch b/patches/server/0810-Add-transient-modifier-API.patch
index 36cc0a030a..36cc0a030a 100644
--- a/patches/server/0811-Add-transient-modifier-API.patch
+++ b/patches/server/0810-Add-transient-modifier-API.patch
diff --git a/patches/server/0812-Fix-block-place-logic.patch b/patches/server/0811-Fix-block-place-logic.patch
index 6f5dfc260e..4f22f03cab 100644
--- a/patches/server/0812-Fix-block-place-logic.patch
+++ b/patches/server/0811-Fix-block-place-logic.patch
@@ -22,10 +22,10 @@ index 44cc12a3338b5f0448c88192c8674cd36531db34..d59120f0304823361cc4112f55833239
itemstack.consume(1, entityhuman);
return InteractionResult.SUCCESS;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index a6f538372830f3f80740ef503733736e0561d1bd..d048d0e4b16459b5bad44ebfa3c6a8f336f6762b 100644
+index f0c2187a92de633a1d4cc7e71ff62cbe30ce8774..18c011c1943867dbc4abee338b03b9be499876dd 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -552,17 +552,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -550,17 +550,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
CraftWorld world = ((ServerLevel) this).getWorld();
diff --git a/patches/server/0813-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0812-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
index 69e6a10e57..69e6a10e57 100644
--- a/patches/server/0813-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
+++ b/patches/server/0812-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
diff --git a/patches/server/0814-Call-BlockGrowEvent-for-missing-blocks.patch b/patches/server/0813-Call-BlockGrowEvent-for-missing-blocks.patch
index d48638c261..d48638c261 100644
--- a/patches/server/0814-Call-BlockGrowEvent-for-missing-blocks.patch
+++ b/patches/server/0813-Call-BlockGrowEvent-for-missing-blocks.patch
diff --git a/patches/server/0815-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0814-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch
index 761e3cb98f..4cc150197b 100644
--- a/patches/server/0815-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch
+++ b/patches/server/0814-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ff7bd67f593bbaabb5eb4c2b845acb2d428f1670..1310bdd5ced5941b2ab4ed1f15365722c0b8252d 100644
+index b84dc11212aba4c06375cdbefa91c09d86a2b957..a7b79c9ec51f037287fad609c29b240e2071f2f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -358,7 +358,11 @@ public final class CraftServer implements Server {
diff --git a/patches/server/0816-fix-MapLike-spam-for-missing-key-selector.patch b/patches/server/0815-fix-MapLike-spam-for-missing-key-selector.patch
index 2bd3b889f1..2bd3b889f1 100644
--- a/patches/server/0816-fix-MapLike-spam-for-missing-key-selector.patch
+++ b/patches/server/0815-fix-MapLike-spam-for-missing-key-selector.patch
diff --git a/patches/server/0817-Fix-sniffer-removeExploredLocation.patch b/patches/server/0816-Fix-sniffer-removeExploredLocation.patch
index e8b1703090..e8b1703090 100644
--- a/patches/server/0817-Fix-sniffer-removeExploredLocation.patch
+++ b/patches/server/0816-Fix-sniffer-removeExploredLocation.patch
diff --git a/patches/server/0818-Add-method-to-remove-all-active-potion-effects.patch b/patches/server/0817-Add-method-to-remove-all-active-potion-effects.patch
index e730bcf1d4..e730bcf1d4 100644
--- a/patches/server/0818-Add-method-to-remove-all-active-potion-effects.patch
+++ b/patches/server/0817-Add-method-to-remove-all-active-potion-effects.patch
diff --git a/patches/server/0819-Add-event-for-player-editing-sign.patch b/patches/server/0818-Add-event-for-player-editing-sign.patch
index 5029597839..5029597839 100644
--- a/patches/server/0819-Add-event-for-player-editing-sign.patch
+++ b/patches/server/0818-Add-event-for-player-editing-sign.patch
diff --git a/patches/server/0820-Only-tick-item-frames-if-players-can-see-it.patch b/patches/server/0819-Only-tick-item-frames-if-players-can-see-it.patch
index c7c6cd499f..c7c6cd499f 100644
--- a/patches/server/0820-Only-tick-item-frames-if-players-can-see-it.patch
+++ b/patches/server/0819-Only-tick-item-frames-if-players-can-see-it.patch
diff --git a/patches/server/0821-Fix-cmd-permission-levels-for-command-blocks.patch b/patches/server/0820-Fix-cmd-permission-levels-for-command-blocks.patch
index aa96a27db6..aa96a27db6 100644
--- a/patches/server/0821-Fix-cmd-permission-levels-for-command-blocks.patch
+++ b/patches/server/0820-Fix-cmd-permission-levels-for-command-blocks.patch
diff --git a/patches/server/0822-Add-option-to-disable-block-updates.patch b/patches/server/0821-Add-option-to-disable-block-updates.patch
index 0ea835ecc9..0ea835ecc9 100644
--- a/patches/server/0822-Add-option-to-disable-block-updates.patch
+++ b/patches/server/0821-Add-option-to-disable-block-updates.patch
diff --git a/patches/server/0823-Call-missing-BlockDispenseEvent.patch b/patches/server/0822-Call-missing-BlockDispenseEvent.patch
index c8d68a1ed8..c8d68a1ed8 100644
--- a/patches/server/0823-Call-missing-BlockDispenseEvent.patch
+++ b/patches/server/0822-Call-missing-BlockDispenseEvent.patch
diff --git a/patches/server/0824-Don-t-load-chunks-for-supporting-block-checks.patch b/patches/server/0823-Don-t-load-chunks-for-supporting-block-checks.patch
index 5f0cc11546..5f0cc11546 100644
--- a/patches/server/0824-Don-t-load-chunks-for-supporting-block-checks.patch
+++ b/patches/server/0823-Don-t-load-chunks-for-supporting-block-checks.patch
diff --git a/patches/server/0825-Optimize-player-lookups-for-beacons.patch b/patches/server/0824-Optimize-player-lookups-for-beacons.patch
index 7e1285d891..7e1285d891 100644
--- a/patches/server/0825-Optimize-player-lookups-for-beacons.patch
+++ b/patches/server/0824-Optimize-player-lookups-for-beacons.patch
diff --git a/patches/server/0826-More-Sign-Block-API.patch b/patches/server/0825-More-Sign-Block-API.patch
index 70558b0010..70558b0010 100644
--- a/patches/server/0826-More-Sign-Block-API.patch
+++ b/patches/server/0825-More-Sign-Block-API.patch
diff --git a/patches/server/0827-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0826-fix-item-meta-for-tadpole-buckets.patch
index 04c4b6a873..04c4b6a873 100644
--- a/patches/server/0827-fix-item-meta-for-tadpole-buckets.patch
+++ b/patches/server/0826-fix-item-meta-for-tadpole-buckets.patch
diff --git a/patches/server/0828-Fix-BanList-API.patch b/patches/server/0827-Fix-BanList-API.patch
index 1164a2d949..1164a2d949 100644
--- a/patches/server/0828-Fix-BanList-API.patch
+++ b/patches/server/0827-Fix-BanList-API.patch
diff --git a/patches/server/0829-Determine-lava-and-water-fluid-explosion-resistance-.patch b/patches/server/0828-Determine-lava-and-water-fluid-explosion-resistance-.patch
index 4f2b8e09cd..4f2b8e09cd 100644
--- a/patches/server/0829-Determine-lava-and-water-fluid-explosion-resistance-.patch
+++ b/patches/server/0828-Determine-lava-and-water-fluid-explosion-resistance-.patch
diff --git a/patches/server/0830-Fix-possible-NPE-on-painting-creation.patch b/patches/server/0829-Fix-possible-NPE-on-painting-creation.patch
index d5fa31bd07..d5fa31bd07 100644
--- a/patches/server/0830-Fix-possible-NPE-on-painting-creation.patch
+++ b/patches/server/0829-Fix-possible-NPE-on-painting-creation.patch
diff --git a/patches/server/0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0830-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
index c481798890..c481798890 100644
--- a/patches/server/0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
+++ b/patches/server/0830-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
diff --git a/patches/server/0832-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0831-ExperienceOrb-should-call-EntitySpawnEvent.patch
index 40dec00abb..40dec00abb 100644
--- a/patches/server/0832-ExperienceOrb-should-call-EntitySpawnEvent.patch
+++ b/patches/server/0831-ExperienceOrb-should-call-EntitySpawnEvent.patch
diff --git a/patches/server/0833-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch b/patches/server/0832-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch
index 301b345fb9..301b345fb9 100644
--- a/patches/server/0833-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch
+++ b/patches/server/0832-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch
diff --git a/patches/server/0834-Add-whitelist-events.patch b/patches/server/0833-Add-whitelist-events.patch
index 96884032fb..96884032fb 100644
--- a/patches/server/0834-Add-whitelist-events.patch
+++ b/patches/server/0833-Add-whitelist-events.patch
diff --git a/patches/server/0835-Implement-PlayerFailMoveEvent.patch b/patches/server/0834-Implement-PlayerFailMoveEvent.patch
index 19858740af..1c34e55f29 100644
--- a/patches/server/0835-Implement-PlayerFailMoveEvent.patch
+++ b/patches/server/0834-Implement-PlayerFailMoveEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 60d58622fd568932c019ba6a4e4070a881fdda53..368547270a3e6cdbda812fcf0ed2519d71383b81 100644
+index 919b0ffb69720b3edeb9d25c7f41291a09976505..134d9fbdb757094a4624325c0ad8f32efadd61b6 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1271,8 +1271,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -91,7 +91,7 @@ index 60d58622fd568932c019ba6a4e4070a881fdda53..368547270a3e6cdbda812fcf0ed2519d
this.internalTeleport(d3, d4, d5, f, f1); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
} else {
-@@ -3537,4 +3567,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3534,4 +3564,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand);
}
diff --git a/patches/server/0836-Folia-scheduler-and-owned-region-API.patch b/patches/server/0835-Folia-scheduler-and-owned-region-API.patch
index 33561d0d1f..fe1d592753 100644
--- a/patches/server/0836-Folia-scheduler-and-owned-region-API.patch
+++ b/patches/server/0835-Folia-scheduler-and-owned-region-API.patch
@@ -1148,13 +1148,13 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 736ff3988d66b8694475d5f62673da61fcb76179..7e83a0de08488c5acf3c1a5d7107564e2a8ed7e0 100644
+index 8f7a808b0c89953a7f2932e68e2c85f9330469f2..be188079f12b3f7b394ae91db62cc17b1d0f4e79 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1655,6 +1655,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
+@@ -1625,6 +1625,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ entityplayer.connection.suspendFlushing();
+ });
this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
- MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
+ // Paper start - Folia scheduler API
+ ((io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler) Bukkit.getGlobalRegionScheduler()).tick();
+ getAllLevels().forEach(level -> {
@@ -1171,12 +1171,12 @@ index 736ff3988d66b8694475d5f62673da61fcb76179..7e83a0de08488c5acf3c1a5d7107564e
+ // Paper end - Folia scheduler API
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
gameprofilerfiller.push("commandFunctions");
- MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
+ this.getFunctions().tick();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index f9212fc2db00531da1618780e231e8ad21285907..a9063533ea4b2b349d476127b99c822203d7dfcb 100644
+index af0ea5b5bbc35cced959beb3ecb576fff46c6a51..74cbc6092d49f573f7fab1895c42a0360bb80bdf 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -598,6 +598,7 @@ public abstract class PlayerList {
+@@ -597,6 +597,7 @@ public abstract class PlayerList {
}
worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
@@ -1249,7 +1249,7 @@ index 3444b1a2da80b85e2b1928d69ff0dd980c5fb34f..463dd4f91212318b51174c5d2f4d25ba
public void setLevelCallback(EntityInLevelCallback changeListener) {
this.levelCallback = changeListener;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 1310bdd5ced5941b2ab4ed1f15365722c0b8252d..0193505562d7bdc6d2ab91b637a916cdecdec911 100644
+index a7b79c9ec51f037287fad609c29b240e2071f2f8..46807d5d94a0f90b230dfaf4d37378a3bfa21414 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -313,6 +313,76 @@ public final class CraftServer implements Server {
diff --git a/patches/server/0837-Only-erase-allay-memory-on-non-item-targets.patch b/patches/server/0836-Only-erase-allay-memory-on-non-item-targets.patch
index b26cfd040b..b26cfd040b 100644
--- a/patches/server/0837-Only-erase-allay-memory-on-non-item-targets.patch
+++ b/patches/server/0836-Only-erase-allay-memory-on-non-item-targets.patch
diff --git a/patches/server/0838-Fix-rotation-when-spawning-display-entities.patch b/patches/server/0837-Fix-rotation-when-spawning-display-entities.patch
index 240a093118..240a093118 100644
--- a/patches/server/0838-Fix-rotation-when-spawning-display-entities.patch
+++ b/patches/server/0837-Fix-rotation-when-spawning-display-entities.patch
diff --git a/patches/server/0839-Only-capture-actual-tree-growth.patch b/patches/server/0838-Only-capture-actual-tree-growth.patch
index 58fb59ab7d..f1dee3ad48 100644
--- a/patches/server/0839-Only-capture-actual-tree-growth.patch
+++ b/patches/server/0838-Only-capture-actual-tree-growth.patch
@@ -17,10 +17,10 @@ index f8f570a97789ab16e57774f233506a289277d5d9..18304349c9ab24657c4152aff800dba9
}
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 537a755d097d7713404d83dc47cd17828b15a906..9270584d74edf5c1af473b1a13f7edca74cc1ec7 100644
+index e9096a138175448279a03a55043982b6d83fbe12..0db41d36d5daf015c750fb0246ab3e5da1cd81a2 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2228,6 +2228,16 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2198,6 +2198,16 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return range <= 0 ? 64.0 * 64.0 : range * range; // 64 is taken from default in ServerLevel#levelEvent
}
// Paper end - respect global sound events gamerule
diff --git a/patches/server/0840-Use-correct-source-for-mushroom-block-spread-event.patch b/patches/server/0839-Use-correct-source-for-mushroom-block-spread-event.patch
index 658d9ec376..658d9ec376 100644
--- a/patches/server/0840-Use-correct-source-for-mushroom-block-spread-event.patch
+++ b/patches/server/0839-Use-correct-source-for-mushroom-block-spread-event.patch
diff --git a/patches/server/0841-Respect-randomizeData-on-more-entities-when-spawning.patch b/patches/server/0840-Respect-randomizeData-on-more-entities-when-spawning.patch
index 67a5238077..67a5238077 100644
--- a/patches/server/0841-Respect-randomizeData-on-more-entities-when-spawning.patch
+++ b/patches/server/0840-Respect-randomizeData-on-more-entities-when-spawning.patch
diff --git a/patches/server/0842-Use-correct-seed-on-api-world-load.patch b/patches/server/0841-Use-correct-seed-on-api-world-load.patch
index 099c091a64..997631e23b 100644
--- a/patches/server/0842-Use-correct-seed-on-api-world-load.patch
+++ b/patches/server/0841-Use-correct-seed-on-api-world-load.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Use correct seed on api world load
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 0193505562d7bdc6d2ab91b637a916cdecdec911..3cf3b353cfb4337abdbb3b6842fd8fa128271948 100644
+index 46807d5d94a0f90b230dfaf4d37378a3bfa21414..da3819f49b105bd98ce94b5abdf1c7652ff625a4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1389,7 +1389,7 @@ public final class CraftServer implements Server {
+@@ -1388,7 +1388,7 @@ public final class CraftServer implements Server {
net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), this.console.options.has("eraseCache"), () -> true, iregistrycustom_dimension, this.console.options.has("recreateRegionFiles"));
}
diff --git a/patches/server/0843-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch b/patches/server/0842-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch
index d87f310ded..d87f310ded 100644
--- a/patches/server/0843-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch
+++ b/patches/server/0842-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch
diff --git a/patches/server/0844-Cache-map-ids-on-item-frames.patch b/patches/server/0843-Cache-map-ids-on-item-frames.patch
index 38554e1a9c..38554e1a9c 100644
--- a/patches/server/0844-Cache-map-ids-on-item-frames.patch
+++ b/patches/server/0843-Cache-map-ids-on-item-frames.patch
diff --git a/patches/server/0845-API-for-updating-recipes-on-clients.patch b/patches/server/0844-API-for-updating-recipes-on-clients.patch
index 0435961d1f..28b0572357 100644
--- a/patches/server/0845-API-for-updating-recipes-on-clients.patch
+++ b/patches/server/0844-API-for-updating-recipes-on-clients.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] API for updating recipes on clients
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index a9063533ea4b2b349d476127b99c822203d7dfcb..a1228d09b91dca3989a4be3120f9724a6e138040 100644
+index 74cbc6092d49f573f7fab1895c42a0360bb80bdf..db19a2483f37fb3554f86577e44162f6fe29592a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1450,6 +1450,13 @@ public abstract class PlayerList {
+@@ -1448,6 +1448,13 @@ public abstract class PlayerList {
}
public void reloadResources() {
@@ -22,7 +22,7 @@ index a9063533ea4b2b349d476127b99c822203d7dfcb..a1228d09b91dca3989a4be3120f9724a
// CraftBukkit start
/*Iterator iterator = this.advancements.values().iterator();
-@@ -1465,7 +1472,13 @@ public abstract class PlayerList {
+@@ -1463,7 +1470,13 @@ public abstract class PlayerList {
}
// CraftBukkit end
@@ -37,10 +37,10 @@ index a9063533ea4b2b349d476127b99c822203d7dfcb..a1228d09b91dca3989a4be3120f9724a
ClientboundUpdateRecipesPacket packetplayoutrecipeupdate = new ClientboundUpdateRecipesPacket(craftingmanager.getSynchronizedItemProperties(), craftingmanager.getSynchronizedStonecutterRecipes());
Iterator iterator1 = this.players.iterator();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 3cf3b353cfb4337abdbb3b6842fd8fa128271948..0433de3c2455cf18584d5ab651843f8d1d874036 100644
+index da3819f49b105bd98ce94b5abdf1c7652ff625a4..fa505c0714bb95b2ab08b4bbb9ea79ce98898f4b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1179,6 +1179,18 @@ public final class CraftServer implements Server {
+@@ -1178,6 +1178,18 @@ public final class CraftServer implements Server {
ReloadCommand.reload(this.console);
}
@@ -59,7 +59,7 @@ index 3cf3b353cfb4337abdbb3b6842fd8fa128271948..0433de3c2455cf18584d5ab651843f8d
private void loadIcon() {
this.icon = new CraftIconCache(null);
try {
-@@ -1558,6 +1570,13 @@ public final class CraftServer implements Server {
+@@ -1557,6 +1569,13 @@ public final class CraftServer implements Server {
@Override
public boolean addRecipe(Recipe recipe) {
@@ -73,7 +73,7 @@ index 3cf3b353cfb4337abdbb3b6842fd8fa128271948..0433de3c2455cf18584d5ab651843f8d
CraftRecipe toAdd;
if (recipe instanceof CraftRecipe) {
toAdd = (CraftRecipe) recipe;
-@@ -1589,6 +1608,11 @@ public final class CraftServer implements Server {
+@@ -1588,6 +1607,11 @@ public final class CraftServer implements Server {
}
}
toAdd.addToCraftingManager();
@@ -85,7 +85,7 @@ index 3cf3b353cfb4337abdbb3b6842fd8fa128271948..0433de3c2455cf18584d5ab651843f8d
return true;
}
-@@ -1769,9 +1793,23 @@ public final class CraftServer implements Server {
+@@ -1768,9 +1792,23 @@ public final class CraftServer implements Server {
@Override
public boolean removeRecipe(NamespacedKey recipeKey) {
diff --git a/patches/server/0846-Fix-custom-statistic-criteria-creation.patch b/patches/server/0845-Fix-custom-statistic-criteria-creation.patch
index 420f7179e9..c57ac96255 100644
--- a/patches/server/0846-Fix-custom-statistic-criteria-creation.patch
+++ b/patches/server/0845-Fix-custom-statistic-criteria-creation.patch
@@ -5,21 +5,19 @@ Subject: [PATCH] Fix custom statistic criteria creation
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 9e0af05e066132b66fafff84ff0a0957c1a44f9f..766ef49d72eef0ff80247a807db5379f7fc60302 100644
+index 9f4124485dac3d029ec8247b64098042aa1a48d2..a74784ddf63d316f253381ed803822a149e92bc7 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -599,6 +599,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -600,6 +600,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
+ net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biomeBase = cra.getHandle().registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME).getOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey)));
+ cra.setBiome(x, y, z, biomeBase);
}
- // Paper end - namespaced key biome methods
-
-+ // Paper start - fix custom stats criteria creation
++
+ @Override
+ public String getStatisticCriteriaKey(org.bukkit.Statistic statistic) {
+ if (statistic.getType() != org.bukkit.Statistic.Type.UNTYPED) return "minecraft.custom:minecraft." + statistic.getKey().getKey();
+ return org.bukkit.craftbukkit.CraftStatistic.getNMSStatistic(statistic).getName();
+ }
-+ // Paper end - fix custom stats criteria creation
-+
- @Override
- public String get(Class<?> aClass, String s) {
- if (aClass == Enchantment.class) {
+ // Paper end
+
+ /**
diff --git a/patches/server/0847-Bandaid-fix-for-Effect.patch b/patches/server/0846-Bandaid-fix-for-Effect.patch
index 8c6534f28e..8c6534f28e 100644
--- a/patches/server/0847-Bandaid-fix-for-Effect.patch
+++ b/patches/server/0846-Bandaid-fix-for-Effect.patch
diff --git a/patches/server/0848-SculkCatalyst-bloom-API.patch b/patches/server/0847-SculkCatalyst-bloom-API.patch
index ba050f6086..ba050f6086 100644
--- a/patches/server/0848-SculkCatalyst-bloom-API.patch
+++ b/patches/server/0847-SculkCatalyst-bloom-API.patch
diff --git a/patches/server/0849-API-for-an-entity-s-scoreboard-name.patch b/patches/server/0848-API-for-an-entity-s-scoreboard-name.patch
index 68f3c7789a..68f3c7789a 100644
--- a/patches/server/0849-API-for-an-entity-s-scoreboard-name.patch
+++ b/patches/server/0848-API-for-an-entity-s-scoreboard-name.patch
diff --git a/patches/server/0850-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/0849-Deprecate-and-replace-methods-with-old-StructureType.patch
index 82cc3b4373..80817c1175 100644
--- a/patches/server/0850-Deprecate-and-replace-methods-with-old-StructureType.patch
+++ b/patches/server/0849-Deprecate-and-replace-methods-with-old-StructureType.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 0433de3c2455cf18584d5ab651843f8d1d874036..83c3de4ae733199f64fe0f967f9f816545d20f1c 100644
+index fa505c0714bb95b2ab08b4bbb9ea79ce98898f4b..a1f2c8fd0348a6a5dad521430f473867bdadd1a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2008,6 +2008,11 @@ public final class CraftServer implements Server {
+@@ -2007,6 +2007,11 @@ public final class CraftServer implements Server {
ServerLevel worldServer = ((CraftWorld) world).getHandle();
Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored);
@@ -20,7 +20,7 @@ index 0433de3c2455cf18584d5ab651843f8d1d874036..83c3de4ae733199f64fe0f967f9f8165
BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation);
// Create map with trackPlayer = true, unlimitedTracking = true
-@@ -2018,6 +2023,31 @@ public final class CraftServer implements Server {
+@@ -2017,6 +2022,31 @@ public final class CraftServer implements Server {
return CraftItemStack.asBukkitCopy(stack);
}
diff --git a/patches/server/0851-Don-t-tab-complete-namespaced-commands-if-send-names.patch b/patches/server/0850-Don-t-tab-complete-namespaced-commands-if-send-names.patch
index 58454d7267..8834a03dcb 100644
--- a/patches/server/0851-Don-t-tab-complete-namespaced-commands-if-send-names.patch
+++ b/patches/server/0850-Don-t-tab-complete-namespaced-commands-if-send-names.patch
@@ -11,7 +11,7 @@ This patch prevents server from sending namespaced commands when player
requests tab-complete only commands.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 368547270a3e6cdbda812fcf0ed2519d71383b81..293c42dd5e870986a2797840756bd7c4d6a34a5d 100644
+index 134d9fbdb757094a4624325c0ad8f32efadd61b6..688d6e51bc8b844ba7648cf1aed1bdd9629c1675 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -832,6 +832,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0852-Properly-handle-BlockBreakEvent-isDropItems.patch b/patches/server/0851-Properly-handle-BlockBreakEvent-isDropItems.patch
index 6c61a65a1c..7bf30bb112 100644
--- a/patches/server/0852-Properly-handle-BlockBreakEvent-isDropItems.patch
+++ b/patches/server/0851-Properly-handle-BlockBreakEvent-isDropItems.patch
@@ -39,10 +39,10 @@ index d5ed53c37bba79f84b60d616887cd5176e124f10..6c0ea0bde1c36edda92807e317ed37f8
if (!EnchantmentHelper.hasTag(tool, EnchantmentTags.PREVENTS_BEE_SPAWNS_WHEN_MINING)) {
tileentitybeehive.emptyAllLivingFromHive(player, state, BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY);
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index 4d140bd83ca0e1554afad80ec4fc6186188a79d8..6fb3f551f432d7e668c606fb7bd3514408e0478a 100644
+index 9d8c4ecd89b05a0e5d4ebb5e686eba5d899765f2..4ff32e3fb1a1979827ef063cda196a43995440fe 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -405,10 +405,18 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -396,10 +396,18 @@ public class Block extends BlockBehaviour implements ItemLike {
return this.defaultBlockState();
}
diff --git a/patches/server/0853-Fire-entity-death-event-for-ender-dragon.patch b/patches/server/0852-Fire-entity-death-event-for-ender-dragon.patch
index 0efcc781a4..0efcc781a4 100644
--- a/patches/server/0853-Fire-entity-death-event-for-ender-dragon.patch
+++ b/patches/server/0852-Fire-entity-death-event-for-ender-dragon.patch
diff --git a/patches/server/0854-Configurable-entity-tracking-range-by-Y-coordinate.patch b/patches/server/0853-Configurable-entity-tracking-range-by-Y-coordinate.patch
index 75dd71166a..a8f7a157ae 100644
--- a/patches/server/0854-Configurable-entity-tracking-range-by-Y-coordinate.patch
+++ b/patches/server/0853-Configurable-entity-tracking-range-by-Y-coordinate.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Configurable entity tracking range by Y coordinate
Options to configure entity tracking by Y coordinate, also for each entity category.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 7810df9c5045a78c2731ee416366da4f973e5d29..502d73830ed87e06529f194090a4ffb895b2623c 100644
+index 53e180e230d5a1652f3e19193243c37095d6b39e..5da3eee41ba0cbec5932cf9a7dac53777a2463fb 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1583,7 +1583,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1577,7 +1577,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
double d0 = (double) Math.min(this.getEffectiveRange(), i * 16);
double d1 = vec3d.x * vec3d.x + vec3d.z * vec3d.z;
double d2 = d0 * d0;
diff --git a/patches/server/0855-Add-Listing-API-for-Player.patch b/patches/server/0854-Add-Listing-API-for-Player.patch
index 05d3d3e571..a411628340 100644
--- a/patches/server/0855-Add-Listing-API-for-Player.patch
+++ b/patches/server/0854-Add-Listing-API-for-Player.patch
@@ -85,10 +85,10 @@ index 29b465fc1dc50e0e84ddb889c5303e80fe662874..4d67d98257b2cb9045d03c999cfd4ba2
static class EntryBuilder {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index a1228d09b91dca3989a4be3120f9724a6e138040..fa951c6e33d583f9c2ca103fbaaa035e40c163f9 100644
+index db19a2483f37fb3554f86577e44162f6fe29592a..409010fae4b175ba7dcbe0f38676022ed9b77b1d 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -363,14 +363,22 @@ public abstract class PlayerList {
+@@ -362,14 +362,22 @@ public abstract class PlayerList {
// CraftBukkit end
// CraftBukkit start - sendAll above replaced with this loop
@@ -112,7 +112,7 @@ index a1228d09b91dca3989a4be3120f9724a6e138040..fa951c6e33d583f9c2ca103fbaaa035e
}
if (entityplayer1 == player || !bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) { // Paper - Use single player info update packet on join; Don't include joining player
-@@ -381,7 +389,7 @@ public abstract class PlayerList {
+@@ -380,7 +388,7 @@ public abstract class PlayerList {
}
// Paper start - Use single player info update packet on join
if (!onlinePlayers.isEmpty()) {
diff --git a/patches/server/0856-Configurable-Region-Compression-Format.patch b/patches/server/0855-Configurable-Region-Compression-Format.patch
index 64a52a4ea2..64a52a4ea2 100644
--- a/patches/server/0856-Configurable-Region-Compression-Format.patch
+++ b/patches/server/0855-Configurable-Region-Compression-Format.patch
diff --git a/patches/server/0857-Add-BlockFace-to-BlockDamageEvent.patch b/patches/server/0856-Add-BlockFace-to-BlockDamageEvent.patch
index 2dcf331517..2dcf331517 100644
--- a/patches/server/0857-Add-BlockFace-to-BlockDamageEvent.patch
+++ b/patches/server/0856-Add-BlockFace-to-BlockDamageEvent.patch
diff --git a/patches/server/0858-Fix-NPE-on-Boat-getStatus.patch b/patches/server/0857-Fix-NPE-on-Boat-getStatus.patch
index 19f832054d..19f832054d 100644
--- a/patches/server/0858-Fix-NPE-on-Boat-getStatus.patch
+++ b/patches/server/0857-Fix-NPE-on-Boat-getStatus.patch
diff --git a/patches/server/0859-Expand-Pose-API.patch b/patches/server/0858-Expand-Pose-API.patch
index 47312a8635..47312a8635 100644
--- a/patches/server/0859-Expand-Pose-API.patch
+++ b/patches/server/0858-Expand-Pose-API.patch
diff --git a/patches/server/0860-More-DragonBattle-API.patch b/patches/server/0859-More-DragonBattle-API.patch
index a752a4de81..a752a4de81 100644
--- a/patches/server/0860-More-DragonBattle-API.patch
+++ b/patches/server/0859-More-DragonBattle-API.patch
diff --git a/patches/server/0861-Add-PlayerPickItemEvent.patch b/patches/server/0860-Add-PlayerPickItemEvent.patch
index 8a28695a2b..0290c1d950 100644
--- a/patches/server/0861-Add-PlayerPickItemEvent.patch
+++ b/patches/server/0860-Add-PlayerPickItemEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerPickItemEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 293c42dd5e870986a2797840756bd7c4d6a34a5d..c50c3d11700aadd4c0e7114b4b6d5c5d15a33ac4 100644
+index 688d6e51bc8b844ba7648cf1aed1bdd9629c1675..b840f7aac9c830b8aa0aa133bf43f87dfc598b2c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -947,7 +947,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0862-Allow-trident-custom-damage.patch b/patches/server/0861-Allow-trident-custom-damage.patch
index ee7ac1a043..ee7ac1a043 100644
--- a/patches/server/0862-Allow-trident-custom-damage.patch
+++ b/patches/server/0861-Allow-trident-custom-damage.patch
diff --git a/patches/server/0863-Expose-hand-in-BlockCanBuildEvent.patch b/patches/server/0862-Expose-hand-in-BlockCanBuildEvent.patch
index f3ed54f3f9..f3ed54f3f9 100644
--- a/patches/server/0863-Expose-hand-in-BlockCanBuildEvent.patch
+++ b/patches/server/0862-Expose-hand-in-BlockCanBuildEvent.patch
diff --git a/patches/server/0864-Optimize-nearest-structure-border-iteration.patch b/patches/server/0863-Optimize-nearest-structure-border-iteration.patch
index edd50774cc..edd50774cc 100644
--- a/patches/server/0864-Optimize-nearest-structure-border-iteration.patch
+++ b/patches/server/0863-Optimize-nearest-structure-border-iteration.patch
diff --git a/patches/server/0865-Implement-OfflinePlayer-isConnected.patch b/patches/server/0864-Implement-OfflinePlayer-isConnected.patch
index ebef6c5101..ebef6c5101 100644
--- a/patches/server/0865-Implement-OfflinePlayer-isConnected.patch
+++ b/patches/server/0864-Implement-OfflinePlayer-isConnected.patch
diff --git a/patches/server/0866-Fix-slot-desync.patch b/patches/server/0865-Fix-slot-desync.patch
index deb1575ede..7c1808398c 100644
--- a/patches/server/0866-Fix-slot-desync.patch
+++ b/patches/server/0865-Fix-slot-desync.patch
@@ -22,10 +22,10 @@ index f05a9fd321a4af28e9771bbf39d73f80dd4160c9..90aa8e401e1d092a31ff21699409b836
this.containerMenu.findSlot(this.getInventory(), this.getInventory().selected).ifPresent(s -> {
this.containerSynchronizer.sendSlotChange(this.containerMenu, s, this.getMainHandItem());
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index c50c3d11700aadd4c0e7114b4b6d5c5d15a33ac4..af7696900171ea6b7941251046bfc10c1f4eb469 100644
+index b840f7aac9c830b8aa0aa133bf43f87dfc598b2c..0cb0d2f863efb86bb589b30bae61ac57bda40fab 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2749,10 +2749,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2746,10 +2746,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Refresh the current entity metadata
entity.refreshEntityData(ServerGamePacketListenerImpl.this.player);
// SPIGOT-7136 - Allays
diff --git a/patches/server/0867-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0866-Add-titleOverride-to-InventoryOpenEvent.patch
index 1b98c1b4a0..1b98c1b4a0 100644
--- a/patches/server/0867-Add-titleOverride-to-InventoryOpenEvent.patch
+++ b/patches/server/0866-Add-titleOverride-to-InventoryOpenEvent.patch
diff --git a/patches/server/0868-Configure-sniffer-egg-hatch-time.patch b/patches/server/0867-Configure-sniffer-egg-hatch-time.patch
index e39971b614..e39971b614 100644
--- a/patches/server/0868-Configure-sniffer-egg-hatch-time.patch
+++ b/patches/server/0867-Configure-sniffer-egg-hatch-time.patch
diff --git a/patches/server/0869-Do-crystal-portal-proximity-check-before-entity-look.patch b/patches/server/0868-Do-crystal-portal-proximity-check-before-entity-look.patch
index 0ba2ce3d55..0ba2ce3d55 100644
--- a/patches/server/0869-Do-crystal-portal-proximity-check-before-entity-look.patch
+++ b/patches/server/0868-Do-crystal-portal-proximity-check-before-entity-look.patch
diff --git a/patches/server/0870-Skip-POI-finding-if-stuck-in-vehicle.patch b/patches/server/0869-Skip-POI-finding-if-stuck-in-vehicle.patch
index a4dcac44ac..a4dcac44ac 100644
--- a/patches/server/0870-Skip-POI-finding-if-stuck-in-vehicle.patch
+++ b/patches/server/0869-Skip-POI-finding-if-stuck-in-vehicle.patch
diff --git a/patches/server/0871-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/0870-Add-slot-sanity-checks-in-container-clicks.patch
index 08f85bdb3b..0925155fcf 100644
--- a/patches/server/0871-Add-slot-sanity-checks-in-container-clicks.patch
+++ b/patches/server/0870-Add-slot-sanity-checks-in-container-clicks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add slot sanity checks in container clicks
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index af7696900171ea6b7941251046bfc10c1f4eb469..836e6b705b201253f2b81d1ca0228b8a0266a1dd 100644
+index 0cb0d2f863efb86bb589b30bae61ac57bda40fab..f92624ccd43f448abdee92c975d613cbcb3457c6 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3011,6 +3011,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3008,6 +3008,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
break;
case SWAP:
if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) {
diff --git a/patches/server/0872-Call-BlockRedstoneEvents-for-lecterns.patch b/patches/server/0871-Call-BlockRedstoneEvents-for-lecterns.patch
index 7726626d78..7726626d78 100644
--- a/patches/server/0872-Call-BlockRedstoneEvents-for-lecterns.patch
+++ b/patches/server/0871-Call-BlockRedstoneEvents-for-lecterns.patch
diff --git a/patches/server/0873-Allow-proper-checking-of-empty-item-stacks.patch b/patches/server/0872-Allow-proper-checking-of-empty-item-stacks.patch
index 85819379c1..85819379c1 100644
--- a/patches/server/0873-Allow-proper-checking-of-empty-item-stacks.patch
+++ b/patches/server/0872-Allow-proper-checking-of-empty-item-stacks.patch
diff --git a/patches/server/0874-Fix-silent-equipment-change-for-mobs.patch b/patches/server/0873-Fix-silent-equipment-change-for-mobs.patch
index 14b0a2dab0..14b0a2dab0 100644
--- a/patches/server/0874-Fix-silent-equipment-change-for-mobs.patch
+++ b/patches/server/0873-Fix-silent-equipment-change-for-mobs.patch
diff --git a/patches/server/0875-Fix-spigot-s-Forced-Stats.patch b/patches/server/0874-Fix-spigot-s-Forced-Stats.patch
index 8e920d0d89..8e920d0d89 100644
--- a/patches/server/0875-Fix-spigot-s-Forced-Stats.patch
+++ b/patches/server/0874-Fix-spigot-s-Forced-Stats.patch
diff --git a/patches/server/0876-Add-missing-InventoryHolders-to-inventories.patch b/patches/server/0875-Add-missing-InventoryHolders-to-inventories.patch
index d6bf23a4f8..d6bf23a4f8 100644
--- a/patches/server/0876-Add-missing-InventoryHolders-to-inventories.patch
+++ b/patches/server/0875-Add-missing-InventoryHolders-to-inventories.patch
diff --git a/patches/server/0877-Do-not-read-tile-entities-in-chunks-that-are-positio.patch b/patches/server/0876-Do-not-read-tile-entities-in-chunks-that-are-positio.patch
index c55e56d157..c55e56d157 100644
--- a/patches/server/0877-Do-not-read-tile-entities-in-chunks-that-are-positio.patch
+++ b/patches/server/0876-Do-not-read-tile-entities-in-chunks-that-are-positio.patch
diff --git a/patches/server/0878-Add-missing-logs-for-log-ips-config-option.patch b/patches/server/0877-Add-missing-logs-for-log-ips-config-option.patch
index 2898d66615..2898d66615 100644
--- a/patches/server/0878-Add-missing-logs-for-log-ips-config-option.patch
+++ b/patches/server/0877-Add-missing-logs-for-log-ips-config-option.patch
diff --git a/patches/server/0879-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch b/patches/server/0878-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch
index b6ec32df61..b6ec32df61 100644
--- a/patches/server/0879-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch
+++ b/patches/server/0878-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch
diff --git a/patches/server/0880-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch b/patches/server/0879-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch
index 7ccf4c0f03..7ccf4c0f03 100644
--- a/patches/server/0880-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch
+++ b/patches/server/0879-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch
diff --git a/patches/server/0881-Fix-team-sidebar-objectives-not-being-cleared.patch b/patches/server/0880-Fix-team-sidebar-objectives-not-being-cleared.patch
index 88a39d0b20..cebe7aefc2 100644
--- a/patches/server/0881-Fix-team-sidebar-objectives-not-being-cleared.patch
+++ b/patches/server/0880-Fix-team-sidebar-objectives-not-being-cleared.patch
@@ -9,7 +9,7 @@ scoreboards. If a player's scoreboard has a displayed objective for the
still had a 'gold' team, it would still be displayed
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
-index cad42a0f3c016bf65181e50d139ae4e2fb9158a5..b3e1adeb932da9b3bed16acd94e2f16da48a7c72 100644
+index c7ca6210d6ae37fe95068c9baa5fb654f95307e0..f3184be3853dfc4df4ae4b8af764dfef07628ef4 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
@@ -87,8 +87,8 @@ public final class CraftScoreboardManager implements ScoreboardManager {
diff --git a/patches/server/0882-Fix-missing-map-initialize-event-call.patch b/patches/server/0881-Fix-missing-map-initialize-event-call.patch
index f2047845c6..0eb662ab82 100644
--- a/patches/server/0882-Fix-missing-map-initialize-event-call.patch
+++ b/patches/server/0881-Fix-missing-map-initialize-event-call.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Fix missing map initialize event call
public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 9270584d74edf5c1af473b1a13f7edca74cc1ec7..1bacbb0d0bd5198d0f946a959b2335d6fba0ca88 100644
+index 0db41d36d5daf015c750fb0246ab3e5da1cd81a2..7cecbac43f1cd2d9516034ea9d2633c0c76e61f4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1726,13 +1726,29 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1696,13 +1696,29 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@Nullable
@Override
public MapItemSavedData getMapData(MapId id) {
diff --git a/patches/server/0883-Update-entity-data-when-attaching-firework-to-entity.patch b/patches/server/0882-Update-entity-data-when-attaching-firework-to-entity.patch
index f2c094976f..f2c094976f 100644
--- a/patches/server/0883-Update-entity-data-when-attaching-firework-to-entity.patch
+++ b/patches/server/0882-Update-entity-data-when-attaching-firework-to-entity.patch
diff --git a/patches/server/0884-Fix-UnsafeValues-loadAdvancement.patch b/patches/server/0883-Fix-UnsafeValues-loadAdvancement.patch
index fa08d471ab..dc4c28926e 100644
--- a/patches/server/0884-Fix-UnsafeValues-loadAdvancement.patch
+++ b/patches/server/0883-Fix-UnsafeValues-loadAdvancement.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix UnsafeValues#loadAdvancement
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 766ef49d72eef0ff80247a807db5379f7fc60302..3900f95f3ea41b010b8ea79c043fe322fa233461 100644
+index a74784ddf63d316f253381ed803822a149e92bc7..1835f8cfda0222fadd9db31abfb7e85899051853 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -308,9 +308,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -302,9 +302,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
ResourceLocation minecraftkey = CraftNamespacedKey.toMinecraft(key);
JsonElement jsonelement = JsonParser.parseString(advancement);
diff --git a/patches/server/0885-Add-player-idle-duration-API.patch b/patches/server/0884-Add-player-idle-duration-API.patch
index 3bf9d659b7..3bf9d659b7 100644
--- a/patches/server/0885-Add-player-idle-duration-API.patch
+++ b/patches/server/0884-Add-player-idle-duration-API.patch
diff --git a/patches/server/0886-Don-t-check-if-we-can-see-non-visible-entities.patch b/patches/server/0885-Don-t-check-if-we-can-see-non-visible-entities.patch
index 5078fe7f01..00d8ff96c1 100644
--- a/patches/server/0886-Don-t-check-if-we-can-see-non-visible-entities.patch
+++ b/patches/server/0885-Don-t-check-if-we-can-see-non-visible-entities.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't check if we can see non-visible entities
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 502d73830ed87e06529f194090a4ffb895b2623c..95c70de2c9f0e26742c0d66ad6c3bcc310a923f6 100644
+index 5da3eee41ba0cbec5932cf9a7dac53777a2463fb..bf6d5f9e23387da845d6fe246c9013ec4d13cfb1 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1596,7 +1596,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1590,7 +1590,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper end - Configurable entity tracking range by Y
// CraftBukkit start - respect vanish API
diff --git a/patches/server/0887-Fix-NPE-in-SculkBloomEvent-world-access.patch b/patches/server/0886-Fix-NPE-in-SculkBloomEvent-world-access.patch
index 3f44bad4f1..3f44bad4f1 100644
--- a/patches/server/0887-Fix-NPE-in-SculkBloomEvent-world-access.patch
+++ b/patches/server/0886-Fix-NPE-in-SculkBloomEvent-world-access.patch
diff --git a/patches/server/0888-Allow-null-itemstack-for-Player-sendEquipmentChange.patch b/patches/server/0887-Allow-null-itemstack-for-Player-sendEquipmentChange.patch
index c5594fd831..c5594fd831 100644
--- a/patches/server/0888-Allow-null-itemstack-for-Player-sendEquipmentChange.patch
+++ b/patches/server/0887-Allow-null-itemstack-for-Player-sendEquipmentChange.patch
diff --git a/patches/server/0889-Optimize-VarInts.patch b/patches/server/0888-Optimize-VarInts.patch
index b96957d432..b96957d432 100644
--- a/patches/server/0889-Optimize-VarInts.patch
+++ b/patches/server/0888-Optimize-VarInts.patch
diff --git a/patches/server/0890-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/server/0889-Add-API-to-get-the-collision-shape-of-a-block-before.patch
index 50464e50cb..50464e50cb 100644
--- a/patches/server/0890-Add-API-to-get-the-collision-shape-of-a-block-before.patch
+++ b/patches/server/0889-Add-API-to-get-the-collision-shape-of-a-block-before.patch
diff --git a/patches/server/0891-Add-predicate-for-blocks-when-raytracing.patch b/patches/server/0890-Add-predicate-for-blocks-when-raytracing.patch
index fdeae8627c..fdeae8627c 100644
--- a/patches/server/0891-Add-predicate-for-blocks-when-raytracing.patch
+++ b/patches/server/0890-Add-predicate-for-blocks-when-raytracing.patch
diff --git a/patches/server/0892-Broadcast-take-item-packets-with-collector-as-source.patch b/patches/server/0891-Broadcast-take-item-packets-with-collector-as-source.patch
index 03d6650dc1..1fb19203b6 100644
--- a/patches/server/0892-Broadcast-take-item-packets-with-collector-as-source.patch
+++ b/patches/server/0891-Broadcast-take-item-packets-with-collector-as-source.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Broadcast take item packets with collector as source
This fixes players (which can't view the collector) seeing item pickups with themselves as the target.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index a4d24269c1365f32f232116f1530ac75b096c6ab..30424789ba1c8d25f830145501b4a7399b91f2d1 100644
+index 24245cfb160dc990b3661388c2f95b9383f98428..09bd6ba5907d42bed08872f18d40d8c743d392ff 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3893,7 +3893,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3891,7 +3891,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public void take(Entity item, int count) {
if (!item.isRemoved() && !this.level().isClientSide && (item instanceof ItemEntity || item instanceof AbstractArrow || item instanceof ExperienceOrb)) {
diff --git a/patches/server/0893-Expand-LingeringPotion-API.patch b/patches/server/0892-Expand-LingeringPotion-API.patch
index 3a58f0528a..3a58f0528a 100644
--- a/patches/server/0893-Expand-LingeringPotion-API.patch
+++ b/patches/server/0892-Expand-LingeringPotion-API.patch
diff --git a/patches/server/0894-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/0893-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
index ac9852081f..ac9852081f 100644
--- a/patches/server/0894-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
+++ b/patches/server/0893-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
diff --git a/patches/server/0895-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/server/0894-Add-hand-to-fish-event-for-all-player-interactions.patch
index cb3197a1b2..cb3197a1b2 100644
--- a/patches/server/0895-Add-hand-to-fish-event-for-all-player-interactions.patch
+++ b/patches/server/0894-Add-hand-to-fish-event-for-all-player-interactions.patch
diff --git a/patches/server/0896-Fix-several-issues-with-EntityBreedEvent.patch b/patches/server/0895-Fix-several-issues-with-EntityBreedEvent.patch
index 7d7a988fc0..7d7a988fc0 100644
--- a/patches/server/0896-Fix-several-issues-with-EntityBreedEvent.patch
+++ b/patches/server/0895-Fix-several-issues-with-EntityBreedEvent.patch
diff --git a/patches/server/0897-Add-UUID-attribute-modifier-API.patch b/patches/server/0896-Add-UUID-attribute-modifier-API.patch
index 4b5e695553..4b5e695553 100644
--- a/patches/server/0897-Add-UUID-attribute-modifier-API.patch
+++ b/patches/server/0896-Add-UUID-attribute-modifier-API.patch
diff --git a/patches/server/0898-Fix-missing-event-call-for-entity-teleport-API.patch b/patches/server/0897-Fix-missing-event-call-for-entity-teleport-API.patch
index c00c1e49bd..c00c1e49bd 100644
--- a/patches/server/0898-Fix-missing-event-call-for-entity-teleport-API.patch
+++ b/patches/server/0897-Fix-missing-event-call-for-entity-teleport-API.patch
diff --git a/patches/server/0899-Lazily-create-LootContext-for-criterions.patch b/patches/server/0898-Lazily-create-LootContext-for-criterions.patch
index d1033bf7e7..d1033bf7e7 100644
--- a/patches/server/0899-Lazily-create-LootContext-for-criterions.patch
+++ b/patches/server/0898-Lazily-create-LootContext-for-criterions.patch
diff --git a/patches/server/0900-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0899-Don-t-fire-sync-events-during-worldgen.patch
index 389d1d5fde..f530a9f4e7 100644
--- a/patches/server/0900-Don-t-fire-sync-events-during-worldgen.patch
+++ b/patches/server/0899-Don-t-fire-sync-events-during-worldgen.patch
@@ -19,10 +19,10 @@ where generation happened directly to a ServerLevel and the
entity still has the flag set.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 1bacbb0d0bd5198d0f946a959b2335d6fba0ca88..a628da8a0ed7ae2c7b46df3881bd75dc5b4fd607 100644
+index 7cecbac43f1cd2d9516034ea9d2633c0c76e61f4..7a985c30a973efacf3e8b70e7163c550d86b0870 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1219,6 +1219,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1189,6 +1189,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// CraftBukkit start
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
@@ -48,10 +48,10 @@ index c0539c8826a60cbe25855319cc174fb1520798c0..02b9d280486a23d8eef650566dfaa10a
this.entityData.set(Entity.DATA_POSE, pose);
}
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index ca9e63942f3cb8986456410b2a77aafc6541aad2..ccee69813597f45d382268bd1792a49722afebe9 100644
+index 64dc0bd1900575e40ac72a98c6df371223bd244c..c2693d530be00af16b2aa4ca4afd1d136db68183 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -658,9 +658,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
+@@ -649,9 +649,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
}
public static Optional<Entity> create(CompoundTag nbt, Level world, EntitySpawnReason reason) {
@@ -68,10 +68,10 @@ index ca9e63942f3cb8986456410b2a77aafc6541aad2..ccee69813597f45d382268bd1792a497
}, () -> {
EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id"));
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 30424789ba1c8d25f830145501b4a7399b91f2d1..9bc6ed9fd8e5154d39fe12ffed1ecd5ec8e70df8 100644
+index 09bd6ba5907d42bed08872f18d40d8c743d392ff..251abe382f951c3ddac8112a0ffe1dc906b88e4c 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1161,6 +1161,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1159,6 +1159,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public boolean addEffect(MobEffectInstance mobeffect, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause) {
@@ -83,7 +83,7 @@ index 30424789ba1c8d25f830145501b4a7399b91f2d1..9bc6ed9fd8e5154d39fe12ffed1ecd5e
// org.spigotmc.AsyncCatcher.catchOp("effect add"); // Spigot // Paper - move to API
if (this.isTickingEffects) {
this.effectsToProcess.add(new ProcessableEffect(mobeffect, cause));
-@@ -1180,10 +1185,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1178,10 +1183,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
override = new MobEffectInstance(mobeffect1).update(mobeffect);
}
@@ -97,7 +97,7 @@ index 30424789ba1c8d25f830145501b4a7399b91f2d1..9bc6ed9fd8e5154d39fe12ffed1ecd5e
// CraftBukkit end
if (mobeffect1 == null) {
-@@ -1192,7 +1200,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1190,7 +1198,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
flag = true;
mobeffect.onEffectAdded(this);
// CraftBukkit start
diff --git a/patches/server/0901-Add-Structure-check-API.patch b/patches/server/0900-Add-Structure-check-API.patch
index d138a01f44..d138a01f44 100644
--- a/patches/server/0901-Add-Structure-check-API.patch
+++ b/patches/server/0900-Add-Structure-check-API.patch
diff --git a/patches/server/0902-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0901-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
index db45e464ac..db45e464ac 100644
--- a/patches/server/0902-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
+++ b/patches/server/0901-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
diff --git a/patches/server/0903-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0902-Restore-vanilla-entity-drops-behavior.patch
index bbad1a93c7..c19f1327f4 100644
--- a/patches/server/0903-Restore-vanilla-entity-drops-behavior.patch
+++ b/patches/server/0902-Restore-vanilla-entity-drops-behavior.patch
@@ -89,10 +89,10 @@ index 02b9d280486a23d8eef650566dfaa10ac0b96c9c..cdc5ea3dd9559c076049c86a9fdb4e8b
return this.spawnAtLocation(world, entityitem);
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 9bc6ed9fd8e5154d39fe12ffed1ecd5ec8e70df8..4b9108e48d052919bca000ddb54f9bf4589c33e6 100644
+index 251abe382f951c3ddac8112a0ffe1dc906b88e4c..adde7352cdbcb8684f43d6bf5978b6943e9f165b 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -291,7 +291,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -289,7 +289,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected float appliedScale;
// CraftBukkit start
public int expToDrop;
diff --git a/patches/server/0904-Dont-resend-blocks-on-interactions.patch b/patches/server/0903-Dont-resend-blocks-on-interactions.patch
index 04f0061970..04f0061970 100644
--- a/patches/server/0904-Dont-resend-blocks-on-interactions.patch
+++ b/patches/server/0903-Dont-resend-blocks-on-interactions.patch
diff --git a/patches/server/0905-add-more-scoreboard-API.patch b/patches/server/0904-add-more-scoreboard-API.patch
index 3365b53a36..3365b53a36 100644
--- a/patches/server/0905-add-more-scoreboard-API.patch
+++ b/patches/server/0904-add-more-scoreboard-API.patch
diff --git a/patches/server/0906-Improve-Registry.patch b/patches/server/0905-Improve-Registry.patch
index d5769f63c0..d5769f63c0 100644
--- a/patches/server/0906-Improve-Registry.patch
+++ b/patches/server/0905-Improve-Registry.patch
diff --git a/patches/server/0907-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/0906-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch
index 394a12efc2..dc1f06ed56 100644
--- a/patches/server/0907-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch
+++ b/patches/server/0906-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch
@@ -26,10 +26,10 @@ index c6dcc37ac5fcf50bcb246f533b99983dfc5c19c2..c13b6f14c3061710c2b27034db240cc9
d3 = to.getX();
d4 = to.getY();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 4b9108e48d052919bca000ddb54f9bf4589c33e6..1c4ec3857c5c3ecf58f842292c280a4a1f00a04c 100644
+index adde7352cdbcb8684f43d6bf5978b6943e9f165b..9d3d6f012cfca60884019ed9710804aa37b11fbf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4365,7 +4365,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4363,7 +4363,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!(this instanceof ServerPlayer)) {
EntityTeleportEvent teleport = new EntityTeleportEvent(this.getBukkitEntity(), new Location(this.level().getWorld(), d3, d4, d5), new Location(this.level().getWorld(), d0, d6, d2));
this.level().getCraftServer().getPluginManager().callEvent(teleport);
diff --git a/patches/server/0908-Add-experience-points-API.patch b/patches/server/0907-Add-experience-points-API.patch
index 1b8c5e9d3f..1b8c5e9d3f 100644
--- a/patches/server/0908-Add-experience-points-API.patch
+++ b/patches/server/0907-Add-experience-points-API.patch
diff --git a/patches/server/0909-Add-drops-to-shear-events.patch b/patches/server/0908-Add-drops-to-shear-events.patch
index 0ae1794dca..0ae1794dca 100644
--- a/patches/server/0909-Add-drops-to-shear-events.patch
+++ b/patches/server/0908-Add-drops-to-shear-events.patch
diff --git a/patches/server/0910-Add-PlayerShieldDisableEvent.patch b/patches/server/0909-Add-PlayerShieldDisableEvent.patch
index d2d860a028..d2d860a028 100644
--- a/patches/server/0910-Add-PlayerShieldDisableEvent.patch
+++ b/patches/server/0909-Add-PlayerShieldDisableEvent.patch
diff --git a/patches/server/0911-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0910-Validate-ResourceLocation-in-NBT-reading.patch
index 5a6790a25d..a7e42195f1 100644
--- a/patches/server/0911-Validate-ResourceLocation-in-NBT-reading.patch
+++ b/patches/server/0910-Validate-ResourceLocation-in-NBT-reading.patch
@@ -53,10 +53,10 @@ index 084935138b1484f3d96e99f4e5655a6c04931907..9e357abe13f55bd9ce3a1d5348bcf19a
if (nbt.contains("LootTableSeed", 4)) {
this.setLootTableSeed(nbt.getLong("LootTableSeed"));
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index ccee69813597f45d382268bd1792a49722afebe9..e56050bef4a5aaa0fca17192dab4cf5e6a55fbae 100644
+index c2693d530be00af16b2aa4ca4afd1d136db68183..629c1316920ad4c111fff489f8c3ea0ed39d0099 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -689,7 +689,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
+@@ -680,7 +680,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
}
public static Optional<EntityType<?>> by(CompoundTag nbt) {
@@ -85,10 +85,10 @@ index b7721ed97305d1cd6725935f965c2effc1bef5a1..5f880a8809f9c20bc8e8c0b2d48590ba
if (nbt.contains("leash", 11)) {
Either<UUID, BlockPos> either = (Either) NbtUtils.readBlockPos(nbt, "leash").map(Either::right).orElse(null); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 1c4ec3857c5c3ecf58f842292c280a4a1f00a04c..7196340fefd95845f290329faef489f2b2626ecb 100644
+index 9d3d6f012cfca60884019ed9710804aa37b11fbf..49b3d8d2bc34c0785f143bbc8976308f5bf8c9de 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -911,11 +911,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -909,11 +909,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (nbt.contains("SleepingX", 99) && nbt.contains("SleepingY", 99) && nbt.contains("SleepingZ", 99)) {
BlockPos blockposition = new BlockPos(nbt.getInt("SleepingX"), nbt.getInt("SleepingY"), nbt.getInt("SleepingZ"));
diff --git a/patches/server/0912-Properly-handle-experience-dropping-on-block-break.patch b/patches/server/0911-Properly-handle-experience-dropping-on-block-break.patch
index e5caf980cd..5b45a7fb92 100644
--- a/patches/server/0912-Properly-handle-experience-dropping-on-block-break.patch
+++ b/patches/server/0911-Properly-handle-experience-dropping-on-block-break.patch
@@ -7,10 +7,10 @@ This causes spawnAfterBreak to spawn xp by default, removing the need to manuall
For classes that use custom xp amounts, they can drop the resources with disabling
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index d048d0e4b16459b5bad44ebfa3c6a8f336f6762b..83537aa240ebff8dd19b450956730dc3d4f355a0 100644
+index 18c011c1943867dbc4abee338b03b9be499876dd..01fbefdbed48ab85481c811cca532c91860626f7 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -617,7 +617,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -615,7 +615,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (drop) {
BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null;
@@ -21,10 +21,10 @@ index d048d0e4b16459b5bad44ebfa3c6a8f336f6762b..83537aa240ebff8dd19b450956730dc3
boolean flag1 = this.setBlock(pos, fluid.createLegacyBlock(), 3, maxUpdateDepth);
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index 6fb3f551f432d7e668c606fb7bd3514408e0478a..9917df070d9815b6915e4a0b022dfe4e5b7861e7 100644
+index 4ff32e3fb1a1979827ef063cda196a43995440fe..dc242451f397ae6a30b830ef1f211f1a066423a4 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -311,23 +311,31 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -302,23 +302,31 @@ public class Block extends BlockBehaviour implements ItemLike {
for (ItemStack drop : Block.getDrops(state, serverLevel, pos, blockEntity)) {
items.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(drop));
}
@@ -58,7 +58,7 @@ index 6fb3f551f432d7e668c606fb7bd3514408e0478a..9917df070d9815b6915e4a0b022dfe4e
}
}
-@@ -415,7 +423,7 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -406,7 +414,7 @@ public class Block extends BlockBehaviour implements ItemLike {
player.awardStat(Stats.BLOCK_MINED.get(this));
player.causeFoodExhaustion(0.005F, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.BLOCK_MINED); // CraftBukkit - EntityExhaustionEvent
if (includeDrops) { // Paper - fix drops not preventing stats/food exhaustion
diff --git a/patches/server/0913-Fixup-NamespacedKey-handling.patch b/patches/server/0912-Fixup-NamespacedKey-handling.patch
index 932cc370d8..932cc370d8 100644
--- a/patches/server/0913-Fixup-NamespacedKey-handling.patch
+++ b/patches/server/0912-Fixup-NamespacedKey-handling.patch
diff --git a/patches/server/0914-Expose-LootTable-of-DecoratedPot.patch b/patches/server/0913-Expose-LootTable-of-DecoratedPot.patch
index afa86977a9..afa86977a9 100644
--- a/patches/server/0914-Expose-LootTable-of-DecoratedPot.patch
+++ b/patches/server/0913-Expose-LootTable-of-DecoratedPot.patch
diff --git a/patches/server/0915-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0914-Reduce-allocation-of-Vec3D-by-entity-tracker.patch
index 2fd7060c00..cd53371b6b 100644
--- a/patches/server/0915-Reduce-allocation-of-Vec3D-by-entity-tracker.patch
+++ b/patches/server/0914-Reduce-allocation-of-Vec3D-by-entity-tracker.patch
@@ -18,10 +18,10 @@ index a043ac10834562d357ef0b5aded2e916e2a0d056..74276c368016fcc4dbf9579b2ecbadc9
@VisibleForTesting
static long encode(double value) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 95c70de2c9f0e26742c0d66ad6c3bcc310a923f6..182513bb175feb5f30f0fb1cd5db501b6d483afd 100644
+index bf6d5f9e23387da845d6fe246c9013ec4d13cfb1..9b64dfe8f1727519673cc87be2398d43601e68ef 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1578,10 +1578,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1572,10 +1572,14 @@ 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/0916-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0915-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch
index 4ed1121ea1..4ed1121ea1 100644
--- a/patches/server/0916-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch
+++ b/patches/server/0915-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch
diff --git a/patches/server/0917-Add-ShulkerDuplicateEvent.patch b/patches/server/0916-Add-ShulkerDuplicateEvent.patch
index f06c91ae48..f06c91ae48 100644
--- a/patches/server/0917-Add-ShulkerDuplicateEvent.patch
+++ b/patches/server/0916-Add-ShulkerDuplicateEvent.patch
diff --git a/patches/server/0918-Add-api-for-spawn-egg-texture-colors.patch b/patches/server/0917-Add-api-for-spawn-egg-texture-colors.patch
index ee55eb2e4a..af708be49f 100644
--- a/patches/server/0918-Add-api-for-spawn-egg-texture-colors.patch
+++ b/patches/server/0917-Add-api-for-spawn-egg-texture-colors.patch
@@ -5,12 +5,12 @@ Subject: [PATCH] Add api for spawn egg texture colors
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 3900f95f3ea41b010b8ea79c043fe322fa233461..7ae4567bc6f2f0374d1a4a3859f6329eaace7415 100644
+index 1835f8cfda0222fadd9db31abfb7e85899051853..30106a999db1bae217333b5e94913b9ec55e4615 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -643,6 +643,15 @@ public final class CraftMagicNumbers implements UnsafeValues {
- return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT);
+@@ -629,6 +629,15 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
+ // Paper end
+ // Paper start - spawn egg color visibility
+ @Override
diff --git a/patches/server/0919-Add-Lifecycle-Event-system.patch b/patches/server/0918-Add-Lifecycle-Event-system.patch
index 611ac65850..0eaff54d34 100644
--- a/patches/server/0919-Add-Lifecycle-Event-system.patch
+++ b/patches/server/0918-Add-Lifecycle-Event-system.patch
@@ -727,10 +727,10 @@ index 2e96308696e131f3f013469a395e5ddda2c5d529..65a66e484c1c39c5f41d97db52f31c67
} catch (Throwable e) {
LOGGER.error("Failed to run bootstrapper for %s. This plugin will not be loaded.".formatted(provider.getSource()), e);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 83c3de4ae733199f64fe0f967f9f816545d20f1c..581a15957478fd9f394a27269c2bd68a117ad8c2 100644
+index a1f2c8fd0348a6a5dad521430f473867bdadd1a5..a2c749b2997557fec5c978f3bed8c35d7614e740 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1051,6 +1051,11 @@ public final class CraftServer implements Server {
+@@ -1050,6 +1050,11 @@ public final class CraftServer implements Server {
@Override
public void reload() {
@@ -743,10 +743,10 @@ index 83c3de4ae733199f64fe0f967f9f816545d20f1c..581a15957478fd9f394a27269c2bd68a
this.reloadCount++;
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 7ae4567bc6f2f0374d1a4a3859f6329eaace7415..ca201861b383bac4ea93284ac017e85ae0b3b17c 100644
+index 30106a999db1bae217333b5e94913b9ec55e4615..06d66c8043daec3c736d82d972ceb98d55eae9d1 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -652,6 +652,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -638,6 +638,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - spawn egg color visibility
diff --git a/patches/server/0920-ItemStack-Tooltip-API.patch b/patches/server/0919-ItemStack-Tooltip-API.patch
index 7279f30261..f06c4356cd 100644
--- a/patches/server/0920-ItemStack-Tooltip-API.patch
+++ b/patches/server/0919-ItemStack-Tooltip-API.patch
@@ -5,14 +5,14 @@ Subject: [PATCH] ItemStack Tooltip API
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index ca201861b383bac4ea93284ac017e85ae0b3b17c..8feba2bd411abe36e64a39a0c599c73d07c19e20 100644
+index 06d66c8043daec3c736d82d972ceb98d55eae9d1..51d5629b00ec4929c12ed9e6ba5a37f5903cf13e 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -628,6 +628,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -627,6 +627,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
+ if (statistic.getType() != org.bukkit.Statistic.Type.UNTYPED) return "minecraft.custom:minecraft." + statistic.getKey().getKey();
+ return org.bukkit.craftbukkit.CraftStatistic.getNMSStatistic(statistic).getName();
}
- // Paper end - fix custom stats criteria creation
-
-+ // Paper start - expose itemstack tooltip lines
++
+ @Override
+ public java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(final ItemStack itemStack, final io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, final org.bukkit.entity.Player player) {
+ Preconditions.checkArgument(tooltipContext != null, "tooltipContext cannot be null");
@@ -25,8 +25,6 @@ index ca201861b383bac4ea93284ac017e85ae0b3b17c..8feba2bd411abe36e64a39a0c599c73d
+ player == null ? null : ((org.bukkit.craftbukkit.entity.CraftPlayer) player).getHandle(), flag);
+ return lines.stream().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).toList();
+ }
-+ // Paper end - expose itemstack tooltip lines
-+
- @Override
- public String get(Class<?> aClass, String s) {
- if (aClass == Enchantment.class) {
+ // Paper end
+
+ // Paper start - spawn egg color visibility
diff --git a/patches/server/0921-Add-getChunkSnapshot-includeLightData-parameter.patch b/patches/server/0920-Add-getChunkSnapshot-includeLightData-parameter.patch
index ba33560bab..ba33560bab 100644
--- a/patches/server/0921-Add-getChunkSnapshot-includeLightData-parameter.patch
+++ b/patches/server/0920-Add-getChunkSnapshot-includeLightData-parameter.patch
diff --git a/patches/server/0922-Add-FluidState-API.patch b/patches/server/0921-Add-FluidState-API.patch
index e1e2fe004f..e1e2fe004f 100644
--- a/patches/server/0922-Add-FluidState-API.patch
+++ b/patches/server/0921-Add-FluidState-API.patch
diff --git a/patches/server/0923-add-number-format-api.patch b/patches/server/0922-add-number-format-api.patch
index d412b5f929..d412b5f929 100644
--- a/patches/server/0923-add-number-format-api.patch
+++ b/patches/server/0922-add-number-format-api.patch
diff --git a/patches/server/0924-improve-BanList-types.patch b/patches/server/0923-improve-BanList-types.patch
index 96871b48ee..c89914131f 100644
--- a/patches/server/0924-improve-BanList-types.patch
+++ b/patches/server/0923-improve-BanList-types.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] improve BanList types
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 581a15957478fd9f394a27269c2bd68a117ad8c2..f7e478a14ef17ad6d747d0ab56418b0b5b20492d 100644
+index a2c749b2997557fec5c978f3bed8c35d7614e740..6136037d3d096300d93b9710dd854224b30e0738 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2261,6 +2261,21 @@ public final class CraftServer implements Server {
+@@ -2260,6 +2260,21 @@ public final class CraftServer implements Server {
};
}
diff --git a/patches/server/0925-Expanded-Hopper-API.patch b/patches/server/0924-Expanded-Hopper-API.patch
index 2b59ac9974..2b59ac9974 100644
--- a/patches/server/0925-Expanded-Hopper-API.patch
+++ b/patches/server/0924-Expanded-Hopper-API.patch
diff --git a/patches/server/0926-Add-BlockBreakProgressUpdateEvent.patch b/patches/server/0925-Add-BlockBreakProgressUpdateEvent.patch
index 2c5061f42f..9b57c89df5 100644
--- a/patches/server/0926-Add-BlockBreakProgressUpdateEvent.patch
+++ b/patches/server/0925-Add-BlockBreakProgressUpdateEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockBreakProgressUpdateEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index a628da8a0ed7ae2c7b46df3881bd75dc5b4fd607..99e6021bc0dc5775f4443bdb77debd535a2cf29f 100644
+index 7a985c30a973efacf3e8b70e7163c550d86b0870..ea1281c9a3b83b17de64d583e029db9bacabcd88 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1315,6 +1315,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1285,6 +1285,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (entity instanceof Player) entityhuman = (Player) entity;
// CraftBukkit end
diff --git a/patches/server/0927-Deprecate-ItemStack-setType.patch b/patches/server/0926-Deprecate-ItemStack-setType.patch
index e58b22013f..e58b22013f 100644
--- a/patches/server/0927-Deprecate-ItemStack-setType.patch
+++ b/patches/server/0926-Deprecate-ItemStack-setType.patch
diff --git a/patches/server/0928-Add-CartographyItemEvent.patch b/patches/server/0927-Add-CartographyItemEvent.patch
index b8a1377ce9..544bc15eda 100644
--- a/patches/server/0928-Add-CartographyItemEvent.patch
+++ b/patches/server/0927-Add-CartographyItemEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add CartographyItemEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 836e6b705b201253f2b81d1ca0228b8a0266a1dd..d3975496dcf94d3474e891bcd3105120559b6a61 100644
+index f92624ccd43f448abdee92c975d613cbcb3457c6..90bed0a36b2d518b56164a414350ec02822ad42a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -3133,6 +3133,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -3130,6 +3130,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}
diff --git a/patches/server/0929-More-Raid-API.patch b/patches/server/0928-More-Raid-API.patch
index 2039ffa00d..2039ffa00d 100644
--- a/patches/server/0929-More-Raid-API.patch
+++ b/patches/server/0928-More-Raid-API.patch
diff --git a/patches/server/0930-Add-onboarding-message-for-initial-server-start.patch b/patches/server/0929-Add-onboarding-message-for-initial-server-start.patch
index 70718c71a4..73d18bd703 100644
--- a/patches/server/0930-Add-onboarding-message-for-initial-server-start.patch
+++ b/patches/server/0929-Add-onboarding-message-for-initial-server-start.patch
@@ -17,10 +17,10 @@ index d9502ba028a96f9cc846f9ed428bd8066b857ca3..87e5f614ba988547a827486740db217e
node = loader.load();
this.verifyGlobalConfigVersion(node);
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-index 36b96e0ed5c0d25068ec4678eddd8a19a020d345..8a0cb603cd4dbfa1839e0f4e1606876cbb373277 100644
+index 56798215644d8bca1695856b3a941e8089f49e48..46c37c8db8ecf3cc808fcf59f6bee5fe6ca49b75 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-@@ -27,6 +27,7 @@ public class GlobalConfiguration extends ConfigurationPart {
+@@ -25,6 +25,7 @@ public class GlobalConfiguration extends ConfigurationPart {
private static final Logger LOGGER = LogUtils.getLogger();
static final int CURRENT_VERSION = 29; // (when you change the version, change the comment, so it conflicts on rebases): <insert changes here>
private static GlobalConfiguration instance;
@@ -29,10 +29,10 @@ index 36b96e0ed5c0d25068ec4678eddd8a19a020d345..8a0cb603cd4dbfa1839e0f4e1606876c
return instance;
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 7e83a0de08488c5acf3c1a5d7107564e2a8ed7e0..6de199b7cf7728479fede534338829cecade50f2 100644
+index be188079f12b3f7b394ae91db62cc17b1d0f4e79..2de0ae09de41f3ed254318a78d65045fc76e5016 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1151,6 +1151,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1149,6 +1149,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long tickSection = Util.getNanos();
long currentTime;
// Paper end - further improve server tick loop
diff --git a/patches/server/0931-Configurable-max-block-fluid-ticks.patch b/patches/server/0930-Configurable-max-block-fluid-ticks.patch
index 15cd7fb486..c93e0006cc 100644
--- a/patches/server/0931-Configurable-max-block-fluid-ticks.patch
+++ b/patches/server/0930-Configurable-max-block-fluid-ticks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable max block/fluid ticks
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 99e6021bc0dc5775f4443bdb77debd535a2cf29f..eed2d1ec425bbd34563fae9e69a4518ec154fc23 100644
+index ea1281c9a3b83b17de64d583e029db9bacabcd88..711d5136124c0fa21015f0154057ab5742071e59 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -492,9 +492,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -489,9 +489,9 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (!this.isDebug() && flag) {
j = this.getGameTime();
gameprofilerfiller.push("blockTicks");
@@ -19,4 +19,4 @@ index 99e6021bc0dc5775f4443bdb77debd535a2cf29f..eed2d1ec425bbd34563fae9e69a4518e
+ this.fluidTicks.tick(j, paperConfig().environment.maxFluidTicks, this::tickFluid); // Paper - configurable max fluid ticks
gameprofilerfiller.pop();
}
- this.timings.scheduledBlocks.stopTiming(); // Paper
+
diff --git a/patches/server/0932-Fix-bees-aging-inside-hives.patch b/patches/server/0931-Fix-bees-aging-inside-hives.patch
index 8d4dcd0b64..8d4dcd0b64 100644
--- a/patches/server/0932-Fix-bees-aging-inside-hives.patch
+++ b/patches/server/0931-Fix-bees-aging-inside-hives.patch
diff --git a/patches/server/0933-Disable-memory-reserve-allocating.patch b/patches/server/0932-Disable-memory-reserve-allocating.patch
index ea801f5092..ea801f5092 100644
--- a/patches/server/0933-Disable-memory-reserve-allocating.patch
+++ b/patches/server/0932-Disable-memory-reserve-allocating.patch
diff --git a/patches/server/0934-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch b/patches/server/0933-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch
index 3cf04503d8..3cf04503d8 100644
--- a/patches/server/0934-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch
+++ b/patches/server/0933-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch
diff --git a/patches/server/0935-Fix-DamageSource-API.patch b/patches/server/0934-Fix-DamageSource-API.patch
index 113d204bee..113d204bee 100644
--- a/patches/server/0935-Fix-DamageSource-API.patch
+++ b/patches/server/0934-Fix-DamageSource-API.patch
diff --git a/patches/server/0936-Fix-creation-of-invalid-block-entity-during-world-ge.patch b/patches/server/0935-Fix-creation-of-invalid-block-entity-during-world-ge.patch
index f476845b96..d12e5cd665 100644
--- a/patches/server/0936-Fix-creation-of-invalid-block-entity-during-world-ge.patch
+++ b/patches/server/0935-Fix-creation-of-invalid-block-entity-during-world-ge.patch
@@ -36,10 +36,10 @@ index 2e72e92762877b28dd908711671e1dfb933de9b0..b7d29389a357f142237cecd75f8ca91c
nbttagcompound.putInt("x", pos.getX());
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 7181acfafad91aa5f6ab7ce663d9be4a1b65b02a..5dd1df0da1f954778aebe0f40611ae0f3a7866ab 100644
+index d4bd4cbc5c4773659662a6d7a09b21a99463c1fb..7a794bb0587ce55b067c67dd17ab5be6a4773030 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -994,9 +994,14 @@ public class LevelChunk extends ChunkAccess {
+@@ -991,9 +991,14 @@ public class LevelChunk extends ChunkAccess {
if (this.blockEntity.getType().isValid(iblockdata)) {
this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), iblockdata, this.blockEntity);
this.loggedInvalidBlockState = false;
diff --git a/patches/server/0937-Fix-possible-StackOverflowError-for-some-dispenses.patch b/patches/server/0936-Fix-possible-StackOverflowError-for-some-dispenses.patch
index 7e0fabb39a..7e0fabb39a 100644
--- a/patches/server/0937-Fix-possible-StackOverflowError-for-some-dispenses.patch
+++ b/patches/server/0936-Fix-possible-StackOverflowError-for-some-dispenses.patch
diff --git a/patches/server/0938-Improve-tag-parser-handling.patch b/patches/server/0937-Improve-tag-parser-handling.patch
index c7b698366d..36bc92d7a0 100644
--- a/patches/server/0938-Improve-tag-parser-handling.patch
+++ b/patches/server/0937-Improve-tag-parser-handling.patch
@@ -252,7 +252,7 @@ index 898b19887ed34c87003fc63cb5905df2ba6234a5..b47eeb23055b135d5567552ba983bfbc
private void write(FriendlyByteBuf buf) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index d3975496dcf94d3474e891bcd3105120559b6a61..2cef6390ce8cdc43ae7566683afc157cb3a6fd78 100644
+index 90bed0a36b2d518b56164a414350ec02822ad42a..0d6c3cdd0c8fa8c6983e8a35bac89ff062e1a97f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -778,6 +778,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/patches/server/0939-Item-Mutation-Fixes.patch b/patches/server/0938-Item-Mutation-Fixes.patch
index f7242e591f..f7242e591f 100644
--- a/patches/server/0939-Item-Mutation-Fixes.patch
+++ b/patches/server/0938-Item-Mutation-Fixes.patch
diff --git a/patches/server/0940-Per-world-ticks-per-spawn-settings.patch b/patches/server/0939-Per-world-ticks-per-spawn-settings.patch
index a028a8c234..2746e3483b 100644
--- a/patches/server/0940-Per-world-ticks-per-spawn-settings.patch
+++ b/patches/server/0939-Per-world-ticks-per-spawn-settings.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Per world ticks per spawn settings
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 83537aa240ebff8dd19b450956730dc3d4f355a0..ffe894f3034a967f7e3d820c6416acb8adbcfb84 100644
+index 01fbefdbed48ab85481c811cca532c91860626f7..083b72ebacfbba22af2230fb69b311aeee62cb6a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -186,6 +186,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -185,6 +185,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return this.getChunkIfLoaded(chunkX, chunkZ) != null;
}
// Paper end - Use getChunkIfLoadedImmediately
@@ -24,7 +24,7 @@ index 83537aa240ebff8dd19b450956730dc3d4f355a0..ffe894f3034a967f7e3d820c6416acb8
public abstract ResourceKey<LevelStem> getTypeKey();
-@@ -199,7 +208,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -198,7 +207,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit Ticks things
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
diff --git a/patches/server/0941-Properly-track-the-changed-item-from-dispense-events.patch b/patches/server/0940-Properly-track-the-changed-item-from-dispense-events.patch
index 3885b9f8a2..3885b9f8a2 100644
--- a/patches/server/0941-Properly-track-the-changed-item-from-dispense-events.patch
+++ b/patches/server/0940-Properly-track-the-changed-item-from-dispense-events.patch
diff --git a/patches/server/0942-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/0941-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch
index 40895c886c..5c06384279 100644
--- a/patches/server/0942-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch
+++ b/patches/server/0941-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch
@@ -13,10 +13,10 @@ A config is provided if you rather let players use these exploits, and let
them destroy the worlds End Portals and get on top of the nether easy.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index ffe894f3034a967f7e3d820c6416acb8adbcfb84..35b9a6d382e420844fc21c88b7d8044e3b8b8368 100644
+index 083b72ebacfbba22af2230fb69b311aeee62cb6a..ba4006bc7dc31d10f37023cba7995a9621796f73 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -447,6 +447,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -445,6 +445,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
@@ -40,13 +40,14 @@ index 86656de31b1e33381eddd3ef210122118b31e620..fd1ecedfab037e377e4dded61539689b
if (!this.level.isInWorldBounds(blockposition)) {
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index 9917df070d9815b6915e4a0b022dfe4e5b7861e7..729c3d8279b13d21c65ede89ea50869b69d5bfe6 100644
+index dc242451f397ae6a30b830ef1f211f1a066423a4..0f7b73634930df02d7b0a7f44890597cc2e6deca 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -89,6 +89,19 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -88,6 +88,21 @@ public class Block extends BlockBehaviour implements ItemLike {
+ public static final int UPDATE_LIMIT = 512;
protected final StateDefinition<Block, BlockState> stateDefinition;
private BlockState defaultBlockState;
- // Paper start
++ // Paper start - Protect Bedrock and End Portal/Frames from being destroyed
+ public final boolean isDestroyable() {
+ return io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowPermanentBlockBreakExploits ||
+ this != Blocks.BARRIER &&
@@ -60,9 +61,10 @@ index 9917df070d9815b6915e4a0b022dfe4e5b7861e7..729c3d8279b13d21c65ede89ea50869b
+ this != Blocks.STRUCTURE_BLOCK &&
+ this != Blocks.JIGSAW;
+ }
- public co.aikar.timings.Timing timing;
- public co.aikar.timings.Timing getTiming() {
- if (timing == null) {
++ // Paper end - Protect Bedrock and End Portal/Frames from being destroyed
+ @Nullable
+ private Item item;
+ private static final int CACHE_SIZE = 256;
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
index e841fccb8f298ef692677583b468869f56dc722c..4b51472502d08ea357da437afeb4b581979e9cff 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
diff --git a/patches/server/0943-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0942-Add-config-for-mobs-immune-to-default-effects.patch
index c3b01a16ed..c3b01a16ed 100644
--- a/patches/server/0943-Add-config-for-mobs-immune-to-default-effects.patch
+++ b/patches/server/0942-Add-config-for-mobs-immune-to-default-effects.patch
diff --git a/patches/server/0944-Deep-clone-nbt-tags-in-PDC.patch b/patches/server/0943-Deep-clone-nbt-tags-in-PDC.patch
index 559c6cddea..559c6cddea 100644
--- a/patches/server/0944-Deep-clone-nbt-tags-in-PDC.patch
+++ b/patches/server/0943-Deep-clone-nbt-tags-in-PDC.patch
diff --git a/patches/server/0945-Support-old-UUID-format-for-NBT.patch b/patches/server/0944-Support-old-UUID-format-for-NBT.patch
index 68ff8a5255..68ff8a5255 100644
--- a/patches/server/0945-Support-old-UUID-format-for-NBT.patch
+++ b/patches/server/0944-Support-old-UUID-format-for-NBT.patch
diff --git a/patches/server/0946-Fix-shield-disable-inconsistency.patch b/patches/server/0945-Fix-shield-disable-inconsistency.patch
index 8d372bca9d..0f02785268 100644
--- a/patches/server/0946-Fix-shield-disable-inconsistency.patch
+++ b/patches/server/0945-Fix-shield-disable-inconsistency.patch
@@ -8,10 +8,10 @@ it will not disable the shield if the attacker is holding
an axe item.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 7196340fefd95845f290329faef489f2b2626ecb..b33dd288065b665e6feb642d090de1fd6e725448 100644
+index 49b3d8d2bc34c0785f143bbc8976308f5bf8c9de..f6d55ff3027bb7f0dcef186c52d48d9c5358ffd0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2426,7 +2426,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2424,7 +2424,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
Entity entity = damagesource.getDirectEntity();
diff --git a/patches/server/0947-Handle-Large-Packets-disconnecting-client.patch b/patches/server/0946-Handle-Large-Packets-disconnecting-client.patch
index 32e463a242..32e463a242 100644
--- a/patches/server/0947-Handle-Large-Packets-disconnecting-client.patch
+++ b/patches/server/0946-Handle-Large-Packets-disconnecting-client.patch
diff --git a/patches/server/0948-Fix-ItemFlags.patch b/patches/server/0947-Fix-ItemFlags.patch
index e045394f3c..e045394f3c 100644
--- a/patches/server/0948-Fix-ItemFlags.patch
+++ b/patches/server/0947-Fix-ItemFlags.patch
diff --git a/patches/server/0949-Fix-helmet-damage-reduction-inconsistencies.patch b/patches/server/0948-Fix-helmet-damage-reduction-inconsistencies.patch
index ef4efc0ef7..ef4efc0ef7 100644
--- a/patches/server/0949-Fix-helmet-damage-reduction-inconsistencies.patch
+++ b/patches/server/0948-Fix-helmet-damage-reduction-inconsistencies.patch
diff --git a/patches/server/0950-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch b/patches/server/0949-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
index e31dca1bf5..035254da67 100644
--- a/patches/server/0950-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
+++ b/patches/server/0949-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Revert to vanilla handling of LivingEntity#actuallyHurt
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index b33dd288065b665e6feb642d090de1fd6e725448..0cb9de4ff9ba0611a3bfc444088accb07ee19252 100644
+index f6d55ff3027bb7f0dcef186c52d48d9c5358ffd0..563e008740bf2017a1767470a2e34629dfa5cfa1 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1457,7 +1457,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1455,7 +1455,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
amount = 0.0F;
}
@@ -17,7 +17,7 @@ index b33dd288065b665e6feb642d090de1fd6e725448..0cb9de4ff9ba0611a3bfc444088accb0
boolean flag = amount > 0.0F && this.isDamageSourceBlocked(source); // Copied from below
float f2 = 0.0F;
-@@ -1515,6 +1515,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1513,6 +1513,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!this.actuallyHurt(world, source, (float) event.getFinalDamage() - this.lastHurt, event)) {
return false;
}
@@ -25,7 +25,7 @@ index b33dd288065b665e6feb642d090de1fd6e725448..0cb9de4ff9ba0611a3bfc444088accb0
// CraftBukkit end
this.lastHurt = amount;
flag1 = false;
-@@ -1523,6 +1524,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1521,6 +1522,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!this.actuallyHurt(world, source, (float) event.getFinalDamage(), event)) {
return false;
}
@@ -33,7 +33,7 @@ index b33dd288065b665e6feb642d090de1fd6e725448..0cb9de4ff9ba0611a3bfc444088accb0
this.lastHurt = amount;
this.invulnerableTime = this.invulnerableDuration; // CraftBukkit - restore use of maxNoDamageTicks
// this.actuallyHurt(worldserver, damagesource, f);
-@@ -2488,12 +2490,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2486,12 +2488,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
return true;
} else {
diff --git a/patches/server/0951-improve-checking-handled-tags-in-itemmeta.patch b/patches/server/0950-improve-checking-handled-tags-in-itemmeta.patch
index 8d257c881d..8d257c881d 100644
--- a/patches/server/0951-improve-checking-handled-tags-in-itemmeta.patch
+++ b/patches/server/0950-improve-checking-handled-tags-in-itemmeta.patch
diff --git a/patches/server/0952-Expose-hasColor-to-leather-armor.patch b/patches/server/0951-Expose-hasColor-to-leather-armor.patch
index 9166ad6261..9166ad6261 100644
--- a/patches/server/0952-Expose-hasColor-to-leather-armor.patch
+++ b/patches/server/0951-Expose-hasColor-to-leather-armor.patch
diff --git a/patches/server/0953-Added-API-to-get-player-ha-proxy-address.patch b/patches/server/0952-Added-API-to-get-player-ha-proxy-address.patch
index 1871d14810..1871d14810 100644
--- a/patches/server/0953-Added-API-to-get-player-ha-proxy-address.patch
+++ b/patches/server/0952-Added-API-to-get-player-ha-proxy-address.patch
diff --git a/patches/server/0954-General-ItemMeta-fixes.patch b/patches/server/0953-General-ItemMeta-fixes.patch
index ce6a04d22f..9421f612dd 100644
--- a/patches/server/0954-General-ItemMeta-fixes.patch
+++ b/patches/server/0953-General-ItemMeta-fixes.patch
@@ -28,10 +28,10 @@ index 98b5208baeaa12a5ff2788e457c542000d6ea48b..babd89f39c43b0c64709d99bf8aca6cd
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 63e234fb72952dcede4eeaa5d3d3390d137d88a2..b4aff394694417cff1930cf8fbd6696b9f9c9d01 100644
+index 645a7ec0709cbd3c0cfbf75f7b8622a67515f74c..39fc5aa6ac8c66d8dd7437262124b61c4c138689 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -152,6 +152,11 @@ public abstract class BlockEntity {
+@@ -147,6 +147,11 @@ public abstract class BlockEntity {
CompoundTag nbttagcompound = new CompoundTag();
this.saveAdditional(nbttagcompound, registries);
diff --git a/patches/server/0955-More-Chest-Block-API.patch b/patches/server/0954-More-Chest-Block-API.patch
index d7c00f61e1..d7c00f61e1 100644
--- a/patches/server/0955-More-Chest-Block-API.patch
+++ b/patches/server/0954-More-Chest-Block-API.patch
diff --git a/patches/server/0956-Print-data-component-type-on-encoding-error.patch b/patches/server/0955-Print-data-component-type-on-encoding-error.patch
index f003f33b92..f003f33b92 100644
--- a/patches/server/0956-Print-data-component-type-on-encoding-error.patch
+++ b/patches/server/0955-Print-data-component-type-on-encoding-error.patch
diff --git a/patches/server/0957-Brigadier-based-command-API.patch b/patches/server/0956-Brigadier-based-command-API.patch
index f305e6146b..a0f076f9b2 100644
--- a/patches/server/0957-Brigadier-based-command-API.patch
+++ b/patches/server/0956-Brigadier-based-command-API.patch
@@ -2228,10 +2228,10 @@ index 55484826fc5ddd04ae024e25a0251796d7fa9c28..237e4f7b24908e9ade9a483eb7ae05fa
Component component = message.resolveComponent(commandSourceStack);
CommandSigningContext commandSigningContext = commandSourceStack.getSigningContext();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 6de199b7cf7728479fede534338829cecade50f2..a6975966f7fbf2dc765b10214ea434bc0c73b66e 100644
+index 2de0ae09de41f3ed254318a78d65045fc76e5016..2d2bb7ed1456d90e7d9218a445a1cf26aaaa6ede 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -317,7 +317,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -316,7 +316,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static int currentTick; // Paper - improve tick loop
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
@@ -2240,7 +2240,7 @@ index 6de199b7cf7728479fede534338829cecade50f2..a6975966f7fbf2dc765b10214ea434bc
private boolean forceTicks;
// CraftBukkit end
// Spigot start
-@@ -407,7 +407,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -406,7 +406,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
this.options = options;
this.worldLoader = worldLoader;
@@ -2248,7 +2248,7 @@ index 6de199b7cf7728479fede534338829cecade50f2..a6975966f7fbf2dc765b10214ea434bc
// Paper start - Handled by TerminalConsoleAppender
// Try to see if we're actually running in a terminal, disable jline if not
/*
-@@ -693,6 +692,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -692,6 +691,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
@@ -2258,7 +2258,7 @@ index 6de199b7cf7728479fede534338829cecade50f2..a6975966f7fbf2dc765b10214ea434bc
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
this.connection.acceptConnections();
}
-@@ -2260,9 +2262,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2216,9 +2218,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return new MinecraftServer.ReloadableResources(resourcemanager, datapackresources);
});
}).thenAcceptAsync((minecraftserver_reloadableresources) -> {
@@ -2269,7 +2269,7 @@ index 6de199b7cf7728479fede534338829cecade50f2..a6975966f7fbf2dc765b10214ea434bc
this.packRepository.setSelected(dataPacks);
WorldDataConfiguration worlddataconfiguration = new WorldDataConfiguration(MinecraftServer.getSelectedPacks(this.packRepository, true), this.worldData.enabledFeatures());
-@@ -2276,6 +2278,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2232,6 +2234,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
this.fuelValues = FuelValues.vanillaBurnTimes(this.registries.compositeAccess(), this.worldData.enabledFeatures());
org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings; they can be defined by datapacks so refresh it here
@@ -2326,10 +2326,10 @@ index 02e00819970eda49196641520870fc31d08b1a38..0b348f701b61c7b7ed0190eff8b2d73f
public void tick() {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index eb9dab7be7da11ab1c4046a7fc4a29d5bddf31d2..39c9c0dad159744da8322c3dfa3bfae448f73241 100644
+index ebe6a002d883721d80cbfcc004064e8a57934a56..cce0e570c8217c8e7cc81642d303e1b96f70f4f3 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -236,7 +236,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -234,7 +234,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
@@ -2338,17 +2338,15 @@ index eb9dab7be7da11ab1c4046a7fc4a29d5bddf31d2..39c9c0dad159744da8322c3dfa3bfae4
this.setPvpAllowed(dedicatedserverproperties.pvp);
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 2cef6390ce8cdc43ae7566683afc157cb3a6fd78..af3e0049beb5590520ed84b52d6df85ad22a8f23 100644
+index 0d6c3cdd0c8fa8c6983e8a35bac89ff062e1a97f..af3e0049beb5590520ed84b52d6df85ad22a8f23 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-@@ -2429,33 +2429,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+@@ -2429,30 +2429,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
}
-+ @Deprecated // Paper
- public void handleCommand(String s) { // Paper - private -> public
+- private void handleCommand(String s) {
- org.spigotmc.AsyncCatcher.catchOp("Command Dispatched Async: " + s); // Paper - Add async catcher
-- co.aikar.timings.MinecraftTimings.playerCommandTimer.startTiming(); // Paper
- if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
- this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
-
@@ -2358,7 +2356,6 @@ index 2cef6390ce8cdc43ae7566683afc157cb3a6fd78..af3e0049beb5590520ed84b52d6df85a
- this.cserver.getPluginManager().callEvent(event);
-
- if (event.isCancelled()) {
-- co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
- return;
- }
-
@@ -2371,7 +2368,8 @@ index 2cef6390ce8cdc43ae7566683afc157cb3a6fd78..af3e0049beb5590520ed84b52d6df85a
- java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
- return;
- } finally {
-- co.aikar.timings.MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
++ @Deprecated // Paper
++ public void handleCommand(String s) { // Paper - private -> public
+ // Paper start - Remove all this old duplicated logic
+ if (s.startsWith("/")) {
+ s = s.substring(1);
@@ -2388,7 +2386,7 @@ index 2cef6390ce8cdc43ae7566683afc157cb3a6fd78..af3e0049beb5590520ed84b52d6df85a
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index f7e478a14ef17ad6d747d0ab56418b0b5b20492d..15b406935047f591a7866d81b40841a5a9878f55 100644
+index 6136037d3d096300d93b9710dd854224b30e0738..694eacb7d3ffd28fe7684139554113e58be1ebfa 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -275,11 +275,11 @@ public final class CraftServer implements Server {
@@ -2419,7 +2417,7 @@ index f7e478a14ef17ad6d747d0ab56418b0b5b20492d..15b406935047f591a7866d81b40841a5
CraftRegistry.setMinecraftRegistry(console.registryAccess());
-@@ -606,48 +612,11 @@ public final class CraftServer implements Server {
+@@ -605,48 +611,11 @@ public final class CraftServer implements Server {
}
private void setVanillaCommands(boolean first) { // Spigot
@@ -2470,7 +2468,7 @@ index f7e478a14ef17ad6d747d0ab56418b0b5b20492d..15b406935047f591a7866d81b40841a5
// Refresh commands
for (ServerPlayer player : this.getHandle().players) {
-@@ -1034,17 +1003,31 @@ public final class CraftServer implements Server {
+@@ -1033,17 +1002,31 @@ public final class CraftServer implements Server {
return true;
}
@@ -2512,7 +2510,7 @@ index f7e478a14ef17ad6d747d0ab56418b0b5b20492d..15b406935047f591a7866d81b40841a5
return false;
}
-@@ -1053,7 +1036,7 @@ public final class CraftServer implements Server {
+@@ -1052,7 +1035,7 @@ public final class CraftServer implements Server {
public void reload() {
// Paper start - lifecycle events
if (io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.blocksPluginReloading()) {
@@ -2521,7 +2519,7 @@ index f7e478a14ef17ad6d747d0ab56418b0b5b20492d..15b406935047f591a7866d81b40841a5
}
// Paper end - lifecycle events
org.spigotmc.WatchdogThread.hasStarted = false; // Paper - Disable watchdog early timeout on reload
-@@ -1108,8 +1091,9 @@ public final class CraftServer implements Server {
+@@ -1107,8 +1090,9 @@ public final class CraftServer implements Server {
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -2532,7 +2530,7 @@ index f7e478a14ef17ad6d747d0ab56418b0b5b20492d..15b406935047f591a7866d81b40841a5
// Paper start
for (Plugin plugin : pluginClone) {
entityMetadata.removeAll(plugin);
-@@ -1149,6 +1133,12 @@ public final class CraftServer implements Server {
+@@ -1148,6 +1132,12 @@ public final class CraftServer implements Server {
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
diff --git a/patches/server/0958-Fix-issues-with-Recipe-API.patch b/patches/server/0957-Fix-issues-with-Recipe-API.patch
index 63c059ad01..63c059ad01 100644
--- a/patches/server/0958-Fix-issues-with-Recipe-API.patch
+++ b/patches/server/0957-Fix-issues-with-Recipe-API.patch
diff --git a/patches/server/0959-Fix-equipment-slot-and-group-API.patch b/patches/server/0958-Fix-equipment-slot-and-group-API.patch
index 3248a82d09..3248a82d09 100644
--- a/patches/server/0959-Fix-equipment-slot-and-group-API.patch
+++ b/patches/server/0958-Fix-equipment-slot-and-group-API.patch
diff --git a/patches/server/0960-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch b/patches/server/0959-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
index 8b39d13b43..8b39d13b43 100644
--- a/patches/server/0960-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
+++ b/patches/server/0959-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
diff --git a/patches/server/0961-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0960-Prevent-sending-oversized-item-data-in-equipment-and.patch
index 6f1042e767..ec6969e742 100644
--- a/patches/server/0961-Prevent-sending-oversized-item-data-in-equipment-and.patch
+++ b/patches/server/0960-Prevent-sending-oversized-item-data-in-equipment-and.patch
@@ -222,10 +222,10 @@ index af3e0049beb5590520ed84b52d6df85ad22a8f23..b7ff8607cd33d8e6bdab9533792cf43a
ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote(); // Paper - fix slot desync - always refresh player inventory
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 0cb9de4ff9ba0611a3bfc444088accb07ee19252..6fa442fe4cf585f7056bedcfbd384e15da90f613 100644
+index 563e008740bf2017a1767470a2e34629dfa5cfa1..51c3ab2baae8cbd246464777b8ddbde2d3d9d0ef 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3462,7 +3462,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3460,7 +3460,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
});
diff --git a/patches/server/0962-Prevent-NPE-if-hooked-entity-was-cleared.patch b/patches/server/0961-Prevent-NPE-if-hooked-entity-was-cleared.patch
index f51092a291..f51092a291 100644
--- a/patches/server/0962-Prevent-NPE-if-hooked-entity-was-cleared.patch
+++ b/patches/server/0961-Prevent-NPE-if-hooked-entity-was-cleared.patch
diff --git a/patches/server/0963-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch b/patches/server/0962-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch
index 6043bb02b6..4b06a0c06a 100644
--- a/patches/server/0963-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch
+++ b/patches/server/0962-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch
@@ -21,7 +21,7 @@ index babd89f39c43b0c64709d99bf8aca6cdc6ca1b24..947e2a3620d73569552c5185664b7564
// Brute force all possible updates
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 35b9a6d382e420844fc21c88b7d8044e3b8b8368..1b899473c6deeaa1aef9007d8b7bcec98580e61c 100644
+index ba4006bc7dc31d10f37023cba7995a9621796f73..96f18fa8fb5eb856a95e94a42504c00046eb491a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -152,6 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -33,7 +33,7 @@ index 35b9a6d382e420844fc21c88b7d8044e3b8b8368..1b899473c6deeaa1aef9007d8b7bcec9
public Map<BlockPos, BlockEntity> capturedTileEntities = new java.util.LinkedHashMap<>(); // Paper - Retain block place order when capturing blockstates
public List<ItemEntity> captureDrops;
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 5dd1df0da1f954778aebe0f40611ae0f3a7866ab..325d1e38a72a4b30f30261267e9adfb8a8726b11 100644
+index 7a794bb0587ce55b067c67dd17ab5be6a4773030..56227ce823ab2997e2602f0807bbd54e54454344 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -369,7 +369,7 @@ public class LevelChunk extends ChunkAccess {
diff --git a/patches/server/0964-Add-missing-fishing-event-state.patch b/patches/server/0963-Add-missing-fishing-event-state.patch
index 5bc1574135..5bc1574135 100644
--- a/patches/server/0964-Add-missing-fishing-event-state.patch
+++ b/patches/server/0963-Add-missing-fishing-event-state.patch
diff --git a/patches/server/0965-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch b/patches/server/0964-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch
index 3fc9866acf..3fc9866acf 100644
--- a/patches/server/0965-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch
+++ b/patches/server/0964-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch
diff --git a/patches/server/0966-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch b/patches/server/0965-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch
index 1abf467e7e..1abf467e7e 100644
--- a/patches/server/0966-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch
+++ b/patches/server/0965-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch
diff --git a/patches/server/0967-Adopt-MaterialRerouting.patch b/patches/server/0966-Adopt-MaterialRerouting.patch
index 648057e1dd..648057e1dd 100644
--- a/patches/server/0967-Adopt-MaterialRerouting.patch
+++ b/patches/server/0966-Adopt-MaterialRerouting.patch
diff --git a/patches/server/0968-Suspicious-Effect-Entry-API.patch b/patches/server/0967-Suspicious-Effect-Entry-API.patch
index d2599dfa85..d2599dfa85 100644
--- a/patches/server/0968-Suspicious-Effect-Entry-API.patch
+++ b/patches/server/0967-Suspicious-Effect-Entry-API.patch
diff --git a/patches/server/0969-check-if-itemstack-is-stackable-first.patch b/patches/server/0968-check-if-itemstack-is-stackable-first.patch
index a7ddd8df5b..a7ddd8df5b 100644
--- a/patches/server/0969-check-if-itemstack-is-stackable-first.patch
+++ b/patches/server/0968-check-if-itemstack-is-stackable-first.patch
diff --git a/patches/server/0970-Fix-removing-recipes-from-RecipeIterator.patch b/patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch
index a8f124b458..a8f124b458 100644
--- a/patches/server/0970-Fix-removing-recipes-from-RecipeIterator.patch
+++ b/patches/server/0969-Fix-removing-recipes-from-RecipeIterator.patch
diff --git a/patches/server/0971-Configurable-damage-tick-when-blocking-with-shield.patch b/patches/server/0970-Configurable-damage-tick-when-blocking-with-shield.patch
index 33e21b4cb1..95d97e81fa 100644
--- a/patches/server/0971-Configurable-damage-tick-when-blocking-with-shield.patch
+++ b/patches/server/0970-Configurable-damage-tick-when-blocking-with-shield.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable damage tick when blocking with shield
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 6fa442fe4cf585f7056bedcfbd384e15da90f613..4f6a9c9a1a9fa0f98ee2c3bfdc4c5b3202c5cdd0 100644
+index 51c3ab2baae8cbd246464777b8ddbde2d3d9d0ef..afa33711426ee28f70be216497941a10de3416ee 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2488,7 +2488,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2486,7 +2486,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
CriteriaTriggers.PLAYER_HURT_ENTITY.trigger((ServerPlayer) damagesource.getEntity(), this, damagesource, originalDamage, f, true); // Paper - fix taken/dealt param order
}
diff --git a/patches/server/0972-Properly-remove-the-experimental-smithing-inventory-.patch b/patches/server/0971-Properly-remove-the-experimental-smithing-inventory-.patch
index 9ede88caa7..9ede88caa7 100644
--- a/patches/server/0972-Properly-remove-the-experimental-smithing-inventory-.patch
+++ b/patches/server/0971-Properly-remove-the-experimental-smithing-inventory-.patch
diff --git a/patches/server/0973-disable-forced-empty-world-ticks.patch b/patches/server/0972-disable-forced-empty-world-ticks.patch
index 343cd32ea2..ae366dd7f0 100644
--- a/patches/server/0973-disable-forced-empty-world-ticks.patch
+++ b/patches/server/0972-disable-forced-empty-world-ticks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] disable forced empty world ticks
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index eed2d1ec425bbd34563fae9e69a4518ec154fc23..982d44b539e189f4a857e72554cc81f8a4501ad6 100644
+index 711d5136124c0fa21015f0154057ab5742071e59..24df2baaeb34eccbe148ac0e518f44e9a869ffa5 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -519,7 +519,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -509,7 +509,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.handlingTick = false;
gameprofilerfiller.pop();
diff --git a/patches/server/0974-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch b/patches/server/0973-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch
index f7d697b689..178cf52c88 100644
--- a/patches/server/0974-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch
+++ b/patches/server/0973-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch
@@ -29,10 +29,10 @@ index 2f2bcc1b9b32e58bf70ae6c171177ceb333ed6cd..d7afddd1d961495f0b50302a8da0a70f
this.x = x;
this.y = y;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 1b899473c6deeaa1aef9007d8b7bcec98580e61c..8adf12491e01830464b07e7a795db995d31f7a31 100644
+index 96f18fa8fb5eb856a95e94a42504c00046eb491a..a124a360f45cd71810b8253ce266d52145b6f83b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -341,7 +341,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -339,7 +339,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end
public boolean isInWorldBounds(BlockPos pos) {
diff --git a/patches/server/0975-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0974-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
index f4600638da..dc903d6e39 100644
--- a/patches/server/0975-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
+++ b/patches/server/0974-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 982d44b539e189f4a857e72554cc81f8a4501ad6..fe610561e6fbb9bc547d27123793395fb0ad80aa 100644
+index 24df2baaeb34eccbe148ac0e518f44e9a869ffa5..ce148cf5930cdcf0163c7f6416cbbd89e4d22720 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2363,6 +2363,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2333,6 +2333,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
{
if ( iter.next().player == entity )
{
diff --git a/patches/server/0976-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/server/0975-Optimize-Network-Manager-and-add-advanced-packet-sup.patch
index e601a7c5a2..e601a7c5a2 100644
--- a/patches/server/0976-Optimize-Network-Manager-and-add-advanced-packet-sup.patch
+++ b/patches/server/0975-Optimize-Network-Manager-and-add-advanced-packet-sup.patch
diff --git a/patches/server/0977-Allow-Saving-of-Oversized-Chunks.patch b/patches/server/0976-Allow-Saving-of-Oversized-Chunks.patch
index 7d1ee992f1..7d1ee992f1 100644
--- a/patches/server/0977-Allow-Saving-of-Oversized-Chunks.patch
+++ b/patches/server/0976-Allow-Saving-of-Oversized-Chunks.patch
diff --git a/patches/server/0978-Flat-bedrock-generator-settings.patch b/patches/server/0977-Flat-bedrock-generator-settings.patch
index 1e4bccf2db..1e4bccf2db 100644
--- a/patches/server/0978-Flat-bedrock-generator-settings.patch
+++ b/patches/server/0977-Flat-bedrock-generator-settings.patch
diff --git a/patches/server/0979-Entity-Activation-Range-2.0.patch b/patches/server/0978-Entity-Activation-Range-2.0.patch
index 6a879cf17f..a4edc8e8a0 100644
--- a/patches/server/0979-Entity-Activation-Range-2.0.patch
+++ b/patches/server/0978-Entity-Activation-Range-2.0.patch
@@ -17,40 +17,26 @@ Adds villagers as separate config
public net.minecraft.world.entity.Entity isInsidePortal
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index fe610561e6fbb9bc547d27123793395fb0ad80aa..ce5fd95cabadd7c92726c401ae35e05dde3e30f6 100644
+index ce148cf5930cdcf0163c7f6416cbbd89e4d22720..75c388a5c9de26f0053015619e6c19bcff219478 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -2,7 +2,6 @@ package net.minecraft.server.level;
-
- import com.google.common.annotations.VisibleForTesting;
- import co.aikar.timings.TimingHistory; // Paper
--import co.aikar.timings.Timings; // Paper
- import com.google.common.collect.Lists;
- import com.mojang.datafixers.DataFixer;
- import com.mojang.datafixers.util.Pair;
-@@ -980,17 +979,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
- ++TimingHistory.entityTicks; // Paper - timings
+@@ -962,12 +962,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+
+ public void tickNonPassenger(Entity entity) {
// Spigot start
- co.aikar.timings.Timing timer; // Paper
- if (!org.spigotmc.ActivationRange.checkIfActive(entity)) {
-+ /*if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { // Paper - comment out - EAR 2, reimplement below
++ /*if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { // Paper - comment out EAR 2
entity.tickCount++;
- timer = entity.getType().inactiveTickTimer.startTiming(); try { // Paper - timings
entity.inactiveTick();
- } finally { timer.stopTiming(); } // Paper
return;
- }
+ }*/ // Paper - comment out EAR 2
// Spigot end
- // Paper start- timings
-- TimingHistory.activatedEntityTicks++;
-- timer = entity.getVehicle() != null ? entity.getType().passengerTickTimer.startTiming() : entity.getType().tickTimer.startTiming();
-+ final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity);
-+ timer = isActive ? entity.getType().tickTimer.startTiming() : entity.getType().inactiveTickTimer.startTiming(); // Paper
- try {
- // Paper end - timings
++ final boolean isActive = org.spigotmc.ActivationRange.checkIfActive(entity); // Paper - EAR 2
entity.setOldPosAndRot();
-@@ -1001,21 +1000,24 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ ProfilerFiller gameprofilerfiller = Profiler.get();
+
+@@ -976,20 +977,22 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
});
gameprofilerfiller.incrementCounter("tickNonPassenger");
@@ -59,7 +45,6 @@ index fe610561e6fbb9bc547d27123793395fb0ad80aa..ce5fd95cabadd7c92726c401ae35e05d
entity.postTick(); // CraftBukkit
+ } else { entity.inactiveTick(); } // Paper - EAR 2
gameprofilerfiller.pop();
-+ } finally { timer.stopTiming(); } // Paper - timings // EAR 2
Iterator iterator = entity.getPassengers().iterator();
while (iterator.hasNext()) {
@@ -68,8 +53,6 @@ index fe610561e6fbb9bc547d27123793395fb0ad80aa..ce5fd95cabadd7c92726c401ae35e05d
- this.tickPassenger(entity, entity1);
+ this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2
}
-- } finally { timer.stopTiming(); } // Paper - timings
-+ // } finally { timer.stopTiming(); } // Paper - timings // EAR 2
}
@@ -78,7 +61,7 @@ index fe610561e6fbb9bc547d27123793395fb0ad80aa..ce5fd95cabadd7c92726c401ae35e05d
if (!passenger.isRemoved() && passenger.getVehicle() == vehicle) {
if (passenger instanceof Player || this.entityTickList.contains(passenger)) {
passenger.setOldPosAndRot();
-@@ -1026,15 +1028,24 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1000,15 +1003,24 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return BuiltInRegistries.ENTITY_TYPE.getKey(passenger.getType()).toString();
});
gameprofilerfiller.incrementCounter("tickPassenger");
@@ -335,7 +318,7 @@ index f0a005724ab64a3b0cbc44d8f430716f7958461c..d81a6874e8b25f098df619f84c359e14
+
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 8adf12491e01830464b07e7a795db995d31f7a31..cef07ec3dfc8db3f3206fa2f5c2acf64c4b4aa65 100644
+index a124a360f45cd71810b8253ce266d52145b6f83b..128bda0d2a690a69b41325a1bb9a2b924cc883cc 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -157,6 +157,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -367,10 +350,10 @@ index 46afba838cf12eeb1bbccaa260131a76f090364b..e1c9a961064887070b29207efd7af478
}
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
-index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f7fb771e7 100644
+index f8387277d915460d755bdd35198d2547d1a49bde..6ffe86aa887ebf96f21114a468e16376c2449911 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
-@@ -1,33 +1,43 @@
+@@ -1,26 +1,35 @@
package org.spigotmc;
+import net.minecraft.core.BlockPos;
@@ -408,26 +391,17 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
import net.minecraft.world.entity.projectile.FireworkRocketEntity;
import net.minecraft.world.entity.projectile.ThrowableProjectile;
import net.minecraft.world.entity.projectile.ThrownTrident;
- import net.minecraft.world.entity.raid.Raider;
-+import co.aikar.timings.MinecraftTimings;
-+import net.minecraft.world.entity.schedule.Activity;
- import net.minecraft.world.level.Level;
- import net.minecraft.world.phys.AABB;
--import co.aikar.timings.MinecraftTimings;
-
- public class ActivationRange
- {
-@@ -44,6 +54,43 @@ public class ActivationRange
+@@ -43,6 +52,43 @@ public class ActivationRange
AABB boundingBox = new AABB( 0, 0, 0, 0, 0, 0 );
}
+ // Paper start
+
-+ static Activity[] VILLAGER_PANIC_IMMUNITIES = {
-+ Activity.HIDE,
-+ Activity.PRE_RAID,
-+ Activity.RAID,
-+ Activity.PANIC
++ static net.minecraft.world.entity.schedule.Activity[] VILLAGER_PANIC_IMMUNITIES = {
++ net.minecraft.world.entity.schedule.Activity.HIDE,
++ net.minecraft.world.entity.schedule.Activity.PRE_RAID,
++ net.minecraft.world.entity.schedule.Activity.RAID,
++ net.minecraft.world.entity.schedule.Activity.PANIC
+ };
+
+ private static int checkInactiveWakeup(Entity entity) {
@@ -461,7 +435,7 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
static AABB maxBB = new AABB( 0, 0, 0, 0, 0, 0 );
-@@ -56,10 +103,13 @@ public class ActivationRange
+@@ -55,10 +101,13 @@ public class ActivationRange
*/
public static ActivationType initializeEntityActivationType(Entity entity)
{
@@ -476,7 +450,7 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
{
return ActivationType.MONSTER;
} else if ( entity instanceof PathfinderMob || entity instanceof AmbientCreature )
-@@ -80,10 +130,14 @@ public class ActivationRange
+@@ -79,10 +128,14 @@ public class ActivationRange
*/
public static boolean initializeEntityActivationState(Entity entity, SpigotWorldConfig config)
{
@@ -495,7 +469,7 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
|| entity instanceof Player
|| entity instanceof ThrowableProjectile
|| entity instanceof EnderDragon
-@@ -118,10 +172,25 @@ public class ActivationRange
+@@ -116,10 +169,25 @@ public class ActivationRange
final int raiderActivationRange = world.spigotConfig.raiderActivationRange;
final int animalActivationRange = world.spigotConfig.animalActivationRange;
final int monsterActivationRange = world.spigotConfig.monsterActivationRange;
@@ -521,7 +495,7 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
maxRange = Math.min( ( world.spigotConfig.simulationDistance << 4 ) - 8, maxRange );
for ( Player player : world.players() )
-@@ -132,13 +201,30 @@ public class ActivationRange
+@@ -130,13 +198,30 @@ public class ActivationRange
continue;
}
@@ -556,9 +530,9 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
+ }
+ // Paper end
}
- MinecraftTimings.entityActivationCheckTimer.stopTiming();
}
-@@ -171,60 +257,118 @@ public class ActivationRange
+
+@@ -168,60 +253,118 @@ public class ActivationRange
* @param entity
* @return
*/
@@ -620,7 +594,8 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
{
- return true;
+ return 20; // Paper
-+ }
+ }
+- if ( entity instanceof Villager && ( (Villager) entity ).canBreed() )
+ // Paper start
+ if (entity instanceof Bee) {
+ Bee bee = (Bee)entity;
@@ -631,13 +606,12 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
+ ) {
+ return 20;
+ }
- }
-- if ( entity instanceof Villager && ( (Villager) entity ).canBreed() )
++ }
+ if ( entity instanceof Villager ) {
+ Brain<Villager> behaviorController = ((Villager) entity).getBrain();
+
+ if (config.villagersActiveForPanic) {
-+ for (Activity activity : VILLAGER_PANIC_IMMUNITIES) {
++ for (net.minecraft.world.entity.schedule.Activity activity : VILLAGER_PANIC_IMMUNITIES) {
+ if (behaviorController.isActive(activity)) {
+ return 20*5;
+ }
@@ -645,7 +619,7 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
+ }
+
+ if (config.villagersWorkImmunityAfter > 0 && inactiveFor >= config.villagersWorkImmunityAfter) {
-+ if (behaviorController.isActive(Activity.WORK)) {
++ if (behaviorController.isActive(net.minecraft.world.entity.schedule.Activity.WORK)) {
+ return config.villagersWorkImmunityFor;
+ }
+ }
@@ -677,11 +651,11 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
+ // Paper start
+ if (entity instanceof Mob && ((Mob) entity).targetSelector.hasTasks() ) {
+ return 0;
- }
++ }
+ if (entity instanceof Pillager) {
+ Pillager pillager = (Pillager) entity;
+ // TODO:?
-+ }
+ }
+ // Paper end
}
// SPIGOT-6644: Otherwise the target refresh tick will be missed
@@ -694,7 +668,7 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
}
/**
-@@ -239,8 +383,19 @@ public class ActivationRange
+@@ -236,8 +379,19 @@ public class ActivationRange
if ( entity instanceof FireworkRocketEntity ) {
return true;
}
@@ -715,7 +689,7 @@ index ad15c7db36bdeadaa8f2ec8f15f41d6f3395bd55..e4252c5a6aec351a4a0a8be372d3b63f
// Should this entity tick?
if ( !isActive )
-@@ -248,15 +403,19 @@ public class ActivationRange
+@@ -245,15 +399,19 @@ public class ActivationRange
if ( ( MinecraftServer.currentTick - entity.activatedTick - 1 ) % 20 == 0 )
{
// Check immunities every 20 ticks.
diff --git a/patches/server/0980-Anti-Xray.patch b/patches/server/0979-Anti-Xray.patch
index 1e72722f63..6164bec6d8 100644
--- a/patches/server/0980-Anti-Xray.patch
+++ b/patches/server/0979-Anti-Xray.patch
@@ -1104,10 +1104,10 @@ index 183b2191fa1c1b27adedf39593e1b5a223fb1279..8ead66c134688b11dca15f6509147e72
private ClientboundLevelChunkWithLightPacket(RegistryFriendlyByteBuf buf) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index ce5fd95cabadd7c92726c401ae35e05dde3e30f6..878bd04b63f257cc625953e45b953beb06917107 100644
+index 75c388a5c9de26f0053015619e6c19bcff219478..c0de354ac03a62f159540f25940dc3700cc0c575 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -344,7 +344,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -343,7 +343,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
@@ -1157,10 +1157,10 @@ index cdd66e6ce96e2613afe7f06ca8da3cfaa6704b2d..dafa2cf7d3c49fc5bdcd68d2a9528127
if (io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0) {
new io.papermc.paper.event.packet.PlayerChunkLoadEvent(new org.bukkit.craftbukkit.CraftChunk(chunk), handler.getPlayer().getBukkitEntity()).callEvent();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index fa951c6e33d583f9c2ca103fbaaa035e40c163f9..b0a43a24f2a43b1513600f26f1f02646c6031cef 100644
+index 409010fae4b175ba7dcbe0f38676022ed9b77b1d..781de82a8bee2836bf154341c91f23b34d98d4ad 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -427,7 +427,7 @@ public abstract class PlayerList {
+@@ -426,7 +426,7 @@ public abstract class PlayerList {
.getOrThrow(net.minecraft.world.level.biome.Biomes.PLAINS);
player.connection.send(new net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket(
new net.minecraft.world.level.chunk.EmptyLevelChunk(worldserver1, player.chunkPosition(), plains),
@@ -1170,7 +1170,7 @@ index fa951c6e33d583f9c2ca103fbaaa035e40c163f9..b0a43a24f2a43b1513600f26f1f02646
}
// Paper end - Send empty chunk
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index cef07ec3dfc8db3f3206fa2f5c2acf64c4b4aa65..ce6c9b82a64a32c4b952d1839260015b1a446365 100644
+index 128bda0d2a690a69b41325a1bb9a2b924cc883cc..078088a854d466e66411d25d6dd6bcc536db78f3 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1178,10 +1178,10 @@ index cef07ec3dfc8db3f3206fa2f5c2acf64c4b4aa65..ce6c9b82a64a32c4b952d1839260015b
// Paper end - add paper world config
+ public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
- public final co.aikar.timings.WorldTimingsHandler timings; // Paper
public static BlockPos lastPhysicsProblem; // Spigot
private org.spigotmc.TickLimiter entityLimiter;
-@@ -206,7 +207,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+ private org.spigotmc.TickLimiter tileLimiter;
+@@ -205,7 +206,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public abstract ResourceKey<LevelStem> getTypeKey();
@@ -1190,15 +1190,15 @@ index cef07ec3dfc8db3f3206fa2f5c2acf64c4b4aa65..ce6c9b82a64a32c4b952d1839260015b
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
this.generator = gen;
-@@ -287,6 +288,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
- this.timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
+@@ -285,6 +286,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+ // CraftBukkit end
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
+ this.chunkPacketBlockController = this.paperConfig().anticheat.antiXray.enabled ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
}
// Paper start - Cancel hit for vanished players
-@@ -487,6 +489,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -485,6 +487,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit end
BlockState iblockdata1 = chunk.setBlockState(pos, state, (flags & 64) != 0, (flags & 1024) == 0); // CraftBukkit custom NO_PLACE flag
@@ -1232,7 +1232,7 @@ index a846dd210ed1de0dc3e8b686663ee346bff33dc8..63d7d6b93119d96d753230472df30a9d
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 325d1e38a72a4b30f30261267e9adfb8a8726b11..71dfd0abb930ecf4f1ba900c80c161fa2a858685 100644
+index 56227ce823ab2997e2602f0807bbd54e54454344..5d15aed0f340a49a47e035fb0ce23413946bc124 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -93,7 +93,7 @@ public class LevelChunk extends ChunkAccess {
@@ -1598,10 +1598,10 @@ index 5fc9e8e969debb3e15ed474b36a1c48b086d0449..f65cc95ab28e8a3b21eac2b16bd9ebe9
private static final byte[] EMPTY_LIGHT = new byte[2048];
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 15b406935047f591a7866d81b40841a5a9878f55..b29220ced6f5294594af23d9227532f5bb292e4c 100644
+index 694eacb7d3ffd28fe7684139554113e58be1ebfa..f3ec7e48f0c1ff3476886a7d64cc0dcc4edeab5f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2693,7 +2693,7 @@ public final class CraftServer implements Server {
+@@ -2692,7 +2692,7 @@ public final class CraftServer implements Server {
public ChunkGenerator.ChunkData createChunkData(World world) {
Preconditions.checkArgument(world != null, "World cannot be null");
ServerLevel handle = ((CraftWorld) world).getHandle();
diff --git a/patches/server/0981-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0980-Use-Velocity-compression-and-cipher-natives.patch
index a57ddf2e84..a57ddf2e84 100644
--- a/patches/server/0981-Use-Velocity-compression-and-cipher-natives.patch
+++ b/patches/server/0980-Use-Velocity-compression-and-cipher-natives.patch
diff --git a/patches/server/0982-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0981-Optimize-Collision-to-not-load-chunks.patch
index 22bbfc1040..327fd5c6c2 100644
--- a/patches/server/0982-Optimize-Collision-to-not-load-chunks.patch
+++ b/patches/server/0981-Optimize-Collision-to-not-load-chunks.patch
@@ -14,10 +14,10 @@ movement will load only the chunk the player enters anyways and avoids loading
massive amounts of surrounding chunks due to large AABB lookups.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index b0a43a24f2a43b1513600f26f1f02646c6031cef..aa245fe0945b267ef03700758e75edd445c7c60d 100644
+index 781de82a8bee2836bf154341c91f23b34d98d4ad..661498e404bd1b0e4857e159b79a3eeca6df1d8a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -827,6 +827,7 @@ public abstract class PlayerList {
+@@ -826,6 +826,7 @@ public abstract class PlayerList {
Vec3 vec3d = teleporttransition.position();
entityplayer1.forceSetPositionRotation(vec3d.x, vec3d.y, vec3d.z, teleporttransition.yRot(), teleporttransition.xRot());
diff --git a/patches/server/0983-Optimize-GoalSelector-Goal.Flag-Set-operations.patch b/patches/server/0982-Optimize-GoalSelector-Goal.Flag-Set-operations.patch
index c4c7e7fd35..c4c7e7fd35 100644
--- a/patches/server/0983-Optimize-GoalSelector-Goal.Flag-Set-operations.patch
+++ b/patches/server/0982-Optimize-GoalSelector-Goal.Flag-Set-operations.patch
diff --git a/patches/server/0984-Optimize-Hoppers.patch b/patches/server/0983-Optimize-Hoppers.patch
index bd4a72c0e2..f44f270f97 100644
--- a/patches/server/0984-Optimize-Hoppers.patch
+++ b/patches/server/0983-Optimize-Hoppers.patch
@@ -50,10 +50,10 @@ index 0000000000000000000000000000000000000000..5c42823726e70ce6c9d0121d07431548
+ }
+}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index a6975966f7fbf2dc765b10214ea434bc0c73b66e..7981abcea38196658556d403cbb588a7ddfff6ba 100644
+index 2d2bb7ed1456d90e7d9218a445a1cf26aaaa6ede..e3e3099bb33d21055e480fdbd2df2a3e159f0f1a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1725,6 +1725,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1689,6 +1689,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
@@ -85,18 +85,18 @@ index 947e2a3620d73569552c5185664b7564e908007e..33e7d2884195677c4d6340d8b84c1dd8
itemstack.setPopTime(this.getPopTime());
return itemstack;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index b4aff394694417cff1930cf8fbd6696b9f9c9d01..fb00e5a02bb8c64e27d6d009068ba041098951d6 100644
+index 39fc5aa6ac8c66d8dd7437262124b61c4c138689..1f929b467a0ece3143af58a657cf5983c07a8d51 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -38,6 +38,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
- import co.aikar.timings.Timing; // Paper
+@@ -34,6 +34,7 @@ import org.bukkit.inventory.InventoryHolder;
+ // CraftBukkit end
public abstract class BlockEntity {
+ static boolean ignoreTileUpdates; // Paper - Perf: Optimize Hoppers
- public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
// CraftBukkit start - data containers
-@@ -230,6 +231,7 @@ public abstract class BlockEntity {
+ private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
+@@ -225,6 +226,7 @@ public abstract class BlockEntity {
public void setChanged() {
if (this.level != null) {
diff --git a/patches/server/0985-Optimize-Voxel-Shape-Merging.patch b/patches/server/0984-Optimize-Voxel-Shape-Merging.patch
index 52246713b3..52246713b3 100644
--- a/patches/server/0985-Optimize-Voxel-Shape-Merging.patch
+++ b/patches/server/0984-Optimize-Voxel-Shape-Merging.patch
diff --git a/patches/server/0986-Optimize-Bit-Operations-by-inlining.patch b/patches/server/0985-Optimize-Bit-Operations-by-inlining.patch
index 2c71fd1153..2c71fd1153 100644
--- a/patches/server/0986-Optimize-Bit-Operations-by-inlining.patch
+++ b/patches/server/0985-Optimize-Bit-Operations-by-inlining.patch
diff --git a/patches/server/0987-Remove-streams-from-hot-code.patch b/patches/server/0986-Remove-streams-from-hot-code.patch
index 37416513dc..37416513dc 100644
--- a/patches/server/0987-Remove-streams-from-hot-code.patch
+++ b/patches/server/0986-Remove-streams-from-hot-code.patch
diff --git a/patches/server/0988-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/0987-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch
index b32ebf6b4e..b32ebf6b4e 100644
--- a/patches/server/0988-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch
+++ b/patches/server/0987-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch
diff --git a/patches/server/0989-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0988-Fix-entity-type-tags-suggestions-in-selectors.patch
index 1b14145b71..1b14145b71 100644
--- a/patches/server/0989-Fix-entity-type-tags-suggestions-in-selectors.patch
+++ b/patches/server/0988-Fix-entity-type-tags-suggestions-in-selectors.patch
diff --git a/patches/server/0990-Handle-Oversized-block-entities-in-chunks.patch b/patches/server/0989-Handle-Oversized-block-entities-in-chunks.patch
index d3283fd63f..d3283fd63f 100644
--- a/patches/server/0990-Handle-Oversized-block-entities-in-chunks.patch
+++ b/patches/server/0989-Handle-Oversized-block-entities-in-chunks.patch
diff --git a/patches/server/0991-Check-distance-in-entity-interactions.patch b/patches/server/0990-Check-distance-in-entity-interactions.patch
index f8d61a567e..238e3e4518 100644
--- a/patches/server/0991-Check-distance-in-entity-interactions.patch
+++ b/patches/server/0990-Check-distance-in-entity-interactions.patch
@@ -17,10 +17,10 @@ index 57223285860f61119b6cf348aa78e59384a04e22..ccfe9ef24dce9f34613692adb13738d3
};
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 4f6a9c9a1a9fa0f98ee2c3bfdc4c5b3202c5cdd0..52ca53b4795981080476fa9425e01f2c804ae6b7 100644
+index afa33711426ee28f70be216497941a10de3416ee..22f520414442c05986cc620208afaa895d8ee4fa 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1469,7 +1469,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1467,7 +1467,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!source.is(DamageTypeTags.IS_PROJECTILE)) {
Entity entity = source.getDirectEntity();
@@ -29,7 +29,7 @@ index 4f6a9c9a1a9fa0f98ee2c3bfdc4c5b3202c5cdd0..52ca53b4795981080476fa9425e01f2c
LivingEntity entityliving = (LivingEntity) entity;
this.blockUsingShield(entityliving);
-@@ -1593,6 +1593,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1591,6 +1591,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
d0 = source.getSourcePosition().x() - this.getX();
d1 = source.getSourcePosition().z() - this.getZ();
}
@@ -44,7 +44,7 @@ index 4f6a9c9a1a9fa0f98ee2c3bfdc4c5b3202c5cdd0..52ca53b4795981080476fa9425e01f2c
this.knockback(0.4000000059604645D, d0, d1, entity1, entity1 == null ? io.papermc.paper.event.entity.EntityKnockbackEvent.Cause.DAMAGE : io.papermc.paper.event.entity.EntityKnockbackEvent.Cause.ENTITY_ATTACK); // CraftBukkit // Paper - knockback events
if (!flag) {
-@@ -2428,7 +2436,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2426,7 +2434,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
Entity entity = damagesource.getDirectEntity();
diff --git a/patches/server/0992-Configurable-Sand-Duping.patch b/patches/server/0991-Configurable-Sand-Duping.patch
index d209e03e1e..d209e03e1e 100644
--- a/patches/server/0992-Configurable-Sand-Duping.patch
+++ b/patches/server/0991-Configurable-Sand-Duping.patch
diff --git a/patches/server/0993-Properly-resend-entities.patch b/patches/server/0992-Properly-resend-entities.patch
index 95bcb49a7c..85cf1b2bde 100644
--- a/patches/server/0993-Properly-resend-entities.patch
+++ b/patches/server/0992-Properly-resend-entities.patch
@@ -102,10 +102,10 @@ index 52eafd99ed63f5fc9596225cf45175b1287f20a1..e5db85f858ab376b225172e22b92b841
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index aa245fe0945b267ef03700758e75edd445c7c60d..f55d7f6ed653b19f28694f91ca5bcc54873e33c3 100644
+index 661498e404bd1b0e4857e159b79a3eeca6df1d8a..7fdadac8f3bc3810ae5adeeed2a77c043bb107c3 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -397,7 +397,7 @@ public abstract class PlayerList {
+@@ -396,7 +396,7 @@ public abstract class PlayerList {
((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - Fire PlayerJoinEvent when Player is actually ready; track entity now
// CraftBukkit end
@@ -114,7 +114,7 @@ index aa245fe0945b267ef03700758e75edd445c7c60d..f55d7f6ed653b19f28694f91ca5bcc54
this.sendLevelInfo(player, worldserver1);
-@@ -908,12 +908,17 @@ public abstract class PlayerList {
+@@ -907,12 +907,17 @@ public abstract class PlayerList {
}
public void sendActiveEffects(LivingEntity entity, ServerGamePacketListenerImpl networkHandler) {
@@ -186,10 +186,10 @@ index aa7d3383c773d3537335e449636f33d69cde12bb..6a0472eaae9ad890692862590b8d2311
public boolean equals(Object object) {
return object instanceof Entity ? ((Entity) object).id == this.id : false;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 52ca53b4795981080476fa9425e01f2c804ae6b7..ed84f06d64afb117e08e8c8b54e992c0159a4a77 100644
+index 22f520414442c05986cc620208afaa895d8ee4fa..5e4716158da891216acc835f2560f980f527c66f 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4031,6 +4031,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4029,6 +4029,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
}
diff --git a/patches/server/0994-Registry-Modification-API.patch b/patches/server/0993-Registry-Modification-API.patch
index 9568730b7f..13cda87ccc 100644
--- a/patches/server/0994-Registry-Modification-API.patch
+++ b/patches/server/0993-Registry-Modification-API.patch
@@ -1359,10 +1359,10 @@ index f8450a2abd1e96fac7827d252cc00038b9dee839..891ccc39d52331648a11b4e7cce78d4c
+ // Paper end - RegistrySet API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 8feba2bd411abe36e64a39a0c599c73d07c19e20..75b5ec1023e2cf974696ee077195b195025ddc74 100644
+index 51d5629b00ec4929c12ed9e6ba5a37f5903cf13e..d728bf1d83877290e4d3fdaa7649ed077c0ee1ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -674,6 +674,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -658,6 +658,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - lifecycle event API
diff --git a/patches/server/0995-Add-registry-entry-and-builders.patch b/patches/server/0994-Add-registry-entry-and-builders.patch
index 0355a6b299..0355a6b299 100644
--- a/patches/server/0995-Add-registry-entry-and-builders.patch
+++ b/patches/server/0994-Add-registry-entry-and-builders.patch
diff --git a/patches/server/0996-Proxy-ItemStack-to-CraftItemStack.patch b/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch
index f37751ee6f..40da32a4fb 100644
--- a/patches/server/0996-Proxy-ItemStack-to-CraftItemStack.patch
+++ b/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch
@@ -205,10 +205,10 @@ index 6cc9d7a9e6d4bfdc27e52fc581b2bb832616f121..6930d0afb230a88aa813b02e4d55c95d
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 75b5ec1023e2cf974696ee077195b195025ddc74..f1178a6c8ccd1ad099d67b906f755eea1dfc0e53 100644
+index d728bf1d83877290e4d3fdaa7649ed077c0ee1ec..d3759c1262a5ce8ff82215a99abd31f20af95fc5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -689,6 +689,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -673,6 +673,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - hack to get tags for non server-backed registries
diff --git a/patches/server/0997-Make-a-PDC-view-accessible-directly-from-ItemStack.patch b/patches/server/0996-Make-a-PDC-view-accessible-directly-from-ItemStack.patch
index f0bd1ac5eb..f0bd1ac5eb 100644
--- a/patches/server/0997-Make-a-PDC-view-accessible-directly-from-ItemStack.patch
+++ b/patches/server/0996-Make-a-PDC-view-accessible-directly-from-ItemStack.patch
diff --git a/patches/server/0998-Prioritize-Minecraft-commands-in-function-parsing-an.patch b/patches/server/0997-Prioritize-Minecraft-commands-in-function-parsing-an.patch
index c22d5f09be..c22d5f09be 100644
--- a/patches/server/0998-Prioritize-Minecraft-commands-in-function-parsing-an.patch
+++ b/patches/server/0997-Prioritize-Minecraft-commands-in-function-parsing-an.patch
diff --git a/patches/server/0999-optimize-dirt-and-snow-spreading.patch b/patches/server/0998-optimize-dirt-and-snow-spreading.patch
index e89393b028..e89393b028 100644
--- a/patches/server/0999-optimize-dirt-and-snow-spreading.patch
+++ b/patches/server/0998-optimize-dirt-and-snow-spreading.patch
diff --git a/patches/server/1000-Fix-NPE-for-Jukebox-setRecord.patch b/patches/server/0999-Fix-NPE-for-Jukebox-setRecord.patch
index c673e4f8c7..c673e4f8c7 100644
--- a/patches/server/1000-Fix-NPE-for-Jukebox-setRecord.patch
+++ b/patches/server/0999-Fix-NPE-for-Jukebox-setRecord.patch
diff --git a/patches/server/1001-fix-horse-inventories.patch b/patches/server/1000-fix-horse-inventories.patch
index 9737a4fa71..9737a4fa71 100644
--- a/patches/server/1001-fix-horse-inventories.patch
+++ b/patches/server/1000-fix-horse-inventories.patch
diff --git a/patches/server/1002-Only-call-EntityDamageEvents-before-actuallyHurt.patch b/patches/server/1001-Only-call-EntityDamageEvents-before-actuallyHurt.patch
index fb40d00f9a..9a4b699009 100644
--- a/patches/server/1002-Only-call-EntityDamageEvents-before-actuallyHurt.patch
+++ b/patches/server/1001-Only-call-EntityDamageEvents-before-actuallyHurt.patch
@@ -12,10 +12,10 @@ This patch moves the invocation directly before the #actuallyHurt calls,
respective invulnerable timings.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index ed84f06d64afb117e08e8c8b54e992c0159a4a77..ab9eec00c8c7d4b9501c6c860065909263da0b10 100644
+index 5e4716158da891216acc835f2560f980f527c66f..ad536c76010957650814b293fc8220ac525c13f1 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1491,12 +1491,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1489,12 +1489,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
// CraftBukkit start
@@ -29,7 +29,7 @@ index ed84f06d64afb117e08e8c8b54e992c0159a4a77..ab9eec00c8c7d4b9501c6c8600659092
// CraftBukkit end
this.walkAnimation.setSpeed(1.5F);
-@@ -1511,6 +1506,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1509,6 +1504,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
return false;
}
@@ -41,7 +41,7 @@ index ed84f06d64afb117e08e8c8b54e992c0159a4a77..ab9eec00c8c7d4b9501c6c8600659092
// CraftBukkit start
if (!this.actuallyHurt(world, source, (float) event.getFinalDamage() - this.lastHurt, event)) {
return false;
-@@ -1520,6 +1520,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1518,6 +1518,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.lastHurt = amount;
flag1 = false;
} else {
@@ -52,7 +52,7 @@ index ed84f06d64afb117e08e8c8b54e992c0159a4a77..ab9eec00c8c7d4b9501c6c8600659092
// CraftBukkit start
if (!this.actuallyHurt(world, source, (float) event.getFinalDamage(), event)) {
return false;
-@@ -1655,6 +1659,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1653,6 +1657,18 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}
diff --git a/patches/server/1003-Add-ItemType-getItemRarity.patch b/patches/server/1002-Add-ItemType-getItemRarity.patch
index 0863f02f5c..0863f02f5c 100644
--- a/patches/server/1003-Add-ItemType-getItemRarity.patch
+++ b/patches/server/1002-Add-ItemType-getItemRarity.patch
diff --git a/patches/server/1004-Add-plugin-info-at-startup.patch b/patches/server/1003-Add-plugin-info-at-startup.patch
index 051309bbed..051309bbed 100644
--- a/patches/server/1004-Add-plugin-info-at-startup.patch
+++ b/patches/server/1003-Add-plugin-info-at-startup.patch
diff --git a/patches/server/1005-Make-interaction-leniency-distance-configurable.patch b/patches/server/1004-Make-interaction-leniency-distance-configurable.patch
index ae6223c783..ae6223c783 100644
--- a/patches/server/1005-Make-interaction-leniency-distance-configurable.patch
+++ b/patches/server/1004-Make-interaction-leniency-distance-configurable.patch
diff --git a/patches/server/1006-Fix-PickupStatus-getting-reset.patch b/patches/server/1005-Fix-PickupStatus-getting-reset.patch
index 4f8f62e8bc..4f8f62e8bc 100644
--- a/patches/server/1006-Fix-PickupStatus-getting-reset.patch
+++ b/patches/server/1005-Fix-PickupStatus-getting-reset.patch
diff --git a/patches/server/1007-Check-for-block-type-in-SculkSensorBlock-canActivate.patch b/patches/server/1006-Check-for-block-type-in-SculkSensorBlock-canActivate.patch
index b06a0b6c33..b06a0b6c33 100644
--- a/patches/server/1007-Check-for-block-type-in-SculkSensorBlock-canActivate.patch
+++ b/patches/server/1006-Check-for-block-type-in-SculkSensorBlock-canActivate.patch
diff --git a/patches/server/1008-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch b/patches/server/1007-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
index 282bdd1de1..282bdd1de1 100644
--- a/patches/server/1008-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
+++ b/patches/server/1007-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
diff --git a/patches/server/1009-Configuration-for-horizontal-only-item-merging.patch b/patches/server/1008-Configuration-for-horizontal-only-item-merging.patch
index 4b16b244dd..4b16b244dd 100644
--- a/patches/server/1009-Configuration-for-horizontal-only-item-merging.patch
+++ b/patches/server/1008-Configuration-for-horizontal-only-item-merging.patch
diff --git a/patches/server/1010-Add-skipping-world-symlink-scan.patch b/patches/server/1009-Add-skipping-world-symlink-scan.patch
index f3221508c6..f3221508c6 100644
--- a/patches/server/1010-Add-skipping-world-symlink-scan.patch
+++ b/patches/server/1009-Add-skipping-world-symlink-scan.patch
diff --git a/patches/server/1011-Add-even-more-Enchantment-API.patch b/patches/server/1010-Add-even-more-Enchantment-API.patch
index dfc79b5b19..dfc79b5b19 100644
--- a/patches/server/1011-Add-even-more-Enchantment-API.patch
+++ b/patches/server/1010-Add-even-more-Enchantment-API.patch
diff --git a/patches/server/1012-Leashable-API.patch b/patches/server/1011-Leashable-API.patch
index f3cf7dc395..f3cf7dc395 100644
--- a/patches/server/1012-Leashable-API.patch
+++ b/patches/server/1011-Leashable-API.patch
diff --git a/patches/server/1013-Fix-CraftBukkit-drag-system.patch b/patches/server/1012-Fix-CraftBukkit-drag-system.patch
index afd7345911..afd7345911 100644
--- a/patches/server/1013-Fix-CraftBukkit-drag-system.patch
+++ b/patches/server/1012-Fix-CraftBukkit-drag-system.patch
diff --git a/patches/server/1014-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch b/patches/server/1013-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch
index c2857c2245..c2857c2245 100644
--- a/patches/server/1014-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch
+++ b/patches/server/1013-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch
diff --git a/patches/server/1015-Remove-set-damage-lootable-item-function-from-compas.patch b/patches/server/1014-Remove-set-damage-lootable-item-function-from-compas.patch
index ac0c0e3513..ac0c0e3513 100644
--- a/patches/server/1015-Remove-set-damage-lootable-item-function-from-compas.patch
+++ b/patches/server/1014-Remove-set-damage-lootable-item-function-from-compas.patch
diff --git a/patches/server/1016-Add-enchantment-seed-update-API.patch b/patches/server/1015-Add-enchantment-seed-update-API.patch
index 3725102979..3725102979 100644
--- a/patches/server/1016-Add-enchantment-seed-update-API.patch
+++ b/patches/server/1015-Add-enchantment-seed-update-API.patch
diff --git a/patches/server/1017-Fix-synchronise-sending-chat-to-client-with-updating.patch b/patches/server/1016-Fix-synchronise-sending-chat-to-client-with-updating.patch
index 63f9be4942..63f9be4942 100644
--- a/patches/server/1017-Fix-synchronise-sending-chat-to-client-with-updating.patch
+++ b/patches/server/1016-Fix-synchronise-sending-chat-to-client-with-updating.patch
diff --git a/patches/server/1018-Fix-InventoryOpenEvent-cancellation.patch b/patches/server/1017-Fix-InventoryOpenEvent-cancellation.patch
index 6f31e5f363..6f31e5f363 100644
--- a/patches/server/1018-Fix-InventoryOpenEvent-cancellation.patch
+++ b/patches/server/1017-Fix-InventoryOpenEvent-cancellation.patch
diff --git a/patches/server/1019-Fire-BlockExpEvent-on-grindstone-use.patch b/patches/server/1018-Fire-BlockExpEvent-on-grindstone-use.patch
index e5944fabfe..e5944fabfe 100644
--- a/patches/server/1019-Fire-BlockExpEvent-on-grindstone-use.patch
+++ b/patches/server/1018-Fire-BlockExpEvent-on-grindstone-use.patch
diff --git a/patches/server/1020-Check-dead-flag-in-isAlive.patch b/patches/server/1019-Check-dead-flag-in-isAlive.patch
index 2136c68a7a..e2836e5738 100644
--- a/patches/server/1020-Check-dead-flag-in-isAlive.patch
+++ b/patches/server/1019-Check-dead-flag-in-isAlive.patch
@@ -15,10 +15,10 @@ Also, even if the plugin is responsibly checking !isDead() before modifying heal
I am currently unable to replicate, these "revived" entities can still appear
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index ab9eec00c8c7d4b9501c6c860065909263da0b10..6db0613904c172fb6ae7e868f542f56aeaa63a5e 100644
+index ad536c76010957650814b293fc8220ac525c13f1..ceaba7b82e9ff73a14fdef046e63b07c4d0fd5e9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2147,7 +2147,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2145,7 +2145,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public boolean isAlive() {
diff --git a/patches/server/1021-Add-FeatureFlag-API.patch b/patches/server/1020-Add-FeatureFlag-API.patch
index cc3530746f..eaaa35ce83 100644
--- a/patches/server/1021-Add-FeatureFlag-API.patch
+++ b/patches/server/1020-Add-FeatureFlag-API.patch
@@ -284,7 +284,7 @@ index 6cf790c9fa23ea313423fdaeb7c181bf530828c6..0bcb9df1103050441f8922a688b163dc
public static PotionEffectType minecraftHolderToBukkit(Holder<MobEffect> minecraft) {
return CraftPotionEffectType.minecraftToBukkit(minecraft.value());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index f1178a6c8ccd1ad099d67b906f755eea1dfc0e53..e1186f840670aabb73668e03d66789f9e306e234 100644
+index d3759c1262a5ce8ff82215a99abd31f20af95fc5..15bb55f0b4c60b0519918b910398a0908022128f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -47,7 +47,7 @@ import org.bukkit.advancement.Advancement;
@@ -296,7 +296,7 @@ index f1178a6c8ccd1ad099d67b906f755eea1dfc0e53..e1186f840670aabb73668e03d66789f9
import org.bukkit.craftbukkit.CraftRegistry;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.attribute.CraftAttribute;
-@@ -461,11 +461,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -455,11 +455,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftAttribute.bukkitToMinecraft(attribute).getDescriptionId();
}
diff --git a/patches/server/1022-Tag-Lifecycle-Events.patch b/patches/server/1021-Tag-Lifecycle-Events.patch
index a247efaccc..943c370a5b 100644
--- a/patches/server/1022-Tag-Lifecycle-Events.patch
+++ b/patches/server/1021-Tag-Lifecycle-Events.patch
@@ -474,10 +474,10 @@ index fdc88e52235a152dbe3cca273990b4b68f8daaf8..13797035494a1e010e1da529fb46040f
static <E> void loadContentsFromNetwork(
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 7981abcea38196658556d403cbb588a7ddfff6ba..257e7cf628af0e539e14f836ca47280ae97bd90d 100644
+index e3e3099bb33d21055e480fdbd2df2a3e159f0f1a..843f8ccce6302a6db6cc61c496a5eee21305a88f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -2252,7 +2252,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2208,7 +2208,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return stream.<Pack>map(resourcepackrepository::getPack).filter(Objects::nonNull).map(Pack::open).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error // Paper - decompile error // todo: is this needed anymore?
}, this).thenCompose((immutablelist) -> {
MultiPackResourceManager resourcemanager = new MultiPackResourceManager(PackType.SERVER_DATA, immutablelist);
diff --git a/patches/server/1023-Item-serialization-as-json.patch b/patches/server/1022-Item-serialization-as-json.patch
index 9e7e7399ca..6b8500a0d7 100644
--- a/patches/server/1023-Item-serialization-as-json.patch
+++ b/patches/server/1022-Item-serialization-as-json.patch
@@ -28,10 +28,10 @@ index c80fd4960dfbb0fde37363e7df25b0a5411bdb11..ff7f6916f65466c25a7bde35d64682c1
public static final Codec<CustomData> CODEC_WITH_ID = CODEC.validate(
component -> component.getUnsafe().contains("id", 8) ? DataResult.success(component) : DataResult.error(() -> "Missing id for entity in: " + component)
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index e1186f840670aabb73668e03d66789f9e306e234..2a5c5e9e04d90c4e218b200bb55ff6bf2877ad73 100644
+index 15bb55f0b4c60b0519918b910398a0908022128f..ef0ef0872a44eb34fe41358728f3ddcf262297e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -511,6 +511,39 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -516,6 +516,39 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow());
}
diff --git a/patches/server/1024-Validate-slot-in-PlayerInventory-setSlot.patch b/patches/server/1023-Validate-slot-in-PlayerInventory-setSlot.patch
index 3c402b2284..3c402b2284 100644
--- a/patches/server/1024-Validate-slot-in-PlayerInventory-setSlot.patch
+++ b/patches/server/1023-Validate-slot-in-PlayerInventory-setSlot.patch
diff --git a/patches/server/1025-Remove-wall-time-unused-skip-tick-protection.patch b/patches/server/1024-Remove-wall-time-unused-skip-tick-protection.patch
index da0d05dd0d..da0d05dd0d 100644
--- a/patches/server/1025-Remove-wall-time-unused-skip-tick-protection.patch
+++ b/patches/server/1024-Remove-wall-time-unused-skip-tick-protection.patch
diff --git a/patches/server/1026-Disable-pretty-printing-for-advancement-saving.patch b/patches/server/1025-Disable-pretty-printing-for-advancement-saving.patch
index c6ad9249f5..c6ad9249f5 100644
--- a/patches/server/1026-Disable-pretty-printing-for-advancement-saving.patch
+++ b/patches/server/1025-Disable-pretty-printing-for-advancement-saving.patch
diff --git a/patches/server/1027-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch b/patches/server/1026-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch
index 88334f2709..88334f2709 100644
--- a/patches/server/1027-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch
+++ b/patches/server/1026-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch
diff --git a/patches/server/1028-Add-enchantWithLevels-with-enchantment-registry-set.patch b/patches/server/1027-Add-enchantWithLevels-with-enchantment-registry-set.patch
index 61f5aced36..61f5aced36 100644
--- a/patches/server/1028-Add-enchantWithLevels-with-enchantment-registry-set.patch
+++ b/patches/server/1027-Add-enchantWithLevels-with-enchantment-registry-set.patch
diff --git a/patches/server/1029-Improve-entity-effect-API.patch b/patches/server/1028-Improve-entity-effect-API.patch
index 6599dd255e..6599dd255e 100644
--- a/patches/server/1029-Improve-entity-effect-API.patch
+++ b/patches/server/1028-Improve-entity-effect-API.patch
diff --git a/patches/server/1030-Add-recipeBrewTime.patch b/patches/server/1029-Add-recipeBrewTime.patch
index 39d7149206..39d7149206 100644
--- a/patches/server/1030-Add-recipeBrewTime.patch
+++ b/patches/server/1029-Add-recipeBrewTime.patch
diff --git a/patches/server/1031-Call-bucket-events-for-cauldrons.patch b/patches/server/1030-Call-bucket-events-for-cauldrons.patch
index ab192b82a4..ab192b82a4 100644
--- a/patches/server/1031-Call-bucket-events-for-cauldrons.patch
+++ b/patches/server/1030-Call-bucket-events-for-cauldrons.patch
diff --git a/patches/server/1032-Add-PlayerInsertLecternBookEvent.patch b/patches/server/1031-Add-PlayerInsertLecternBookEvent.patch
index e410ce7bc2..e410ce7bc2 100644
--- a/patches/server/1032-Add-PlayerInsertLecternBookEvent.patch
+++ b/patches/server/1031-Add-PlayerInsertLecternBookEvent.patch
diff --git a/patches/server/1033-Void-damage-configuration-API.patch b/patches/server/1032-Void-damage-configuration-API.patch
index 6270e63ff8..0bebf02515 100644
--- a/patches/server/1033-Void-damage-configuration-API.patch
+++ b/patches/server/1032-Void-damage-configuration-API.patch
@@ -20,10 +20,10 @@ index 6a0472eaae9ad890692862590b8d23110e48536d..7d16f9935407931823ad3e420f336c7e
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
// Paper end - Configurable nether ceiling damage
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 6db0613904c172fb6ae7e868f542f56aeaa63a5e..22b3d3d945cbddae25abfca7d900324c79d32293 100644
+index ceaba7b82e9ff73a14fdef046e63b07c4d0fd5e9..2914be5f6681c513bf2878a92c0c60ad997852dc 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2702,7 +2702,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2700,7 +2700,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
protected void onBelowWorld() {
diff --git a/patches/server/1034-Add-Offline-PDC-API.patch b/patches/server/1033-Add-Offline-PDC-API.patch
index f1513955cb..f1513955cb 100644
--- a/patches/server/1034-Add-Offline-PDC-API.patch
+++ b/patches/server/1033-Add-Offline-PDC-API.patch
diff --git a/patches/server/1035-Add-AnvilView-bypassEnchantmentLevelRestriction.patch b/patches/server/1034-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
index f8c089a57c..f8c089a57c 100644
--- a/patches/server/1035-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
+++ b/patches/server/1034-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
diff --git a/patches/server/1036-Add-proper-async-player-disconnections.patch b/patches/server/1035-Add-proper-async-player-disconnections.patch
index 6369e9271b..6369e9271b 100644
--- a/patches/server/1036-Add-proper-async-player-disconnections.patch
+++ b/patches/server/1035-Add-proper-async-player-disconnections.patch
diff --git a/patches/server/1037-Always-send-Banner-patterns-to-the-client.patch b/patches/server/1036-Always-send-Banner-patterns-to-the-client.patch
index a5951afc90..a5951afc90 100644
--- a/patches/server/1037-Always-send-Banner-patterns-to-the-client.patch
+++ b/patches/server/1036-Always-send-Banner-patterns-to-the-client.patch
diff --git a/patches/server/1038-Rewrite-dataconverter-system.patch b/patches/server/1037-Rewrite-dataconverter-system.patch
index c56d13c873..e91a834827 100644
--- a/patches/server/1038-Rewrite-dataconverter-system.patch
+++ b/patches/server/1037-Rewrite-dataconverter-system.patch
@@ -30384,10 +30384,10 @@ index b54a3741cd3ba615c83c98985cb4b3c4c586ed7a..b148cf247acdd36f856d0495cde4cc5a
return nbttagcompound;
});
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 2a5c5e9e04d90c4e218b200bb55ff6bf2877ad73..bc53c263682ada9eebcaccc13e741844d310a7a6 100644
+index ef0ef0872a44eb34fe41358728f3ddcf262297e9..05a62b2cf9ca8e0141274bd7f44ef8fb703466d1 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -507,7 +507,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -512,7 +512,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data);
final int dataVersion = compound.getInt("DataVersion");
@@ -30396,7 +30396,7 @@ index 2a5c5e9e04d90c4e218b200bb55ff6bf2877ad73..bc53c263682ada9eebcaccc13e741844
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow());
}
-@@ -561,7 +561,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -566,7 +566,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data);
int dataVersion = compound.getInt("DataVersion");
diff --git a/patches/server/1039-Moonrise-optimisation-patches.patch b/patches/server/1038-Moonrise-optimisation-patches.patch
index 8bd5172b96..1e69b3cb33 100644
--- a/patches/server/1039-Moonrise-optimisation-patches.patch
+++ b/patches/server/1038-Moonrise-optimisation-patches.patch
@@ -23189,10 +23189,10 @@ index 0000000000000000000000000000000000000000..85950a1aa732ab8c01ad28bec9e0de14
+ }
+}
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-index 8a0cb603cd4dbfa1839e0f4e1606876cbb373277..e4df6312fc676ab2d573f060b007e0442d60a6a9 100644
+index 46c37c8db8ecf3cc808fcf59f6bee5fe6ca49b75..cbd0f2c6636b8ae332f20a3cb763b06855dfe795 100644
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
-@@ -244,6 +244,23 @@ public class GlobalConfiguration extends ConfigurationPart {
+@@ -219,6 +219,23 @@ public class GlobalConfiguration extends ConfigurationPart {
@PostProcess
private void postProcess() {
ca.spottedleaf.moonrise.common.util.MoonriseCommon.adjustWorkerThreads(this.workerThreads, this.ioThreads);
@@ -23386,19 +23386,19 @@ index fc6ce3485dc890f5105a37fe3e344a1460867556..e114e687f2f4503546687fd6792226a6
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::createFromGameruleRadius);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d8b7b6354 100644
+index 843f8ccce6302a6db6cc61c496a5eee21305a88f..e0b80b23197307d156ade8427a5227acbc45eb92 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -205,7 +205,7 @@ import org.bukkit.event.server.ServerLoadEvent;
+@@ -204,7 +204,7 @@ import org.bukkit.event.server.ServerLoadEvent;
+ // CraftBukkit end
- import co.aikar.timings.MinecraftTimings; // Paper
-public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource {
+public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource, ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer { // Paper - rewrite chunk system
private static MinecraftServer SERVER; // Paper
public static final Logger LOGGER = LogUtils.getLogger();
-@@ -332,7 +332,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -331,7 +331,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
@@ -23407,7 +23407,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
((MinecraftServer) atomicreference.get()).runServer();
}, "Server thread");
-@@ -351,6 +351,77 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -350,6 +350,77 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return s0;
}
@@ -23485,7 +23485,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server");
SERVER = this; // Paper - better singleton
-@@ -672,7 +743,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -671,7 +742,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.forceDifficulty();
for (ServerLevel worldserver : this.getAllLevels()) {
this.prepareLevels(worldserver.getChunkSource().chunkMap.progressListener, worldserver);
@@ -23494,7 +23494,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
}
-@@ -885,6 +956,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -884,6 +955,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public abstract boolean shouldRconBroadcast();
public boolean saveAllChunks(boolean suppressLogs, boolean flush, boolean force) {
@@ -23506,7 +23506,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
boolean flag3 = false;
for (Iterator iterator = this.getAllLevels().iterator(); iterator.hasNext(); flag3 = true) {
-@@ -894,7 +970,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -893,7 +969,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.info("Saving chunks for level '{}'/{}", worldserver, worldserver.dimension().location());
}
@@ -23515,7 +23515,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
}
// CraftBukkit start - moved to WorldServer.save
-@@ -995,7 +1071,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -993,7 +1069,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
}
@@ -23524,7 +23524,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
return worldserver1.getChunkSource().chunkMap.hasWork();
})) {
this.nextTickTimeNanos = Util.getNanos() + TimeUtil.NANOSECONDS_PER_MILLISECOND;
-@@ -1012,19 +1088,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1010,19 +1086,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.waitUntilNextTick();
}
@@ -23545,7 +23545,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
this.isSaving = false;
this.resources.close();
-@@ -1044,6 +1108,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1042,6 +1106,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
// Spigot end
@@ -23560,7 +23560,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
}
public String getLocalIp() {
-@@ -1224,6 +1296,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1222,6 +1294,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.tickServer(flag ? () -> {
return false;
} : this::haveTime);
@@ -23574,7 +23574,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
this.tickFrame.end();
gameprofilerfiller.popPush("nextTickWait");
this.mayHaveDelayedTasks = true;
-@@ -1440,6 +1519,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1426,6 +1505,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private boolean pollTaskInternal() {
if (super.pollTask()) {
@@ -23582,7 +23582,7 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
return true;
} else {
boolean ret = false; // Paper - force execution of all worlds, do not just bias the first
-@@ -2733,6 +2813,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2689,6 +2769,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
@@ -23597,10 +23597,10 @@ index 257e7cf628af0e539e14f836ca47280ae97bd90d..0b095c559c6a95ba2d9d7717d527cc2d
public boolean isDebugging() {
return false;
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 39c9c0dad159744da8322c3dfa3bfae448f73241..3ed19896a0e06fe834953e6450f23abdc805a6cc 100644
+index cce0e570c8217c8e7cc81642d303e1b96f70f4f3..bf2bae3166df06be240dbbeecce16a24c85897a9 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -458,7 +458,33 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -456,7 +456,33 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
return world.dimension() == net.minecraft.world.level.Level.NETHER ? this.getProperties().allowNether : true;
}
@@ -24141,10 +24141,10 @@ index d9ad32acdf46a43a649334a3b736aeb7b3af21d1..fae17a075d7efaf24d916877dd5968eb
public static final int RADIUS_AROUND_FULL_CHUNK = FULL_CHUNK_STEP.accumulatedDependencies().getRadius();
public static final int MAX_LEVEL = 33 + RADIUS_AROUND_FULL_CHUNK;
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d84f99c39 100644
+index 9b64dfe8f1727519673cc87be2398d43601e68ef..c11ba8d9e97a68cda1811b570f0df117e6c38138 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -110,7 +110,7 @@ import org.slf4j.Logger;
+@@ -108,7 +108,7 @@ import org.slf4j.Logger;
import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
// CraftBukkit end
@@ -24153,7 +24153,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
private static final ChunkResult<List<ChunkAccess>> UNLOADED_CHUNK_LIST_RESULT = ChunkResult.error("Unloaded chunks found in range");
private static final CompletableFuture<ChunkResult<List<ChunkAccess>>> UNLOADED_CHUNK_LIST_FUTURE = CompletableFuture.completedFuture(ChunkMap.UNLOADED_CHUNK_LIST_RESULT);
-@@ -125,10 +125,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -123,10 +123,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
public static final int MIN_VIEW_DISTANCE = 2;
public static final int MAX_VIEW_DISTANCE = 32;
public static final int FORCED_TICKET_LEVEL = ChunkLevel.byStatus(FullChunkStatus.ENTITY_TICKING);
@@ -24165,7 +24165,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
public final ServerLevel level;
private final ThreadedLevelLightEngine lightEngine;
private final BlockableEventLoop<Runnable> mainThreadExecutor;
-@@ -138,22 +135,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -136,22 +133,18 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
private final PoiManager poiManager;
public final LongSet toDrop;
private boolean modified;
@@ -24192,7 +24192,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
// CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback()
public final CallbackExecutor callbackExecutor = new CallbackExecutor();
-@@ -178,24 +171,26 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -176,24 +169,26 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper start
public final ChunkHolder getUnloadingChunkHolder(int chunkX, int chunkZ) {
@@ -24227,7 +24227,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
Path path = session.getDimensionPath(world.dimension());
this.storageName = path.getFileName().toString();
-@@ -223,18 +218,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -221,18 +216,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.chunkStatusListener = chunkStatusChangeListener;
ConsecutiveExecutor consecutiveexecutor1 = new ConsecutiveExecutor(executor, "light");
@@ -24249,7 +24249,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
// Paper start
-@@ -265,23 +258,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -263,23 +256,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
boolean isChunkTracked(ServerPlayer player, int chunkX, int chunkZ) {
@@ -24275,7 +24275,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
protected ThreadedLevelLightEngine getLightEngine() {
-@@ -290,20 +271,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -288,20 +269,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@Nullable
protected ChunkHolder getUpdatingChunkIfPresent(long pos) {
@@ -24305,7 +24305,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
public String getChunkDebugData(ChunkPos chunkPos) {
-@@ -332,56 +315,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -330,56 +313,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
private CompletableFuture<ChunkResult<List<ChunkAccess>>> getChunkRangeFuture(ChunkHolder centerChunk, int margin, IntFunction<ChunkStatus> distanceToStatus) {
@@ -24363,7 +24363,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
public ReportedException debugFuturesAndCreateReportedException(IllegalStateException exception, String details) {
-@@ -411,104 +345,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -409,104 +343,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public CompletableFuture<ChunkResult<LevelChunk>> prepareEntityTickingChunk(ChunkHolder holder) {
@@ -24477,7 +24477,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
-@@ -526,143 +386,29 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -524,143 +384,29 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public boolean hasWork() {
@@ -24628,7 +24628,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
private ChunkAccess handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) {
-@@ -718,139 +464,43 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -716,139 +462,43 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@Override
public GenerationChunkHolder acquireGeneration(long pos) {
@@ -24777,7 +24777,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
public int getTickingGenerated() {
-@@ -858,144 +508,80 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -856,144 +506,80 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
private boolean saveChunkIfNeeded(ChunkHolder chunkHolder, long currentTime) {
@@ -24970,7 +24970,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
@Nullable
public LevelChunk getChunkToSend(long pos) {
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos);
-@@ -1061,7 +647,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1059,7 +645,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
// CraftBukkit start
@@ -24979,7 +24979,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
return this.upgradeChunkTag(this.level.getTypeKey(), this.overworldDataStorage, nbttagcompound, this.generator().getTypeNameForDataFixer(), chunkcoordintpair, this.level);
// CraftBukkit end
}
-@@ -1071,7 +657,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1069,7 +655,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
while (longiterator.hasNext()) {
long i = longiterator.nextLong();
@@ -24988,7 +24988,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
if (playerchunk != null && this.anyPlayerCloseEnoughForSpawningInternal(playerchunk.getPos())) {
callback.accept(playerchunk);
-@@ -1086,7 +672,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1084,7 +670,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
boolean anyPlayerCloseEnoughForSpawning(ChunkPos chunkcoordintpair, boolean reducedRange) {
@@ -24997,7 +24997,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
// Spigot end
}
-@@ -1104,16 +690,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1102,16 +688,20 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
//double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D; // Paper - use from event
double blockRange = 16384.0D; // Paper
// Spigot end
@@ -25026,7 +25026,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
// Paper start - PlayerNaturallySpawnCreaturesEvent
com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent event;
blockRange = 16384.0D;
-@@ -1123,33 +713,47 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1121,33 +711,47 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
blockRange = (double) ((event.getSpawnRadius() << 4) * (event.getSpawnRadius() << 4));
}
// Paper end - PlayerNaturallySpawnCreaturesEvent
@@ -25089,7 +25089,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
if (entityplayer.isSpectator()) {
return false;
} else {
-@@ -1172,19 +776,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1170,19 +774,21 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.updatePlayerPos(player);
if (!flag1) {
this.distanceManager.addPlayer(SectionPos.of((EntityAccess) player), player);
@@ -25113,7 +25113,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
}
-@@ -1196,17 +802,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1194,17 +800,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public void move(ServerPlayer player) {
@@ -25132,7 +25132,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
SectionPos sectionposition = player.getLastSectionPos();
SectionPos sectionposition1 = SectionPos.of((EntityAccess) player);
-@@ -1216,6 +812,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1214,6 +810,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
if (flag2 || flag != flag1) {
this.updatePlayerPos(player);
@@ -25140,7 +25140,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
if (!flag) {
this.distanceManager.removePlayer(sectionposition, player);
}
-@@ -1232,70 +829,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1230,70 +827,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.playerMap.unIgnorePlayer(player);
}
@@ -25222,7 +25222,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
public void addEntity(Entity entity) {
-@@ -1322,6 +879,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1320,6 +877,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas());
this.entityMap.put(entity.getId(), playerchunkmap_entitytracker);
@@ -25235,7 +25235,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
playerchunkmap_entitytracker.updatePlayers(this.level.players());
if (entity instanceof ServerPlayer) {
ServerPlayer entityplayer = (ServerPlayer) entity;
-@@ -1362,16 +925,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1360,16 +923,38 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
playerchunkmap_entitytracker1.broadcastRemoved();
}
@@ -25279,7 +25279,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
List<ServerPlayer> list = Lists.newArrayList();
List<ServerPlayer> list1 = this.level.players();
-@@ -1478,27 +1063,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1472,27 +1057,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
public void waitForLightBeforeSending(ChunkPos centerPos, int radius) {
@@ -25317,7 +25317,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
}
@Nullable
-@@ -1514,7 +1097,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1508,7 +1091,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
}
@@ -25326,7 +25326,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
public final ServerEntity serverEntity;
final Entity entity;
-@@ -1522,6 +1105,89 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1516,6 +1099,89 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
SectionPos lastSectionPos;
public final Set<ServerPlayerConnection> seenBy = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<>(); // Paper - Perf: optimise map impl
@@ -25416,7 +25416,7 @@ index 182513bb175feb5f30f0fb1cd5db501b6d483afd..d692af061ded8cd5bcf1d268e6bd521d
public TrackedEntity(final Entity entity, final int i, final int j, final boolean flag) {
this.serverEntity = new ServerEntity(ChunkMap.this.level, entity, j, flag, this::broadcast, this.seenBy); // CraftBukkit
this.entity = entity;
-@@ -1624,20 +1290,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1618,20 +1284,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
private int getEffectiveRange() {
@@ -26268,7 +26268,7 @@ index 65206fdfa5b94eaca139e433b4865c16b16641f3..bf4463bcb5dc439ac5a3fa08dd60845a
}
}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f5060ecff4a 100644
+index 76cb7ffad02dcc27966ca13da6552edbb696e41f..07dde7dbf4d9e1d2f61426e3f1dc3cd5be55f193 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -52,7 +52,7 @@ import net.minecraft.world.level.storage.DimensionDataStorage;
@@ -26396,7 +26396,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
@Nullable
public ChunkAccess getChunkAtImmediately(int x, int z) {
-@@ -186,63 +274,42 @@ public class ServerChunkCache extends ChunkSource {
+@@ -186,59 +274,42 @@ public class ServerChunkCache extends ChunkSource {
@Nullable
@Override
public ChunkAccess getChunk(int x, int z, ChunkStatus leastStatus, boolean create) {
@@ -26436,12 +26436,8 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
- ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
-
- Objects.requireNonNull(completablefuture);
-- if (!completablefuture.isDone()) { // Paper
-- com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x, z); // Paper - Add debug for sync chunk loads
-- this.level.timings.syncChunkLoad.startTiming(); // Paper
- chunkproviderserver_b.managedBlock(completablefuture::isDone);
-- this.level.timings.syncChunkLoad.stopTiming(); // Paper
-- } // Paper
+- // com.destroystokyo.paper.io.SyncLoadFinder.logSyncLoad(this.level, x, z); // Paper - Add debug for sync chunk loads
- ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
- ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
-
@@ -26486,7 +26482,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
}
private void clearCache() {
-@@ -273,56 +340,59 @@ public class ServerChunkCache extends ChunkSource {
+@@ -269,56 +340,59 @@ public class ServerChunkCache extends ChunkSource {
}
private CompletableFuture<ChunkResult<ChunkAccess>> getChunkFutureMainThread(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create) {
@@ -26584,7 +26580,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
}
@Override
-@@ -335,16 +405,7 @@ public class ServerChunkCache extends ChunkSource {
+@@ -331,16 +405,7 @@ public class ServerChunkCache extends ChunkSource {
}
public boolean runDistanceManagerUpdates() { // Paper - public
@@ -26602,7 +26598,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
}
// Paper start
-@@ -354,17 +415,14 @@ public class ServerChunkCache extends ChunkSource {
+@@ -350,17 +415,14 @@ public class ServerChunkCache extends ChunkSource {
// Paper end
public boolean isPositionTicking(long pos) {
@@ -26622,10 +26618,10 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
public void save(boolean flush) {
- this.runDistanceManagerUpdates();
+ // Paper - rewrite chunk system
- try (co.aikar.timings.Timing timed = level.timings.chunkSaveData.startTiming()) { // Paper - Timings
this.chunkMap.saveAllChunks(flush);
- } // Paper - Timings
-@@ -377,17 +435,15 @@ public class ServerChunkCache extends ChunkSource {
+ }
+
+@@ -371,17 +433,15 @@ public class ServerChunkCache extends ChunkSource {
}
public void close(boolean save) throws IOException {
@@ -26646,15 +26642,15 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("purge");
-@@ -415,6 +471,7 @@ public class ServerChunkCache extends ChunkSource {
+@@ -406,6 +466,7 @@ public class ServerChunkCache extends ChunkSource {
+ this.runDistanceManagerUpdates();
gameprofilerfiller.popPush("chunks");
if (tickChunks) {
- this.level.timings.chunks.startTiming(); // Paper - timings
+ ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getPlayerChunkLoader().tick(); // Paper - rewrite chunk system
this.tickChunks();
- this.level.timings.chunks.stopTiming(); // Paper - timings
this.chunkMap.tick();
-@@ -444,7 +501,10 @@ public class ServerChunkCache extends ChunkSource {
+ }
+@@ -432,7 +493,10 @@ public class ServerChunkCache extends ChunkSource {
gameprofilerfiller.push("filteringTickingChunks");
this.collectTickingChunks(list);
gameprofilerfiller.popPush("shuffleChunks");
@@ -26666,7 +26662,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
this.tickChunks(gameprofilerfiller, j, list);
gameprofilerfiller.pop();
} finally {
-@@ -477,14 +537,26 @@ public class ServerChunkCache extends ChunkSource {
+@@ -463,14 +527,26 @@ public class ServerChunkCache extends ChunkSource {
}
private void collectTickingChunks(List<LevelChunk> chunks) {
@@ -26698,7 +26694,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
}
private void tickChunks(ProfilerFiller profiler, long timeDelta, List<LevelChunk> chunks) {
-@@ -528,7 +600,7 @@ public class ServerChunkCache extends ChunkSource {
+@@ -512,7 +588,7 @@ public class ServerChunkCache extends ChunkSource {
NaturalSpawner.spawnForChunk(this.level, chunk, spawnercreature_d, list1);
}
@@ -26707,7 +26703,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
this.level.tickChunk(chunk, k);
}
}
-@@ -545,11 +617,13 @@ public class ServerChunkCache extends ChunkSource {
+@@ -525,11 +601,13 @@ public class ServerChunkCache extends ChunkSource {
}
private void getFullChunk(long pos, Consumer<LevelChunk> chunkConsumer) {
@@ -26725,7 +26721,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
}
-@@ -643,6 +717,12 @@ public class ServerChunkCache extends ChunkSource {
+@@ -623,6 +701,12 @@ public class ServerChunkCache extends ChunkSource {
this.chunkMap.setServerViewDistance(watchDistance);
}
@@ -26738,7 +26734,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50
public void setSimulationDistance(int simulationDistance) {
this.distanceManager.updateSimulationDistance(simulationDistance);
}
-@@ -734,21 +814,19 @@ public class ServerChunkCache extends ChunkSource {
+@@ -714,21 +798,19 @@ public class ServerChunkCache extends ChunkSource {
@Override
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
public boolean pollTask() {
@@ -26783,10 +26779,10 @@ index b2fd3e936559c8fcb8b02ae3ef63c4f3bd0edb08..5bbc7ceaafc163f12344e5d5d355ad2f
if (!list.equals(this.lastPassengers)) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d4b294e8c 100644
+index c0de354ac03a62f159540f25940dc3700cc0c575..9af879115a24145ec290ac200565004e49ee7b0b 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -186,7 +186,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
+@@ -185,7 +185,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
import org.bukkit.event.world.TimeSkipEvent;
// CraftBukkit end
@@ -26795,7 +26791,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
public static final BlockPos END_SPAWN_POINT = new BlockPos(100, 50, 0);
public static final IntProvider RAIN_DELAY = UniformInt.of(12000, 180000);
-@@ -202,7 +202,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -201,7 +201,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
private int lastSpawnChunkRadius;
final EntityTickList entityTickList = new EntityTickList();
@@ -26804,7 +26800,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
private final GameEventDispatcher gameEventDispatcher;
public boolean noSave;
private final SleepStatus sleepStatus;
-@@ -273,15 +273,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -272,15 +272,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public final void loadChunksForMoveAsync(AABB axisalignedbb, ca.spottedleaf.concurrentutil.util.Priority priority,
java.util.function.Consumer<List<net.minecraft.world.level.chunk.ChunkAccess>> onLoad) {
@@ -26821,7 +26817,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
int minBlockX = Mth.floor(axisalignedbb.minX - 1.0E-7D) - 3;
int maxBlockX = Mth.floor(axisalignedbb.maxX + 1.0E-7D) + 3;
-@@ -294,30 +286,159 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -293,30 +285,159 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
int minChunkZ = minBlockZ >> 4;
int maxChunkZ = maxBlockZ >> 4;
@@ -26995,7 +26991,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
}
}
}
-@@ -325,22 +446,137 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -324,22 +445,137 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
for (int cx = minChunkX; cx <= maxChunkX; ++cx) {
for (int cz = minChunkZ; cz <= maxChunkZ; ++cz) {
@@ -27143,7 +27139,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
-@@ -374,14 +610,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -373,14 +609,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
DataFixer datafixer = minecraftserver.getFixerUpper();
EntityPersistentStorage<Entity> entitypersistentstorage = new EntityStorage(new SimpleRegionStorage(new RegionStorageInfo(convertable_conversionsession.getLevelId(), resourcekey, "entities"), convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, DataFixTypes.ENTITY_CHUNK), this, minecraftserver);
@@ -27161,7 +27157,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
return minecraftserver.overworld().getDataStorage();
});
this.chunkSource.getGeneratorState().ensureStructuresGenerated();
-@@ -409,6 +644,20 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -408,6 +643,20 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.randomSequences = (RandomSequences) Objects.requireNonNullElseGet(randomsequences, () -> {
return (RandomSequences) this.getDataStorage().computeIfAbsent(RandomSequences.factory(l), "random_sequences");
});
@@ -27182,7 +27178,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
}
-@@ -541,7 +790,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -530,7 +779,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
gameprofilerfiller.push("checkDespawn");
entity.checkDespawn();
gameprofilerfiller.pop();
@@ -27191,7 +27187,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
Entity entity1 = entity.getVehicle();
if (entity1 != null) {
-@@ -566,13 +815,16 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -553,13 +802,16 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
gameprofilerfiller.push("entityManagement");
@@ -27210,7 +27206,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
}
protected void tickTime() {
-@@ -612,7 +864,60 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -599,7 +851,60 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
});
}
@@ -27271,7 +27267,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
ChunkPos chunkcoordintpair = chunk.getPos();
boolean flag = this.isRaining();
int j = chunkcoordintpair.getMinBlockX();
-@@ -620,7 +925,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -607,7 +912,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
ProfilerFiller gameprofilerfiller = Profiler.get();
gameprofilerfiller.push("thunder");
@@ -27280,7 +27276,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
if (this.isRainingAt(blockposition)) {
-@@ -652,7 +957,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -639,7 +944,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
for (int l = 0; l < randomTickSpeed; ++l) {
@@ -27289,9 +27285,9 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
this.tickPrecipitation(this.getBlockRandomPos(j, 0, k, 15));
}
}
-@@ -661,35 +966,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -647,35 +952,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+
gameprofilerfiller.popPush("tickBlocks");
- timings.chunkTicksBlocks.startTiming(); // Paper
if (randomTickSpeed > 0) {
- LevelChunkSection[] achunksection = chunk.getSections();
-
@@ -27325,8 +27321,8 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
+ this.optimiseRandomTick(chunk, randomTickSpeed); // Paper - optimise random ticking
}
- timings.chunkTicksBlocks.stopTiming(); // Paper
-@@ -963,6 +1240,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ gameprofilerfiller.pop();
+@@ -948,6 +1225,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (fluid1.is(fluid)) {
fluid1.tick(this, pos, iblockdata);
}
@@ -27338,7 +27334,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
}
-@@ -972,6 +1254,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -957,6 +1239,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
if (iblockdata.is(block)) {
iblockdata.tick(this, pos, this.random);
}
@@ -27350,7 +27346,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
}
-@@ -1060,6 +1347,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1035,6 +1322,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
public void save(@Nullable ProgressListener progressListener, boolean flush, boolean savingDisabled) {
@@ -27362,19 +27358,17 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
ServerChunkCache chunkproviderserver = this.getChunkSource();
if (!savingDisabled) {
-@@ -1075,16 +1367,21 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1048,14 +1340,19 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ progressListener.progressStage(Component.translatable("menu.savingChunks"));
}
- timings.worldSaveChunks.startTiming(); // Paper
- chunkproviderserver.save(flush);
-+ if (!close) { chunkproviderserver.save(flush); } // Paper - add close param
- timings.worldSaveChunks.stopTiming(); // Paper
- }// Paper
- if (flush) {
- this.entityManager.saveAll();
- } else {
- this.entityManager.autoSave();
- }
++ if (!close) { chunkproviderserver.save(flush); } // Paper - add close param
+ // Paper - rewrite chunk system
}
@@ -27390,7 +27384,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
// CraftBukkit start - moved from MinecraftServer.saveChunks
ServerLevel worldserver1 = this;
-@@ -1224,7 +1521,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1195,7 +1492,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.removePlayerImmediately((ServerPlayer) entity, Entity.RemovalReason.DISCARDED);
}
@@ -27399,7 +27393,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
}
// CraftBukkit start
-@@ -1255,7 +1552,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1226,7 +1523,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
// CraftBukkit end
@@ -27408,7 +27402,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
}
}
-@@ -1266,11 +1563,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1237,11 +1534,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
public boolean tryAddFreshEntityWithPassengers(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
// CraftBukkit end
@@ -27421,7 +27415,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
return false;
} else {
this.addFreshEntityWithPassengers(entity, reason); // CraftBukkit
-@@ -1930,7 +2223,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1901,7 +2194,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
}
@@ -27430,7 +27424,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
bufferedwriter.write(String.format(Locale.ROOT, "block_entity_tickers: %d\n", this.blockEntityTickers.size()));
bufferedwriter.write(String.format(Locale.ROOT, "block_ticks: %d\n", this.getBlockTicks().count()));
bufferedwriter.write(String.format(Locale.ROOT, "fluid_ticks: %d\n", this.getFluidTicks().count()));
-@@ -1979,7 +2272,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1950,7 +2243,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
BufferedWriter bufferedwriter2 = Files.newBufferedWriter(path1);
try {
@@ -27439,7 +27433,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
} catch (Throwable throwable4) {
if (bufferedwriter2 != null) {
try {
-@@ -2000,7 +2293,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1971,7 +2264,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
BufferedWriter bufferedwriter3 = Files.newBufferedWriter(path2);
try {
@@ -27448,7 +27442,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
} catch (Throwable throwable6) {
if (bufferedwriter3 != null) {
try {
-@@ -2142,7 +2435,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2113,7 +2406,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@VisibleForTesting
public String getWatchdogStats() {
@@ -27457,7 +27451,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString();
}), this.blockEntityTickers.size(), ServerLevel.getTypeCount(this.blockEntityTickers, TickingBlockEntity::getType), this.getBlockTicks().count(), this.getFluidTicks().count(), this.gatherChunkSourceStats());
}
-@@ -2172,15 +2465,25 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2143,15 +2436,25 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@Override
public LevelEntityGetter<Entity> getEntities() {
org.spigotmc.AsyncCatcher.catchOp("Chunk getEntities call"); // Spigot
@@ -27486,7 +27480,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
}
public void startTickingChunk(LevelChunk chunk) {
-@@ -2200,34 +2503,47 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2171,34 +2474,47 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@Override
public void close() throws IOException {
super.close();
@@ -27541,7 +27535,7 @@ index 878bd04b63f257cc625953e45b953beb06917107..3b55367865b3583e11ef886678114d4d
}
@Override
-@@ -2283,7 +2599,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -2254,7 +2570,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
CrashReportCategory crashreportsystemdetails = super.fillReportDetails(report);
crashreportsystemdetails.setDetail("Loaded entity count", () -> {
@@ -28032,10 +28026,10 @@ index b7d29389a357f142237cecd75f8ca91cf1eb6b5b..e4b0dc3121101d54394a0c3a413dabf8
this.generatingStep = generationStep;
this.cache = chunks;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index f55d7f6ed653b19f28694f91ca5bcc54873e33c3..a6964ceb3874acebdcb8cdc8fe0c128bd56bea48 100644
+index 7fdadac8f3bc3810ae5adeeed2a77c043bb107c3..296002eafb028e60aaa5d9728cd035f86abe6913 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1422,7 +1422,7 @@ public abstract class PlayerList {
+@@ -1420,7 +1420,7 @@ public abstract class PlayerList {
public void setViewDistance(int viewDistance) {
this.viewDistance = viewDistance;
@@ -29471,7 +29465,7 @@ index e185a33b5b1f8e8e0a0e666b24ba3e9186a8a7ff..5d7a6e4b73f032db356e7ec369b15001
// Paper start - Affects Spawning API
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58169fe783 100644
+index 078088a854d466e66411d25d6dd6bcc536db78f3..86cd6e1b8f68dd0564ee2a7c60f02d7af287af67 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -83,6 +83,7 @@ import net.minecraft.world.level.storage.LevelData;
@@ -29491,7 +29485,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
public static final Codec<ResourceKey<Level>> RESOURCE_KEY_CODEC = ResourceKey.codec(Registries.DIMENSION);
public static final ResourceKey<Level> OVERWORLD = ResourceKey.create(Registries.DIMENSION, ResourceLocation.withDefaultNamespace("overworld"));
-@@ -207,7 +208,639 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -206,7 +207,639 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public abstract ResourceKey<LevelStem> getTypeKey();
@@ -30131,7 +30125,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
this.generator = gen;
-@@ -289,6 +922,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -287,6 +920,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
this.chunkPacketBlockController = this.paperConfig().anticheat.antiXray.enabled ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
@@ -30139,7 +30133,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
}
// Paper start - Cancel hit for vanished players
-@@ -558,7 +1192,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -556,7 +1190,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.setBlocksDirty(blockposition, iblockdata1, iblockdata2);
}
@@ -30148,7 +30142,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i);
}
-@@ -824,6 +1458,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -819,6 +1453,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Iterator<TickingBlockEntity> iterator = this.blockEntityTickers.iterator();
boolean flag = this.tickRateManager().runsNormally();
@@ -30157,7 +30151,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
int tilesThisCycle = 0;
var toRemove = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet<TickingBlockEntity>(); // Paper - Fix MC-117075; use removeAll
toRemove.add(null); // Paper - Fix MC-117075
-@@ -839,6 +1475,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -834,6 +1470,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Spigot end
} else if (flag && this.shouldTickBlocksAt(tickingblockentity.getPos())) {
tickingblockentity.tick();
@@ -30169,7 +30163,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
}
}
this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
-@@ -861,12 +1502,20 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -854,12 +1495,20 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD);
// Paper end - Prevent block entity and entity crashes
}
@@ -30191,7 +30185,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
}
// Paper end - Option to prevent armor stands from doing entity lookups
-@@ -918,7 +1567,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -911,7 +1560,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
}
// Paper end - Perf: Optimize capturedTileEntities lookup
// CraftBukkit end
@@ -30200,7 +30194,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
}
public void setBlockEntity(BlockEntity blockEntity) {
-@@ -1010,26 +1659,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -1003,26 +1652,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
Profiler.get().incrementCounter("getEntities");
List<Entity> list = Lists.newArrayList();
@@ -30233,7 +30227,7 @@ index ce6c9b82a64a32c4b952d1839260015b1a446365..bb2d3ba2065b6bf67af24a8630ac2d58
}
@Override
-@@ -1044,36 +1682,94 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
+@@ -1037,36 +1675,94 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.getEntities(filter, box, predicate, result, Integer.MAX_VALUE);
}
@@ -30863,10 +30857,10 @@ index 01352cc83b25eb0e30b7e0ff521fc7c1b3d5155b..90f8360f547ce709fd13ee34f8e67d8b
public interface NoiseBiomeSource {
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
-index 729c3d8279b13d21c65ede89ea50869b69d5bfe6..fa19720fbb911842db42a4eb0ccf8406cb27c137 100644
+index 0f7b73634930df02d7b0a7f44890597cc2e6deca..b6d6c2cb9b227a17fb4ce42bc75f92206fbea043 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
-@@ -278,7 +278,7 @@ public class Block extends BlockBehaviour implements ItemLike {
+@@ -271,7 +271,7 @@ public class Block extends BlockBehaviour implements ItemLike {
}
public static boolean isShapeFullBlock(VoxelShape shape) {
@@ -31673,7 +31667,7 @@ index f38700e5fbeeb8a913272d4464b8aa325d511dac..1eb8022f3e31603322e6c56516304afc
@Override
public BlockEntity getBlockEntity(BlockPos pos) {
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index 71dfd0abb930ecf4f1ba900c80c161fa2a858685..e03d57f58a9f962cd429e8851fb3f35f3491e2c0 100644
+index 5d15aed0f340a49a47e035fb0ce23413946bc124..01cfb478764b8deb38be5692390dd9f014b8999f 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -54,7 +54,7 @@ import net.minecraft.world.ticks.LevelChunkTicks;
@@ -31791,8 +31785,8 @@ index 71dfd0abb930ecf4f1ba900c80c161fa2a858685..e03d57f58a9f962cd429e8851fb3f35f
+ org.bukkit.craftbukkit.event.CraftEventFactory.callEntitiesLoadEvent(this.level, this.chunkPos, ((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getChunkTaskScheduler().chunkHolderManager.getChunkHolder(this.locX, this.locZ).getEntityChunk().getAllEntities()); // Paper - rewrite chunk system
if (this.needsDecoration) {
- try (co.aikar.timings.Timing ignored = this.level.timings.chunkLoadPopulate.startTiming()) { // Paper
-@@ -668,13 +717,15 @@ public class LevelChunk extends ChunkAccess {
+ this.needsDecoration = false;
+@@ -666,13 +715,15 @@ public class LevelChunk extends ChunkAccess {
}
public void unloadCallback() {
@@ -31810,7 +31804,7 @@ index 71dfd0abb930ecf4f1ba900c80c161fa2a858685..e03d57f58a9f962cd429e8851fb3f35f
// Paper start
this.loadedTicketLevel = false;
// Paper end
-@@ -682,8 +733,31 @@ public class LevelChunk extends ChunkAccess {
+@@ -680,8 +731,31 @@ public class LevelChunk extends ChunkAccess {
@Override
public boolean isUnsaved() {
@@ -31843,7 +31837,7 @@ index 71dfd0abb930ecf4f1ba900c80c161fa2a858685..e03d57f58a9f962cd429e8851fb3f35f
// CraftBukkit end
public boolean isEmpty() {
-@@ -791,6 +865,7 @@ public class LevelChunk extends ChunkAccess {
+@@ -789,6 +863,7 @@ public class LevelChunk extends ChunkAccess {
this.pendingBlockEntities.clear();
this.upgradeData.upgrade(this);
@@ -36000,10 +35994,10 @@ index f65cc95ab28e8a3b21eac2b16bd9ebe97e56e571..0074bc0e7147dc3a8c538e796f14ac9b
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b29220ced6f5294594af23d9227532f5bb292e4c..d45d4d43f8e960f164c00bb534ebfbb6da6a803b 100644
+index f3ec7e48f0c1ff3476886a7d64cc0dcc4edeab5f..ca92d377a774ee46d13e108c528ce78941f906ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1433,7 +1433,7 @@ public final class CraftServer implements Server {
+@@ -1432,7 +1432,7 @@ public final class CraftServer implements Server {
// Paper - Put world into worldlist before initing the world; move up
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
@@ -36012,7 +36006,7 @@ index b29220ced6f5294594af23d9227532f5bb292e4c..d45d4d43f8e960f164c00bb534ebfbb6
this.pluginManager.callEvent(new WorldLoadEvent(internal.getWorld()));
return internal.getWorld();
-@@ -1478,7 +1478,7 @@ public final class CraftServer implements Server {
+@@ -1477,7 +1477,7 @@ public final class CraftServer implements Server {
}
handle.getChunkSource().close(save);
@@ -36021,7 +36015,7 @@ index b29220ced6f5294594af23d9227532f5bb292e4c..d45d4d43f8e960f164c00bb534ebfbb6
handle.convertable.close();
} catch (Exception ex) {
this.getLogger().log(Level.SEVERE, null, ex);
-@@ -2516,7 +2516,7 @@ public final class CraftServer implements Server {
+@@ -2515,7 +2515,7 @@ public final class CraftServer implements Server {
@Override
public boolean isPrimaryThread() {
diff --git a/patches/server/1040-API-for-checking-sent-chunks.patch b/patches/server/1039-API-for-checking-sent-chunks.patch
index 7f0201844b..7f0201844b 100644
--- a/patches/server/1040-API-for-checking-sent-chunks.patch
+++ b/patches/server/1039-API-for-checking-sent-chunks.patch
diff --git a/patches/server/1041-Fix-CraftWorld-isChunkGenerated.patch b/patches/server/1040-Fix-CraftWorld-isChunkGenerated.patch
index a1a60d71b0..a1a60d71b0 100644
--- a/patches/server/1041-Fix-CraftWorld-isChunkGenerated.patch
+++ b/patches/server/1040-Fix-CraftWorld-isChunkGenerated.patch
diff --git a/patches/server/1042-Add-startup-flag-to-disable-gamerule-limits.patch b/patches/server/1041-Add-startup-flag-to-disable-gamerule-limits.patch
index 426dd76265..426dd76265 100644
--- a/patches/server/1042-Add-startup-flag-to-disable-gamerule-limits.patch
+++ b/patches/server/1041-Add-startup-flag-to-disable-gamerule-limits.patch
diff --git a/patches/server/1043-Improved-Watchdog-Support.patch b/patches/server/1042-Improved-Watchdog-Support.patch
index 9ce6a1fe4a..f272bf5247 100644
--- a/patches/server/1043-Improved-Watchdog-Support.patch
+++ b/patches/server/1042-Improved-Watchdog-Support.patch
@@ -115,10 +115,10 @@ index e114e687f2f4503546687fd6792226a643af8793..90ca25c4aaf92a5639839a7cdaee2ffc
/* CraftBukkit start - Replace everything
OptionParser optionparser = new OptionParser();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0ca2eb95a6 100644
+index e0b80b23197307d156ade8427a5227acbc45eb92..7a671772760152f26e5bb60ea2f2a7765c017c37 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -318,7 +318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -317,7 +317,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod;
// Paper - don't store the vanilla dispatcher
@@ -127,7 +127,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
// CraftBukkit end
// Spigot start
public static final int TPS = 20;
-@@ -330,6 +330,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -329,6 +329,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
public boolean isIteratingOverLevels = false; // Paper - Throw exception on world create while being ticked
@@ -137,7 +137,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
Thread thread = new ca.spottedleaf.moonrise.common.util.TickThread(() -> { // Paper - rewrite chunk system
-@@ -504,6 +507,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -503,6 +506,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
*/
// Paper end
@@ -145,7 +145,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
// CraftBukkit end
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
-@@ -1020,6 +1024,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1019,6 +1023,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
private boolean hasLoggedStop = false; // Paper - Debugging
@@ -153,7 +153,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
private final Object stopLock = new Object();
public final boolean hasStopped() {
synchronized (this.stopLock) {
-@@ -1035,6 +1040,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1034,6 +1039,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.hasStopped = true;
}
if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
@@ -164,7 +164,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
// CraftBukkit end
if (this.metricsRecorder.isRecording()) {
this.cancelRecordingMetrics();
-@@ -1116,6 +1125,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1114,6 +1123,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ca.spottedleaf.moonrise.common.util.MoonriseCommon.haltExecutors();
}
// Paper end - rewrite chunk system
@@ -180,7 +180,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
}
public String getLocalIp() {
-@@ -1210,6 +1228,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1208,6 +1226,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
protected void runServer() {
try {
@@ -188,7 +188,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
if (!this.initServer()) {
throw new IllegalStateException("Failed to initialize server");
}
-@@ -1219,6 +1238,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1217,6 +1236,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.status = this.buildServerStatus();
// Spigot start
@@ -206,7 +206,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Arrays.fill( this.recentTps, 20 );
// Paper start - further improve server tick loop
-@@ -1339,6 +1369,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1337,6 +1367,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
}
} catch (Throwable throwable2) {
@@ -219,7 +219,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
MinecraftServer.LOGGER.error("Encountered an unexpected exception", throwable2);
CrashReport crashreport = MinecraftServer.constructOrExtractCrashReport(throwable2);
-@@ -1363,15 +1399,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1361,15 +1397,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.services.profileCache().clearExecutor();
}
@@ -239,7 +239,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
}
}
-@@ -1502,6 +1538,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1488,6 +1524,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override
public TickTask wrapRunnable(Runnable runnable) {
@@ -252,7 +252,7 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
return new TickTask(this.tickCount, runnable);
}
-@@ -2353,7 +2395,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -2309,7 +2351,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.resources.managers.updateStaticRegistryTags();
this.resources.managers.getRecipeManager().finalizeRecipeLoading(this.worldData.enabledFeatures());
this.potionBrewing = this.potionBrewing.reload(this.worldData.enabledFeatures()); // Paper - Custom Potion Mixes
@@ -270,10 +270,10 @@ index 0b095c559c6a95ba2d9d7717d527cc2d8b7b6354..79f3dc4f53dce892c4756b0850352e0c
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 3ed19896a0e06fe834953e6450f23abdc805a6cc..7a79541db29cc47c844d617fc8a4360f61c73372 100644
+index bf2bae3166df06be240dbbeecce16a24c85897a9..c06863578c5d654706d93e73059d89c12ae502a5 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -327,7 +327,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -325,7 +325,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
long j = Util.getNanos() - i;
String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D);
@@ -282,7 +282,7 @@ index 3ed19896a0e06fe834953e6450f23abdc805a6cc..7a79541db29cc47c844d617fc8a4360f
if (dedicatedserverproperties.announcePlayerAchievements != null) {
((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this.overworld()); // CraftBukkit - per-world
}
-@@ -444,7 +444,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -442,7 +442,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
// this.remoteStatusListener.stop(); // Paper - don't wait for remote connections
}
@@ -292,7 +292,7 @@ index 3ed19896a0e06fe834953e6450f23abdc805a6cc..7a79541db29cc47c844d617fc8a4360f
}
@Override
-@@ -824,7 +825,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -788,7 +789,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@Override
public void stopServer() {
super.stopServer();
@@ -302,10 +302,10 @@ index 3ed19896a0e06fe834953e6450f23abdc805a6cc..7a79541db29cc47c844d617fc8a4360f
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index a6964ceb3874acebdcb8cdc8fe0c128bd56bea48..3642444d45038fd1a07768ff96bfbd8678b02e04 100644
+index 296002eafb028e60aaa5d9728cd035f86abe6913..60ddba097ba09a5f6a69adafbeabc496a3c2766f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -554,7 +554,7 @@ public abstract class PlayerList {
+@@ -553,7 +553,7 @@ public abstract class PlayerList {
this.cserver.getPluginManager().callEvent(playerQuitEvent);
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
@@ -327,10 +327,10 @@ index d6e942aca1bcc769c390504a4119d6619872c4d4..9b706276dc5b5f55b966c5472c6c4e86
}
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index bb2d3ba2065b6bf67af24a8630ac2d58169fe783..044985030607bc20a61666dee7dd2659ae4553b5 100644
+index 86cd6e1b8f68dd0564ee2a7c60f02d7af287af67..022de445bbbb869c38be4972c98dcf1c665539ec 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
-@@ -1495,6 +1495,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
+@@ -1488,6 +1488,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
try {
tickConsumer.accept(entity);
} catch (Throwable throwable) {
@@ -339,10 +339,10 @@ index bb2d3ba2065b6bf67af24a8630ac2d58169fe783..044985030607bc20a61666dee7dd2659
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-index e03d57f58a9f962cd429e8851fb3f35f3491e2c0..1313ac2ff9f1b9fccab54b0c200b9dfa7a4edd00 100644
+index 01cfb478764b8deb38be5692390dd9f014b8999f..4640baec5bed6c2d53cc0f8ca1d273cc115abe9b 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
-@@ -1081,6 +1081,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
+@@ -1078,6 +1078,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
gameprofilerfiller.pop();
} catch (Throwable throwable) {
diff --git a/patches/server/1044-Detail-more-information-in-watchdog-dumps.patch b/patches/server/1043-Detail-more-information-in-watchdog-dumps.patch
index 6c08ae9d36..46e97e3b0d 100644
--- a/patches/server/1044-Detail-more-information-in-watchdog-dumps.patch
+++ b/patches/server/1043-Detail-more-information-in-watchdog-dumps.patch
@@ -25,7 +25,7 @@ index fff8d15d44613a075b9793c2a41520212166eb3b..4a8356a714ed50d4a32bcf046a2e1649
}
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
-index d0d36a57ec4896bcb74970f8fb24d8f3e17db133..e2c24813f59c2fd075c740ac1842a38f20ed8554 100644
+index f7197f1347251a37dd0f6d9ffa2f09bc3a4e1233..1f7f68aad97ee73763c042837f239bdc7167db55 100644
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
@@ -20,6 +20,24 @@ public class PacketUtils {
@@ -61,8 +61,8 @@ index d0d36a57ec4896bcb74970f8fb24d8f3e17db133..e2c24813f59c2fd075c740ac1842a38f
+ try { // Paper - detailed watchdog information
if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
if (listener.shouldHandleMessage(packet)) {
- co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings
-@@ -48,6 +68,12 @@ public class PacketUtils {
+ try {
+@@ -47,6 +67,12 @@ public class PacketUtils {
} else {
PacketUtils.LOGGER.debug("Ignoring packet due to disconnection: {}", packet);
}
@@ -76,10 +76,10 @@ index d0d36a57ec4896bcb74970f8fb24d8f3e17db133..e2c24813f59c2fd075c740ac1842a38f
});
throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 3b55367865b3583e11ef886678114d4d4b294e8c..a7420e4522e0dff72ce7f8a791b9cd4bfa270106 100644
+index 9af879115a24145ec290ac200565004e49ee7b0b..c9d7ea8fbaf8858564282b42f6f6dda3d6927f8e 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1262,7 +1262,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1247,7 +1247,26 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
}
@@ -103,14 +103,13 @@ index 3b55367865b3583e11ef886678114d4d4b294e8c..a7420e4522e0dff72ce7f8a791b9cd4b
+ currentlyTickingEntity.lazySet(entity);
+ }
+ // Paper end - log detailed entity tick information
- ++TimingHistory.entityTicks; // Paper - timings
// Spigot start
- co.aikar.timings.Timing timer; // Paper
-@@ -1301,7 +1320,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+ /*if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { // Paper - comment out EAR 2
+ entity.tickCount++;
+@@ -1277,6 +1296,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
this.tickPassenger(entity, entity1, isActive); // Paper - EAR 2
}
- // } finally { timer.stopTiming(); } // Paper - timings // EAR 2
--
+
+ // Paper start - log detailed entity tick information
+ } finally {
+ if (currentlyTickingEntity.get() == entity) {
diff --git a/patches/server/1045-Entity-load-save-limit-per-chunk.patch b/patches/server/1044-Entity-load-save-limit-per-chunk.patch
index 0b3fc48e43..7a75cf646d 100644
--- a/patches/server/1045-Entity-load-save-limit-per-chunk.patch
+++ b/patches/server/1044-Entity-load-save-limit-per-chunk.patch
@@ -32,10 +32,10 @@ index 5ed6599d1f9a2edf8c904f3602b06d26d857600c..b3c993a790fc3fab6a408c731deb297f
if (entity.save(compoundTag)) {
entitiesTag.add(compoundTag);
diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java
-index e56050bef4a5aaa0fca17192dab4cf5e6a55fbae..3a8af3c6164da68eac0faeb436b8d9d8159fd4bd 100644
+index 629c1316920ad4c111fff489f8c3ea0ed39d0099..c8c2394558952d7ca57d29874485251b8f2b3400 100644
--- a/src/main/java/net/minecraft/world/entity/EntityType.java
+++ b/src/main/java/net/minecraft/world/entity/EntityType.java
-@@ -715,9 +715,20 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
+@@ -706,9 +706,20 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT
final Spliterator<? extends Tag> spliterator = entityNbtList.spliterator();
return StreamSupport.stream(new Spliterator<Entity>() {
diff --git a/patches/server/1046-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/1045-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch
index 5c2ab9cfcd..5c2ab9cfcd 100644
--- a/patches/server/1046-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch
+++ b/patches/server/1045-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch
diff --git a/patches/server/1047-Bundle-spark.patch b/patches/server/1046-Bundle-spark.patch
index f66e0b42bb..8db706fc97 100644
--- a/patches/server/1047-Bundle-spark.patch
+++ b/patches/server/1046-Bundle-spark.patch
@@ -269,10 +269,10 @@ index 6b8ed8a0baaf4a57d20e57cec3400af5561ddd79..48604e7f96adc9e226e034054c5e2bad
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index 79f3dc4f53dce892c4756b0850352e0ca2eb95a6..de80ac827c8ac3630d68b73cb425d4b56f7d2cd7 100644
+index 7a671772760152f26e5bb60ea2f2a7765c017c37..3fc6e7cb5e02792e5e87beb7525cde96bc45df1c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -766,6 +766,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -765,6 +765,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Paper end - Configurable player collision
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.POSTWORLD);
@@ -281,15 +281,15 @@ index 79f3dc4f53dce892c4756b0850352e0ca2eb95a6..de80ac827c8ac3630d68b73cb425d4b5
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
io.papermc.paper.command.brigadier.PaperCommands.INSTANCE.setValid(); // Paper - reset invalid state for event fire below
io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.callReloadableRegistrarEvent(io.papermc.paper.plugin.lifecycle.event.types.LifecycleEvents.COMMANDS, io.papermc.paper.command.brigadier.PaperCommands.INSTANCE, org.bukkit.plugin.Plugin.class, io.papermc.paper.plugin.lifecycle.event.registrar.ReloadableRegistrarEvent.Cause.INITIAL); // Paper - call commands event for regular plugins
-@@ -1052,6 +1054,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1050,6 +1052,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+
MinecraftServer.LOGGER.info("Stopping server");
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
- MinecraftTimings.stopServer(); // Paper
+ this.server.spark.disable(); // Paper - spark
// CraftBukkit start
if (this.server != null) {
this.server.disablePlugins();
-@@ -1247,6 +1250,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1245,6 +1248,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// tasks are default scheduled at -1 + delay, and first tick will tick at 1
final long actualDoneTimeMs = System.currentTimeMillis() - org.bukkit.craftbukkit.Main.BOOT_TIME.toEpochMilli(); // Paper - Add total time
LOGGER.info("Done ({})! For help, type \"help\"", String.format(java.util.Locale.ROOT, "%.3fs", actualDoneTimeMs / 1000.00D)); // Paper - Add total time
@@ -297,15 +297,15 @@ index 79f3dc4f53dce892c4756b0850352e0ca2eb95a6..de80ac827c8ac3630d68b73cb425d4b5
org.spigotmc.WatchdogThread.tick();
// Paper end - Improved Watchdog Support
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
-@@ -1660,6 +1664,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
- });
- isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
- // Paper end
+@@ -1638,6 +1642,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ }
+ }
+
+ this.server.spark.tickStart(); // Paper - spark
new com.destroystokyo.paper.event.server.ServerTickStartEvent(this.tickCount+1).callEvent(); // Paper - Server Tick Events
-
++this.tickCount;
-@@ -1687,6 +1692,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+ this.tickRateManager.tick();
+@@ -1660,6 +1665,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
// Paper end - Server Tick Events
@@ -314,10 +314,10 @@ index 79f3dc4f53dce892c4756b0850352e0ca2eb95a6..de80ac827c8ac3630d68b73cb425d4b5
long k = Util.getNanos() - i;
int l = this.tickCount % 100;
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-index 7a79541db29cc47c844d617fc8a4360f61c73372..f8ee4b6c481d3fe15f48bf4a93696dd23e4f01a4 100644
+index c06863578c5d654706d93e73059d89c12ae502a5..17a158ff6ce6520b69a5a0032ba4c05449dd0cf8 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -225,6 +225,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -223,6 +223,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess());
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
// Paper end - initialize global and world-defaults configuration
@@ -325,7 +325,7 @@ index 7a79541db29cc47c844d617fc8a4360f61c73372..f8ee4b6c481d3fe15f48bf4a93696dd2
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
if (this.convertOldUsers()) {
this.getProfileCache().save(false); // Paper
-@@ -234,6 +235,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
+@@ -232,6 +233,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash); // Paper - start watchdog thread
thread.start(); // Paper - Enhance console tab completions for brigadier commands; start console thread after MinecraftServer.console & PaperConfig are initialized
io.papermc.paper.command.PaperCommands.registerCommands(this); // Paper - setup /paper command
@@ -334,7 +334,7 @@ index 7a79541db29cc47c844d617fc8a4360f61c73372..f8ee4b6c481d3fe15f48bf4a93696dd2
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index d45d4d43f8e960f164c00bb534ebfbb6da6a803b..4db0d960adc637c37cb322471357876837ef9e8e 100644
+index ca92d377a774ee46d13e108c528ce78941f906ec..9f9eefc7346838a9effcda861cecd098092efb0f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -312,6 +312,7 @@ public final class CraftServer implements Server {
@@ -345,7 +345,7 @@ index d45d4d43f8e960f164c00bb534ebfbb6da6a803b..4db0d960adc637c37cb3224713578768
// Paper start - Folia region threading API
private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler();
-@@ -478,6 +479,7 @@ public final class CraftServer implements Server {
+@@ -477,6 +478,7 @@ public final class CraftServer implements Server {
}
this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
@@ -353,7 +353,7 @@ index d45d4d43f8e960f164c00bb534ebfbb6da6a803b..4db0d960adc637c37cb3224713578768
}
public boolean getCommandBlockOverride(String command) {
-@@ -1104,6 +1106,7 @@ public final class CraftServer implements Server {
+@@ -1103,6 +1105,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
@@ -361,7 +361,7 @@ index d45d4d43f8e960f164c00bb534ebfbb6da6a803b..4db0d960adc637c37cb3224713578768
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
-@@ -1132,6 +1135,7 @@ public final class CraftServer implements Server {
+@@ -1131,6 +1134,7 @@ public final class CraftServer implements Server {
this.loadPlugins();
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
diff --git a/patches/server/1048-Improve-performance-of-mass-crafts.patch b/patches/server/1047-Improve-performance-of-mass-crafts.patch
index 57f901bc5f..57f901bc5f 100644
--- a/patches/server/1048-Improve-performance-of-mass-crafts.patch
+++ b/patches/server/1047-Improve-performance-of-mass-crafts.patch
diff --git a/patches/server/1049-Incremental-chunk-and-player-saving.patch b/patches/server/1048-Incremental-chunk-and-player-saving.patch
index 9a12860c6a..09e62595a7 100644
--- a/patches/server/1049-Incremental-chunk-and-player-saving.patch
+++ b/patches/server/1048-Incremental-chunk-and-player-saving.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Incremental chunk and player saving
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index de80ac827c8ac3630d68b73cb425d4b56f7d2cd7..f422cbcb69d6fda2b4e229cbdbf10abd0d36d6f9 100644
+index 3fc6e7cb5e02792e5e87beb7525cde96bc45df1c..27a50ce8f9ed5a6024f16444be5585f61062c2e9 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -1009,7 +1009,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1008,7 +1008,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try {
this.isSaving = true;
@@ -17,7 +17,7 @@ index de80ac827c8ac3630d68b73cb425d4b56f7d2cd7..f422cbcb69d6fda2b4e229cbdbf10abd
flag3 = this.saveAllChunks(suppressLogs, flush, force);
} finally {
this.isSaving = false;
-@@ -1676,9 +1676,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1653,9 +1653,29 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
--this.ticksUntilAutosave;
@@ -50,10 +50,10 @@ index de80ac827c8ac3630d68b73cb425d4b56f7d2cd7..f422cbcb69d6fda2b4e229cbdbf10abd
ProfilerFiller gameprofilerfiller = Profiler.get();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index a7420e4522e0dff72ce7f8a791b9cd4bfa270106..fd07824ff6a928ca6e2f56477a63bac7aaeb8c15 100644
+index c9d7ea8fbaf8858564282b42f6f6dda3d6927f8e..2519a886317362db4ac0aeadb3655624f175cd99 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -1371,6 +1371,35 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -1347,6 +1347,30 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos);
}
@@ -65,24 +65,19 @@ index a7420e4522e0dff72ce7f8a791b9cd4bfa270106..fd07824ff6a928ca6e2f56477a63bac7
+ org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld()));
+ }
+
-+ try (co.aikar.timings.Timing ignored = this.timings.worldSave.startTiming()) {
-+ if (doFull) {
-+ this.saveLevelData(true);
-+ }
-+
-+ // chunk autosave is already called by the ChunkSystem during unload processing (ChunkMap#processUnloads)
-+
-+ // Copied from save()
-+ // CraftBukkit start - moved from MinecraftServer.saveChunks
-+ if (doFull) { // Paper
-+ ServerLevel worldserver1 = this;
-+
-+ this.serverLevelData.setWorldBorder(worldserver1.getWorldBorder().createSettings());
-+ this.serverLevelData.setCustomBossEvents(this.server.getCustomBossEvents().save(this.registryAccess()));
-+ this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData());
-+ }
-+ // CraftBukkit end
++ if (doFull) {
++ this.saveLevelData(true);
+ }
++ // chunk autosave is already called by the ChunkSystem during unload processing (ChunkMap#processUnloads)
++ // Copied from save()
++ // CraftBukkit start - moved from MinecraftServer.saveChunks
++ if (doFull) { // Paper
++ ServerLevel worldserver1 = this;
++ this.serverLevelData.setWorldBorder(worldserver1.getWorldBorder().createSettings());
++ this.serverLevelData.setCustomBossEvents(this.server.getCustomBossEvents().save(this.registryAccess()));
++ this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData());
++ }
++ // CraftBukkit end
+ }
+ // Paper end - Incremental chunk and player saving
+
@@ -102,10 +97,10 @@ index 8ceeebb561046933cba0725e15732fa074226884..8c9148426f23cbbdfaf7ae66657d1a62
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
private static final int FLY_STAT_RECORDING_SPEED = 25;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 3642444d45038fd1a07768ff96bfbd8678b02e04..f8f8e8f602f416fe97fc23ef6efeee7af2749292 100644
+index 60ddba097ba09a5f6a69adafbeabc496a3c2766f..d66fb339eb66d340a9cd29cf6032a7bfcfd9d793 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -519,6 +519,7 @@ public abstract class PlayerList {
+@@ -518,6 +518,7 @@ public abstract class PlayerList {
protected void save(ServerPlayer player) {
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
@@ -113,7 +108,7 @@ index 3642444d45038fd1a07768ff96bfbd8678b02e04..f8f8e8f602f416fe97fc23ef6efeee7a
this.playerIo.save(player);
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
-@@ -1153,10 +1154,22 @@ public abstract class PlayerList {
+@@ -1152,9 +1153,21 @@ public abstract class PlayerList {
}
public void saveAll() {
@@ -123,17 +118,16 @@ index 3642444d45038fd1a07768ff96bfbd8678b02e04..f8f8e8f602f416fe97fc23ef6efeee7a
+
+ public void saveAll(int interval) {
io.papermc.paper.util.MCUtil.ensureMain("Save Players" , () -> { // Paper - Ensure main
- MinecraftTimings.savePlayers.startTiming(); // Paper
+ int numSaved = 0;
+ long now = MinecraftServer.currentTick;
for (int i = 0; i < this.players.size(); ++i) {
-- this.save(this.players.get(i));
-+ ServerPlayer entityplayer = this.players.get(i);
-+ if (interval == -1 || now - entityplayer.lastSave >= interval) {
-+ this.save(entityplayer);
+- this.save((ServerPlayer) this.players.get(i));
++ final ServerPlayer player = this.players.get(i);
++ if (interval == -1 || now - player.lastSave >= interval) {
++ this.save(player);
+ if (interval != -1 && ++numSaved >= io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.maxPerTick()) { break; }
+ }
+ // Paper end - Incremental chunk and player saving
}
- MinecraftTimings.savePlayers.stopTiming(); // Paper
+
return null; }); // Paper - ensure main
diff --git a/patches/server/1050-Optimise-general-POI-access.patch b/patches/server/1049-Optimise-general-POI-access.patch
index 0e3d18cfa4..0e3d18cfa4 100644
--- a/patches/server/1050-Optimise-general-POI-access.patch
+++ b/patches/server/1049-Optimise-general-POI-access.patch
diff --git a/patches/server/1051-Fix-entity-tracker-desync-when-new-players-are-added.patch b/patches/server/1050-Fix-entity-tracker-desync-when-new-players-are-added.patch
index 6aecc462a4..c123fccefa 100644
--- a/patches/server/1051-Fix-entity-tracker-desync-when-new-players-are-added.patch
+++ b/patches/server/1050-Fix-entity-tracker-desync-when-new-players-are-added.patch
@@ -48,10 +48,10 @@ index f6e1deb2f849d8b01b15cfa69e2f6cd5f2b1512b..f66e40326c510aa3267542b1a24ed75d
entityTrackerEntry.getLastSentYRot(),
entity.getType(),
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index d692af061ded8cd5bcf1d268e6bd521d84f99c39..bf43bdb43c5301c0e0954729bc531fb6a5045075 100644
+index c11ba8d9e97a68cda1811b570f0df117e6c38138..c7a9a22d84583764fc1cbcc1bdeb01a339d33687 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -1277,6 +1277,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -1271,6 +1271,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
this.serverEntity.addPairing(player);
}
// Paper end - entity tracking events
diff --git a/patches/server/1052-Lag-compensation-ticks.patch b/patches/server/1051-Lag-compensation-ticks.patch
index 2643c943aa..eb783423fe 100644
--- a/patches/server/1052-Lag-compensation-ticks.patch
+++ b/patches/server/1051-Lag-compensation-ticks.patch
@@ -8,10 +8,10 @@ Areas affected by lag comepnsation:
- Eating food items
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
-index f422cbcb69d6fda2b4e229cbdbf10abd0d36d6f9..73855f4555f781741f70267be65dec1ebb98b46a 100644
+index 27a50ce8f9ed5a6024f16444be5585f61062c2e9..1636c4347bb6e5a0b4c2e08c7ed9c49587769a2b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
-@@ -332,6 +332,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -331,6 +331,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public volatile Thread shutdownThread; // Paper
public volatile boolean abnormalExit = false; // Paper
@@ -19,7 +19,7 @@ index f422cbcb69d6fda2b4e229cbdbf10abd0d36d6f9..73855f4555f781741f70267be65dec1e
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
-@@ -1874,6 +1875,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
+@@ -1838,6 +1839,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - Add EntityMoveEvent
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
@@ -28,10 +28,10 @@ index f422cbcb69d6fda2b4e229cbdbf10abd0d36d6f9..73855f4555f781741f70267be65dec1e
gameprofilerfiller.push(() -> {
String s = String.valueOf(worldserver);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index fd07824ff6a928ca6e2f56477a63bac7aaeb8c15..b2bbc9f3efbb7c949cc862eeee5d5f47be5d804f 100644
+index 2519a886317362db4ac0aeadb3655624f175cd99..e65cfb1132f5f0c9e1fa5ae4a46a8abed0c56be1 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
-@@ -577,6 +577,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
+@@ -576,6 +576,17 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
);
}
// Paper end - chunk tick iteration
@@ -63,10 +63,10 @@ index 504c996220b278c194c93e001a3b326d549868ec..a96f859a5d0c6ec692d4627a69f3c9ee
if (this.hasDelayedDestroy) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 22b3d3d945cbddae25abfca7d900324c79d32293..a68ca22d5f8909d2ad37feded448f777736bf7db 100644
+index 2914be5f6681c513bf2878a92c0c60ad997852dc..0831d69d6ac1aa112dfe8243b01adcf5e8eba6a0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4052,6 +4052,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4050,6 +4050,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.resendPossiblyDesyncedDataValues(java.util.List.of(DATA_LIVING_ENTITY_FLAGS), serverPlayer);
}
// Paper end - Properly cancel usable items
@@ -77,7 +77,7 @@ index 22b3d3d945cbddae25abfca7d900324c79d32293..a68ca22d5f8909d2ad37feded448f777
private void updatingUsingItem() {
if (this.isUsingItem()) {
if (ItemStack.isSameItem(this.getItemInHand(this.getUsedItemHand()), this.useItem)) {
-@@ -4066,7 +4070,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4064,7 +4068,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void updateUsingItem(ItemStack stack) {
stack.onUseTick(this.level(), this, this.getUseItemRemainingTicks());
@@ -91,7 +91,7 @@ index 22b3d3d945cbddae25abfca7d900324c79d32293..a68ca22d5f8909d2ad37feded448f777
this.completeUsingItem();
}
-@@ -4104,7 +4113,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4102,7 +4111,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper - Prevent consuming the wrong itemstack
this.useItem = itemstack;
@@ -103,7 +103,7 @@ index 22b3d3d945cbddae25abfca7d900324c79d32293..a68ca22d5f8909d2ad37feded448f777
if (!this.level().isClientSide) {
this.setLivingEntityFlag(1, true);
this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND);
-@@ -4129,7 +4141,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4127,7 +4139,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
} else if (!this.isUsingItem() && !this.useItem.isEmpty()) {
this.useItem = ItemStack.EMPTY;
@@ -115,7 +115,7 @@ index 22b3d3d945cbddae25abfca7d900324c79d32293..a68ca22d5f8909d2ad37feded448f777
}
}
-@@ -4260,7 +4275,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4258,7 +4273,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.useItem = ItemStack.EMPTY;
diff --git a/patches/server/1053-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/1052-Optimise-collision-checking-in-player-move-packet-ha.patch
index a75038dc8a..a75038dc8a 100644
--- a/patches/server/1053-Optimise-collision-checking-in-player-move-packet-ha.patch
+++ b/patches/server/1052-Optimise-collision-checking-in-player-move-packet-ha.patch
diff --git a/patches/server/1054-Optional-per-player-mob-spawns.patch b/patches/server/1053-Optional-per-player-mob-spawns.patch
index e08da27a04..604904f337 100644
--- a/patches/server/1054-Optional-per-player-mob-spawns.patch
+++ b/patches/server/1053-Optional-per-player-mob-spawns.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Optional per player mob spawns
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index bf43bdb43c5301c0e0954729bc531fb6a5045075..97a24cb410cf7d22a1a8edf8a5622d03a3d5a9c7 100644
+index c7a9a22d84583764fc1cbcc1bdeb01a339d33687..c9e5df9a598a1211aeba88920e774b0f765b3a14 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -231,8 +231,26 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -229,8 +229,26 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
// Paper start
@@ -37,10 +37,10 @@ index bf43bdb43c5301c0e0954729bc531fb6a5045075..97a24cb410cf7d22a1a8edf8a5622d03
// Paper end
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index 4b5985c284faac7b06c0f99d53065f5060ecff4a..ba989879c43cb7d614198444fd2ead85ea71eae9 100644
+index 07dde7dbf4d9e1d2f61426e3f1dc3cd5be55f193..12f49deea35ecbaea08869332982c00af7cf99d9 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -503,7 +503,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -495,7 +495,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
gameprofilerfiller.popPush("shuffleChunks");
// Paper start - chunk tick iteration optimisation
this.shuffleRandom.setSeed(this.level.random.nextLong());
@@ -49,9 +49,9 @@ index 4b5985c284faac7b06c0f99d53065f5060ecff4a..ba989879c43cb7d614198444fd2ead85
// Paper end - chunk tick iteration optimisation
this.tickChunks(gameprofilerfiller, j, list);
gameprofilerfiller.pop();
-@@ -563,7 +563,19 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -552,7 +552,19 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+ private void tickChunks(ProfilerFiller profiler, long timeDelta, List<LevelChunk> chunks) {
profiler.popPush("naturalSpawnCount");
- this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
int j = this.distanceManager.getNaturalSpawnChunkCount();
- NaturalSpawner.SpawnState spawnercreature_d = NaturalSpawner.createState(j, this.level.getAllEntities(), this::getFullChunk, new LocalMobCapCalculator(this.chunkMap));
+ // Paper start - Optional per player mob spawns
@@ -67,9 +67,9 @@ index 4b5985c284faac7b06c0f99d53065f5060ecff4a..ba989879c43cb7d614198444fd2ead85
+ spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, !this.level.paperConfig().entities.spawning.perPlayerMobSpawns ? new LocalMobCapCalculator(this.chunkMap) : null, false);
+ }
+ // Paper end - Optional per player mob spawns
- this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings
this.lastSpawnState = spawnercreature_d;
+ profiler.popPush("spawnAndTick");
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 8c9148426f23cbbdfaf7ae66657d1a620f8bd853..8cc02ee9b1a710e35eb65a5a095681cc7dc542bb 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -86,7 +86,7 @@ index 8c9148426f23cbbdfaf7ae66657d1a620f8bd853..8cc02ee9b1a710e35eb65a5a095681cc
// CraftBukkit start
public CraftPlayer.TransferCookieConnection transferCookieConnection;
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-index 6eb69ebe688c1c52d5a5986dfc63cdd42e66687e..f3b52e61ddde25a60c1d178a7607b220ca01f770 100644
+index bf943feca387b77a3154773a59da7190d38d8621..0beb5ab48c5405d9bc2ad8d0c430312f456d38c2 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
@@ -71,6 +71,12 @@ public final class NaturalSpawner {
@@ -129,7 +129,7 @@ index 6eb69ebe688c1c52d5a5986dfc63cdd42e66687e..f3b52e61ddde25a60c1d178a7607b220
// CraftBukkit end
list.add(enumcreaturetype);
}
-@@ -161,12 +172,43 @@ public final class NaturalSpawner {
+@@ -160,12 +171,43 @@ public final class NaturalSpawner {
while (iterator.hasNext()) {
MobCategory enumcreaturetype = (MobCategory) iterator.next();
@@ -175,7 +175,7 @@ index 6eb69ebe688c1c52d5a5986dfc63cdd42e66687e..f3b52e61ddde25a60c1d178a7607b220
}
}
-@@ -185,10 +227,15 @@ public final class NaturalSpawner {
+@@ -183,10 +225,15 @@ public final class NaturalSpawner {
// Paper end - Add mobcaps commands
public static void spawnCategoryForChunk(MobCategory group, ServerLevel world, LevelChunk chunk, NaturalSpawner.SpawnPredicate checker, NaturalSpawner.AfterSpawnCallback runner) {
@@ -192,7 +192,7 @@ index 6eb69ebe688c1c52d5a5986dfc63cdd42e66687e..f3b52e61ddde25a60c1d178a7607b220
}
}
-@@ -200,7 +247,12 @@ public final class NaturalSpawner {
+@@ -198,7 +245,12 @@ public final class NaturalSpawner {
});
}
@@ -205,7 +205,7 @@ index 6eb69ebe688c1c52d5a5986dfc63cdd42e66687e..f3b52e61ddde25a60c1d178a7607b220
StructureManager structuremanager = world.structureManager();
ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator();
int i = pos.getY();
-@@ -270,9 +322,14 @@ public final class NaturalSpawner {
+@@ -268,9 +320,14 @@ public final class NaturalSpawner {
++j;
++k1;
runner.run(entityinsentient, chunk);
@@ -221,7 +221,7 @@ index 6eb69ebe688c1c52d5a5986dfc63cdd42e66687e..f3b52e61ddde25a60c1d178a7607b220
return;
}
-@@ -545,7 +602,7 @@ public final class NaturalSpawner {
+@@ -543,7 +600,7 @@ public final class NaturalSpawner {
MobCategory enumcreaturetype = entitytypes.getCategory();
this.mobCategoryCounts.addTo(enumcreaturetype, 1);
diff --git a/patches/server/1055-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch b/patches/server/1054-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch
index 46bbbf1a99..e9cea51b0d 100644
--- a/patches/server/1055-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch
+++ b/patches/server/1054-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Improve cancelling PreCreatureSpawnEvent with per player mob
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 97a24cb410cf7d22a1a8edf8a5622d03a3d5a9c7..72fdcb65c1cc76d69369306c2c7e9a0f5dcb1f96 100644
+index c9e5df9a598a1211aeba88920e774b0f765b3a14..f4b578c7f839f58da265f2cbcb53e5654ca3edc8 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
-@@ -248,8 +248,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
+@@ -246,8 +246,25 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
++(backingSet[i].mobCounts[index]);
}
}
@@ -37,10 +37,10 @@ index 97a24cb410cf7d22a1a8edf8a5622d03a3d5a9c7..72fdcb65c1cc76d69369306c2c7e9a0f
}
// Paper end
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-index ba989879c43cb7d614198444fd2ead85ea71eae9..b3024770b4fd140370a75afa55b966a404969428 100644
+index 12f49deea35ecbaea08869332982c00af7cf99d9..3c711e1df57ac5b0f8795ebb12299d275792b1d4 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
-@@ -569,7 +569,17 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
+@@ -558,7 +558,17 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
if ((this.spawnFriendlies || this.spawnEnemies) && this.level.paperConfig().entities.spawning.perPlayerMobSpawns) { // don't count mobs when animals and monsters are disabled
// re-set mob counts
for (ServerPlayer player : this.level.players) {
@@ -72,10 +72,10 @@ index 8cc02ee9b1a710e35eb65a5a095681cc7dc542bb..4e4e5b7e8c387cf13cf5bc5e39d334c3
// CraftBukkit start
public CraftPlayer.TransferCookieConnection transferCookieConnection;
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-index f3b52e61ddde25a60c1d178a7607b220ca01f770..848bfa93ebbdf78b0c3bae50e1726377fb78c862 100644
+index 0beb5ab48c5405d9bc2ad8d0c430312f456d38c2..5297798c2be1ba85569c2b92ed221956bf75477a 100644
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
-@@ -301,6 +301,11 @@ public final class NaturalSpawner {
+@@ -299,6 +299,11 @@ public final class NaturalSpawner {
// Paper start - PreCreatureSpawnEvent
PreSpawnStatus doSpawning = isValidSpawnPostitionForType(world, group, structuremanager, chunkgenerator, biomesettingsmobs_c, blockposition_mutableblockposition, d2);