From 02bca1e6558bf4ac0cbf928d48e90f497b10b0a3 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 27 Oct 2024 18:11:15 +0100 Subject: [PATCH] Remove timings impl --- patches/api/0011-Timings-v2.patch | 62 +- ...-option-to-load-extra-plugin-jars-no.patch | 2 +- ...0015-Expose-server-build-information.patch | 13 +- .../0021-Add-exception-reporting-event.patch | 2 +- ...Add-Raw-Byte-ItemStack-Serialization.patch | 4 +- ...y-Counter-to-allow-plugins-to-use-va.patch | 4 +- patches/api/0253-Expand-world-key-API.patch | 4 +- .../api/0255-Expose-protocol-version.patch | 4 +- .../api/0272-ItemStack-repair-check-API.patch | 4 +- .../0304-Get-entity-default-attributes.patch | 4 +- ...12-Add-Raw-Byte-Entity-Serialization.patch | 4 +- ...0358-Add-NamespacedKey-biome-methods.patch | 4 +- ...x-custom-statistic-criteria-creation.patch | 4 +- ...Add-api-for-spawn-egg-texture-colors.patch | 4 +- .../api/0441-Add-Lifecycle-Event-system.patch | 4 +- patches/api/0442-ItemStack-Tooltip-API.patch | 4 +- .../api/0472-Registry-Modification-API.patch | 4 +- ...74-Proxy-ItemStack-to-CraftItemStack.patch | 4 +- patches/api/0485-Add-FeatureFlag-API.patch | 4 +- .../api/0487-Item-serialization-as-json.patch | 4 +- patches/server/0005-Paper-config-files.patch | 29 +- patches/server/0009-MC-Utils.patch | 4 +- ...23-Further-improve-server-tick-loop.patch} | 14 +- patches/server/0023-Timings-v2.patch | 2077 ----------------- .../server/0024-Remove-Spigot-timings.patch | 967 ++++++++ ...-option-to-load-extra-plugin-jars-no.patch | 4 +- ...0033-Expose-server-build-information.patch | 30 +- patches/server/0036-Entity-Origin-API.patch | 4 +- ...vent-block-entity-and-entity-crashes.patch | 16 +- ...ties-to-activation-range-ignore-list.patch | 4 +- patches/server/0043-Optimize-explosions.patch | 8 +- patches/server/0045-Disable-thunder.patch | 4 +- .../server/0046-Disable-ice-and-snow.patch | 6 +- .../0052-Disable-spigot-tick-limiters.patch | 4 +- ...awn-location-event-changing-location.patch | 4 +- ...055-Improve-Player-chat-API-handling.patch | 14 +- .../0057-Expose-server-CommandMap.patch | 4 +- .../server/0061-Add-velocity-warnings.patch | 2 +- .../0062-Add-exception-reporting-event.patch | 18 +- ...oreboards-for-non-players-by-default.patch | 4 +- ...ading-permissions.yml-before-plugins.patch | 6 +- ...llow-Reloading-of-Custom-Permissions.patch | 4 +- .../0069-Remove-Metadata-on-reload.patch | 4 +- .../server/0072-Add-World-Util-Methods.patch | 4 +- ...3-Custom-replacement-for-eaten-items.patch | 8 +- ...th-absorb-values-and-repair-bad-data.patch | 8 +- ...le-spawn-chances-for-skeleton-horses.patch | 4 +- ...ckPhysicsEvent-if-a-plugin-has-a-lis.patch | 12 +- ...Entity-AddTo-RemoveFrom-World-Events.patch | 6 +- ...79-Configurable-Chunk-Inhabited-Time.patch | 2 +- ...0083-Add-PlayerUseUnknownEntityEvent.patch | 4 +- ...g-BlockPlaceEvent-triggering-physics.patch | 4 +- .../0088-Configurable-Player-Collision.patch | 14 +- ...ityRegainHealthEvent-isFastRegen-API.patch | 4 +- ...-possibility-for-getServer-singleton.patch | 8 +- .../0097-Async-GameProfileCache-saving.patch | 8 +- ...r-redstone-torch-rapid-clock-removal.patch | 4 +- .../0101-Fix-global-sound-handling.patch | 6 +- ...setting-for-proxy-online-mode-status.patch | 8 +- ...onfigurable-packet-in-spam-threshold.patch | 2 +- ...07-Configurable-flying-kick-messages.patch | 2 +- ...1-Allow-Reloading-of-Command-Aliases.patch | 4 +- ...ize-Level.hasChunkAt-BlockPosition-Z.patch | 4 +- ...rovide-E-TE-Chunk-count-stat-methods.patch | 2 +- .../0124-Enforce-Sync-Player-Saves.patch | 10 +- ...PI-for-Reason-Source-Triggering-play.patch | 8 +- .../server/0126-Cap-Entity-Collisions.patch | 4 +- ...e-CraftScheduler-Async-Task-Debugger.patch | 10 +- ...le-async-calls-to-restart-the-server.patch | 12 +- ...ke-parrots-stay-on-shoulders-despite.patch | 4 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- .../server/0136-Basic-PlayerProfile-API.patch | 4 +- .../server/0137-Add-UnknownCommandEvent.patch | 4 +- .../0145-ProfileWhitelistVerifyEvent.patch | 6 +- patches/server/0151-Add-PlayerJumpEvent.patch | 2 +- .../0156-Add-PlayerArmorChangeEvent.patch | 4 +- ...117075-Block-entity-unload-lag-spike.patch | 8 +- ...e-implementations-for-captured-block.patch | 8 +- ...-get-a-BlockState-without-a-snapshot.patch | 8 +- .../server/0161-AsyncTabCompleteEvent.patch | 6 +- ...4-PlayerNaturallySpawnCreaturesEvent.patch | 10 +- .../server/0166-PreCreatureSpawnEvent.patch | 10 +- ...nt-extended-PaperServerListPingEvent.patch | 4 +- .../0176-Player.setPlayerProfile-API.patch | 4 +- .../server/0177-getPlayerUniqueId-API.patch | 4 +- .../0178-Improved-Async-Task-Scheduler.patch | 43 +- ...ld.spawnParticle-API-and-add-Builder.patch | 4 +- ...e-shield-blocking-delay-configurable.patch | 4 +- .../0201-Add-entity-knockback-events.patch | 10 +- .../server/0202-Expand-Explosions-API.patch | 6 +- .../0207-InventoryCloseEvent-Reason-API.patch | 14 +- ...t-armor-stands-from-doing-entity-loo.patch | 4 +- ...5-Vanished-players-don-t-have-rights.patch | 4 +- ...nd-make-tab-spam-limits-configurable.patch | 2 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 4 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 14 +- ...26-Use-ConcurrentHashMap-in-JsonList.patch | 4 +- ...27-Use-a-Queue-for-Queueing-Commands.patch | 7 +- ...-ray-tracing-methods-to-LivingEntity.patch | 4 +- .../server/0241-Improve-death-events.patch | 14 +- ...wning-from-loading-generating-chunks.patch | 6 +- ...251-Add-LivingEntity-getTargetEntity.patch | 4 +- ...event-players-from-moving-into-unloa.patch | 2 +- ...er-Thread-Pool-and-Thread-Priorities.patch | 4 +- .../0261-Optimize-World-Time-Updates.patch | 10 +- ...t-allow-digging-into-unloaded-chunks.patch | 2 +- ...ault-permission-message-configurable.patch | 4 +- ...entity-dismount-during-teleportation.patch | 4 +- patches/server/0268-Book-size-limits.patch | 2 +- ...-Replace-OfflinePlayer-getLastPlayed.patch | 4 +- patches/server/0273-BlockDestroyEvent.patch | 4 +- .../0274-Async-command-map-building.patch | 6 +- .../server/0275-Brigadier-Mojang-API.patch | 2 +- .../0276-Limit-Client-Sign-length-more.patch | 4 +- ...oggleEvent-when-whitelist-is-toggled.patch | 4 +- ...nd-additions-to-the-spawn-reason-API.patch | 12 +- .../0280-Add-PlayerPostRespawnEvent.patch | 10 +- patches/server/0281-Server-Tick-Events.patch | 20 +- ...Optimize-Captured-BlockEntity-Lookup.patch | 4 +- ...288-Expose-the-internal-current-tick.patch | 4 +- ...al-Spawned-mobs-towards-natural-spaw.patch | 2 +- ...revent-consuming-the-wrong-itemstack.patch | 8 +- ...ptimise-EntityGetter-getPlayerByUUID.patch | 4 +- ...0302-Fix-items-not-falling-correctly.patch | 4 +- .../0306-Tracking-Range-Improvements.patch | 4 +- ...e-getChunkAt-calls-for-loaded-chunks.patch | 4 +- .../0310-Add-debug-for-sync-chunk-loads.patch | 14 +- patches/server/0313-Entity-Jump-API.patch | 4 +- .../server/0320-Optimise-Chunk-getFluid.patch | 2 +- ...-Add-tick-times-API-and-mspt-command.patch | 14 +- ...323-Expose-MinecraftServer-isRunning.patch | 4 +- ...Add-Raw-Byte-ItemStack-Serialization.patch | 6 +- ...nnections-shouldn-t-hold-up-shutdown.patch | 4 +- ...-PlayerChunkMap-adds-crashing-server.patch | 10 +- ...move-existing-players-to-world-spawn.patch | 4 +- ...-entity-collision-code-if-not-needed.patch | 4 +- ...nEvent-when-Player-is-actually-ready.patch | 12 +- ...pawn-point-if-spawn-in-unloaded-worl.patch | 8 +- ...PlayerAttackEntityCooldownResetEvent.patch | 4 +- ...item-duplication-and-teleport-issues.patch | 6 +- ...PickItem-Packet-and-kick-for-invalid.patch | 2 +- .../server/0348-misc-debugging-dumps.patch | 12 +- ...49-Prevent-teleporting-dead-entities.patch | 2 +- .../server/0350-Implement-Mob-Goal-API.patch | 4 +- ...Wait-for-Async-Tasks-during-shutdown.patch | 8 +- ...er-runTaskTimerAsynchronously-Plugin.patch | 4 +- ...t-position-desync-causing-tp-exploit.patch | 2 +- .../0366-Add-PlayerRecipeBookClickEvent.patch | 4 +- ...68-Add-permission-for-command-blocks.patch | 2 +- ...ld-Difficulty-Remembering-Difficulty.patch | 20 +- ...-Plugin-Tickets-to-API-Chunk-Methods.patch | 6 +- ...o-not-accept-invalid-client-settings.patch | 4 +- ...k-for-portal-on-world-gen-entity-add.patch | 4 +- ...geEvent-not-firing-for-all-use-cases.patch | 4 +- .../0403-Cache-block-data-strings.patch | 4 +- ...ortation-and-cancel-velocity-if-tele.patch | 2 +- ...p-capture-to-capture-all-items-added.patch | 4 +- ...y-Counter-to-allow-plugins-to-use-va.patch | 6 +- ...-non-whitelisted-player-when-white-l.patch | 4 +- ...r-large-move-vectors-crashing-server.patch | 2 +- ...ace-order-when-capturing-blockstates.patch | 2 +- ...-Add-getOfflinePlayerIfCached-String.patch | 4 +- ...ix-client-lag-on-advancement-loading.patch | 4 +- .../server/0427-Add-API-for-quit-reason.patch | 4 +- ...-should-not-bypass-cramming-gamerule.patch | 6 +- .../server/0438-Limit-recipe-packets.patch | 4 +- ...act-event-not-being-called-sometimes.patch | 4 +- ...457-Add-ServerResourcesReloadedEvent.patch | 6 +- patches/server/0464-Remove-stale-POIs.patch | 4 +- .../0465-Fix-villager-boat-exploit.patch | 4 +- patches/server/0466-Add-sendOpLevel-API.patch | 6 +- ...gistryAccess-for-managing-Registries.patch | 6 +- patches/server/0480-Add-EntityMoveEvent.patch | 12 +- ...disable-pathfinding-updates-on-block.patch | 6 +- ...ainThreadExecutor-to-BukkitScheduler.patch | 4 +- ...0490-fix-converting-txt-to-json-file.patch | 10 +- ...-using-signs-inside-spawn-protection.patch | 2 +- .../server/0496-Expand-world-key-API.patch | 14 +- ...ed-item-when-player-has-disconnected.patch | 4 +- ...telist-use-configurable-kick-message.patch | 4 +- ...ignore-result-of-PlayerEditBookEvent.patch | 2 +- .../server/0501-Expose-protocol-version.patch | 6 +- ...tab-completions-for-brigadier-comman.patch | 6 +- ...ItemConsumeEvent-cancelling-properly.patch | 4 +- ...fix-PlayerItemHeldEvent-firing-twice.patch | 2 +- ...s-to-convert-between-Component-and-B.patch | 4 +- .../server/0525-Add-basic-Datapack-API.patch | 6 +- ...527-Expand-PlayerGameModeChangeEvent.patch | 4 +- .../0528-ItemStack-repair-check-API.patch | 6 +- ...ove-range-check-for-block-placing-up.patch | 2 +- .../0533-Add-Unix-domain-socket-support.patch | 10 +- ...5-Improve-item-default-attribute-API.patch | 4 +- ...cause-to-Weather-ThunderChangeEvents.patch | 8 +- .../0539-Add-PlayerKickEvent-causes.patch | 28 +- .../server/0548-Line-Of-Sight-Changes.patch | 4 +- ...etChunkIfLoadedImmediately-in-places.patch | 8 +- .../server/0557-Add-PlayerArmSwingEvent.patch | 4 +- ...k-event-leave-message-not-being-sent.patch | 6 +- ...nd-timings-for-sensors-and-behaviors.patch | 61 +- .../0563-Add-System.out-err-catcher.patch | 2 +- ...-AFK-kick-while-watching-end-credits.patch | 2 +- .../server/0566-Add-PlayerSetSpawnEvent.patch | 4 +- .../0574-Add-BlockBreakBlockEvent.patch | 4 +- ...o-find-targets-for-lightning-strikes.patch | 6 +- .../0580-Get-entity-default-attributes.patch | 6 +- ...89-Add-Raw-Byte-Entity-Serialization.patch | 4 +- ...-logic-for-inventories-on-chunk-unlo.patch | 4 +- ...0593-Improve-and-expand-AsyncCatcher.patch | 6 +- ...aper-mobcaps-and-paper-playermobcaps.patch | 8 +- ...d-getChunkAt-has-inlined-logic-for-l.patch | 4 +- ...rimise-map-impl-for-tracked-players.patch} | 4 +- .../server/0601-Time-scoreboard-search.patch | 43 - ...h => 0602-Add-missing-InventoryType.patch} | 0 ...imise-BlockSoil-nearby-water-lookup.patch} | 0 ...ntory-not-closing-on-entity-removal.patch} | 4 +- ...rement-before-suggesting-root-nodes.patch} | 0 ...ServerboundCommandSuggestionPacket-.patch} | 2 +- ...h => 0607-Add-packet-limiter-config.patch} | 0 ...nColor-on-tropical-fish-bucket-meta.patch} | 0 ...=> 0609-Ensure-valid-vehicle-status.patch} | 0 ...ftlocked-end-exit-portal-generation.patch} | 0 ...r-causing-a-crash-when-trying-to-ge.patch} | 0 ...-t-log-debug-logging-being-disabled.patch} | 0 ...ous-menus-with-empty-level-accesses.patch} | 0 ...h => 0614-Preserve-overstacked-loot.patch} | 0 ...ate-head-rotation-in-missing-places.patch} | 0 ...unintended-light-block-manipulation.patch} | 0 ...0617-Fix-CraftCriteria-defaults-map.patch} | 0 ...Fix-upstreams-block-state-factories.patch} | 4 +- ... => 0619-Configurable-feature-seeds.patch} | 13 - ... 0620-Add-root-admin-user-detection.patch} | 4 +- ...t-attempt-to-teleport-dead-entities.patch} | 0 ...ive-velocity-through-repeated-crits.patch} | 4 +- ...e-code-using-deprecated-for-removal.patch} | 0 ...=> 0624-Fix-Spigot-growth-modifiers.patch} | 0 ...OpenersCounter-openCount-from-going.patch} | 0 ...0626-Add-PlayerItemFrameChangeEvent.patch} | 0 ...tch => 0627-Optimize-HashMapPalette.patch} | 0 ...-isSectionEmpty-int-and-optimize-Pa.patch} | 0 ...patch => 0629-Add-more-Campfire-API.patch} | 0 ...data-to-disk-if-it-serializes-witho.patch} | 0 ...ard-CraftEntity-in-teleport-command.patch} | 0 ... => 0632-Improve-scoreboard-entries.patch} | 0 ...ch => 0633-Entity-powdered-snow-API.patch} | 0 ...0634-Add-API-for-item-entity-health.patch} | 0 ...ax-block-light-for-monster-spawning.patch} | 0 ...pistons-and-BlockPistonRetractEvent.patch} | 0 ...-canSmelt-methods-to-FurnaceInvento.patch} | 0 ...le-API.patch => 0638-Bucketable-API.patch} | 0 ...es.patch => 0639-Validate-usernames.patch} | 4 +- ...er-animal-spawn-height-configurable.patch} | 0 ...anilla-BiomeProvider-from-WorldInfo.patch} | 12 +- ...ion-for-worlds-affected-by-time-cmd.patch} | 0 ...heck-for-PersistentDataContainer-ha.patch} | 0 ...4-Multiple-Entries-with-Scoreboards.patch} | 0 ...645-Reset-placed-block-on-exception.patch} | 0 ...configurable-height-for-slime-spawn.patch} | 0 ...0647-Fix-xp-reward-for-baby-zombies.patch} | 0 ...lti-Block-Change-API-Implementation.patch} | 0 ...ent.patch => 0649-Fix-NotePlayEvent.patch} | 0 ....patch => 0650-Freeze-Tick-Lock-API.patch} | 4 +- ...h => 0651-More-PotionEffectType-API.patch} | 0 ...for-StructureTemplate.Pallete-cache.patch} | 0 ...command-sender-which-forwards-feedb.patch} | 4 +- ...-missing-structure-set-seed-configs.patch} | 0 ...lled-powdered-snow-bucket-placement.patch} | 0 ...ate-calls-to-CraftServer-getSpawnLi.patch} | 4 +- ...gs.patch => 0657-Add-GameEvent-tags.patch} | 6 +- ...ks-fairly-for-worlds-while-waiting-.patch} | 6 +- ...tch => 0659-Furnace-RecipesUsed-API.patch} | 0 ...gurable-sculk-sensor-listener-range.patch} | 0 ... => 0661-Add-missing-block-data-API.patch} | 0 ...fault-CustomSpawners-in-custom-worl.patch} | 4 +- ...-worldlist-before-initing-the-world.patch} | 8 +- ...s.patch => 0664-Custom-Potion-Mixes.patch} | 10 +- ...65-Force-close-world-loading-screen.patch} | 4 +- ...666-Fix-falling-block-spawn-methods.patch} | 0 ...Expose-furnace-minecart-push-values.patch} | 0 ...ojectileHitEvent-for-piercing-arrow.patch} | 0 ...I.patch => 0669-More-Projectile-API.patch} | 0 ...x-swamp-hut-cat-generation-deadlock.patch} | 0 ...le-movement-from-players-while-tele.patch} | 2 +- ...0672-Implement-getComputedBiome-API.patch} | 0 ...> 0673-Make-some-itemstacks-nonnull.patch} | 0 ...674-Implement-enchantWithLevels-API.patch} | 0 ...h => 0675-Fix-saving-in-unloadWorld.patch} | 4 +- ...h => 0676-Buffer-OOB-setBlock-calls.patch} | 0 ... 0677-Add-TameableDeathMessageEvent.patch} | 0 ...ock-data-for-EntityChangeBlockEvent.patch} | 0 ...bles-running-when-mob-loot-gamerule.patch} | 0 ...ssenger-world-matches-ridden-entity.patch} | 0 ...ys-and-optimize-reference-Holder-ta.patch} | 0 ...low-changing-the-EnderDragon-podium.patch} | 0 ...erriding-a-block-entity-during-worl.patch} | 0 ...t-tile-entity-copies-loading-chunks.patch} | 4 +- ...ead-of-display-name-in-PlayerList-g.patch} | 4 +- ...> 0686-Expand-PlayerItemDamageEvent.patch} | 0 ...> 0687-WorldCreator-keepSpawnLoaded.patch} | 4 +- ...-in-CraftPersistentDataTypeRegistry.patch} | 0 ...destroyed-trigger-in-the-correct-pl.patch} | 0 ...Event-and-CollarColorable-interface.patch} | 0 ...CauldronLevelChange-on-initial-fill.patch} | 0 ...snow-cauldrons-not-turning-to-water.patch} | 0 ...> 0693-Add-PlayerStopUsingItemEvent.patch} | 4 +- ...rs.patch => 0694-Don-t-tick-markers.patch} | 4 +- ...tch => 0695-Expand-FallingBlock-API.patch} | 0 ...0696-Add-support-for-Proxy-Protocol.patch} | 0 ...x-OfflinePlayer-getBedSpawnLocation.patch} | 0 ...tory-for-smokers-and-blast-furnaces.patch} | 0 ... 0699-Sanitize-sent-BlockEntity-NBT.patch} | 4 +- ...-selector-resolving-in-books-by-def.patch} | 0 ...ntity-loading-causing-async-lookups.patch} | 0 ...-on-world-create-while-being-ticked.patch} | 26 +- ...03-Dont-resent-entity-on-art-update.patch} | 0 ... => 0704-Add-WardenAngerChangeEvent.patch} | 0 ...strict-advancement-dimension-checks.patch} | 0 ...tant-BlockStateListPopulator-method.patch} | 0 ...I.patch => 0707-Nameable-Banner-API.patch} | 0 ...roadcast-messages-to-command-blocks.patch} | 4 +- ...pty-items-from-being-added-to-world.patch} | 4 +- ...hPotion-and-LingeringPotion-spawnin.patch} | 0 ...atch => 0711-Add-Player-getFishHook.patch} | 0 ...chunk-for-dynamic-game-event-listen.patch} | 0 ...s-missing-EntityDropItemEvent-calls.patch} | 0 ...PE.patch => 0714-Fix-Bee-flower-NPE.patch} | 0 ...API.patch => 0715-More-Teleport-API.patch} | 2 +- ... => 0716-Add-EntityPortalReadyEvent.patch} | 0 ...level-random-in-entity-constructors.patch} | 0 ...k-entities-after-destroy-prediction.patch} | 2 +- ...on-plugins-accessing-faraway-chunks.patch} | 4 +- ...tom-Chat-Completion-Suggestions-API.patch} | 0 ...Add-and-fix-missing-BlockFadeEvents.patch} | 0 ...ion-API.patch => 0722-Collision-API.patch} | 0 ...nd-message-for-brigadier-syntax-exc.patch} | 0 ...API.patch => 0724-Block-Ticking-API.patch} | 0 ...-Add-Velocity-IP-Forwarding-Support.patch} | 8 +- ...726-Add-NamespacedKey-biome-methods.patch} | 18 +- ...x-plugin-loggers-on-server-shutdown.patch} | 4 +- ...ok-changes-from-crashing-the-server.patch} | 4 +- ...tityChangeBlockEvent-in-more-places.patch} | 0 ...> 0730-Missing-eating-regain-reason.patch} | 0 ....patch => 0731-Missing-effect-cause.patch} | 0 ...serialization-deserialization-for-P.patch} | 0 ...3-Call-BlockPhysicsEvent-more-often.patch} | 0 ...0734-Configurable-chat-thread-limit.patch} | 4 +- ...of-WorldCreator-keepSpawnLoaded-ret.patch} | 0 ... 0736-fix-Jigsaw-block-kicking-user.patch} | 0 ...mEvent-for-mud-converting-into-clay.patch} | 0 ... => 0738-Add-getDrops-to-BlockState.patch} | 0 ...=> 0739-Fix-a-bunch-of-vanilla-bugs.patch} | 16 +- ...y-onTrackingStart-during-navigation.patch} | 6 +- ... 0741-Fix-custom-piglin-loved-items.patch} | 0 ...=> 0742-EntityPickupItemEvent-fixes.patch} | 0 ...interactions-with-items-on-cooldown.patch} | 0 ...-Add-PlayerInventorySlotChangeEvent.patch} | 0 ... 0745-Elder-Guardian-appearance-API.patch} | 0 ...ch => 0746-Add-entity-knockback-API.patch} | 0 ....patch => 0747-Detect-headless-JREs.patch} | 0 ...-vehicle-collision-event-not-called.patch} | 0 ...ch => 0749-Add-EntityToggleSitEvent.patch} | 0 ... => 0750-Add-fire-tick-delay-option.patch} | 0 ...patch => 0751-Add-Moving-Piston-API.patch} | 0 ...> 0752-Ignore-impossible-spawn-tick.patch} | 0 ...t-and-EntitySelectorParser-permissi.patch} | 0 ...Event-cancellation-cant-fully-preve.patch} | 0 ...0755-Add-PrePlayerAttackEntityEvent.patch} | 0 ...e-reset-EnderDragon-boss-event-name.patch} | 0 ... 0757-Add-Player-Warden-Warning-API.patch} | 0 ...a-friendly-methods-to-update-trades.patch} | 0 ...759-Add-paper-dumplisteners-command.patch} | 0 ...lobal-player-list-where-appropriate.patch} | 8 +- ...sync-entity-add-due-to-fungus-trees.patch} | 0 ....patch => 0762-ItemStack-damage-API.patch} | 0 ...tion-API.patch => 0763-Friction-API.patch} | 10 +- ...trol-player-s-insomnia-and-phantoms.patch} | 0 ...-premature-player-kicks-on-shutdown.patch} | 4 +- ... => 0766-Sync-offhand-slot-in-menus.patch} | 0 ... 0767-Player-Entity-Tracking-Events.patch} | 4 +- ...tch => 0768-Limit-pet-look-distance.patch} | 0 ...ments.patch => 0769-fix-Instruments.patch} | 0 ...for-some-hot-BlockBehavior-and-Flui.patch} | 0 ...tch => 0771-Add-BlockLockCheckEvent.patch} | 0 ... 0772-Add-Sneaking-API-for-Entities.patch} | 0 ... => 0773-Improve-logging-and-errors.patch} | 8 +- ....patch => 0774-Improve-PortalEvents.patch} | 0 ...ion-for-spider-worldborder-climbing.patch} | 0 ...sing-SpigotConfig-logCommands-check.patch} | 2 +- ...Allay-stopDancing-while-not-dancing.patch} | 0 ...ge.patch => 0778-Flying-Fall-Damage.patch} | 0 ...ion-moving-velocity-to-VehicleBlock.patch} | 0 ...onfig-for-disabling-entity-tag-tags.patch} | 4 +- ...e-player-info-update-packet-on-join.patch} | 10 +- ...k-items-during-EntityResurrectEvent.patch} | 4 +- ...en-API.patch => 0783-Win-Screen-API.patch} | 0 ...ItemStack-setAmount-null-assignment.patch} | 0 ...ix-force-opening-enchantment-tables.patch} | 0 ...tch => 0786-Add-Entity-Body-Yaw-API.patch} | 0 ...vent-sleeping-villagers-moving-towa.patch} | 0 ...=> 0788-Add-EntityFertilizeEggEvent.patch} | 0 ...ty-drop-not-updating-the-client-inv.patch} | 0 ...temEvent-and-EntityCompostItemEvent.patch} | 0 ...ctly-handle-ArmorStand-invisibility.patch} | 0 ...ancement-triggers-for-entity-damage.patch} | 6 +- ...793-Fix-text-display-error-on-spawn.patch} | 0 ...nventories-returning-null-Locations.patch} | 0 ...API.patch => 0795-Add-Shearable-API.patch} | 0 ...Fix-SpawnEggMeta-get-setSpawnedType.patch} | 0 ...g-to-bad-recipes-in-furnace-like-ti.patch} | 0 ...ence-violations-like-they-should-be.patch} | 2 +- ...xpired-keys-from-impacting-new-join.patch} | 4 +- ...ts-being-fired-from-unloaded-chunks.patch} | 4 +- ...0801-Use-array-for-gamerule-storage.patch} | 0 ...Fix-a-couple-of-upstream-bed-issues.patch} | 0 ...ix-demo-flag-not-enabling-demo-mode.patch} | 0 ... 0804-Add-Mob-Experience-reward-API.patch} | 0 ...redstone-on-top-of-trap-doors-early.patch} | 0 ...Lazy-Initialization-for-Enum-Fields.patch} | 0 ...07-More-accurate-isInOpenWater-impl.patch} | 0 ... => 0808-Expand-PlayerItemMendEvent.patch} | 0 ...sh-ProjectileSource-for-projectiles.patch} | 0 ... => 0810-Add-transient-modifier-API.patch} | 0 ...patch => 0811-Fix-block-place-logic.patch} | 4 +- ...nd-playing-for-BlockItem-ItemStacks.patch} | 0 ...l-BlockGrowEvent-for-missing-blocks.patch} | 0 ...nhasbukkit-default-if-alias-block-e.patch} | 2 +- ...pLike-spam-for-missing-key-selector.patch} | 0 ...-Fix-sniffer-removeExploredLocation.patch} | 0 ...to-remove-all-active-potion-effects.patch} | 0 ...8-Add-event-for-player-editing-sign.patch} | 0 ...k-item-frames-if-players-can-see-it.patch} | 0 ...ermission-levels-for-command-blocks.patch} | 0 ...Add-option-to-disable-block-updates.patch} | 0 ...822-Call-missing-BlockDispenseEvent.patch} | 0 ...-chunks-for-supporting-block-checks.patch} | 0 ...Optimize-player-lookups-for-beacons.patch} | 0 ...I.patch => 0825-More-Sign-Block-API.patch} | 0 ...6-fix-item-meta-for-tadpole-buckets.patch} | 0 ...t-API.patch => 0827-Fix-BanList-API.patch} | 0 ...d-water-fluid-explosion-resistance-.patch} | 0 ...x-possible-NPE-on-painting-creation.patch} | 0 ...imer-for-Wandering-Traders-spawned-.patch} | 0 ...nceOrb-should-call-EntitySpawnEvent.patch} | 0 ...t-throw-both-Spread-and-Grow-Events.patch} | 0 ....patch => 0833-Add-whitelist-events.patch} | 0 ... 0834-Implement-PlayerFailMoveEvent.patch} | 4 +- ...olia-scheduler-and-owned-region-API.patch} | 16 +- ...se-allay-memory-on-non-item-targets.patch} | 0 ...tion-when-spawning-display-entities.patch} | 0 ...838-Only-capture-actual-tree-growth.patch} | 4 +- ...rce-for-mushroom-block-spread-event.patch} | 0 ...Data-on-more-entities-when-spawning.patch} | 0 ...-Use-correct-seed-on-api-world-load.patch} | 4 +- ...ta-neighbour-ticks-outside-of-range.patch} | 0 ...> 0843-Cache-map-ids-on-item-frames.patch} | 0 ...API-for-updating-recipes-on-clients.patch} | 16 +- ...-custom-statistic-criteria-creation.patch} | 18 +- ...atch => 0846-Bandaid-fix-for-Effect.patch} | 0 ...tch => 0847-SculkCatalyst-bloom-API.patch} | 0 ...API-for-an-entity-s-scoreboard-name.patch} | 0 ...lace-methods-with-old-StructureType.patch} | 6 +- ...e-namespaced-commands-if-send-names.patch} | 2 +- ...-handle-BlockBreakEvent-isDropItems.patch} | 4 +- ...entity-death-event-for-ender-dragon.patch} | 0 ...tity-tracking-range-by-Y-coordinate.patch} | 4 +- ... => 0854-Add-Listing-API-for-Player.patch} | 6 +- ...figurable-Region-Compression-Format.patch} | 0 ...6-Add-BlockFace-to-BlockDamageEvent.patch} | 0 ...h => 0857-Fix-NPE-on-Boat-getStatus.patch} | 0 ...e-API.patch => 0858-Expand-Pose-API.patch} | 0 ...patch => 0859-More-DragonBattle-API.patch} | 0 ...tch => 0860-Add-PlayerPickItemEvent.patch} | 2 +- ...=> 0861-Allow-trident-custom-damage.patch} | 0 ...2-Expose-hand-in-BlockCanBuildEvent.patch} | 0 ...-nearest-structure-border-iteration.patch} | 0 ...Implement-OfflinePlayer-isConnected.patch} | 0 ...esync.patch => 0865-Fix-slot-desync.patch} | 4 +- ...titleOverride-to-InventoryOpenEvent.patch} | 0 ...67-Configure-sniffer-egg-hatch-time.patch} | 0 ...-proximity-check-before-entity-look.patch} | 0 ...kip-POI-finding-if-stuck-in-vehicle.patch} | 0 ...t-sanity-checks-in-container-clicks.patch} | 4 +- ...ll-BlockRedstoneEvents-for-lecterns.patch} | 0 ...roper-checking-of-empty-item-stacks.patch} | 0 ...ix-silent-equipment-change-for-mobs.patch} | 0 ...h => 0874-Fix-spigot-s-Forced-Stats.patch} | 0 ...ing-InventoryHolders-to-inventories.patch} | 0 ...entities-in-chunks-that-are-positio.patch} | 0 ...sing-logs-for-log-ips-config-option.patch} | 0 ...n-on-UpgradeData.BlockFixers-class-.patch} | 0 ...-AdvancementProgress-getDateAwarded.patch} | 0 ...idebar-objectives-not-being-cleared.patch} | 2 +- ...x-missing-map-initialize-event-call.patch} | 4 +- ...a-when-attaching-firework-to-entity.patch} | 0 ...83-Fix-UnsafeValues-loadAdvancement.patch} | 4 +- ...> 0884-Add-player-idle-duration-API.patch} | 0 ...-if-we-can-see-non-visible-entities.patch} | 4 +- ...NPE-in-SculkBloomEvent-world-access.patch} | 0 ...tack-for-Player-sendEquipmentChange.patch} | 0 ...Ints.patch => 0888-Optimize-VarInts.patch} | 0 ...e-collision-shape-of-a-block-before.patch} | 0 ...redicate-for-blocks-when-raytracing.patch} | 0 ...em-packets-with-collector-as-source.patch} | 4 +- ... => 0892-Expand-LingeringPotion-API.patch} | 0 ...ngEffect-powers-lightning-rods-and-.patch} | 0 ...h-event-for-all-player-interactions.patch} | 0 ...everal-issues-with-EntityBreedEvent.patch} | 0 ...896-Add-UUID-attribute-modifier-API.patch} | 0 ...-event-call-for-entity-teleport-API.patch} | 0 ...y-create-LootContext-for-criterions.patch} | 0 ...-t-fire-sync-events-during-worldgen.patch} | 16 +- ...tch => 0900-Add-Structure-check-API.patch} | 0 ...-getAttributeModifier-duplication-c.patch} | 0 ...store-vanilla-entity-drops-behavior.patch} | 4 +- ...-Dont-resend-blocks-on-interactions.patch} | 0 ...tch => 0904-add-more-scoreboard-API.patch} | 0 ...stry.patch => 0905-Improve-Registry.patch} | 0 ...on-null-loc-for-EntityTeleportEvent.patch} | 4 +- ...h => 0907-Add-experience-points-API.patch} | 0 ...h => 0908-Add-drops-to-shear-events.patch} | 0 ...> 0909-Add-PlayerShieldDisableEvent.patch} | 0 ...ate-ResourceLocation-in-NBT-reading.patch} | 8 +- ...-experience-dropping-on-block-break.patch} | 10 +- ...> 0912-Fixup-NamespacedKey-handling.patch} | 0 ...13-Expose-LootTable-of-DecoratedPot.patch} | 0 ...location-of-Vec3D-by-entity-tracker.patch} | 4 +- ...rTradeEvent-and-PlayerPurchaseEvent.patch} | 0 ...h => 0916-Add-ShulkerDuplicateEvent.patch} | 0 ...dd-api-for-spawn-egg-texture-colors.patch} | 6 +- ... => 0918-Add-Lifecycle-Event-system.patch} | 8 +- ...patch => 0919-ItemStack-Tooltip-API.patch} | 18 +- ...Snapshot-includeLightData-parameter.patch} | 0 ...PI.patch => 0921-Add-FluidState-API.patch} | 0 ...patch => 0922-add-number-format-api.patch} | 0 ...patch => 0923-improve-BanList-types.patch} | 4 +- ...I.patch => 0924-Expanded-Hopper-API.patch} | 0 ...5-Add-BlockBreakProgressUpdateEvent.patch} | 4 +- ...=> 0926-Deprecate-ItemStack-setType.patch} | 0 ...ch => 0927-Add-CartographyItemEvent.patch} | 4 +- ...aid-API.patch => 0928-More-Raid-API.patch} | 0 ...ng-message-for-initial-server-start.patch} | 8 +- ...-Configurable-max-block-fluid-ticks.patch} | 6 +- ...=> 0931-Fix-bees-aging-inside-hives.patch} | 0 ...2-Disable-memory-reserve-allocating.patch} | 0 ...ByEntityEvent-for-unowned-wither-sk.patch} | 0 ....patch => 0934-Fix-DamageSource-API.patch} | 0 ...nvalid-block-entity-during-world-ge.patch} | 4 +- ...ackOverflowError-for-some-dispenses.patch} | 0 ...=> 0937-Improve-tag-parser-handling.patch} | 2 +- ...s.patch => 0938-Item-Mutation-Fixes.patch} | 0 ...-Per-world-ticks-per-spawn-settings.patch} | 6 +- ...e-changed-item-from-dispense-events.patch} | 0 ...nd-End-Portal-Frames-from-being-des.patch} | 18 +- ...-for-mobs-immune-to-default-effects.patch} | 0 ... => 0943-Deep-clone-nbt-tags-in-PDC.patch} | 0 ...944-Support-old-UUID-format-for-NBT.patch} | 0 ...45-Fix-shield-disable-inconsistency.patch} | 4 +- ...-Large-Packets-disconnecting-client.patch} | 0 ...emFlags.patch => 0947-Fix-ItemFlags.patch} | 0 ...et-damage-reduction-inconsistencies.patch} | 0 ...-handling-of-LivingEntity-actuallyH.patch} | 10 +- ...e-checking-handled-tags-in-itemmeta.patch} | 0 ...51-Expose-hasColor-to-leather-armor.patch} | 0 ...-API-to-get-player-ha-proxy-address.patch} | 0 ...atch => 0953-General-ItemMeta-fixes.patch} | 4 +- ....patch => 0954-More-Chest-Block-API.patch} | 0 ...ta-component-type-on-encoding-error.patch} | 0 ...=> 0956-Brigadier-based-command-API.patch} | 40 +- ... => 0957-Fix-issues-with-Recipe-API.patch} | 0 ...58-Fix-equipment-slot-and-group-API.patch} | 0 ...lugin-to-use-Paper-PluginLoader-API.patch} | 0 ...versized-item-data-in-equipment-and.patch} | 4 +- ...nt-NPE-if-hooked-entity-was-cleared.patch} | 0 ...ng-BlockPlaceEvent-calling-onRemove.patch} | 4 +- ...963-Add-missing-fishing-event-state.patch} | 0 ...ate-InvAction-HOTBAR_MOVE_AND_READD.patch} | 0 ...nnect-packet-in-phases-where-it-doe.patch} | 0 ...tch => 0966-Adopt-MaterialRerouting.patch} | 0 ...=> 0967-Suspicious-Effect-Entry-API.patch} | 0 ...eck-if-itemstack-is-stackable-first.patch} | 0 ...emoving-recipes-from-RecipeIterator.patch} | 0 ...mage-tick-when-blocking-with-shield.patch} | 4 +- ...he-experimental-smithing-inventory-.patch} | 0 ...72-disable-forced-empty-world-ticks.patch} | 4 +- ...dBounds-and-getBlockState-for-inlin.patch} | 4 +- ...tem-frames-performance-and-bug-fixe.patch} | 4 +- ...Manager-and-add-advanced-packet-sup.patch} | 0 ...76-Allow-Saving-of-Oversized-Chunks.patch} | 0 ...977-Flat-bedrock-generator-settings.patch} | 0 ...=> 0978-Entity-Activation-Range-2.0.patch} | 92 +- ...0-Anti-Xray.patch => 0979-Anti-Xray.patch} | 26 +- ...city-compression-and-cipher-natives.patch} | 0 ...timize-Collision-to-not-load-chunks.patch} | 4 +- ...alSelector-Goal.Flag-Set-operations.patch} | 0 ...pers.patch => 0983-Optimize-Hoppers.patch} | 14 +- ...> 0984-Optimize-Voxel-Shape-Merging.patch} | 0 ...Optimize-Bit-Operations-by-inlining.patch} | 0 ...> 0986-Remove-streams-from-hot-code.patch} | 0 ...er-Remove-Streams-Optimized-collect.patch} | 0 ...-type-tags-suggestions-in-selectors.patch} | 0 ...-Oversized-block-entities-in-chunks.patch} | 0 ...eck-distance-in-entity-interactions.patch} | 8 +- ...ch => 0991-Configurable-Sand-Duping.patch} | 0 ...ch => 0992-Properly-resend-entities.patch} | 10 +- ...h => 0993-Registry-Modification-API.patch} | 4 +- ...994-Add-registry-entry-and-builders.patch} | 0 ...5-Proxy-ItemStack-to-CraftItemStack.patch} | 4 +- ...-accessible-directly-from-ItemStack.patch} | 0 ...aft-commands-in-function-parsing-an.patch} | 0 ...98-optimize-dirt-and-snow-spreading.patch} | 0 ... 0999-Fix-NPE-for-Jukebox-setRecord.patch} | 0 ...patch => 1000-fix-horse-inventories.patch} | 0 ...ityDamageEvents-before-actuallyHurt.patch} | 10 +- ... => 1002-Add-ItemType-getItemRarity.patch} | 0 ... => 1003-Add-plugin-info-at-startup.patch} | 0 ...tion-leniency-distance-configurable.patch} | 0 ...1005-Fix-PickupStatus-getting-reset.patch} | 0 ...ype-in-SculkSensorBlock-canActivate.patch} | 0 ...anPlaceOn-and-CanDestroy-NBT-values.patch} | 0 ...on-for-horizontal-only-item-merging.patch} | 0 ...009-Add-skipping-world-symlink-scan.patch} | 0 ... 1010-Add-even-more-Enchantment-API.patch} | 0 ...ble-API.patch => 1011-Leashable-API.patch} | 0 ...=> 1012-Fix-CraftBukkit-drag-system.patch} | 0 ...ent-firing-for-block-entity-loading.patch} | 0 ...-lootable-item-function-from-compas.patch} | 0 ...015-Add-enchantment-seed-update-API.patch} | 0 ...ending-chat-to-client-with-updating.patch} | 0 ...Fix-InventoryOpenEvent-cancellation.patch} | 0 ...ire-BlockExpEvent-on-grindstone-use.patch} | 0 ... => 1019-Check-dead-flag-in-isAlive.patch} | 4 +- ...I.patch => 1020-Add-FeatureFlag-API.patch} | 4 +- ....patch => 1021-Tag-Lifecycle-Events.patch} | 4 +- ... => 1022-Item-serialization-as-json.patch} | 4 +- ...ate-slot-in-PlayerInventory-setSlot.patch} | 0 ...ll-time-unused-skip-tick-protection.patch} | 0 ...tty-printing-for-advancement-saving.patch} | 0 ...dPreprocessEvent-on-signed-commands.patch} | 0 ...evels-with-enchantment-registry-set.patch} | 0 ...h => 1028-Improve-entity-effect-API.patch} | 0 ...me.patch => 1029-Add-recipeBrewTime.patch} | 0 ...30-Call-bucket-events-for-cauldrons.patch} | 0 ...31-Add-PlayerInsertLecternBookEvent.patch} | 0 ... 1032-Void-damage-configuration-API.patch} | 4 +- ...I.patch => 1033-Add-Offline-PDC-API.patch} | 0 ...w-bypassEnchantmentLevelRestriction.patch} | 0 ...-proper-async-player-disconnections.patch} | 0 ...-send-Banner-patterns-to-the-client.patch} | 0 ...> 1037-Rewrite-dataconverter-system.patch} | 6 +- ... 1038-Moonrise-optimisation-patches.patch} | 244 +- ...> 1039-API-for-checking-sent-chunks.patch} | 0 ...040-Fix-CraftWorld-isChunkGenerated.patch} | 0 ...tup-flag-to-disable-gamerule-limits.patch} | 0 ...h => 1042-Improved-Watchdog-Support.patch} | 46 +- ...-more-information-in-watchdog-dumps.patch} | 19 +- ...44-Entity-load-save-limit-per-chunk.patch} | 4 +- ...ulate-regionfile-header-if-it-is-co.patch} | 0 ...le-spark.patch => 1046-Bundle-spark.patch} | 36 +- ...-Improve-performance-of-mass-crafts.patch} | 0 ...Incremental-chunk-and-player-saving.patch} | 56 +- ...=> 1049-Optimise-general-POI-access.patch} | 0 ...r-desync-when-new-players-are-added.patch} | 4 +- ...atch => 1051-Lag-compensation-ticks.patch} | 22 +- ...n-checking-in-player-move-packet-ha.patch} | 0 ...1053-Optional-per-player-mob-spawns.patch} | 26 +- ...g-PreCreatureSpawnEvent-with-per-pl.patch} | 12 +- 665 files changed, 2225 insertions(+), 3555 deletions(-) rename patches/server/{0024-Further-improve-server-tick-loop.patch => 0023-Further-improve-server-tick-loop.patch} (96%) delete mode 100644 patches/server/0023-Timings-v2.patch create mode 100644 patches/server/0024-Remove-Spigot-timings.patch rename patches/server/{0602-Oprimise-map-impl-for-tracked-players.patch => 0601-Oprimise-map-impl-for-tracked-players.patch} (87%) delete mode 100644 patches/server/0601-Time-scoreboard-search.patch rename patches/server/{0603-Add-missing-InventoryType.patch => 0602-Add-missing-InventoryType.patch} (100%) rename patches/server/{0604-Optimise-BlockSoil-nearby-water-lookup.patch => 0603-Optimise-BlockSoil-nearby-water-lookup.patch} (100%) rename patches/server/{0605-Fix-merchant-inventory-not-closing-on-entity-removal.patch => 0604-Fix-merchant-inventory-not-closing-on-entity-removal.patch} (90%) rename patches/server/{0606-Check-requirement-before-suggesting-root-nodes.patch => 0605-Check-requirement-before-suggesting-root-nodes.patch} (100%) rename patches/server/{0607-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch => 0606-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch} (92%) rename patches/server/{0608-Add-packet-limiter-config.patch => 0607-Add-packet-limiter-config.patch} (100%) rename patches/server/{0609-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch => 0608-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch} (100%) rename patches/server/{0610-Ensure-valid-vehicle-status.patch => 0609-Ensure-valid-vehicle-status.patch} (100%) rename patches/server/{0611-Prevent-softlocked-end-exit-portal-generation.patch => 0610-Prevent-softlocked-end-exit-portal-generation.patch} (100%) rename patches/server/{0612-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch => 0611-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch} (100%) rename patches/server/{0613-Don-t-log-debug-logging-being-disabled.patch => 0612-Don-t-log-debug-logging-being-disabled.patch} (100%) rename patches/server/{0614-fix-various-menus-with-empty-level-accesses.patch => 0613-fix-various-menus-with-empty-level-accesses.patch} (100%) rename patches/server/{0615-Preserve-overstacked-loot.patch => 0614-Preserve-overstacked-loot.patch} (100%) rename patches/server/{0616-Update-head-rotation-in-missing-places.patch => 0615-Update-head-rotation-in-missing-places.patch} (100%) rename patches/server/{0617-prevent-unintended-light-block-manipulation.patch => 0616-prevent-unintended-light-block-manipulation.patch} (100%) rename patches/server/{0618-Fix-CraftCriteria-defaults-map.patch => 0617-Fix-CraftCriteria-defaults-map.patch} (100%) rename patches/server/{0619-Fix-upstreams-block-state-factories.patch => 0618-Fix-upstreams-block-state-factories.patch} (99%) rename patches/server/{0620-Configurable-feature-seeds.patch => 0619-Configurable-feature-seeds.patch} (62%) rename patches/server/{0621-Add-root-admin-user-detection.patch => 0620-Add-root-admin-user-detection.patch} (95%) rename patches/server/{0622-don-t-attempt-to-teleport-dead-entities.patch => 0621-don-t-attempt-to-teleport-dead-entities.patch} (100%) rename patches/server/{0623-Prevent-excessive-velocity-through-repeated-crits.patch => 0622-Prevent-excessive-velocity-through-repeated-crits.patch} (92%) rename patches/server/{0624-Remove-client-side-code-using-deprecated-for-removal.patch => 0623-Remove-client-side-code-using-deprecated-for-removal.patch} (100%) rename patches/server/{0625-Fix-Spigot-growth-modifiers.patch => 0624-Fix-Spigot-growth-modifiers.patch} (100%) rename patches/server/{0626-Prevent-ContainerOpenersCounter-openCount-from-going.patch => 0625-Prevent-ContainerOpenersCounter-openCount-from-going.patch} (100%) rename patches/server/{0627-Add-PlayerItemFrameChangeEvent.patch => 0626-Add-PlayerItemFrameChangeEvent.patch} (100%) rename patches/server/{0628-Optimize-HashMapPalette.patch => 0627-Optimize-HashMapPalette.patch} (100%) rename patches/server/{0629-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch => 0628-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch} (100%) rename patches/server/{0630-Add-more-Campfire-API.patch => 0629-Add-more-Campfire-API.patch} (100%) rename patches/server/{0631-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch => 0630-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch} (100%) rename patches/server/{0632-Forward-CraftEntity-in-teleport-command.patch => 0631-Forward-CraftEntity-in-teleport-command.patch} (100%) rename patches/server/{0633-Improve-scoreboard-entries.patch => 0632-Improve-scoreboard-entries.patch} (100%) rename patches/server/{0634-Entity-powdered-snow-API.patch => 0633-Entity-powdered-snow-API.patch} (100%) rename patches/server/{0635-Add-API-for-item-entity-health.patch => 0634-Add-API-for-item-entity-health.patch} (100%) rename patches/server/{0636-Configurable-max-block-light-for-monster-spawning.patch => 0635-Configurable-max-block-light-for-monster-spawning.patch} (100%) rename patches/server/{0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch => 0636-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch} (100%) rename patches/server/{0638-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch => 0637-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch} (100%) rename patches/server/{0639-Bucketable-API.patch => 0638-Bucketable-API.patch} (100%) rename patches/server/{0640-Validate-usernames.patch => 0639-Validate-usernames.patch} (96%) rename patches/server/{0641-Make-water-animal-spawn-height-configurable.patch => 0640-Make-water-animal-spawn-height-configurable.patch} (100%) rename patches/server/{0642-Expose-vanilla-BiomeProvider-from-WorldInfo.patch => 0641-Expose-vanilla-BiomeProvider-from-WorldInfo.patch} (95%) rename patches/server/{0643-Add-config-option-for-worlds-affected-by-time-cmd.patch => 0642-Add-config-option-for-worlds-affected-by-time-cmd.patch} (100%) rename patches/server/{0644-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch => 0643-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch} (100%) rename patches/server/{0645-Multiple-Entries-with-Scoreboards.patch => 0644-Multiple-Entries-with-Scoreboards.patch} (100%) rename patches/server/{0646-Reset-placed-block-on-exception.patch => 0645-Reset-placed-block-on-exception.patch} (100%) rename patches/server/{0647-Add-configurable-height-for-slime-spawn.patch => 0646-Add-configurable-height-for-slime-spawn.patch} (100%) rename patches/server/{0648-Fix-xp-reward-for-baby-zombies.patch => 0647-Fix-xp-reward-for-baby-zombies.patch} (100%) rename patches/server/{0649-Multi-Block-Change-API-Implementation.patch => 0648-Multi-Block-Change-API-Implementation.patch} (100%) rename patches/server/{0650-Fix-NotePlayEvent.patch => 0649-Fix-NotePlayEvent.patch} (100%) rename patches/server/{0651-Freeze-Tick-Lock-API.patch => 0650-Freeze-Tick-Lock-API.patch} (96%) rename patches/server/{0652-More-PotionEffectType-API.patch => 0651-More-PotionEffectType-API.patch} (100%) rename patches/server/{0653-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch => 0652-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch} (100%) rename patches/server/{0654-API-for-creating-command-sender-which-forwards-feedb.patch => 0653-API-for-creating-command-sender-which-forwards-feedb.patch} (97%) rename patches/server/{0655-Add-missing-structure-set-seed-configs.patch => 0654-Add-missing-structure-set-seed-configs.patch} (100%) rename patches/server/{0656-Fix-cancelled-powdered-snow-bucket-placement.patch => 0655-Fix-cancelled-powdered-snow-bucket-placement.patch} (100%) rename patches/server/{0657-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch => 0656-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch} (86%) rename patches/server/{0658-Add-GameEvent-tags.patch => 0657-Add-GameEvent-tags.patch} (95%) rename patches/server/{0659-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch => 0658-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch} (87%) rename patches/server/{0660-Furnace-RecipesUsed-API.patch => 0659-Furnace-RecipesUsed-API.patch} (100%) rename patches/server/{0661-Configurable-sculk-sensor-listener-range.patch => 0660-Configurable-sculk-sensor-listener-range.patch} (100%) rename patches/server/{0662-Add-missing-block-data-API.patch => 0661-Add-missing-block-data-API.patch} (100%) rename patches/server/{0663-Option-to-have-default-CustomSpawners-in-custom-worl.patch => 0662-Option-to-have-default-CustomSpawners-in-custom-worl.patch} (94%) rename patches/server/{0664-Put-world-into-worldlist-before-initing-the-world.patch => 0663-Put-world-into-worldlist-before-initing-the-world.patch} (86%) rename patches/server/{0665-Custom-Potion-Mixes.patch => 0664-Custom-Potion-Mixes.patch} (97%) rename patches/server/{0666-Force-close-world-loading-screen.patch => 0665-Force-close-world-loading-screen.patch} (93%) rename patches/server/{0667-Fix-falling-block-spawn-methods.patch => 0666-Fix-falling-block-spawn-methods.patch} (100%) rename patches/server/{0668-Expose-furnace-minecart-push-values.patch => 0667-Expose-furnace-minecart-push-values.patch} (100%) rename patches/server/{0669-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch => 0668-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch} (100%) rename patches/server/{0670-More-Projectile-API.patch => 0669-More-Projectile-API.patch} (100%) rename patches/server/{0671-Fix-swamp-hut-cat-generation-deadlock.patch => 0670-Fix-swamp-hut-cat-generation-deadlock.patch} (100%) rename patches/server/{0672-Don-t-allow-vehicle-movement-from-players-while-tele.patch => 0671-Don-t-allow-vehicle-movement-from-players-while-tele.patch} (94%) rename patches/server/{0673-Implement-getComputedBiome-API.patch => 0672-Implement-getComputedBiome-API.patch} (100%) rename patches/server/{0674-Make-some-itemstacks-nonnull.patch => 0673-Make-some-itemstacks-nonnull.patch} (100%) rename patches/server/{0675-Implement-enchantWithLevels-API.patch => 0674-Implement-enchantWithLevels-API.patch} (100%) rename patches/server/{0676-Fix-saving-in-unloadWorld.patch => 0675-Fix-saving-in-unloadWorld.patch} (83%) rename patches/server/{0677-Buffer-OOB-setBlock-calls.patch => 0676-Buffer-OOB-setBlock-calls.patch} (100%) rename patches/server/{0678-Add-TameableDeathMessageEvent.patch => 0677-Add-TameableDeathMessageEvent.patch} (100%) rename patches/server/{0679-Fix-new-block-data-for-EntityChangeBlockEvent.patch => 0678-Fix-new-block-data-for-EntityChangeBlockEvent.patch} (100%) rename patches/server/{0680-fix-player-loottables-running-when-mob-loot-gamerule.patch => 0679-fix-player-loottables-running-when-mob-loot-gamerule.patch} (100%) rename patches/server/{0681-Ensure-entity-passenger-world-matches-ridden-entity.patch => 0680-Ensure-entity-passenger-world-matches-ridden-entity.patch} (100%) rename patches/server/{0682-Cache-resource-keys-and-optimize-reference-Holder-ta.patch => 0681-Cache-resource-keys-and-optimize-reference-Holder-ta.patch} (100%) rename patches/server/{0683-Allow-changing-the-EnderDragon-podium.patch => 0682-Allow-changing-the-EnderDragon-podium.patch} (100%) rename patches/server/{0684-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch => 0683-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch} (100%) rename patches/server/{0685-Prevent-tile-entity-copies-loading-chunks.patch => 0684-Prevent-tile-entity-copies-loading-chunks.patch} (90%) rename patches/server/{0686-Use-username-instead-of-display-name-in-PlayerList-g.patch => 0685-Use-username-instead-of-display-name-in-PlayerList-g.patch} (87%) rename patches/server/{0687-Expand-PlayerItemDamageEvent.patch => 0686-Expand-PlayerItemDamageEvent.patch} (100%) rename patches/server/{0688-WorldCreator-keepSpawnLoaded.patch => 0687-WorldCreator-keepSpawnLoaded.patch} (87%) rename patches/server/{0689-Fix-CME-in-CraftPersistentDataTypeRegistry.patch => 0688-Fix-CME-in-CraftPersistentDataTypeRegistry.patch} (100%) rename patches/server/{0690-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch => 0689-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch} (100%) rename patches/server/{0691-Add-EntityDyeEvent-and-CollarColorable-interface.patch => 0690-Add-EntityDyeEvent-and-CollarColorable-interface.patch} (100%) rename patches/server/{0692-Fire-CauldronLevelChange-on-initial-fill.patch => 0691-Fire-CauldronLevelChange-on-initial-fill.patch} (100%) rename patches/server/{0693-fix-powder-snow-cauldrons-not-turning-to-water.patch => 0692-fix-powder-snow-cauldrons-not-turning-to-water.patch} (100%) rename patches/server/{0694-Add-PlayerStopUsingItemEvent.patch => 0693-Add-PlayerStopUsingItemEvent.patch} (85%) rename patches/server/{0695-Don-t-tick-markers.patch => 0694-Don-t-tick-markers.patch} (93%) rename patches/server/{0696-Expand-FallingBlock-API.patch => 0695-Expand-FallingBlock-API.patch} (100%) rename patches/server/{0697-Add-support-for-Proxy-Protocol.patch => 0696-Add-support-for-Proxy-Protocol.patch} (100%) rename patches/server/{0698-Fix-OfflinePlayer-getBedSpawnLocation.patch => 0697-Fix-OfflinePlayer-getBedSpawnLocation.patch} (100%) rename patches/server/{0699-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch => 0698-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch} (100%) rename patches/server/{0700-Sanitize-sent-BlockEntity-NBT.patch => 0699-Sanitize-sent-BlockEntity-NBT.patch} (95%) rename patches/server/{0701-Disable-component-selector-resolving-in-books-by-def.patch => 0700-Disable-component-selector-resolving-in-books-by-def.patch} (100%) rename patches/server/{0702-Prevent-entity-loading-causing-async-lookups.patch => 0701-Prevent-entity-loading-causing-async-lookups.patch} (100%) rename patches/server/{0703-Throw-exception-on-world-create-while-being-ticked.patch => 0702-Throw-exception-on-world-create-while-being-ticked.patch} (80%) rename patches/server/{0704-Dont-resent-entity-on-art-update.patch => 0703-Dont-resent-entity-on-art-update.patch} (100%) rename patches/server/{0705-Add-WardenAngerChangeEvent.patch => 0704-Add-WardenAngerChangeEvent.patch} (100%) rename patches/server/{0706-Add-option-for-strict-advancement-dimension-checks.patch => 0705-Add-option-for-strict-advancement-dimension-checks.patch} (100%) rename patches/server/{0707-Add-missing-important-BlockStateListPopulator-method.patch => 0706-Add-missing-important-BlockStateListPopulator-method.patch} (100%) rename patches/server/{0708-Nameable-Banner-API.patch => 0707-Nameable-Banner-API.patch} (100%) rename patches/server/{0709-Don-t-broadcast-messages-to-command-blocks.patch => 0708-Don-t-broadcast-messages-to-command-blocks.patch} (92%) rename patches/server/{0710-Prevent-empty-items-from-being-added-to-world.patch => 0709-Prevent-empty-items-from-being-added-to-world.patch} (89%) rename patches/server/{0711-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch => 0710-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch} (100%) rename patches/server/{0712-Add-Player-getFishHook.patch => 0711-Add-Player-getFishHook.patch} (100%) rename patches/server/{0713-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch => 0712-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch} (100%) rename patches/server/{0714-Add-various-missing-EntityDropItemEvent-calls.patch => 0713-Add-various-missing-EntityDropItemEvent-calls.patch} (100%) rename patches/server/{0715-Fix-Bee-flower-NPE.patch => 0714-Fix-Bee-flower-NPE.patch} (100%) rename patches/server/{0716-More-Teleport-API.patch => 0715-More-Teleport-API.patch} (99%) rename patches/server/{0717-Add-EntityPortalReadyEvent.patch => 0716-Add-EntityPortalReadyEvent.patch} (100%) rename patches/server/{0718-Don-t-use-level-random-in-entity-constructors.patch => 0717-Don-t-use-level-random-in-entity-constructors.patch} (100%) rename patches/server/{0719-Send-block-entities-after-destroy-prediction.patch => 0718-Send-block-entities-after-destroy-prediction.patch} (98%) rename patches/server/{0720-Warn-on-plugins-accessing-faraway-chunks.patch => 0719-Warn-on-plugins-accessing-faraway-chunks.patch} (97%) rename patches/server/{0721-Custom-Chat-Completion-Suggestions-API.patch => 0720-Custom-Chat-Completion-Suggestions-API.patch} (100%) rename patches/server/{0722-Add-and-fix-missing-BlockFadeEvents.patch => 0721-Add-and-fix-missing-BlockFadeEvents.patch} (100%) rename patches/server/{0723-Collision-API.patch => 0722-Collision-API.patch} (100%) rename patches/server/{0724-Fix-suggest-command-message-for-brigadier-syntax-exc.patch => 0723-Fix-suggest-command-message-for-brigadier-syntax-exc.patch} (100%) rename patches/server/{0725-Block-Ticking-API.patch => 0724-Block-Ticking-API.patch} (100%) rename patches/server/{0726-Add-Velocity-IP-Forwarding-Support.patch => 0725-Add-Velocity-IP-Forwarding-Support.patch} (97%) rename patches/server/{0727-Add-NamespacedKey-biome-methods.patch => 0726-Add-NamespacedKey-biome-methods.patch} (76%) rename patches/server/{0728-Fix-plugin-loggers-on-server-shutdown.patch => 0727-Fix-plugin-loggers-on-server-shutdown.patch} (94%) rename patches/server/{0729-Stop-large-look-changes-from-crashing-the-server.patch => 0728-Stop-large-look-changes-from-crashing-the-server.patch} (94%) rename patches/server/{0730-Fire-EntityChangeBlockEvent-in-more-places.patch => 0729-Fire-EntityChangeBlockEvent-in-more-places.patch} (100%) rename patches/server/{0731-Missing-eating-regain-reason.patch => 0730-Missing-eating-regain-reason.patch} (100%) rename patches/server/{0732-Missing-effect-cause.patch => 0731-Missing-effect-cause.patch} (100%) rename patches/server/{0733-Added-byte-array-serialization-deserialization-for-P.patch => 0732-Added-byte-array-serialization-deserialization-for-P.patch} (100%) rename patches/server/{0734-Call-BlockPhysicsEvent-more-often.patch => 0733-Call-BlockPhysicsEvent-more-often.patch} (100%) rename patches/server/{0735-Configurable-chat-thread-limit.patch => 0734-Configurable-chat-thread-limit.patch} (94%) rename patches/server/{0736-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch => 0735-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch} (100%) rename patches/server/{0737-fix-Jigsaw-block-kicking-user.patch => 0736-fix-Jigsaw-block-kicking-user.patch} (100%) rename patches/server/{0738-use-BlockFormEvent-for-mud-converting-into-clay.patch => 0737-use-BlockFormEvent-for-mud-converting-into-clay.patch} (100%) rename patches/server/{0739-Add-getDrops-to-BlockState.patch => 0738-Add-getDrops-to-BlockState.patch} (100%) rename patches/server/{0740-Fix-a-bunch-of-vanilla-bugs.patch => 0739-Fix-a-bunch-of-vanilla-bugs.patch} (97%) rename patches/server/{0741-Remove-unnecessary-onTrackingStart-during-navigation.patch => 0740-Remove-unnecessary-onTrackingStart-during-navigation.patch} (88%) rename patches/server/{0742-Fix-custom-piglin-loved-items.patch => 0741-Fix-custom-piglin-loved-items.patch} (100%) rename patches/server/{0743-EntityPickupItemEvent-fixes.patch => 0742-EntityPickupItemEvent-fixes.patch} (100%) rename patches/server/{0744-Correctly-handle-interactions-with-items-on-cooldown.patch => 0743-Correctly-handle-interactions-with-items-on-cooldown.patch} (100%) rename patches/server/{0745-Add-PlayerInventorySlotChangeEvent.patch => 0744-Add-PlayerInventorySlotChangeEvent.patch} (100%) rename patches/server/{0746-Elder-Guardian-appearance-API.patch => 0745-Elder-Guardian-appearance-API.patch} (100%) rename patches/server/{0747-Add-entity-knockback-API.patch => 0746-Add-entity-knockback-API.patch} (100%) rename patches/server/{0748-Detect-headless-JREs.patch => 0747-Detect-headless-JREs.patch} (100%) rename patches/server/{0749-fix-entity-vehicle-collision-event-not-called.patch => 0748-fix-entity-vehicle-collision-event-not-called.patch} (100%) rename patches/server/{0750-Add-EntityToggleSitEvent.patch => 0749-Add-EntityToggleSitEvent.patch} (100%) rename patches/server/{0751-Add-fire-tick-delay-option.patch => 0750-Add-fire-tick-delay-option.patch} (100%) rename patches/server/{0752-Add-Moving-Piston-API.patch => 0751-Add-Moving-Piston-API.patch} (100%) rename patches/server/{0753-Ignore-impossible-spawn-tick.patch => 0752-Ignore-impossible-spawn-tick.patch} (100%) rename patches/server/{0754-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch => 0753-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch} (100%) rename patches/server/{0755-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch => 0754-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch} (100%) rename patches/server/{0756-Add-PrePlayerAttackEntityEvent.patch => 0755-Add-PrePlayerAttackEntityEvent.patch} (100%) rename patches/server/{0757-ensure-reset-EnderDragon-boss-event-name.patch => 0756-ensure-reset-EnderDragon-boss-event-name.patch} (100%) rename patches/server/{0758-Add-Player-Warden-Warning-API.patch => 0757-Add-Player-Warden-Warning-API.patch} (100%) rename patches/server/{0759-More-vanilla-friendly-methods-to-update-trades.patch => 0758-More-vanilla-friendly-methods-to-update-trades.patch} (100%) rename patches/server/{0760-Add-paper-dumplisteners-command.patch => 0759-Add-paper-dumplisteners-command.patch} (100%) rename patches/server/{0761-check-global-player-list-where-appropriate.patch => 0760-check-global-player-list-where-appropriate.patch} (93%) rename patches/server/{0762-Fix-async-entity-add-due-to-fungus-trees.patch => 0761-Fix-async-entity-add-due-to-fungus-trees.patch} (100%) rename patches/server/{0763-ItemStack-damage-API.patch => 0762-ItemStack-damage-API.patch} (100%) rename patches/server/{0764-Friction-API.patch => 0763-Friction-API.patch} (95%) rename patches/server/{0765-Ability-to-control-player-s-insomnia-and-phantoms.patch => 0764-Ability-to-control-player-s-insomnia-and-phantoms.patch} (100%) rename patches/server/{0766-Fix-premature-player-kicks-on-shutdown.patch => 0765-Fix-premature-player-kicks-on-shutdown.patch} (95%) rename patches/server/{0767-Sync-offhand-slot-in-menus.patch => 0766-Sync-offhand-slot-in-menus.patch} (100%) rename patches/server/{0768-Player-Entity-Tracking-Events.patch => 0767-Player-Entity-Tracking-Events.patch} (93%) rename patches/server/{0769-Limit-pet-look-distance.patch => 0768-Limit-pet-look-distance.patch} (100%) rename patches/server/{0770-fix-Instruments.patch => 0769-fix-Instruments.patch} (100%) rename patches/server/{0771-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch => 0770-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch} (100%) rename patches/server/{0772-Add-BlockLockCheckEvent.patch => 0771-Add-BlockLockCheckEvent.patch} (100%) rename patches/server/{0773-Add-Sneaking-API-for-Entities.patch => 0772-Add-Sneaking-API-for-Entities.patch} (100%) rename patches/server/{0774-Improve-logging-and-errors.patch => 0773-Improve-logging-and-errors.patch} (95%) rename patches/server/{0775-Improve-PortalEvents.patch => 0774-Improve-PortalEvents.patch} (100%) rename patches/server/{0776-Add-config-option-for-spider-worldborder-climbing.patch => 0775-Add-config-option-for-spider-worldborder-climbing.patch} (100%) rename patches/server/{0777-Add-missing-SpigotConfig-logCommands-check.patch => 0776-Add-missing-SpigotConfig-logCommands-check.patch} (95%) rename patches/server/{0778-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch => 0777-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch} (100%) rename patches/server/{0779-Flying-Fall-Damage.patch => 0778-Flying-Fall-Damage.patch} (100%) rename patches/server/{0780-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch => 0779-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch} (100%) rename patches/server/{0781-config-for-disabling-entity-tag-tags.patch => 0780-config-for-disabling-entity-tag-tags.patch} (89%) rename patches/server/{0782-Use-single-player-info-update-packet-on-join.patch => 0781-Use-single-player-info-update-packet-on-join.patch} (89%) rename patches/server/{0783-Correctly-shrink-items-during-EntityResurrectEvent.patch => 0782-Correctly-shrink-items-during-EntityResurrectEvent.patch} (92%) rename patches/server/{0784-Win-Screen-API.patch => 0783-Win-Screen-API.patch} (100%) rename patches/server/{0785-Remove-CraftItemStack-setAmount-null-assignment.patch => 0784-Remove-CraftItemStack-setAmount-null-assignment.patch} (100%) rename patches/server/{0786-Fix-force-opening-enchantment-tables.patch => 0785-Fix-force-opening-enchantment-tables.patch} (100%) rename patches/server/{0787-Add-Entity-Body-Yaw-API.patch => 0786-Add-Entity-Body-Yaw-API.patch} (100%) rename patches/server/{0788-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch => 0787-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch} (100%) rename patches/server/{0789-Add-EntityFertilizeEggEvent.patch => 0788-Add-EntityFertilizeEggEvent.patch} (100%) rename patches/server/{0790-Fix-HumanEntity-drop-not-updating-the-client-inv.patch => 0789-Fix-HumanEntity-drop-not-updating-the-client-inv.patch} (100%) rename patches/server/{0791-Add-CompostItemEvent-and-EntityCompostItemEvent.patch => 0790-Add-CompostItemEvent-and-EntityCompostItemEvent.patch} (100%) rename patches/server/{0792-Correctly-handle-ArmorStand-invisibility.patch => 0791-Correctly-handle-ArmorStand-invisibility.patch} (100%) rename patches/server/{0793-Fix-advancement-triggers-for-entity-damage.patch => 0792-Fix-advancement-triggers-for-entity-damage.patch} (93%) rename patches/server/{0794-Fix-text-display-error-on-spawn.patch => 0793-Fix-text-display-error-on-spawn.patch} (100%) rename patches/server/{0795-Fix-inventories-returning-null-Locations.patch => 0794-Fix-inventories-returning-null-Locations.patch} (100%) rename patches/server/{0796-Add-Shearable-API.patch => 0795-Add-Shearable-API.patch} (100%) rename patches/server/{0797-Fix-SpawnEggMeta-get-setSpawnedType.patch => 0796-Fix-SpawnEggMeta-get-setSpawnedType.patch} (100%) rename patches/server/{0798-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch => 0797-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch} (100%) rename patches/server/{0799-Treat-sequence-violations-like-they-should-be.patch => 0798-Treat-sequence-violations-like-they-should-be.patch} (92%) rename patches/server/{0800-Prevent-causing-expired-keys-from-impacting-new-join.patch => 0799-Prevent-causing-expired-keys-from-impacting-new-join.patch} (96%) rename patches/server/{0801-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch => 0800-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch} (86%) rename patches/server/{0802-Use-array-for-gamerule-storage.patch => 0801-Use-array-for-gamerule-storage.patch} (100%) rename patches/server/{0803-Fix-a-couple-of-upstream-bed-issues.patch => 0802-Fix-a-couple-of-upstream-bed-issues.patch} (100%) rename patches/server/{0804-Fix-demo-flag-not-enabling-demo-mode.patch => 0803-Fix-demo-flag-not-enabling-demo-mode.patch} (100%) rename patches/server/{0805-Add-Mob-Experience-reward-API.patch => 0804-Add-Mob-Experience-reward-API.patch} (100%) rename patches/server/{0806-Break-redstone-on-top-of-trap-doors-early.patch => 0805-Break-redstone-on-top-of-trap-doors-early.patch} (100%) rename patches/server/{0807-Avoid-Lazy-Initialization-for-Enum-Fields.patch => 0806-Avoid-Lazy-Initialization-for-Enum-Fields.patch} (100%) rename patches/server/{0808-More-accurate-isInOpenWater-impl.patch => 0807-More-accurate-isInOpenWater-impl.patch} (100%) rename patches/server/{0809-Expand-PlayerItemMendEvent.patch => 0808-Expand-PlayerItemMendEvent.patch} (100%) rename patches/server/{0810-Refresh-ProjectileSource-for-projectiles.patch => 0809-Refresh-ProjectileSource-for-projectiles.patch} (100%) rename patches/server/{0811-Add-transient-modifier-API.patch => 0810-Add-transient-modifier-API.patch} (100%) rename patches/server/{0812-Fix-block-place-logic.patch => 0811-Fix-block-place-logic.patch} (95%) rename patches/server/{0813-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch => 0812-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch} (100%) rename patches/server/{0814-Call-BlockGrowEvent-for-missing-blocks.patch => 0813-Call-BlockGrowEvent-for-missing-blocks.patch} (100%) rename patches/server/{0815-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch => 0814-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch} (94%) rename patches/server/{0816-fix-MapLike-spam-for-missing-key-selector.patch => 0815-fix-MapLike-spam-for-missing-key-selector.patch} (100%) rename patches/server/{0817-Fix-sniffer-removeExploredLocation.patch => 0816-Fix-sniffer-removeExploredLocation.patch} (100%) rename patches/server/{0818-Add-method-to-remove-all-active-potion-effects.patch => 0817-Add-method-to-remove-all-active-potion-effects.patch} (100%) rename patches/server/{0819-Add-event-for-player-editing-sign.patch => 0818-Add-event-for-player-editing-sign.patch} (100%) rename patches/server/{0820-Only-tick-item-frames-if-players-can-see-it.patch => 0819-Only-tick-item-frames-if-players-can-see-it.patch} (100%) rename patches/server/{0821-Fix-cmd-permission-levels-for-command-blocks.patch => 0820-Fix-cmd-permission-levels-for-command-blocks.patch} (100%) rename patches/server/{0822-Add-option-to-disable-block-updates.patch => 0821-Add-option-to-disable-block-updates.patch} (100%) rename patches/server/{0823-Call-missing-BlockDispenseEvent.patch => 0822-Call-missing-BlockDispenseEvent.patch} (100%) rename patches/server/{0824-Don-t-load-chunks-for-supporting-block-checks.patch => 0823-Don-t-load-chunks-for-supporting-block-checks.patch} (100%) rename patches/server/{0825-Optimize-player-lookups-for-beacons.patch => 0824-Optimize-player-lookups-for-beacons.patch} (100%) rename patches/server/{0826-More-Sign-Block-API.patch => 0825-More-Sign-Block-API.patch} (100%) rename patches/server/{0827-fix-item-meta-for-tadpole-buckets.patch => 0826-fix-item-meta-for-tadpole-buckets.patch} (100%) rename patches/server/{0828-Fix-BanList-API.patch => 0827-Fix-BanList-API.patch} (100%) rename patches/server/{0829-Determine-lava-and-water-fluid-explosion-resistance-.patch => 0828-Determine-lava-and-water-fluid-explosion-resistance-.patch} (100%) rename patches/server/{0830-Fix-possible-NPE-on-painting-creation.patch => 0829-Fix-possible-NPE-on-painting-creation.patch} (100%) rename patches/server/{0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch => 0830-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch} (100%) rename patches/server/{0832-ExperienceOrb-should-call-EntitySpawnEvent.patch => 0831-ExperienceOrb-should-call-EntitySpawnEvent.patch} (100%) rename patches/server/{0833-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch => 0832-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch} (100%) rename patches/server/{0834-Add-whitelist-events.patch => 0833-Add-whitelist-events.patch} (100%) rename patches/server/{0835-Implement-PlayerFailMoveEvent.patch => 0834-Implement-PlayerFailMoveEvent.patch} (98%) rename patches/server/{0836-Folia-scheduler-and-owned-region-API.patch => 0835-Folia-scheduler-and-owned-region-API.patch} (98%) rename patches/server/{0837-Only-erase-allay-memory-on-non-item-targets.patch => 0836-Only-erase-allay-memory-on-non-item-targets.patch} (100%) rename patches/server/{0838-Fix-rotation-when-spawning-display-entities.patch => 0837-Fix-rotation-when-spawning-display-entities.patch} (100%) rename patches/server/{0839-Only-capture-actual-tree-growth.patch => 0838-Only-capture-actual-tree-growth.patch} (97%) rename patches/server/{0840-Use-correct-source-for-mushroom-block-spread-event.patch => 0839-Use-correct-source-for-mushroom-block-spread-event.patch} (100%) rename patches/server/{0841-Respect-randomizeData-on-more-entities-when-spawning.patch => 0840-Respect-randomizeData-on-more-entities-when-spawning.patch} (100%) rename patches/server/{0842-Use-correct-seed-on-api-world-load.patch => 0841-Use-correct-seed-on-api-world-load.patch} (87%) rename patches/server/{0843-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch => 0842-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch} (100%) rename patches/server/{0844-Cache-map-ids-on-item-frames.patch => 0843-Cache-map-ids-on-item-frames.patch} (100%) rename patches/server/{0845-API-for-updating-recipes-on-clients.patch => 0844-API-for-updating-recipes-on-clients.patch} (88%) rename patches/server/{0846-Fix-custom-statistic-criteria-creation.patch => 0845-Fix-custom-statistic-criteria-creation.patch} (59%) rename patches/server/{0847-Bandaid-fix-for-Effect.patch => 0846-Bandaid-fix-for-Effect.patch} (100%) rename patches/server/{0848-SculkCatalyst-bloom-API.patch => 0847-SculkCatalyst-bloom-API.patch} (100%) rename patches/server/{0849-API-for-an-entity-s-scoreboard-name.patch => 0848-API-for-an-entity-s-scoreboard-name.patch} (100%) rename patches/server/{0850-Deprecate-and-replace-methods-with-old-StructureType.patch => 0849-Deprecate-and-replace-methods-with-old-StructureType.patch} (92%) rename patches/server/{0851-Don-t-tab-complete-namespaced-commands-if-send-names.patch => 0850-Don-t-tab-complete-namespaced-commands-if-send-names.patch} (95%) rename patches/server/{0852-Properly-handle-BlockBreakEvent-isDropItems.patch => 0851-Properly-handle-BlockBreakEvent-isDropItems.patch} (98%) rename patches/server/{0853-Fire-entity-death-event-for-ender-dragon.patch => 0852-Fire-entity-death-event-for-ender-dragon.patch} (100%) rename patches/server/{0854-Configurable-entity-tracking-range-by-Y-coordinate.patch => 0853-Configurable-entity-tracking-range-by-Y-coordinate.patch} (92%) rename patches/server/{0855-Add-Listing-API-for-Player.patch => 0854-Add-Listing-API-for-Player.patch} (98%) rename patches/server/{0856-Configurable-Region-Compression-Format.patch => 0855-Configurable-Region-Compression-Format.patch} (100%) rename patches/server/{0857-Add-BlockFace-to-BlockDamageEvent.patch => 0856-Add-BlockFace-to-BlockDamageEvent.patch} (100%) rename patches/server/{0858-Fix-NPE-on-Boat-getStatus.patch => 0857-Fix-NPE-on-Boat-getStatus.patch} (100%) rename patches/server/{0859-Expand-Pose-API.patch => 0858-Expand-Pose-API.patch} (100%) rename patches/server/{0860-More-DragonBattle-API.patch => 0859-More-DragonBattle-API.patch} (100%) rename patches/server/{0861-Add-PlayerPickItemEvent.patch => 0860-Add-PlayerPickItemEvent.patch} (96%) rename patches/server/{0862-Allow-trident-custom-damage.patch => 0861-Allow-trident-custom-damage.patch} (100%) rename patches/server/{0863-Expose-hand-in-BlockCanBuildEvent.patch => 0862-Expose-hand-in-BlockCanBuildEvent.patch} (100%) rename patches/server/{0864-Optimize-nearest-structure-border-iteration.patch => 0863-Optimize-nearest-structure-border-iteration.patch} (100%) rename patches/server/{0865-Implement-OfflinePlayer-isConnected.patch => 0864-Implement-OfflinePlayer-isConnected.patch} (100%) rename patches/server/{0866-Fix-slot-desync.patch => 0865-Fix-slot-desync.patch} (98%) rename patches/server/{0867-Add-titleOverride-to-InventoryOpenEvent.patch => 0866-Add-titleOverride-to-InventoryOpenEvent.patch} (100%) rename patches/server/{0868-Configure-sniffer-egg-hatch-time.patch => 0867-Configure-sniffer-egg-hatch-time.patch} (100%) rename patches/server/{0869-Do-crystal-portal-proximity-check-before-entity-look.patch => 0868-Do-crystal-portal-proximity-check-before-entity-look.patch} (100%) rename patches/server/{0870-Skip-POI-finding-if-stuck-in-vehicle.patch => 0869-Skip-POI-finding-if-stuck-in-vehicle.patch} (100%) rename patches/server/{0871-Add-slot-sanity-checks-in-container-clicks.patch => 0870-Add-slot-sanity-checks-in-container-clicks.patch} (94%) rename patches/server/{0872-Call-BlockRedstoneEvents-for-lecterns.patch => 0871-Call-BlockRedstoneEvents-for-lecterns.patch} (100%) rename patches/server/{0873-Allow-proper-checking-of-empty-item-stacks.patch => 0872-Allow-proper-checking-of-empty-item-stacks.patch} (100%) rename patches/server/{0874-Fix-silent-equipment-change-for-mobs.patch => 0873-Fix-silent-equipment-change-for-mobs.patch} (100%) rename patches/server/{0875-Fix-spigot-s-Forced-Stats.patch => 0874-Fix-spigot-s-Forced-Stats.patch} (100%) rename patches/server/{0876-Add-missing-InventoryHolders-to-inventories.patch => 0875-Add-missing-InventoryHolders-to-inventories.patch} (100%) rename patches/server/{0877-Do-not-read-tile-entities-in-chunks-that-are-positio.patch => 0876-Do-not-read-tile-entities-in-chunks-that-are-positio.patch} (100%) rename patches/server/{0878-Add-missing-logs-for-log-ips-config-option.patch => 0877-Add-missing-logs-for-log-ips-config-option.patch} (100%) rename patches/server/{0879-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch => 0878-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch} (100%) rename patches/server/{0880-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch => 0879-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch} (100%) rename patches/server/{0881-Fix-team-sidebar-objectives-not-being-cleared.patch => 0880-Fix-team-sidebar-objectives-not-being-cleared.patch} (94%) rename patches/server/{0882-Fix-missing-map-initialize-event-call.patch => 0881-Fix-missing-map-initialize-event-call.patch} (93%) rename patches/server/{0883-Update-entity-data-when-attaching-firework-to-entity.patch => 0882-Update-entity-data-when-attaching-firework-to-entity.patch} (100%) rename patches/server/{0884-Fix-UnsafeValues-loadAdvancement.patch => 0883-Fix-UnsafeValues-loadAdvancement.patch} (94%) rename patches/server/{0885-Add-player-idle-duration-API.patch => 0884-Add-player-idle-duration-API.patch} (100%) rename patches/server/{0886-Don-t-check-if-we-can-see-non-visible-entities.patch => 0885-Don-t-check-if-we-can-see-non-visible-entities.patch} (85%) rename patches/server/{0887-Fix-NPE-in-SculkBloomEvent-world-access.patch => 0886-Fix-NPE-in-SculkBloomEvent-world-access.patch} (100%) rename patches/server/{0888-Allow-null-itemstack-for-Player-sendEquipmentChange.patch => 0887-Allow-null-itemstack-for-Player-sendEquipmentChange.patch} (100%) rename patches/server/{0889-Optimize-VarInts.patch => 0888-Optimize-VarInts.patch} (100%) rename patches/server/{0890-Add-API-to-get-the-collision-shape-of-a-block-before.patch => 0889-Add-API-to-get-the-collision-shape-of-a-block-before.patch} (100%) rename patches/server/{0891-Add-predicate-for-blocks-when-raytracing.patch => 0890-Add-predicate-for-blocks-when-raytracing.patch} (100%) rename patches/server/{0892-Broadcast-take-item-packets-with-collector-as-source.patch => 0891-Broadcast-take-item-packets-with-collector-as-source.patch} (88%) rename patches/server/{0893-Expand-LingeringPotion-API.patch => 0892-Expand-LingeringPotion-API.patch} (100%) rename patches/server/{0894-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch => 0893-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch} (100%) rename patches/server/{0895-Add-hand-to-fish-event-for-all-player-interactions.patch => 0894-Add-hand-to-fish-event-for-all-player-interactions.patch} (100%) rename patches/server/{0896-Fix-several-issues-with-EntityBreedEvent.patch => 0895-Fix-several-issues-with-EntityBreedEvent.patch} (100%) rename patches/server/{0897-Add-UUID-attribute-modifier-API.patch => 0896-Add-UUID-attribute-modifier-API.patch} (100%) rename patches/server/{0898-Fix-missing-event-call-for-entity-teleport-API.patch => 0897-Fix-missing-event-call-for-entity-teleport-API.patch} (100%) rename patches/server/{0899-Lazily-create-LootContext-for-criterions.patch => 0898-Lazily-create-LootContext-for-criterions.patch} (100%) rename patches/server/{0900-Don-t-fire-sync-events-during-worldgen.patch => 0899-Don-t-fire-sync-events-during-worldgen.patch} (95%) rename patches/server/{0901-Add-Structure-check-API.patch => 0900-Add-Structure-check-API.patch} (100%) rename patches/server/{0902-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch => 0901-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch} (100%) rename patches/server/{0903-Restore-vanilla-entity-drops-behavior.patch => 0902-Restore-vanilla-entity-drops-behavior.patch} (99%) rename patches/server/{0904-Dont-resend-blocks-on-interactions.patch => 0903-Dont-resend-blocks-on-interactions.patch} (100%) rename patches/server/{0905-add-more-scoreboard-API.patch => 0904-add-more-scoreboard-API.patch} (100%) rename patches/server/{0906-Improve-Registry.patch => 0905-Improve-Registry.patch} (100%) rename patches/server/{0907-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch => 0906-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch} (96%) rename patches/server/{0908-Add-experience-points-API.patch => 0907-Add-experience-points-API.patch} (100%) rename patches/server/{0909-Add-drops-to-shear-events.patch => 0908-Add-drops-to-shear-events.patch} (100%) rename patches/server/{0910-Add-PlayerShieldDisableEvent.patch => 0909-Add-PlayerShieldDisableEvent.patch} (100%) rename patches/server/{0911-Validate-ResourceLocation-in-NBT-reading.patch => 0910-Validate-ResourceLocation-in-NBT-reading.patch} (97%) rename patches/server/{0912-Properly-handle-experience-dropping-on-block-break.patch => 0911-Properly-handle-experience-dropping-on-block-break.patch} (94%) rename patches/server/{0913-Fixup-NamespacedKey-handling.patch => 0912-Fixup-NamespacedKey-handling.patch} (100%) rename patches/server/{0914-Expose-LootTable-of-DecoratedPot.patch => 0913-Expose-LootTable-of-DecoratedPot.patch} (100%) rename patches/server/{0915-Reduce-allocation-of-Vec3D-by-entity-tracker.patch => 0914-Reduce-allocation-of-Vec3D-by-entity-tracker.patch} (95%) rename patches/server/{0916-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch => 0915-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch} (100%) rename patches/server/{0917-Add-ShulkerDuplicateEvent.patch => 0916-Add-ShulkerDuplicateEvent.patch} (100%) rename patches/server/{0918-Add-api-for-spawn-egg-texture-colors.patch => 0917-Add-api-for-spawn-egg-texture-colors.patch} (82%) rename patches/server/{0919-Add-Lifecycle-Event-system.patch => 0918-Add-Lifecycle-Event-system.patch} (99%) rename patches/server/{0920-ItemStack-Tooltip-API.patch => 0919-ItemStack-Tooltip-API.patch} (78%) rename patches/server/{0921-Add-getChunkSnapshot-includeLightData-parameter.patch => 0920-Add-getChunkSnapshot-includeLightData-parameter.patch} (100%) rename patches/server/{0922-Add-FluidState-API.patch => 0921-Add-FluidState-API.patch} (100%) rename patches/server/{0923-add-number-format-api.patch => 0922-add-number-format-api.patch} (100%) rename patches/server/{0924-improve-BanList-types.patch => 0923-improve-BanList-types.patch} (89%) rename patches/server/{0925-Expanded-Hopper-API.patch => 0924-Expanded-Hopper-API.patch} (100%) rename patches/server/{0926-Add-BlockBreakProgressUpdateEvent.patch => 0925-Add-BlockBreakProgressUpdateEvent.patch} (90%) rename patches/server/{0927-Deprecate-ItemStack-setType.patch => 0926-Deprecate-ItemStack-setType.patch} (100%) rename patches/server/{0928-Add-CartographyItemEvent.patch => 0927-Add-CartographyItemEvent.patch} (94%) rename patches/server/{0929-More-Raid-API.patch => 0928-More-Raid-API.patch} (100%) rename patches/server/{0930-Add-onboarding-message-for-initial-server-start.patch => 0929-Add-onboarding-message-for-initial-server-start.patch} (94%) rename patches/server/{0931-Configurable-max-block-fluid-ticks.patch => 0930-Configurable-max-block-fluid-ticks.patch} (83%) rename patches/server/{0932-Fix-bees-aging-inside-hives.patch => 0931-Fix-bees-aging-inside-hives.patch} (100%) rename patches/server/{0933-Disable-memory-reserve-allocating.patch => 0932-Disable-memory-reserve-allocating.patch} (100%) rename patches/server/{0934-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch => 0933-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch} (100%) rename patches/server/{0935-Fix-DamageSource-API.patch => 0934-Fix-DamageSource-API.patch} (100%) rename patches/server/{0936-Fix-creation-of-invalid-block-entity-during-world-ge.patch => 0935-Fix-creation-of-invalid-block-entity-during-world-ge.patch} (96%) rename patches/server/{0937-Fix-possible-StackOverflowError-for-some-dispenses.patch => 0936-Fix-possible-StackOverflowError-for-some-dispenses.patch} (100%) rename patches/server/{0938-Improve-tag-parser-handling.patch => 0937-Improve-tag-parser-handling.patch} (99%) rename patches/server/{0939-Item-Mutation-Fixes.patch => 0938-Item-Mutation-Fixes.patch} (100%) rename patches/server/{0940-Per-world-ticks-per-spawn-settings.patch => 0939-Per-world-ticks-per-spawn-settings.patch} (87%) rename patches/server/{0941-Properly-track-the-changed-item-from-dispense-events.patch => 0940-Properly-track-the-changed-item-from-dispense-events.patch} (100%) rename patches/server/{0942-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch => 0941-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch} (94%) rename patches/server/{0943-Add-config-for-mobs-immune-to-default-effects.patch => 0942-Add-config-for-mobs-immune-to-default-effects.patch} (100%) rename patches/server/{0944-Deep-clone-nbt-tags-in-PDC.patch => 0943-Deep-clone-nbt-tags-in-PDC.patch} (100%) rename patches/server/{0945-Support-old-UUID-format-for-NBT.patch => 0944-Support-old-UUID-format-for-NBT.patch} (100%) rename patches/server/{0946-Fix-shield-disable-inconsistency.patch => 0945-Fix-shield-disable-inconsistency.patch} (87%) rename patches/server/{0947-Handle-Large-Packets-disconnecting-client.patch => 0946-Handle-Large-Packets-disconnecting-client.patch} (100%) rename patches/server/{0948-Fix-ItemFlags.patch => 0947-Fix-ItemFlags.patch} (100%) rename patches/server/{0949-Fix-helmet-damage-reduction-inconsistencies.patch => 0948-Fix-helmet-damage-reduction-inconsistencies.patch} (100%) rename patches/server/{0950-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch => 0949-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch} (88%) rename patches/server/{0951-improve-checking-handled-tags-in-itemmeta.patch => 0950-improve-checking-handled-tags-in-itemmeta.patch} (100%) rename patches/server/{0952-Expose-hasColor-to-leather-armor.patch => 0951-Expose-hasColor-to-leather-armor.patch} (100%) rename patches/server/{0953-Added-API-to-get-player-ha-proxy-address.patch => 0952-Added-API-to-get-player-ha-proxy-address.patch} (100%) rename patches/server/{0954-General-ItemMeta-fixes.patch => 0953-General-ItemMeta-fixes.patch} (99%) rename patches/server/{0955-More-Chest-Block-API.patch => 0954-More-Chest-Block-API.patch} (100%) rename patches/server/{0956-Print-data-component-type-on-encoding-error.patch => 0955-Print-data-component-type-on-encoding-error.patch} (100%) rename patches/server/{0957-Brigadier-based-command-API.patch => 0956-Brigadier-based-command-API.patch} (98%) rename patches/server/{0958-Fix-issues-with-Recipe-API.patch => 0957-Fix-issues-with-Recipe-API.patch} (100%) rename patches/server/{0959-Fix-equipment-slot-and-group-API.patch => 0958-Fix-equipment-slot-and-group-API.patch} (100%) rename patches/server/{0960-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch => 0959-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch} (100%) rename patches/server/{0961-Prevent-sending-oversized-item-data-in-equipment-and.patch => 0960-Prevent-sending-oversized-item-data-in-equipment-and.patch} (98%) rename patches/server/{0962-Prevent-NPE-if-hooked-entity-was-cleared.patch => 0961-Prevent-NPE-if-hooked-entity-was-cleared.patch} (100%) rename patches/server/{0963-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch => 0962-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch} (94%) rename patches/server/{0964-Add-missing-fishing-event-state.patch => 0963-Add-missing-fishing-event-state.patch} (100%) rename patches/server/{0965-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch => 0964-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch} (100%) rename patches/server/{0966-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch => 0965-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch} (100%) rename patches/server/{0967-Adopt-MaterialRerouting.patch => 0966-Adopt-MaterialRerouting.patch} (100%) rename patches/server/{0968-Suspicious-Effect-Entry-API.patch => 0967-Suspicious-Effect-Entry-API.patch} (100%) rename patches/server/{0969-check-if-itemstack-is-stackable-first.patch => 0968-check-if-itemstack-is-stackable-first.patch} (100%) rename patches/server/{0970-Fix-removing-recipes-from-RecipeIterator.patch => 0969-Fix-removing-recipes-from-RecipeIterator.patch} (100%) rename patches/server/{0971-Configurable-damage-tick-when-blocking-with-shield.patch => 0970-Configurable-damage-tick-when-blocking-with-shield.patch} (88%) rename patches/server/{0972-Properly-remove-the-experimental-smithing-inventory-.patch => 0971-Properly-remove-the-experimental-smithing-inventory-.patch} (100%) rename patches/server/{0973-disable-forced-empty-world-ticks.patch => 0972-disable-forced-empty-world-ticks.patch} (87%) rename patches/server/{0974-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch => 0973-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch} (96%) rename patches/server/{0975-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch => 0974-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch} (97%) rename patches/server/{0976-Optimize-Network-Manager-and-add-advanced-packet-sup.patch => 0975-Optimize-Network-Manager-and-add-advanced-packet-sup.patch} (100%) rename patches/server/{0977-Allow-Saving-of-Oversized-Chunks.patch => 0976-Allow-Saving-of-Oversized-Chunks.patch} (100%) rename patches/server/{0978-Flat-bedrock-generator-settings.patch => 0977-Flat-bedrock-generator-settings.patch} (100%) rename patches/server/{0979-Entity-Activation-Range-2.0.patch => 0978-Entity-Activation-Range-2.0.patch} (93%) rename patches/server/{0980-Anti-Xray.patch => 0979-Anti-Xray.patch} (98%) rename patches/server/{0981-Use-Velocity-compression-and-cipher-natives.patch => 0980-Use-Velocity-compression-and-cipher-natives.patch} (100%) rename patches/server/{0982-Optimize-Collision-to-not-load-chunks.patch => 0981-Optimize-Collision-to-not-load-chunks.patch} (97%) rename patches/server/{0983-Optimize-GoalSelector-Goal.Flag-Set-operations.patch => 0982-Optimize-GoalSelector-Goal.Flag-Set-operations.patch} (100%) rename patches/server/{0984-Optimize-Hoppers.patch => 0983-Optimize-Hoppers.patch} (98%) rename patches/server/{0985-Optimize-Voxel-Shape-Merging.patch => 0984-Optimize-Voxel-Shape-Merging.patch} (100%) rename patches/server/{0986-Optimize-Bit-Operations-by-inlining.patch => 0985-Optimize-Bit-Operations-by-inlining.patch} (100%) rename patches/server/{0987-Remove-streams-from-hot-code.patch => 0986-Remove-streams-from-hot-code.patch} (100%) rename patches/server/{0988-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch => 0987-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch} (100%) rename patches/server/{0989-Fix-entity-type-tags-suggestions-in-selectors.patch => 0988-Fix-entity-type-tags-suggestions-in-selectors.patch} (100%) rename patches/server/{0990-Handle-Oversized-block-entities-in-chunks.patch => 0989-Handle-Oversized-block-entities-in-chunks.patch} (100%) rename patches/server/{0991-Check-distance-in-entity-interactions.patch => 0990-Check-distance-in-entity-interactions.patch} (93%) rename patches/server/{0992-Configurable-Sand-Duping.patch => 0991-Configurable-Sand-Duping.patch} (100%) rename patches/server/{0993-Properly-resend-entities.patch => 0992-Properly-resend-entities.patch} (97%) rename patches/server/{0994-Registry-Modification-API.patch => 0993-Registry-Modification-API.patch} (99%) rename patches/server/{0995-Add-registry-entry-and-builders.patch => 0994-Add-registry-entry-and-builders.patch} (100%) rename patches/server/{0996-Proxy-ItemStack-to-CraftItemStack.patch => 0995-Proxy-ItemStack-to-CraftItemStack.patch} (98%) rename patches/server/{0997-Make-a-PDC-view-accessible-directly-from-ItemStack.patch => 0996-Make-a-PDC-view-accessible-directly-from-ItemStack.patch} (100%) rename patches/server/{0998-Prioritize-Minecraft-commands-in-function-parsing-an.patch => 0997-Prioritize-Minecraft-commands-in-function-parsing-an.patch} (100%) rename patches/server/{0999-optimize-dirt-and-snow-spreading.patch => 0998-optimize-dirt-and-snow-spreading.patch} (100%) rename patches/server/{1000-Fix-NPE-for-Jukebox-setRecord.patch => 0999-Fix-NPE-for-Jukebox-setRecord.patch} (100%) rename patches/server/{1001-fix-horse-inventories.patch => 1000-fix-horse-inventories.patch} (100%) rename patches/server/{1002-Only-call-EntityDamageEvents-before-actuallyHurt.patch => 1001-Only-call-EntityDamageEvents-before-actuallyHurt.patch} (91%) rename patches/server/{1003-Add-ItemType-getItemRarity.patch => 1002-Add-ItemType-getItemRarity.patch} (100%) rename patches/server/{1004-Add-plugin-info-at-startup.patch => 1003-Add-plugin-info-at-startup.patch} (100%) rename patches/server/{1005-Make-interaction-leniency-distance-configurable.patch => 1004-Make-interaction-leniency-distance-configurable.patch} (100%) rename patches/server/{1006-Fix-PickupStatus-getting-reset.patch => 1005-Fix-PickupStatus-getting-reset.patch} (100%) rename patches/server/{1007-Check-for-block-type-in-SculkSensorBlock-canActivate.patch => 1006-Check-for-block-type-in-SculkSensorBlock-canActivate.patch} (100%) rename patches/server/{1008-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch => 1007-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch} (100%) rename patches/server/{1009-Configuration-for-horizontal-only-item-merging.patch => 1008-Configuration-for-horizontal-only-item-merging.patch} (100%) rename patches/server/{1010-Add-skipping-world-symlink-scan.patch => 1009-Add-skipping-world-symlink-scan.patch} (100%) rename patches/server/{1011-Add-even-more-Enchantment-API.patch => 1010-Add-even-more-Enchantment-API.patch} (100%) rename patches/server/{1012-Leashable-API.patch => 1011-Leashable-API.patch} (100%) rename patches/server/{1013-Fix-CraftBukkit-drag-system.patch => 1012-Fix-CraftBukkit-drag-system.patch} (100%) rename patches/server/{1014-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch => 1013-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch} (100%) rename patches/server/{1015-Remove-set-damage-lootable-item-function-from-compas.patch => 1014-Remove-set-damage-lootable-item-function-from-compas.patch} (100%) rename patches/server/{1016-Add-enchantment-seed-update-API.patch => 1015-Add-enchantment-seed-update-API.patch} (100%) rename patches/server/{1017-Fix-synchronise-sending-chat-to-client-with-updating.patch => 1016-Fix-synchronise-sending-chat-to-client-with-updating.patch} (100%) rename patches/server/{1018-Fix-InventoryOpenEvent-cancellation.patch => 1017-Fix-InventoryOpenEvent-cancellation.patch} (100%) rename patches/server/{1019-Fire-BlockExpEvent-on-grindstone-use.patch => 1018-Fire-BlockExpEvent-on-grindstone-use.patch} (100%) rename patches/server/{1020-Check-dead-flag-in-isAlive.patch => 1019-Check-dead-flag-in-isAlive.patch} (90%) rename patches/server/{1021-Add-FeatureFlag-API.patch => 1020-Add-FeatureFlag-API.patch} (99%) rename patches/server/{1022-Tag-Lifecycle-Events.patch => 1021-Tag-Lifecycle-Events.patch} (99%) rename patches/server/{1023-Item-serialization-as-json.patch => 1022-Item-serialization-as-json.patch} (96%) rename patches/server/{1024-Validate-slot-in-PlayerInventory-setSlot.patch => 1023-Validate-slot-in-PlayerInventory-setSlot.patch} (100%) rename patches/server/{1025-Remove-wall-time-unused-skip-tick-protection.patch => 1024-Remove-wall-time-unused-skip-tick-protection.patch} (100%) rename patches/server/{1026-Disable-pretty-printing-for-advancement-saving.patch => 1025-Disable-pretty-printing-for-advancement-saving.patch} (100%) rename patches/server/{1027-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch => 1026-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch} (100%) rename patches/server/{1028-Add-enchantWithLevels-with-enchantment-registry-set.patch => 1027-Add-enchantWithLevels-with-enchantment-registry-set.patch} (100%) rename patches/server/{1029-Improve-entity-effect-API.patch => 1028-Improve-entity-effect-API.patch} (100%) rename patches/server/{1030-Add-recipeBrewTime.patch => 1029-Add-recipeBrewTime.patch} (100%) rename patches/server/{1031-Call-bucket-events-for-cauldrons.patch => 1030-Call-bucket-events-for-cauldrons.patch} (100%) rename patches/server/{1032-Add-PlayerInsertLecternBookEvent.patch => 1031-Add-PlayerInsertLecternBookEvent.patch} (100%) rename patches/server/{1033-Void-damage-configuration-API.patch => 1032-Void-damage-configuration-API.patch} (96%) rename patches/server/{1034-Add-Offline-PDC-API.patch => 1033-Add-Offline-PDC-API.patch} (100%) rename patches/server/{1035-Add-AnvilView-bypassEnchantmentLevelRestriction.patch => 1034-Add-AnvilView-bypassEnchantmentLevelRestriction.patch} (100%) rename patches/server/{1036-Add-proper-async-player-disconnections.patch => 1035-Add-proper-async-player-disconnections.patch} (100%) rename patches/server/{1037-Always-send-Banner-patterns-to-the-client.patch => 1036-Always-send-Banner-patterns-to-the-client.patch} (100%) rename patches/server/{1038-Rewrite-dataconverter-system.patch => 1037-Rewrite-dataconverter-system.patch} (99%) rename patches/server/{1039-Moonrise-optimisation-patches.patch => 1038-Moonrise-optimisation-patches.patch} (99%) rename patches/server/{1040-API-for-checking-sent-chunks.patch => 1039-API-for-checking-sent-chunks.patch} (100%) rename patches/server/{1041-Fix-CraftWorld-isChunkGenerated.patch => 1040-Fix-CraftWorld-isChunkGenerated.patch} (100%) rename patches/server/{1042-Add-startup-flag-to-disable-gamerule-limits.patch => 1041-Add-startup-flag-to-disable-gamerule-limits.patch} (100%) rename patches/server/{1043-Improved-Watchdog-Support.patch => 1042-Improved-Watchdog-Support.patch} (94%) rename patches/server/{1044-Detail-more-information-in-watchdog-dumps.patch => 1043-Detail-more-information-in-watchdog-dumps.patch} (95%) rename patches/server/{1045-Entity-load-save-limit-per-chunk.patch => 1044-Entity-load-save-limit-per-chunk.patch} (97%) rename patches/server/{1046-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch => 1045-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch} (100%) rename patches/server/{1047-Bundle-spark.patch => 1046-Bundle-spark.patch} (94%) rename patches/server/{1048-Improve-performance-of-mass-crafts.patch => 1047-Improve-performance-of-mass-crafts.patch} (100%) rename patches/server/{1049-Incremental-chunk-and-player-saving.patch => 1048-Incremental-chunk-and-player-saving.patch} (74%) rename patches/server/{1050-Optimise-general-POI-access.patch => 1049-Optimise-general-POI-access.patch} (100%) rename patches/server/{1051-Fix-entity-tracker-desync-when-new-players-are-added.patch => 1050-Fix-entity-tracker-desync-when-new-players-are-added.patch} (97%) rename patches/server/{1052-Lag-compensation-ticks.patch => 1051-Lag-compensation-ticks.patch} (89%) rename patches/server/{1053-Optimise-collision-checking-in-player-move-packet-ha.patch => 1052-Optimise-collision-checking-in-player-move-packet-ha.patch} (100%) rename patches/server/{1054-Optional-per-player-mob-spawns.patch => 1053-Optional-per-player-mob-spawns.patch} (93%) rename patches/server/{1055-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch => 1054-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch} (92%) 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 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}. *

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 <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> 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 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 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 computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines io.papermc.paper.registry.tag.@Nullable Tag getTag(io.papermc.paper.registry.tag.@NotNull TagKey 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 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 similarity index 96% rename from patches/server/0024-Further-improve-server-tick-loop.patch rename to 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 -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, 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 -+ * -+ * 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 tileEntityTypeSet = Sets.newHashSet(); -+ Set 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 v = (Iterable) 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 implements ServerInfo, ChunkIOErrorReporter, CommandSource { - -@@ -926,6 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { -- 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 { -+ 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 { - 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 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 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 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 list = Lists.newArrayList(); - List 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> 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 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 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 implements FeatureElement, EntityTypeT - } - - public EntityType(EntityType.EntityFactory factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, String translationKey, Optional> 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 factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, String translationKey, Optional> 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 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 void guardEntityTick(Consumer 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 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 biomeRegistry, ChunkPos chun - @Nullable - private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel world, List entities, List 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 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 entityTypeTimingMap = new HashMap(); -- public static final HashMap tileEntityTypeTimingMap = new HashMap(); -- public static final HashMap pluginTaskTimingMap = new HashMap(); -- -- /** -- * 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 cTask; -+ public final Runnable rTask; // Paper -+ public final Consumer 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 +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 implements ServerInfo, ChunkIOErrorReporter, CommandSource { + +@@ -1456,7 +1455,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { + 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> 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 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 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 void guardEntityTick(Consumer 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 biomeRegistry, ChunkPos chun + @Nullable + private static LevelChunk.PostLoadProcessor postLoadChunk(ServerLevel world, List entities, List 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 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 entityTypeTimingMap = new HashMap(); +- public static final HashMap tileEntityTypeTimingMap = new HashMap(); +- public static final HashMap pluginTaskTimingMap = new HashMap(); +- +- /** +- * 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 cTask; ++ public final Runnable rTask; ++ public final Consumer 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 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 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 Co-authored-by: SoSeDiK 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 { 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 playersByName = new java.util.HashMap<>(); @@ -54,7 +54,7 @@ index 2af4b853fde493c1fa5c8d530aae4d68b79f7ba0..04e25dba87cc1531898bdf9640d6da44 public PlayerList(MinecraftServer server, LayeredRegistryAccess 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 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 { this.stopRecordingMetrics(); -@@ -2625,9 +2627,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 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 Co-authored-by: Aikar 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, 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 capturedTileEntities = new HashMap<>(); public List captureDrops; public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap 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 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 implements FeatureElement, EntityTypeT +@@ -497,6 +497,16 @@ public class EntityType implements FeatureElement, EntityTypeT @Nullable public T spawn(ServerLevel worldserver, @Nullable Consumer 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() { @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 getActiveWorkers() { @@ -291,7 +291,7 @@ index 0e7f402a7b841c5f6f5a4b699b7bb3d9f46b1af6..fd5a058dd802599598a64467cf25f083 final ArrayList workers = new ArrayList(); 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 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 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 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 <90862990+EsotericEnderman@users.noreply.githu Co-authored-by: Bjarne Koll 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 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 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 { 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 implements FeatureElement, EntityTypeT +@@ -433,7 +433,7 @@ public class EntityType 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 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 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 <23108066+Owen1212055@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 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 Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 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 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 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 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 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 completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = dataPacks.stream(); // CraftBukkit - decompile error PackRepository resourcepackrepository = this.packRepository; -@@ -2229,6 +2235,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { 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 Registry getRegistry(Class 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 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 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 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 implements BehaviorContro +@@ -14,6 +14,9 @@ public abstract class Behavior 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, MemoryStatus> requiredMemoryState) { this(requiredMemoryState, 60); -@@ -27,6 +31,15 @@ public abstract class Behavior implements BehaviorContro +@@ -27,6 +30,14 @@ public abstract class Behavior 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 implements BehaviorContro +@@ -36,6 +47,12 @@ public abstract class Behavior 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 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 { +@@ -29,8 +29,19 @@ public abstract class Sensor { .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 { +@@ -41,8 +52,10 @@ public abstract class Sensor { 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 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 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 similarity index 87% rename from patches/server/0602-Oprimise-map-impl-for-tracked-players.patch rename to 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 -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, 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 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 similarity index 100% rename from patches/server/0603-Add-missing-InventoryType.patch rename to 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 similarity index 100% rename from patches/server/0604-Optimise-BlockSoil-nearby-water-lookup.patch rename to 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 similarity index 90% rename from patches/server/0605-Fix-merchant-inventory-not-closing-on-entity-removal.patch rename to 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 similarity index 100% rename from patches/server/0606-Check-requirement-before-suggesting-root-nodes.patch rename to 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 similarity index 92% rename from patches/server/0607-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch rename to 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 similarity index 100% rename from patches/server/0608-Add-packet-limiter-config.patch rename to 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 similarity index 100% rename from patches/server/0609-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch rename to 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 similarity index 100% rename from patches/server/0610-Ensure-valid-vehicle-status.patch rename to 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 similarity index 100% rename from patches/server/0611-Prevent-softlocked-end-exit-portal-generation.patch rename to 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 similarity index 100% rename from patches/server/0612-Fix-CocaoDecorator-causing-a-crash-when-trying-to-ge.patch rename to 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 similarity index 100% rename from patches/server/0613-Don-t-log-debug-logging-being-disabled.patch rename to 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 similarity index 100% rename from patches/server/0614-fix-various-menus-with-empty-level-accesses.patch rename to 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 similarity index 100% rename from patches/server/0615-Preserve-overstacked-loot.patch rename to 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 similarity index 100% rename from patches/server/0616-Update-head-rotation-in-missing-places.patch rename to 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 similarity index 100% rename from patches/server/0617-prevent-unintended-light-block-manipulation.patch rename to 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 similarity index 100% rename from patches/server/0618-Fix-CraftCriteria-defaults-map.patch rename to 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 similarity index 99% rename from patches/server/0619-Fix-upstreams-block-state-factories.patch rename to 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 similarity index 62% rename from patches/server/0620-Configurable-feature-seeds.patch rename to 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 <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> -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 similarity index 95% rename from patches/server/0621-Add-root-admin-user-detection.patch rename to 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 similarity index 100% rename from patches/server/0622-don-t-attempt-to-teleport-dead-entities.patch rename to 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 similarity index 92% rename from patches/server/0623-Prevent-excessive-velocity-through-repeated-crits.patch rename to 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 similarity index 100% rename from patches/server/0624-Remove-client-side-code-using-deprecated-for-removal.patch rename to 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 similarity index 100% rename from patches/server/0625-Fix-Spigot-growth-modifiers.patch rename to 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 similarity index 100% rename from patches/server/0626-Prevent-ContainerOpenersCounter-openCount-from-going.patch rename to 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 similarity index 100% rename from patches/server/0627-Add-PlayerItemFrameChangeEvent.patch rename to patches/server/0626-Add-PlayerItemFrameChangeEvent.patch diff --git a/patches/server/0628-Optimize-HashMapPalette.patch b/patches/server/0627-Optimize-HashMapPalette.patch similarity index 100% rename from patches/server/0628-Optimize-HashMapPalette.patch rename to 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 similarity index 100% rename from patches/server/0629-Fix-ChunkSnapshot-isSectionEmpty-int-and-optimize-Pa.patch rename to 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 similarity index 100% rename from patches/server/0630-Add-more-Campfire-API.patch rename to 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 similarity index 100% rename from patches/server/0631-Only-write-chunk-data-to-disk-if-it-serializes-witho.patch rename to 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 similarity index 100% rename from patches/server/0632-Forward-CraftEntity-in-teleport-command.patch rename to 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 similarity index 100% rename from patches/server/0633-Improve-scoreboard-entries.patch rename to 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 similarity index 100% rename from patches/server/0634-Entity-powdered-snow-API.patch rename to 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 similarity index 100% rename from patches/server/0635-Add-API-for-item-entity-health.patch rename to 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 similarity index 100% rename from patches/server/0636-Configurable-max-block-light-for-monster-spawning.patch rename to 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 similarity index 100% rename from patches/server/0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch rename to 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 similarity index 100% rename from patches/server/0638-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch rename to 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 similarity index 100% rename from patches/server/0639-Bucketable-API.patch rename to patches/server/0638-Bucketable-API.patch diff --git a/patches/server/0640-Validate-usernames.patch b/patches/server/0639-Validate-usernames.patch similarity index 96% rename from patches/server/0640-Validate-usernames.patch rename to 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 similarity index 100% rename from patches/server/0641-Make-water-animal-spawn-height-configurable.patch rename to 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 similarity index 95% rename from patches/server/0642-Expose-vanilla-BiomeProvider-from-WorldInfo.patch rename to 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 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 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 similarity index 100% rename from patches/server/0643-Add-config-option-for-worlds-affected-by-time-cmd.patch rename to 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 similarity index 100% rename from patches/server/0644-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch rename to 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 similarity index 100% rename from patches/server/0645-Multiple-Entries-with-Scoreboards.patch rename to 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 similarity index 100% rename from patches/server/0646-Reset-placed-block-on-exception.patch rename to 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 similarity index 100% rename from patches/server/0647-Add-configurable-height-for-slime-spawn.patch rename to 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 similarity index 100% rename from patches/server/0648-Fix-xp-reward-for-baby-zombies.patch rename to 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 similarity index 100% rename from patches/server/0649-Multi-Block-Change-API-Implementation.patch rename to 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 similarity index 100% rename from patches/server/0650-Fix-NotePlayEvent.patch rename to 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 similarity index 96% rename from patches/server/0651-Freeze-Tick-Lock-API.patch rename to 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 similarity index 100% rename from patches/server/0652-More-PotionEffectType-API.patch rename to 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 similarity index 100% rename from patches/server/0653-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to 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 similarity index 97% rename from patches/server/0654-API-for-creating-command-sender-which-forwards-feedb.patch rename to 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 similarity index 100% rename from patches/server/0655-Add-missing-structure-set-seed-configs.patch rename to 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 similarity index 100% rename from patches/server/0656-Fix-cancelled-powdered-snow-bucket-placement.patch rename to 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 similarity index 86% rename from patches/server/0657-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to 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 similarity index 95% rename from patches/server/0658-Add-GameEvent-tags.patch rename to 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) 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 damageTags = CraftRegistry.getMinecraftRegistry(Registries.DAMAGE_TYPE); return damageTags.getTags().map(pair -> (org.bukkit.Tag) 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 similarity index 87% rename from patches/server/0659-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to 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 S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); -@@ -1659,7 +1660,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - BlockPhysicsEvent -@@ -1725,6 +1728,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop(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 similarity index 100% rename from patches/server/0704-Dont-resent-entity-on-art-update.patch rename to 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 similarity index 100% rename from patches/server/0705-Add-WardenAngerChangeEvent.patch rename to 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 similarity index 100% rename from patches/server/0706-Add-option-for-strict-advancement-dimension-checks.patch rename to 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 similarity index 100% rename from patches/server/0707-Add-missing-important-BlockStateListPopulator-method.patch rename to 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 similarity index 100% rename from patches/server/0708-Nameable-Banner-API.patch rename to 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 similarity index 92% rename from patches/server/0709-Don-t-broadcast-messages-to-command-blocks.patch rename to 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 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 similarity index 89% rename from patches/server/0710-Prevent-empty-items-from-being-added-to-world.patch rename to 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 similarity index 100% rename from patches/server/0711-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch rename to 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 similarity index 100% rename from patches/server/0712-Add-Player-getFishHook.patch rename to 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 similarity index 100% rename from patches/server/0713-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch rename to 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 similarity index 100% rename from patches/server/0714-Add-various-missing-EntityDropItemEvent-calls.patch rename to 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 similarity index 100% rename from patches/server/0715-Fix-Bee-flower-NPE.patch rename to 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 similarity index 99% rename from patches/server/0716-More-Teleport-API.patch rename to 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 similarity index 100% rename from patches/server/0717-Add-EntityPortalReadyEvent.patch rename to 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 similarity index 100% rename from patches/server/0718-Don-t-use-level-random-in-entity-constructors.patch rename to 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 similarity index 98% rename from patches/server/0719-Send-block-entities-after-destroy-prediction.patch rename to 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 similarity index 97% rename from patches/server/0720-Warn-on-plugins-accessing-faraway-chunks.patch rename to 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 similarity index 100% rename from patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch rename to 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 similarity index 100% rename from patches/server/0722-Add-and-fix-missing-BlockFadeEvents.patch rename to 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 similarity index 100% rename from patches/server/0723-Collision-API.patch rename to 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 similarity index 100% rename from patches/server/0724-Fix-suggest-command-message-for-brigadier-syntax-exc.patch rename to 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 similarity index 100% rename from patches/server/0725-Block-Ticking-API.patch rename to 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 similarity index 97% rename from patches/server/0726-Add-Velocity-IP-Forwarding-Support.patch rename to 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 similarity index 76% rename from patches/server/0727-Add-NamespacedKey-biome-methods.patch rename to 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 <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> 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) 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 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 similarity index 94% rename from patches/server/0728-Fix-plugin-loggers-on-server-shutdown.patch rename to 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 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 similarity index 100% rename from patches/server/0730-Fire-EntityChangeBlockEvent-in-more-places.patch rename to 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 similarity index 100% rename from patches/server/0731-Missing-eating-regain-reason.patch rename to 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 similarity index 100% rename from patches/server/0732-Missing-effect-cause.patch rename to 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 similarity index 100% rename from patches/server/0733-Added-byte-array-serialization-deserialization-for-P.patch rename to 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 similarity index 100% rename from patches/server/0734-Call-BlockPhysicsEvent-more-often.patch rename to 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 similarity index 94% rename from patches/server/0735-Configurable-chat-thread-limit.patch rename to 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 similarity index 100% rename from patches/server/0736-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch rename to 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 similarity index 100% rename from patches/server/0737-fix-Jigsaw-block-kicking-user.patch rename to 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 similarity index 100% rename from patches/server/0738-use-BlockFormEvent-for-mud-converting-into-clay.patch rename to 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 similarity index 100% rename from patches/server/0739-Add-getDrops-to-BlockState.patch rename to 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 similarity index 97% rename from patches/server/0740-Fix-a-bunch-of-vanilla-bugs.patch rename to 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 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 similarity index 88% rename from patches/server/0741-Remove-unnecessary-onTrackingStart-during-navigation.patch rename to 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 similarity index 100% rename from patches/server/0742-Fix-custom-piglin-loved-items.patch rename to 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 similarity index 100% rename from patches/server/0743-EntityPickupItemEvent-fixes.patch rename to 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 similarity index 100% rename from patches/server/0744-Correctly-handle-interactions-with-items-on-cooldown.patch rename to 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 similarity index 100% rename from patches/server/0745-Add-PlayerInventorySlotChangeEvent.patch rename to 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 similarity index 100% rename from patches/server/0746-Elder-Guardian-appearance-API.patch rename to 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 similarity index 100% rename from patches/server/0747-Add-entity-knockback-API.patch rename to 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 similarity index 100% rename from patches/server/0748-Detect-headless-JREs.patch rename to 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 similarity index 100% rename from patches/server/0749-fix-entity-vehicle-collision-event-not-called.patch rename to 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 similarity index 100% rename from patches/server/0750-Add-EntityToggleSitEvent.patch rename to 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 similarity index 100% rename from patches/server/0751-Add-fire-tick-delay-option.patch rename to 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 similarity index 100% rename from patches/server/0752-Add-Moving-Piston-API.patch rename to 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 similarity index 100% rename from patches/server/0753-Ignore-impossible-spawn-tick.patch rename to 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 similarity index 100% rename from patches/server/0754-Fix-EntityArgument-and-EntitySelectorParser-permissi.patch rename to 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 similarity index 100% rename from patches/server/0755-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch rename to 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 similarity index 100% rename from patches/server/0756-Add-PrePlayerAttackEntityEvent.patch rename to 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 similarity index 100% rename from patches/server/0757-ensure-reset-EnderDragon-boss-event-name.patch rename to 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 similarity index 100% rename from patches/server/0758-Add-Player-Warden-Warning-API.patch rename to 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 similarity index 100% rename from patches/server/0759-More-vanilla-friendly-methods-to-update-trades.patch rename to 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 similarity index 100% rename from patches/server/0760-Add-paper-dumplisteners-command.patch rename to 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 similarity index 93% rename from patches/server/0761-check-global-player-list-where-appropriate.patch rename to 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 similarity index 100% rename from patches/server/0762-Fix-async-entity-add-due-to-fungus-trees.patch rename to 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 similarity index 100% rename from patches/server/0763-ItemStack-damage-API.patch rename to patches/server/0762-ItemStack-damage-API.patch diff --git a/patches/server/0764-Friction-API.patch b/patches/server/0763-Friction-API.patch similarity index 95% rename from patches/server/0764-Friction-API.patch rename to 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 similarity index 100% rename from patches/server/0765-Ability-to-control-player-s-insomnia-and-phantoms.patch rename to 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 similarity index 95% rename from patches/server/0766-Fix-premature-player-kicks-on-shutdown.patch rename to 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 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 similarity index 100% rename from patches/server/0778-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch rename to 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 similarity index 100% rename from patches/server/0779-Flying-Fall-Damage.patch rename to 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 similarity index 100% rename from patches/server/0780-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch rename to 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 similarity index 89% rename from patches/server/0781-config-for-disabling-entity-tag-tags.patch rename to 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 implements FeatureElement, EntityTypeT +@@ -569,6 +569,16 @@ public class EntityType 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 similarity index 89% rename from patches/server/0782-Use-single-player-info-update-packet-on-join.patch rename to 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 similarity index 92% rename from patches/server/0783-Correctly-shrink-items-during-EntityResurrectEvent.patch rename to 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 similarity index 100% rename from patches/server/0784-Win-Screen-API.patch rename to 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 similarity index 100% rename from patches/server/0785-Remove-CraftItemStack-setAmount-null-assignment.patch rename to 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 similarity index 100% rename from patches/server/0786-Fix-force-opening-enchantment-tables.patch rename to 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 similarity index 100% rename from patches/server/0787-Add-Entity-Body-Yaw-API.patch rename to 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 similarity index 100% rename from patches/server/0788-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch rename to 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 similarity index 100% rename from patches/server/0789-Add-EntityFertilizeEggEvent.patch rename to 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 similarity index 100% rename from patches/server/0790-Fix-HumanEntity-drop-not-updating-the-client-inv.patch rename to 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 similarity index 100% rename from patches/server/0791-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to 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 similarity index 100% rename from patches/server/0792-Correctly-handle-ArmorStand-invisibility.patch rename to 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 similarity index 93% rename from patches/server/0793-Fix-advancement-triggers-for-entity-damage.patch rename to 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 similarity index 100% rename from patches/server/0794-Fix-text-display-error-on-spawn.patch rename to 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 similarity index 100% rename from patches/server/0795-Fix-inventories-returning-null-Locations.patch rename to 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 similarity index 100% rename from patches/server/0796-Add-Shearable-API.patch rename to 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 similarity index 100% rename from patches/server/0797-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to 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 similarity index 100% rename from patches/server/0798-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch rename to 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 similarity index 92% rename from patches/server/0799-Treat-sequence-violations-like-they-should-be.patch rename to 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 similarity index 96% rename from patches/server/0800-Prevent-causing-expired-keys-from-impacting-new-join.patch rename to 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 similarity index 86% rename from patches/server/0801-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch rename to 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 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 similarity index 100% rename from patches/server/0802-Use-array-for-gamerule-storage.patch rename to 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 similarity index 100% rename from patches/server/0803-Fix-a-couple-of-upstream-bed-issues.patch rename to 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 similarity index 100% rename from patches/server/0804-Fix-demo-flag-not-enabling-demo-mode.patch rename to 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 similarity index 100% rename from patches/server/0805-Add-Mob-Experience-reward-API.patch rename to 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 similarity index 100% rename from patches/server/0806-Break-redstone-on-top-of-trap-doors-early.patch rename to 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 similarity index 100% rename from patches/server/0807-Avoid-Lazy-Initialization-for-Enum-Fields.patch rename to 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 similarity index 100% rename from patches/server/0808-More-accurate-isInOpenWater-impl.patch rename to patches/server/0807-More-accurate-isInOpenWater-impl.patch diff --git a/patches/server/0809-Expand-PlayerItemMendEvent.patch b/patches/server/0808-Expand-PlayerItemMendEvent.patch similarity index 100% rename from patches/server/0809-Expand-PlayerItemMendEvent.patch rename to 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 similarity index 100% rename from patches/server/0810-Refresh-ProjectileSource-for-projectiles.patch rename to 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 similarity index 100% rename from patches/server/0811-Add-transient-modifier-API.patch rename to 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 similarity index 95% rename from patches/server/0812-Fix-block-place-logic.patch rename to 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 similarity index 100% rename from patches/server/0813-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch rename to 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 similarity index 100% rename from patches/server/0814-Call-BlockGrowEvent-for-missing-blocks.patch rename to 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 similarity index 94% rename from patches/server/0815-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch rename to 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 similarity index 100% rename from patches/server/0816-fix-MapLike-spam-for-missing-key-selector.patch rename to 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 similarity index 100% rename from patches/server/0817-Fix-sniffer-removeExploredLocation.patch rename to 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 similarity index 100% rename from patches/server/0818-Add-method-to-remove-all-active-potion-effects.patch rename to 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 similarity index 100% rename from patches/server/0819-Add-event-for-player-editing-sign.patch rename to 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 similarity index 100% rename from patches/server/0820-Only-tick-item-frames-if-players-can-see-it.patch rename to 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 similarity index 100% rename from patches/server/0821-Fix-cmd-permission-levels-for-command-blocks.patch rename to 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 similarity index 100% rename from patches/server/0822-Add-option-to-disable-block-updates.patch rename to 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 similarity index 100% rename from patches/server/0823-Call-missing-BlockDispenseEvent.patch rename to 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 similarity index 100% rename from patches/server/0824-Don-t-load-chunks-for-supporting-block-checks.patch rename to 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 similarity index 100% rename from patches/server/0825-Optimize-player-lookups-for-beacons.patch rename to 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 similarity index 100% rename from patches/server/0826-More-Sign-Block-API.patch rename to 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 similarity index 100% rename from patches/server/0827-fix-item-meta-for-tadpole-buckets.patch rename to 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 similarity index 100% rename from patches/server/0828-Fix-BanList-API.patch rename to 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 similarity index 100% rename from patches/server/0829-Determine-lava-and-water-fluid-explosion-resistance-.patch rename to 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 similarity index 100% rename from patches/server/0830-Fix-possible-NPE-on-painting-creation.patch rename to 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 similarity index 100% rename from patches/server/0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch rename to 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 similarity index 100% rename from patches/server/0832-ExperienceOrb-should-call-EntitySpawnEvent.patch rename to 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 similarity index 100% rename from patches/server/0833-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch rename to 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 similarity index 100% rename from patches/server/0834-Add-whitelist-events.patch rename to patches/server/0833-Add-whitelist-events.patch diff --git a/patches/server/0835-Implement-PlayerFailMoveEvent.patch b/patches/server/0834-Implement-PlayerFailMoveEvent.patch similarity index 98% rename from patches/server/0835-Implement-PlayerFailMoveEvent.patch rename to 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 similarity index 98% rename from patches/server/0836-Folia-scheduler-and-owned-region-API.patch rename to 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 { @@ -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 similarity index 100% rename from patches/server/0837-Only-erase-allay-memory-on-non-item-targets.patch rename to 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 similarity index 100% rename from patches/server/0838-Fix-rotation-when-spawning-display-entities.patch rename to 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 similarity index 97% rename from patches/server/0839-Only-capture-actual-tree-growth.patch rename to 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 similarity index 100% rename from patches/server/0840-Use-correct-source-for-mushroom-block-spread-event.patch rename to 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 similarity index 100% rename from patches/server/0841-Respect-randomizeData-on-more-entities-when-spawning.patch rename to 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 similarity index 87% rename from patches/server/0842-Use-correct-seed-on-api-world-load.patch rename to 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 similarity index 100% rename from patches/server/0843-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch rename to 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 similarity index 100% rename from patches/server/0844-Cache-map-ids-on-item-frames.patch rename to 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 similarity index 88% rename from patches/server/0845-API-for-updating-recipes-on-clients.patch rename to 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 similarity index 59% rename from patches/server/0846-Fix-custom-statistic-criteria-creation.patch rename to 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 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 similarity index 100% rename from patches/server/0847-Bandaid-fix-for-Effect.patch rename to 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 similarity index 100% rename from patches/server/0848-SculkCatalyst-bloom-API.patch rename to 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 similarity index 100% rename from patches/server/0849-API-for-an-entity-s-scoreboard-name.patch rename to 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 similarity index 92% rename from patches/server/0850-Deprecate-and-replace-methods-with-old-StructureType.patch rename to 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 similarity index 95% rename from patches/server/0851-Don-t-tab-complete-namespaced-commands-if-send-names.patch rename to 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 similarity index 98% rename from patches/server/0852-Properly-handle-BlockBreakEvent-isDropItems.patch rename to 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 similarity index 100% rename from patches/server/0853-Fire-entity-death-event-for-ender-dragon.patch rename to 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 similarity index 92% rename from patches/server/0854-Configurable-entity-tracking-range-by-Y-coordinate.patch rename to 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 similarity index 98% rename from patches/server/0855-Add-Listing-API-for-Player.patch rename to 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 similarity index 100% rename from patches/server/0856-Configurable-Region-Compression-Format.patch rename to 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 similarity index 100% rename from patches/server/0857-Add-BlockFace-to-BlockDamageEvent.patch rename to 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 similarity index 100% rename from patches/server/0858-Fix-NPE-on-Boat-getStatus.patch rename to 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 similarity index 100% rename from patches/server/0859-Expand-Pose-API.patch rename to 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 similarity index 100% rename from patches/server/0860-More-DragonBattle-API.patch rename to patches/server/0859-More-DragonBattle-API.patch diff --git a/patches/server/0861-Add-PlayerPickItemEvent.patch b/patches/server/0860-Add-PlayerPickItemEvent.patch similarity index 96% rename from patches/server/0861-Add-PlayerPickItemEvent.patch rename to 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 similarity index 100% rename from patches/server/0862-Allow-trident-custom-damage.patch rename to 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 similarity index 100% rename from patches/server/0863-Expose-hand-in-BlockCanBuildEvent.patch rename to 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 similarity index 100% rename from patches/server/0864-Optimize-nearest-structure-border-iteration.patch rename to 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 similarity index 100% rename from patches/server/0865-Implement-OfflinePlayer-isConnected.patch rename to 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 similarity index 98% rename from patches/server/0866-Fix-slot-desync.patch rename to 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 similarity index 100% rename from patches/server/0867-Add-titleOverride-to-InventoryOpenEvent.patch rename to 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 similarity index 100% rename from patches/server/0868-Configure-sniffer-egg-hatch-time.patch rename to 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 similarity index 100% rename from patches/server/0869-Do-crystal-portal-proximity-check-before-entity-look.patch rename to 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 similarity index 100% rename from patches/server/0870-Skip-POI-finding-if-stuck-in-vehicle.patch rename to 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 similarity index 94% rename from patches/server/0871-Add-slot-sanity-checks-in-container-clicks.patch rename to 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 similarity index 100% rename from patches/server/0872-Call-BlockRedstoneEvents-for-lecterns.patch rename to 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 similarity index 100% rename from patches/server/0873-Allow-proper-checking-of-empty-item-stacks.patch rename to 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 similarity index 100% rename from patches/server/0874-Fix-silent-equipment-change-for-mobs.patch rename to 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 similarity index 100% rename from patches/server/0875-Fix-spigot-s-Forced-Stats.patch rename to 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 similarity index 100% rename from patches/server/0876-Add-missing-InventoryHolders-to-inventories.patch rename to 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 similarity index 100% rename from patches/server/0877-Do-not-read-tile-entities-in-chunks-that-are-positio.patch rename to 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 similarity index 100% rename from patches/server/0878-Add-missing-logs-for-log-ips-config-option.patch rename to 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 similarity index 100% rename from patches/server/0879-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch rename to 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 similarity index 100% rename from patches/server/0880-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch rename to 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 similarity index 94% rename from patches/server/0881-Fix-team-sidebar-objectives-not-being-cleared.patch rename to 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 similarity index 93% rename from patches/server/0882-Fix-missing-map-initialize-event-call.patch rename to 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 similarity index 100% rename from patches/server/0883-Update-entity-data-when-attaching-firework-to-entity.patch rename to 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 similarity index 94% rename from patches/server/0884-Fix-UnsafeValues-loadAdvancement.patch rename to 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 similarity index 100% rename from patches/server/0885-Add-player-idle-duration-API.patch rename to 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 similarity index 85% rename from patches/server/0886-Don-t-check-if-we-can-see-non-visible-entities.patch rename to 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 similarity index 100% rename from patches/server/0887-Fix-NPE-in-SculkBloomEvent-world-access.patch rename to 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 similarity index 100% rename from patches/server/0888-Allow-null-itemstack-for-Player-sendEquipmentChange.patch rename to 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 similarity index 100% rename from patches/server/0889-Optimize-VarInts.patch rename to 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 similarity index 100% rename from patches/server/0890-Add-API-to-get-the-collision-shape-of-a-block-before.patch rename to 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 similarity index 100% rename from patches/server/0891-Add-predicate-for-blocks-when-raytracing.patch rename to 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 similarity index 88% rename from patches/server/0892-Broadcast-take-item-packets-with-collector-as-source.patch rename to 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 similarity index 100% rename from patches/server/0893-Expand-LingeringPotion-API.patch rename to 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 similarity index 100% rename from patches/server/0894-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch rename to 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 similarity index 100% rename from patches/server/0895-Add-hand-to-fish-event-for-all-player-interactions.patch rename to 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 similarity index 100% rename from patches/server/0896-Fix-several-issues-with-EntityBreedEvent.patch rename to 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 similarity index 100% rename from patches/server/0897-Add-UUID-attribute-modifier-API.patch rename to 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 similarity index 100% rename from patches/server/0898-Fix-missing-event-call-for-entity-teleport-API.patch rename to 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 similarity index 100% rename from patches/server/0899-Lazily-create-LootContext-for-criterions.patch rename to 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 similarity index 95% rename from patches/server/0900-Don-t-fire-sync-events-during-worldgen.patch rename to 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 implements FeatureElement, EntityTypeT +@@ -649,9 +649,15 @@ public class EntityType implements FeatureElement, EntityTypeT } public static Optional 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 similarity index 100% rename from patches/server/0901-Add-Structure-check-API.patch rename to 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 similarity index 100% rename from patches/server/0902-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch rename to 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 similarity index 99% rename from patches/server/0903-Restore-vanilla-entity-drops-behavior.patch rename to 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 similarity index 100% rename from patches/server/0904-Dont-resend-blocks-on-interactions.patch rename to 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 similarity index 100% rename from patches/server/0905-add-more-scoreboard-API.patch rename to patches/server/0904-add-more-scoreboard-API.patch diff --git a/patches/server/0906-Improve-Registry.patch b/patches/server/0905-Improve-Registry.patch similarity index 100% rename from patches/server/0906-Improve-Registry.patch rename to 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 similarity index 96% rename from patches/server/0907-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch rename to 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 similarity index 100% rename from patches/server/0908-Add-experience-points-API.patch rename to 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 similarity index 100% rename from patches/server/0909-Add-drops-to-shear-events.patch rename to 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 similarity index 100% rename from patches/server/0910-Add-PlayerShieldDisableEvent.patch rename to 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 similarity index 97% rename from patches/server/0911-Validate-ResourceLocation-in-NBT-reading.patch rename to 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 implements FeatureElement, EntityTypeT +@@ -680,7 +680,7 @@ public class EntityType implements FeatureElement, EntityTypeT } public static Optional> by(CompoundTag nbt) { @@ -85,10 +85,10 @@ index b7721ed97305d1cd6725935f965c2effc1bef5a1..5f880a8809f9c20bc8e8c0b2d48590ba if (nbt.contains("leash", 11)) { Either 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 similarity index 94% rename from patches/server/0912-Properly-handle-experience-dropping-on-block-break.patch rename to 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 similarity index 100% rename from patches/server/0913-Fixup-NamespacedKey-handling.patch rename to 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 similarity index 100% rename from patches/server/0914-Expose-LootTable-of-DecoratedPot.patch rename to 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 similarity index 95% rename from patches/server/0915-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to 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 similarity index 100% rename from patches/server/0916-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/0915-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch diff --git a/patches/server/0917-Add-ShulkerDuplicateEvent.patch b/patches/server/0916-Add-ShulkerDuplicateEvent.patch similarity index 100% rename from patches/server/0917-Add-ShulkerDuplicateEvent.patch rename to 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 similarity index 82% rename from patches/server/0918-Add-api-for-spawn-egg-texture-colors.patch rename to 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 similarity index 99% rename from patches/server/0919-Add-Lifecycle-Event-system.patch rename to 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 similarity index 78% rename from patches/server/0920-ItemStack-Tooltip-API.patch rename to 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 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 similarity index 100% rename from patches/server/0921-Add-getChunkSnapshot-includeLightData-parameter.patch rename to 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 similarity index 100% rename from patches/server/0922-Add-FluidState-API.patch rename to 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 similarity index 100% rename from patches/server/0923-add-number-format-api.patch rename to 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 similarity index 89% rename from patches/server/0924-improve-BanList-types.patch rename to 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 similarity index 100% rename from patches/server/0925-Expanded-Hopper-API.patch rename to patches/server/0924-Expanded-Hopper-API.patch diff --git a/patches/server/0926-Add-BlockBreakProgressUpdateEvent.patch b/patches/server/0925-Add-BlockBreakProgressUpdateEvent.patch similarity index 90% rename from patches/server/0926-Add-BlockBreakProgressUpdateEvent.patch rename to 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 similarity index 100% rename from patches/server/0927-Deprecate-ItemStack-setType.patch rename to patches/server/0926-Deprecate-ItemStack-setType.patch diff --git a/patches/server/0928-Add-CartographyItemEvent.patch b/patches/server/0927-Add-CartographyItemEvent.patch similarity index 94% rename from patches/server/0928-Add-CartographyItemEvent.patch rename to 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 similarity index 100% rename from patches/server/0929-More-Raid-API.patch rename to 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 similarity index 94% rename from patches/server/0930-Add-onboarding-message-for-initial-server-start.patch rename to 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): 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 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 similarity index 100% rename from patches/server/0941-Properly-track-the-changed-item-from-dispense-events.patch rename to 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 similarity index 94% rename from patches/server/0942-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch rename to 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 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 similarity index 100% rename from patches/server/0943-Add-config-for-mobs-immune-to-default-effects.patch rename to 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 similarity index 100% rename from patches/server/0944-Deep-clone-nbt-tags-in-PDC.patch rename to 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 similarity index 100% rename from patches/server/0945-Support-old-UUID-format-for-NBT.patch rename to 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 similarity index 87% rename from patches/server/0946-Fix-shield-disable-inconsistency.patch rename to 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 similarity index 100% rename from patches/server/0947-Handle-Large-Packets-disconnecting-client.patch rename to 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 similarity index 100% rename from patches/server/0948-Fix-ItemFlags.patch rename to 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 similarity index 100% rename from patches/server/0949-Fix-helmet-damage-reduction-inconsistencies.patch rename to 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 similarity index 88% rename from patches/server/0950-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch rename to 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 similarity index 100% rename from patches/server/0951-improve-checking-handled-tags-in-itemmeta.patch rename to 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 similarity index 100% rename from patches/server/0952-Expose-hasColor-to-leather-armor.patch rename to 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 similarity index 100% rename from patches/server/0953-Added-API-to-get-player-ha-proxy-address.patch rename to 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 similarity index 99% rename from patches/server/0954-General-ItemMeta-fixes.patch rename to 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 similarity index 100% rename from patches/server/0955-More-Chest-Block-API.patch rename to 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 similarity index 100% rename from patches/server/0956-Print-data-component-type-on-encoding-error.patch rename to 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 similarity index 98% rename from patches/server/0957-Brigadier-based-command-API.patch rename to 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 processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); 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 { @@ -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 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 similarity index 100% rename from patches/server/0958-Fix-issues-with-Recipe-API.patch rename to 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 similarity index 100% rename from patches/server/0959-Fix-equipment-slot-and-group-API.patch rename to 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 similarity index 100% rename from patches/server/0960-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch rename to 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 similarity index 98% rename from patches/server/0961-Prevent-sending-oversized-item-data-in-equipment-and.patch rename to 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 similarity index 100% rename from patches/server/0962-Prevent-NPE-if-hooked-entity-was-cleared.patch rename to 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 similarity index 94% rename from patches/server/0963-Fix-cancelling-BlockPlaceEvent-calling-onRemove.patch rename to 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 capturedTileEntities = new java.util.LinkedHashMap<>(); // Paper - Retain block place order when capturing blockstates public List 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 similarity index 100% rename from patches/server/0964-Add-missing-fishing-event-state.patch rename to 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 similarity index 100% rename from patches/server/0965-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch rename to 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 similarity index 100% rename from patches/server/0966-Fix-sending-disconnect-packet-in-phases-where-it-doe.patch rename to 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 similarity index 100% rename from patches/server/0967-Adopt-MaterialRerouting.patch rename to 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 similarity index 100% rename from patches/server/0968-Suspicious-Effect-Entry-API.patch rename to 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 similarity index 100% rename from patches/server/0969-check-if-itemstack-is-stackable-first.patch rename to 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 similarity index 100% rename from patches/server/0970-Fix-removing-recipes-from-RecipeIterator.patch rename to 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 similarity index 88% rename from patches/server/0971-Configurable-damage-tick-when-blocking-with-shield.patch rename to 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 similarity index 100% rename from patches/server/0972-Properly-remove-the-experimental-smithing-inventory-.patch rename to 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 similarity index 87% rename from patches/server/0973-disable-forced-empty-world-ticks.patch rename to 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 similarity index 96% rename from patches/server/0974-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch rename to 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 similarity index 97% rename from patches/server/0975-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch rename to 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 similarity index 100% rename from patches/server/0976-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to 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 similarity index 100% rename from patches/server/0977-Allow-Saving-of-Oversized-Chunks.patch rename to 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 similarity index 100% rename from patches/server/0978-Flat-bedrock-generator-settings.patch rename to 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 similarity index 93% rename from patches/server/0979-Entity-Activation-Range-2.0.patch rename to 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; +@@ -962,12 +962,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe - 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 + 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 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 similarity index 98% rename from patches/server/0980-Anti-Xray.patch rename to 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 resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List 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 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 similarity index 100% rename from patches/server/0981-Use-Velocity-compression-and-cipher-natives.patch rename to 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 similarity index 97% rename from patches/server/0982-Optimize-Collision-to-not-load-chunks.patch rename to 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 similarity index 100% rename from patches/server/0983-Optimize-GoalSelector-Goal.Flag-Set-operations.patch rename to 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 similarity index 98% rename from patches/server/0984-Optimize-Hoppers.patch rename to 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 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 similarity index 100% rename from patches/server/0985-Optimize-Voxel-Shape-Merging.patch rename to 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 similarity index 100% rename from patches/server/0986-Optimize-Bit-Operations-by-inlining.patch rename to 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 similarity index 100% rename from patches/server/0987-Remove-streams-from-hot-code.patch rename to 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 similarity index 100% rename from patches/server/0988-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to 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 similarity index 100% rename from patches/server/0989-Fix-entity-type-tags-suggestions-in-selectors.patch rename to 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 similarity index 100% rename from patches/server/0990-Handle-Oversized-block-entities-in-chunks.patch rename to 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 similarity index 93% rename from patches/server/0991-Check-distance-in-entity-interactions.patch rename to 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 similarity index 100% rename from patches/server/0992-Configurable-Sand-Duping.patch rename to 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 similarity index 97% rename from patches/server/0993-Properly-resend-entities.patch rename to 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 similarity index 99% rename from patches/server/0994-Registry-Modification-API.patch rename to 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 similarity index 100% rename from patches/server/0995-Add-registry-entry-and-builders.patch rename to 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 similarity index 98% rename from patches/server/0996-Proxy-ItemStack-to-CraftItemStack.patch rename to 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 similarity index 100% rename from patches/server/0997-Make-a-PDC-view-accessible-directly-from-ItemStack.patch rename to 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 similarity index 100% rename from patches/server/0998-Prioritize-Minecraft-commands-in-function-parsing-an.patch rename to 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 similarity index 100% rename from patches/server/0999-optimize-dirt-and-snow-spreading.patch rename to 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 similarity index 100% rename from patches/server/1000-Fix-NPE-for-Jukebox-setRecord.patch rename to 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 similarity index 100% rename from patches/server/1001-fix-horse-inventories.patch rename to 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 similarity index 91% rename from patches/server/1002-Only-call-EntityDamageEvents-before-actuallyHurt.patch rename to 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 similarity index 100% rename from patches/server/1003-Add-ItemType-getItemRarity.patch rename to 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 similarity index 100% rename from patches/server/1004-Add-plugin-info-at-startup.patch rename to 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 similarity index 100% rename from patches/server/1005-Make-interaction-leniency-distance-configurable.patch rename to 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 similarity index 100% rename from patches/server/1006-Fix-PickupStatus-getting-reset.patch rename to 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 similarity index 100% rename from patches/server/1007-Check-for-block-type-in-SculkSensorBlock-canActivate.patch rename to 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 similarity index 100% rename from patches/server/1008-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch rename to 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 similarity index 100% rename from patches/server/1009-Configuration-for-horizontal-only-item-merging.patch rename to 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 similarity index 100% rename from patches/server/1010-Add-skipping-world-symlink-scan.patch rename to 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 similarity index 100% rename from patches/server/1011-Add-even-more-Enchantment-API.patch rename to 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 similarity index 100% rename from patches/server/1012-Leashable-API.patch rename to 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 similarity index 100% rename from patches/server/1013-Fix-CraftBukkit-drag-system.patch rename to 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 similarity index 100% rename from patches/server/1014-Fix-SculkBloomEvent-firing-for-block-entity-loading.patch rename to 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 similarity index 100% rename from patches/server/1015-Remove-set-damage-lootable-item-function-from-compas.patch rename to 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 similarity index 100% rename from patches/server/1016-Add-enchantment-seed-update-API.patch rename to 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 similarity index 100% rename from patches/server/1017-Fix-synchronise-sending-chat-to-client-with-updating.patch rename to 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 similarity index 100% rename from patches/server/1018-Fix-InventoryOpenEvent-cancellation.patch rename to 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 similarity index 100% rename from patches/server/1019-Fire-BlockExpEvent-on-grindstone-use.patch rename to 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 similarity index 90% rename from patches/server/1020-Check-dead-flag-in-isAlive.patch rename to 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 similarity index 99% rename from patches/server/1021-Add-FeatureFlag-API.patch rename to 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 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 similarity index 99% rename from patches/server/1022-Tag-Lifecycle-Events.patch rename to 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 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 ReentrantBlockableEventLoopmap(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 similarity index 96% rename from patches/server/1023-Item-serialization-as-json.patch rename to 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 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 similarity index 100% rename from patches/server/1024-Validate-slot-in-PlayerInventory-setSlot.patch rename to 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 similarity index 100% rename from patches/server/1025-Remove-wall-time-unused-skip-tick-protection.patch rename to 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 similarity index 100% rename from patches/server/1026-Disable-pretty-printing-for-advancement-saving.patch rename to 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 similarity index 100% rename from patches/server/1027-Fix-PlayerCommandPreprocessEvent-on-signed-commands.patch rename to 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 similarity index 100% rename from patches/server/1028-Add-enchantWithLevels-with-enchantment-registry-set.patch rename to 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 similarity index 100% rename from patches/server/1029-Improve-entity-effect-API.patch rename to patches/server/1028-Improve-entity-effect-API.patch diff --git a/patches/server/1030-Add-recipeBrewTime.patch b/patches/server/1029-Add-recipeBrewTime.patch similarity index 100% rename from patches/server/1030-Add-recipeBrewTime.patch rename to 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 similarity index 100% rename from patches/server/1031-Call-bucket-events-for-cauldrons.patch rename to 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 similarity index 100% rename from patches/server/1032-Add-PlayerInsertLecternBookEvent.patch rename to 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 similarity index 96% rename from patches/server/1033-Void-damage-configuration-API.patch rename to 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 similarity index 100% rename from patches/server/1034-Add-Offline-PDC-API.patch rename to 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 similarity index 100% rename from patches/server/1035-Add-AnvilView-bypassEnchantmentLevelRestriction.patch rename to 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 similarity index 100% rename from patches/server/1036-Add-proper-async-player-disconnections.patch rename to 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 similarity index 100% rename from patches/server/1037-Always-send-Banner-patterns-to-the-client.patch rename to 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 similarity index 99% rename from patches/server/1038-Rewrite-dataconverter-system.patch rename to 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 similarity index 99% rename from patches/server/1039-Moonrise-optimisation-patches.patch rename to 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 implements ServerInfo, ChunkIOErrorReporter, CommandSource { +public abstract class MinecraftServer extends ReentrantBlockableEventLoop 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 S spin(Function serverFactory) { AtomicReference 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 { 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> UNLOADED_CHUNK_LIST_RESULT = ChunkResult.error("Unloaded chunks found in range"); private static final CompletableFuture>> 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 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>> getChunkRangeFuture(ChunkHolder centerChunk, int margin, IntFunction 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> 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 list = Lists.newArrayList(); List 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 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 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> 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 chunks) { @@ -26698,7 +26694,7 @@ index 350bfa9c891130b1aa2ab973e86668de187ee1e0..4b5985c284faac7b06c0f99d53065f50 } private void tickChunks(ProfilerFiller profiler, long timeDelta, List 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 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> 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 resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List 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 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 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> RESOURCE_KEY_CODEC = ResourceKey.codec(Registries.DIMENSION); public static final ResourceKey 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 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 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(); // 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 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 similarity index 100% rename from patches/server/1040-API-for-checking-sent-chunks.patch rename to 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 similarity index 100% rename from patches/server/1041-Fix-CraftWorld-isChunkGenerated.patch rename to 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 similarity index 100% rename from patches/server/1042-Add-startup-flag-to-disable-gamerule-limits.patch rename to 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 similarity index 94% rename from patches/server/1043-Improved-Watchdog-Support.patch rename to 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 processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); 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 S spin(Function serverFactory) { AtomicReference 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 implements FeatureElement, EntityTypeT +@@ -706,9 +706,20 @@ public class EntityType implements FeatureElement, EntityTypeT final Spliterator spliterator = entityNbtList.spliterator(); return StreamSupport.stream(new Spliterator() { 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 similarity index 100% rename from patches/server/1046-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch rename to 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 similarity index 94% rename from patches/server/1047-Bundle-spark.patch rename to 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 { // 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 similarity index 100% rename from patches/server/1050-Optimise-general-POI-access.patch rename to 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 similarity index 97% rename from patches/server/1051-Fix-entity-tracker-desync-when-new-players-are-added.patch rename to 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 similarity index 89% rename from patches/server/1052-Lag-compensation-ticks.patch rename to 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 S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); -@@ -1874,6 +1875,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 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 similarity index 100% rename from patches/server/1053-Optimise-collision-checking-in-player-move-packet-ha.patch rename to 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 similarity index 93% rename from patches/server/1054-Optional-per-player-mob-spawns.patch rename to 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 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 similarity index 92% rename from patches/server/1055-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch rename to 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);