From c7304035b6a3ca33196d88a5c46f746dbff178fe Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 27 Jul 2022 23:19:52 +0200 Subject: [PATCH] More more more more work --- ...47-Ensure-commands-are-not-ran-async.patch | 4 +- ...-allowed-colored-signs-to-be-created.patch | 4 +- ...ove-range-check-for-block-placing-up.patch | 4 +- ...x-and-optimise-world-force-upgrading.patch | 6 +- .../server/0649-Add-Mob-lookAt-API.patch | 0 .../0650-Add-Unix-domain-socket-support.patch | 14 +-- .../0651-Add-EntityInsideBlockEvent.patch | 0 ...652-Attributes-API-for-item-defaults.patch | 2 +- ...cause-to-Weather-ThunderChangeEvents.patch | 8 +- .../server/0654-More-Lidded-Block-API.patch | 0 ...655-Limit-item-frame-cursors-on-maps.patch | 0 .../0656-Add-PlayerKickEvent-causes.patch | 89 +++++++++---------- .../0657-Add-PufferFishStateChangeEvent.patch | 0 ...yerBucketEmptyEvent-result-itemstack.patch | 0 ...ttedContainer-instead-of-ThreadingDe.patch | 6 +- ...n-to-fix-items-merging-through-walls.patch | 4 +- .../0661-Add-BellRevealRaiderEvent.patch | 0 .../0662-Fix-invulnerable-end-crystals.patch | 0 ...663-Add-ElderGuardianAppearanceEvent.patch | 0 .../0664-Fix-dangerous-end-portal-logic.patch | 4 +- ...e-Biome-Mob-Lookups-for-Mob-Spawning.patch | 0 ...6-Make-item-validations-configurable.patch | 0 .../server/0667-Line-Of-Sight-Changes.patch | 4 +- .../0668-add-per-world-spawn-limits.patch | 0 ...SplashEvent-for-water-splash-potions.patch | 0 .../0670-Add-more-LimitedRegion-API.patch | 0 ...PlayerDropItemEvent-using-wrong-item.patch | 8 +- .../0672-Missing-Entity-Behavior-API.patch | 2 +- ...nect-for-book-edit-is-called-on-main.patch | 4 +- ...-of-Block-applyBoneMeal-always-being.patch | 0 ...etChunkIfLoadedImmediately-in-places.patch | 6 +- ...from-signs-not-firing-command-events.patch | 0 .../0677-Adds-PlayerArmSwingEvent.patch | 4 +- ...k-event-leave-message-not-being-sent.patch | 26 +++--- ...g-for-mobs-immune-to-default-effects.patch | 2 +- ...ncorrect-message-for-outdated-client.patch | 0 ...n-t-apply-cramming-damage-to-players.patch | 4 +- ...nd-timings-for-sensors-and-behaviors.patch | 0 ...a-bunch-of-missing-forceDrop-toggles.patch | 0 .../server/0684-Stinger-API.patch | 0 ...ncy-issue-with-empty-map-items-in-CB.patch | 0 .../0686-Add-System.out-err-catcher.patch | 0 .../0687-Fix-test-not-bootstrapping.patch | 0 ...s-to-contain-the-source-jars-in-stac.patch | 0 ...9-Improve-boat-collision-performance.patch | 6 +- ...-AFK-kick-while-watching-end-credits.patch | 4 +- ...riting-of-comments-to-server.propert.patch | 0 .../server/0692-Add-PlayerSetSpawnEvent.patch | 14 +-- ...ers-respect-inventory-max-stack-size.patch | 0 ...mize-entity-tracker-passenger-checks.patch | 0 ...g-option-for-Piglins-guarding-chests.patch | 0 .../0696-Added-EntityDamageItemEvent.patch | 2 +- ...ptimize-indirect-passenger-iteration.patch | 4 +- ...position-losing-precision-millions-o.patch | 2 +- ...tem-frame-map-cursor-update-interval.patch | 0 ...-Make-EntityUnleashEvent-cancellable.patch | 0 ...0701-Clear-bucket-NBT-after-dispense.patch | 0 ...target-without-changing-other-things.patch | 0 .../0703-Add-BlockBreakBlockEvent.patch | 2 +- ...prevent-NBT-copy-in-smithing-recipes.patch | 0 .../server/0705-More-CommandBlock-API.patch | 0 ...d-missing-team-sidebar-display-slots.patch | 0 .../0707-Add-back-EntityPortalExitEvent.patch | 6 +- ...o-find-targets-for-lightning-strikes.patch | 6 +- .../0709-Get-entity-default-attributes.patch | 2 +- .../server/0710-Left-handed-API.patch | 0 .../0711-Add-advancement-display-API.patch | 0 ...12-Add-ItemFactory-getMonsterEgg-API.patch | 0 .../server/0713-Add-critical-damage-API.patch | 8 +- .../0714-Fix-issues-with-mob-conversion.patch | 0 ...Collidable-methods-to-various-places.patch | 2 +- .../server/0716-Goat-ram-API.patch | 0 ...Add-API-for-resetting-a-single-score.patch | 0 ...18-Add-Raw-Byte-Entity-Serialization.patch | 6 +- ...719-Vanilla-command-permission-fixes.patch | 4 +- ...0-Make-CallbackExecutor-strict-again.patch | 4 +- ...-server-to-unload-chunks-at-request-.patch | 0 ...-logic-for-inventories-on-chunk-unlo.patch | 12 +-- ...le-recursion-for-chunkholder-updates.patch | 0 ...724-Fix-GameProfileCache-concurrency.patch | 2 +- ...chunks-refusing-to-unload-at-low-TPS.patch | 4 +- ...ket-level-changes-while-unloading-pl.patch | 10 +-- ...ket-level-changes-when-updating-chun.patch | 0 ...og-when-the-async-catcher-is-tripped.patch | 0 ...aper-mobcaps-and-paper-playermobcaps.patch | 0 ...alls-removing-tickets-for-sync-loads.patch | 0 ...itize-ResourceLocation-error-logging.patch | 0 ...trolled-flushing-for-network-manager.patch | 44 ++++----- .../0733-Optimise-general-POI-access.patch | 0 .../server/0734-Add-more-async-catchers.patch | 0 ...ite-entity-bounding-box-lookup-calls.patch | 12 +-- .../0736-Optimise-chunk-tick-iteration.patch | 4 +- .../0737-Execute-chunk-tasks-mid-tick.patch | 12 +-- .../0738-Do-not-copy-visible-chunks.patch | 26 +++--- ...culate-regionfile-header-if-it-is-co.patch | 0 ...lementation-for-blockstate-state-loo.patch | 0 ...l-more-information-in-watchdog-dumps.patch | 27 +++--- ...ally-inline-methods-in-BlockPosition.patch | 0 .../0743-Distance-manager-tick-timings.patch | 0 ...uler-threads-according-to-the-plugin.patch | 0 ...d-getChunkAt-has-inlined-logic-for-l.patch | 0 .../0746-Add-packet-limiter-config.patch | 6 +- ...lStem-registry-when-loading-default-.patch | 4 +- ...bour-chunk-data-off-disk-when-conver.patch | 0 ...ush-calls-for-entity-tracker-packets.patch | 0 ...t-lookup-fluid-state-when-raytracing.patch | 0 .../server/0751-Time-scoreboard-search.patch | 0 ...-packets-for-hard-colliding-entities.patch | 0 ...53-Do-not-run-raytrace-logic-for-AIR.patch | 0 ...primise-map-impl-for-tracked-players.patch | 6 +- ...timise-BlockSoil-nearby-water-lookup.patch | 0 ...dition-of-entities-to-entity-ticklis.patch | 0 .../0757-Optimise-random-block-ticking.patch | 10 +-- ...58-Optimise-non-flush-packet-sending.patch | 14 +-- .../0759-Optimise-nearby-player-lookups.patch | 18 ++-- .../0760-Optimise-WorldServer-notify.patch | 16 ++-- .../0761-Remove-streams-for-villager-AI.patch | 0 .../0762-Rewrite-dataconverter-system.patch | 0 ...ocity-compression-and-cipher-natives.patch | 14 +-- ...thread-worker-count-for-low-core-cou.patch | 4 +- ...ntity-loads-in-CraftChunk-getEntitie.patch | 0 ...difications-to-critical-entity-state.patch | 0 ...Fix-Bukkit-NamespacedKey-shenanigans.patch | 0 123 files changed, 257 insertions(+), 265 deletions(-) rename patches/{unapplied => }/server/0647-Move-range-check-for-block-placing-up.patch (84%) rename patches/{unapplied => }/server/0648-Fix-and-optimise-world-force-upgrading.patch (98%) rename patches/{unapplied => }/server/0649-Add-Mob-lookAt-API.patch (100%) rename patches/{unapplied => }/server/0650-Add-Unix-domain-socket-support.patch (94%) rename patches/{unapplied => }/server/0651-Add-EntityInsideBlockEvent.patch (100%) rename patches/{unapplied => }/server/0652-Attributes-API-for-item-defaults.patch (94%) rename patches/{unapplied => }/server/0653-Add-cause-to-Weather-ThunderChangeEvents.patch (95%) rename patches/{unapplied => }/server/0654-More-Lidded-Block-API.patch (100%) rename patches/{unapplied => }/server/0655-Limit-item-frame-cursors-on-maps.patch (100%) rename patches/{unapplied => }/server/0656-Add-PlayerKickEvent-causes.patch (85%) rename patches/{unapplied => }/server/0657-Add-PufferFishStateChangeEvent.patch (100%) rename patches/{unapplied => }/server/0658-Fix-PlayerBucketEmptyEvent-result-itemstack.patch (100%) rename patches/{unapplied => }/server/0659-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch (93%) rename patches/{unapplied => }/server/0660-Add-option-to-fix-items-merging-through-walls.patch (90%) rename patches/{unapplied => }/server/0661-Add-BellRevealRaiderEvent.patch (100%) rename patches/{unapplied => }/server/0662-Fix-invulnerable-end-crystals.patch (100%) rename patches/{unapplied => }/server/0663-Add-ElderGuardianAppearanceEvent.patch (100%) rename patches/{unapplied => }/server/0664-Fix-dangerous-end-portal-logic.patch (96%) rename patches/{unapplied => }/server/0665-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch (100%) rename patches/{unapplied => }/server/0666-Make-item-validations-configurable.patch (100%) rename patches/{unapplied => }/server/0667-Line-Of-Sight-Changes.patch (96%) rename patches/{unapplied => }/server/0668-add-per-world-spawn-limits.patch (100%) rename patches/{unapplied => }/server/0669-Fix-PotionSplashEvent-for-water-splash-potions.patch (100%) rename patches/{unapplied => }/server/0670-Add-more-LimitedRegion-API.patch (100%) rename patches/{unapplied => }/server/0671-Fix-PlayerDropItemEvent-using-wrong-item.patch (82%) rename patches/{unapplied => }/server/0672-Missing-Entity-Behavior-API.patch (99%) rename patches/{unapplied => }/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch (85%) rename patches/{unapplied => }/server/0674-Fix-return-value-of-Block-applyBoneMeal-always-being.patch (100%) rename patches/{unapplied => }/server/0675-Use-getChunkIfLoadedImmediately-in-places.patch (92%) rename patches/{unapplied => }/server/0676-Fix-commands-from-signs-not-firing-command-events.patch (100%) rename patches/{unapplied => }/server/0677-Adds-PlayerArmSwingEvent.patch (85%) rename patches/{unapplied => }/server/0678-Fixes-kick-event-leave-message-not-being-sent.patch (84%) rename patches/{unapplied => }/server/0679-Add-config-for-mobs-immune-to-default-effects.patch (97%) rename patches/{unapplied => }/server/0680-Fix-incorrect-message-for-outdated-client.patch (100%) rename patches/{unapplied => }/server/0681-Don-t-apply-cramming-damage-to-players.patch (89%) rename patches/{unapplied => }/server/0682-Rate-options-and-timings-for-sensors-and-behaviors.patch (100%) rename patches/{unapplied => }/server/0683-Add-a-bunch-of-missing-forceDrop-toggles.patch (100%) rename patches/{unapplied => }/server/0684-Stinger-API.patch (100%) rename patches/{unapplied => }/server/0685-Fix-incosistency-issue-with-empty-map-items-in-CB.patch (100%) rename patches/{unapplied => }/server/0686-Add-System.out-err-catcher.patch (100%) rename patches/{unapplied => }/server/0687-Fix-test-not-bootstrapping.patch (100%) rename patches/{unapplied => }/server/0688-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch (100%) rename patches/{unapplied => }/server/0689-Improve-boat-collision-performance.patch (94%) rename patches/{unapplied => }/server/0690-Prevent-AFK-kick-while-watching-end-credits.patch (87%) rename patches/{unapplied => }/server/0691-Allow-skipping-writing-of-comments-to-server.propert.patch (100%) rename patches/{unapplied => }/server/0692-Add-PlayerSetSpawnEvent.patch (94%) rename patches/{unapplied => }/server/0693-Make-hoppers-respect-inventory-max-stack-size.patch (100%) rename patches/{unapplied => }/server/0694-Optimize-entity-tracker-passenger-checks.patch (100%) rename patches/{unapplied => }/server/0695-Config-option-for-Piglins-guarding-chests.patch (100%) rename patches/{unapplied => }/server/0696-Added-EntityDamageItemEvent.patch (97%) rename patches/{unapplied => }/server/0697-Optimize-indirect-passenger-iteration.patch (93%) rename patches/{unapplied => }/server/0698-Fix-block-drops-position-losing-precision-millions-o.patch (96%) rename patches/{unapplied => }/server/0699-Configurable-item-frame-map-cursor-update-interval.patch (100%) rename patches/{unapplied => }/server/0700-Make-EntityUnleashEvent-cancellable.patch (100%) rename patches/{unapplied => }/server/0701-Clear-bucket-NBT-after-dispense.patch (100%) rename patches/{unapplied => }/server/0702-Change-EnderEye-target-without-changing-other-things.patch (100%) rename patches/{unapplied => }/server/0703-Add-BlockBreakBlockEvent.patch (98%) rename patches/{unapplied => }/server/0704-Option-to-prevent-NBT-copy-in-smithing-recipes.patch (100%) rename patches/{unapplied => }/server/0705-More-CommandBlock-API.patch (100%) rename patches/{unapplied => }/server/0706-Add-missing-team-sidebar-display-slots.patch (100%) rename patches/{unapplied => }/server/0707-Add-back-EntityPortalExitEvent.patch (93%) rename patches/{unapplied => }/server/0708-Add-methods-to-find-targets-for-lightning-strikes.patch (92%) rename patches/{unapplied => }/server/0709-Get-entity-default-attributes.patch (98%) rename patches/{unapplied => }/server/0710-Left-handed-API.patch (100%) rename patches/{unapplied => }/server/0711-Add-advancement-display-API.patch (100%) rename patches/{unapplied => }/server/0712-Add-ItemFactory-getMonsterEgg-API.patch (100%) rename patches/{unapplied => }/server/0713-Add-critical-damage-API.patch (96%) rename patches/{unapplied => }/server/0714-Fix-issues-with-mob-conversion.patch (100%) rename patches/{unapplied => }/server/0715-Add-isCollidable-methods-to-various-places.patch (96%) rename patches/{unapplied => }/server/0716-Goat-ram-API.patch (100%) rename patches/{unapplied => }/server/0717-Add-API-for-resetting-a-single-score.patch (100%) rename patches/{unapplied => }/server/0718-Add-Raw-Byte-Entity-Serialization.patch (94%) rename patches/{unapplied => }/server/0719-Vanilla-command-permission-fixes.patch (96%) rename patches/{unapplied => }/server/0720-Make-CallbackExecutor-strict-again.patch (93%) rename patches/{unapplied => }/server/0721-Do-not-allow-the-server-to-unload-chunks-at-request-.patch (100%) rename patches/{unapplied => }/server/0722-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch (88%) rename patches/{unapplied => }/server/0723-Correctly-handle-recursion-for-chunkholder-updates.patch (100%) rename patches/{unapplied => }/server/0724-Fix-GameProfileCache-concurrency.patch (98%) rename patches/{unapplied => }/server/0725-Fix-chunks-refusing-to-unload-at-low-TPS.patch (88%) rename patches/{unapplied => }/server/0726-Do-not-allow-ticket-level-changes-while-unloading-pl.patch (92%) rename patches/{unapplied => }/server/0727-Do-not-allow-ticket-level-changes-when-updating-chun.patch (100%) rename patches/{unapplied => }/server/0728-Log-when-the-async-catcher-is-tripped.patch (100%) rename patches/{unapplied => }/server/0729-Add-paper-mobcaps-and-paper-playermobcaps.patch (100%) rename patches/{unapplied => }/server/0730-Prevent-unload-calls-removing-tickets-for-sync-loads.patch (100%) rename patches/{unapplied => }/server/0731-Sanitize-ResourceLocation-error-logging.patch (100%) rename patches/{unapplied => }/server/0732-Allow-controlled-flushing-for-network-manager.patch (74%) rename patches/{unapplied => }/server/0733-Optimise-general-POI-access.patch (100%) rename patches/{unapplied => }/server/0734-Add-more-async-catchers.patch (100%) rename patches/{unapplied => }/server/0735-Rewrite-entity-bounding-box-lookup-calls.patch (99%) rename patches/{unapplied => }/server/0736-Optimise-chunk-tick-iteration.patch (98%) rename patches/{unapplied => }/server/0737-Execute-chunk-tasks-mid-tick.patch (94%) rename patches/{unapplied => }/server/0738-Do-not-copy-visible-chunks.patch (94%) rename patches/{unapplied => }/server/0739-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch (100%) rename patches/{unapplied => }/server/0740-Custom-table-implementation-for-blockstate-state-loo.patch (100%) rename patches/{unapplied => }/server/0741-Detail-more-information-in-watchdog-dumps.patch (93%) rename patches/{unapplied => }/server/0742-Manually-inline-methods-in-BlockPosition.patch (100%) rename patches/{unapplied => }/server/0743-Distance-manager-tick-timings.patch (100%) rename patches/{unapplied => }/server/0744-Name-craft-scheduler-threads-according-to-the-plugin.patch (100%) rename patches/{unapplied => }/server/0745-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch (100%) rename patches/{unapplied => }/server/0746-Add-packet-limiter-config.patch (95%) rename patches/{unapplied => }/server/0747-Use-correct-LevelStem-registry-when-loading-default-.patch (94%) rename patches/{unapplied => }/server/0748-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch (100%) rename patches/{unapplied => }/server/0749-Consolidate-flush-calls-for-entity-tracker-packets.patch (100%) rename patches/{unapplied => }/server/0750-Don-t-lookup-fluid-state-when-raytracing.patch (100%) rename patches/{unapplied => }/server/0751-Time-scoreboard-search.patch (100%) rename patches/{unapplied => }/server/0752-Send-full-pos-packets-for-hard-colliding-entities.patch (100%) rename patches/{unapplied => }/server/0753-Do-not-run-raytrace-logic-for-AIR.patch (100%) rename patches/{unapplied => }/server/0754-Oprimise-map-impl-for-tracked-players.patch (87%) rename patches/{unapplied => }/server/0755-Optimise-BlockSoil-nearby-water-lookup.patch (100%) rename patches/{unapplied => }/server/0756-Allow-removal-addition-of-entities-to-entity-ticklis.patch (100%) rename patches/{unapplied => }/server/0757-Optimise-random-block-ticking.patch (98%) rename patches/{unapplied => }/server/0758-Optimise-non-flush-packet-sending.patch (73%) rename patches/{unapplied => }/server/0759-Optimise-nearby-player-lookups.patch (97%) rename patches/{unapplied => }/server/0760-Optimise-WorldServer-notify.patch (96%) rename patches/{unapplied => }/server/0761-Remove-streams-for-villager-AI.patch (100%) rename patches/{unapplied => }/server/0762-Rewrite-dataconverter-system.patch (100%) rename patches/{unapplied => }/server/0763-Use-Velocity-compression-and-cipher-natives.patch (96%) rename patches/{unapplied => }/server/0764-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch (90%) rename patches/{unapplied => }/server/0765-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch (100%) rename patches/{unapplied => }/server/0766-Async-catch-modifications-to-critical-entity-state.patch (100%) rename patches/{unapplied => }/server/0767-Fix-Bukkit-NamespacedKey-shenanigans.patch (100%) diff --git a/patches/server/0047-Ensure-commands-are-not-ran-async.patch b/patches/server/0047-Ensure-commands-are-not-ran-async.patch index 19f060befb..d34aa5d7d3 100644 --- a/patches/server/0047-Ensure-commands-are-not-ran-async.patch +++ b/patches/server/0047-Ensure-commands-are-not-ran-async.patch @@ -14,7 +14,7 @@ big slowdown in execution but throwing an exception at same time to raise awaren that it is happening so that plugin authors can fix their code to stop executing commands async. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fda4d570ef04e91c4e6c29c52221c04937dc4fbc..e9999a52a0f54c47e973bc22fa91465e8e993b1c 100644 +index fda4d570ef04e91c4e6c29c52221c04937dc4fbc..350128dc1c4c2c1597ad19d8b24193bc94c90d81 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2041,6 +2041,29 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -29,7 +29,7 @@ index fda4d570ef04e91c4e6c29c52221c04937dc4fbc..e9999a52a0f54c47e973bc22fa91465e + Waitable wait = new Waitable() { + @Override + protected Object evaluate() { -+ chat(fCommandLine, false); ++ chat(fCommandLine, original, false); + return null; + } + }; diff --git a/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index 0718c82df4..cec36444d7 100644 --- a/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/patches/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7fb4e1cf4eb21dd19a581b082caf9825cdaa4ad9..78662c29e9771ddead43dc243fb5f7d802d6d40d 100644 +index 795bd69354dc59ea3fc59daa7239e5e8fa110e8c..4471a220b66cdb055b5e4c32b5d7859685ea4666 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -3218,9 +3218,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -13,7 +13,7 @@ index 7fb4e1cf4eb21dd19a581b082caf9825cdaa4ad9..78662c29e9771ddead43dc243fb5f7d8 if (this.player.isTextFilteringEnabled()) { - lines.add(net.kyori.adventure.text.Component.text(filteredtext.filteredOrEmpty())); // Paper - adventure -+ lines.add(SharedConstants.filterText(net.kyori.adventure.text.Component.text(filteredtext.filteredOrEmpty()))); // Paper - adventure ++ lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(filteredtext.filteredOrEmpty()))); // Paper - adventure } else { - lines.add(net.kyori.adventure.text.Component.text(filteredtext.raw())); // Paper - adventure + lines.add(net.kyori.adventure.text.Component.text(SharedConstants.filterText(filteredtext.raw()))); // Paper - adventure diff --git a/patches/unapplied/server/0647-Move-range-check-for-block-placing-up.patch b/patches/server/0647-Move-range-check-for-block-placing-up.patch similarity index 84% rename from patches/unapplied/server/0647-Move-range-check-for-block-placing-up.patch rename to patches/server/0647-Move-range-check-for-block-placing-up.patch index 43e26ae4ed..44c4bc7329 100644 --- a/patches/unapplied/server/0647-Move-range-check-for-block-placing-up.patch +++ b/patches/server/0647-Move-range-check-for-block-placing-up.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Move range check for block placing up diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7abd31f1f18624cc69262fedb072008d9ff43af1..de2d10a57b8146bd8d039577b8d48889a2c96d93 100644 +index acb7c80fa01689098962d170df91aa79c2472dd1..cc1225f7c1e4d47f509c55609066fba084331a4d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1763,6 +1763,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1829,6 +1829,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ItemStack itemstack = this.player.getItemInHand(enumhand); BlockHitResult movingobjectpositionblock = packet.getHitResult(); Vec3 vec3d = movingobjectpositionblock.getLocation(); diff --git a/patches/unapplied/server/0648-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0648-Fix-and-optimise-world-force-upgrading.patch similarity index 98% rename from patches/unapplied/server/0648-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0648-Fix-and-optimise-world-force-upgrading.patch index c925b72304..579501f1b0 100644 --- a/patches/unapplied/server/0648-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0648-Fix-and-optimise-world-force-upgrading.patch @@ -272,10 +272,10 @@ index ce4aed84d751a48dcd2a8409190db4a22d78f77b..0a843e0afbcb1af8e2641515eb244b79 Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, generatorOptions, eraseCache); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7ddb096b0532e50f19d6d81095b1a708ba92b336..c4f76705c0aae300abf8e4c7b06b6db791f14071 100644 +index cefa833408ff95890dc5c831276f259022bd95a3..fdf08831a9d1b27c8050432e958f7133f3d10e1e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -543,11 +543,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop Reviewed-by: Mariell Hoversholm diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 91cf0a6b5061bf4731731fdd69beb80fb30c6b51..45598a94524519257c5ffb03800f0b081f4d7a78 100644 +index 023c564248adb2c5c4b679be9075ca88cb2d5b62..ca6b12b61874913f6d4abac97a3df67d0053cd8f 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -629,6 +629,11 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -641,6 +641,11 @@ public class Connection extends SimpleChannelInboundHandler> { // Spigot Start public SocketAddress getRawAddress() { @@ -27,7 +27,7 @@ index 91cf0a6b5061bf4731731fdd69beb80fb30c6b51..45598a94524519257c5ffb03800f0b08 } // Spigot End diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index f99c616006d49d91922abf5283146bc6f4fb5493..9f3165178e744751343df98568113250578c6d2f 100644 +index 2c215e2080f00d6c875fbde92fd2c1c051d0cf98..2d01a1d4b2f7fdd38a6b1022f2476ba68b663171 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -224,6 +224,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -69,10 +69,10 @@ index f99c616006d49d91922abf5283146bc6f4fb5493..9f3165178e744751343df98568113250 DedicatedServer.LOGGER.warn("**** FAILED TO BIND TO PORT!"); DedicatedServer.LOGGER.warn("The exception was: {}", ioexception.toString()); diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -index 076c1d5fb69a4a30b3e412e85b17db09fd9a1def..9e7154c9df96d5a0577886d43a98a73626a8f189 100644 +index 83af90fb0dcb4b1a5a68f655cf66d101b472e8e7..b80aedd2002959b4026c27ce76b3ed17f0acfb5b 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -@@ -79,7 +79,12 @@ public class ServerConnectionListener { +@@ -80,7 +80,12 @@ public class ServerConnectionListener { this.running = true; } @@ -85,7 +85,7 @@ index 076c1d5fb69a4a30b3e412e85b17db09fd9a1def..9e7154c9df96d5a0577886d43a98a736 List list = this.channels; synchronized (this.channels) { -@@ -87,7 +92,11 @@ public class ServerConnectionListener { +@@ -88,7 +93,11 @@ public class ServerConnectionListener { LazyLoadedValue lazyinitvar; if (Epoll.isAvailable() && this.server.isEpollEnabled()) { @@ -97,7 +97,7 @@ index 076c1d5fb69a4a30b3e412e85b17db09fd9a1def..9e7154c9df96d5a0577886d43a98a736 lazyinitvar = ServerConnectionListener.SERVER_EPOLL_EVENT_GROUP; ServerConnectionListener.LOGGER.info("Using epoll channel type"); } else { -@@ -115,7 +124,7 @@ public class ServerConnectionListener { +@@ -116,7 +125,7 @@ public class ServerConnectionListener { ((Connection) object).setListener(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object)); io.papermc.paper.network.ChannelInitializeListenerHolder.callListeners(channel); // Paper } diff --git a/patches/unapplied/server/0651-Add-EntityInsideBlockEvent.patch b/patches/server/0651-Add-EntityInsideBlockEvent.patch similarity index 100% rename from patches/unapplied/server/0651-Add-EntityInsideBlockEvent.patch rename to patches/server/0651-Add-EntityInsideBlockEvent.patch diff --git a/patches/unapplied/server/0652-Attributes-API-for-item-defaults.patch b/patches/server/0652-Attributes-API-for-item-defaults.patch similarity index 94% rename from patches/unapplied/server/0652-Attributes-API-for-item-defaults.patch rename to patches/server/0652-Attributes-API-for-item-defaults.patch index ab2191630c..e9852950a1 100644 --- a/patches/unapplied/server/0652-Attributes-API-for-item-defaults.patch +++ b/patches/server/0652-Attributes-API-for-item-defaults.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Attributes API for item defaults diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 57b7fedcccbb9a0c1cc56eb6be48a18e2fbadc7f..5345ab40f18437fc60080f9feff4ee0d59a9ed6d 100644 +index 44b922c9e6f022c1a9282c0cb686bbd8a8d1c675..c98c5e070349e5c9356a3dec2344a135ad8f0b56 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -545,6 +545,19 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0653-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0653-Add-cause-to-Weather-ThunderChangeEvents.patch similarity index 95% rename from patches/unapplied/server/0653-Add-cause-to-Weather-ThunderChangeEvents.patch rename to patches/server/0653-Add-cause-to-Weather-ThunderChangeEvents.patch index 011698d798..797dffa662 100644 --- a/patches/unapplied/server/0653-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0653-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 a5199e0a95e1bb85c06de612ed7a54bec215deae..a19be39c5b4552ebfa74634c0cc004f9de0a9eff 100644 +index 3bb1fe9e6f5e8f7dc6dc07f83c5b0793760882e8..428272c1cace3a87fbcade90b5f9ee9236532418 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -493,8 +493,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -494,8 +494,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.serverLevelData.setClearWeatherTime(clearDuration); this.serverLevelData.setRainTime(rainDuration); this.serverLevelData.setThunderTime(rainDuration); @@ -19,7 +19,7 @@ index a5199e0a95e1bb85c06de612ed7a54bec215deae..a19be39c5b4552ebfa74634c0cc004f9 } @Override -@@ -886,8 +886,8 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -887,8 +887,8 @@ public class ServerLevel extends Level implements WorldGenLevel { this.serverLevelData.setThunderTime(j); this.serverLevelData.setRainTime(k); this.serverLevelData.setClearWeatherTime(i); @@ -30,7 +30,7 @@ index a5199e0a95e1bb85c06de612ed7a54bec215deae..a19be39c5b4552ebfa74634c0cc004f9 } this.oThunderLevel = this.thunderLevel; -@@ -953,14 +953,14 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -954,14 +954,14 @@ public class ServerLevel extends Level implements WorldGenLevel { private void resetWeatherCycle() { // CraftBukkit start diff --git a/patches/unapplied/server/0654-More-Lidded-Block-API.patch b/patches/server/0654-More-Lidded-Block-API.patch similarity index 100% rename from patches/unapplied/server/0654-More-Lidded-Block-API.patch rename to patches/server/0654-More-Lidded-Block-API.patch diff --git a/patches/unapplied/server/0655-Limit-item-frame-cursors-on-maps.patch b/patches/server/0655-Limit-item-frame-cursors-on-maps.patch similarity index 100% rename from patches/unapplied/server/0655-Limit-item-frame-cursors-on-maps.patch rename to patches/server/0655-Limit-item-frame-cursors-on-maps.patch diff --git a/patches/unapplied/server/0656-Add-PlayerKickEvent-causes.patch b/patches/server/0656-Add-PlayerKickEvent-causes.patch similarity index 85% rename from patches/unapplied/server/0656-Add-PlayerKickEvent-causes.patch rename to patches/server/0656-Add-PlayerKickEvent-causes.patch index 4d94028225..6dba122290 100644 --- a/patches/unapplied/server/0656-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0656-Add-PlayerKickEvent-causes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerKickEvent causes diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c4f76705c0aae300abf8e4c7b06b6db791f14071..c4a2fd7a2104ad94c4835981b08ebb4ce2529629 100644 +index fdf08831a9d1b27c8050432e958f7133f3d10e1e..d605c4355674644e47ea5ea9e979f7806aed1607 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2101,7 +2101,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); @@ -69,7 +69,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } } else { -@@ -363,7 +363,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -391,7 +391,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) { if (++this.aboveGroundVehicleTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); @@ -78,7 +78,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } } else { -@@ -385,7 +385,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -413,7 +413,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.keepAlivePending) { if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info @@ -87,7 +87,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } } else { if (elapsedTime >= 15000L) { // 15 seconds -@@ -415,7 +415,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -443,7 +443,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) (this.server.getPlayerIdleTimeout() * 1000 * 60)) { this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854 @@ -96,7 +96,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } this.chatPreviewThrottler.tick(); -@@ -441,14 +441,22 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -469,14 +469,22 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void disconnect(String s) { // Paper start @@ -122,8 +122,8 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 // Paper end // CraftBukkit start - fire PlayerKickEvent if (this.processedDisconnect) { -@@ -456,7 +464,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - } +@@ -505,7 +513,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? this.player.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(this.player.getScoreboardName())); // Paper - Adventure - PlayerKickEvent event = new PlayerKickEvent(this.player.getBukkitEntity(), reason, leaveMessage); // Paper - Adventure @@ -131,7 +131,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 if (this.cserver.getServer().isRunning()) { this.cserver.getPluginManager().callEvent(event); -@@ -533,7 +541,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -575,7 +583,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleMoveVehicle(ServerboundMoveVehiclePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(), packet.getY(), packet.getZ(), packet.getYRot(), packet.getXRot())) { @@ -140,7 +140,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } else { Entity entity = this.player.getRootVehicle(); -@@ -784,13 +792,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -826,13 +834,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable @@ -156,7 +156,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } // Paper end -@@ -943,7 +951,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -985,7 +993,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start - validate pick item position if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -165,7 +165,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed -@@ -1108,7 +1116,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1172,7 +1180,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; if (byteLength > 256 * 4) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!"); @@ -174,7 +174,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } byteTotal += byteLength; -@@ -1131,14 +1139,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1195,14 +1203,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (byteTotal > byteAllowed) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); @@ -191,7 +191,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } this.lastBookTick = MinecraftServer.currentTick; -@@ -1260,7 +1268,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1326,7 +1334,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(0.0D), packet.getY(0.0D), packet.getZ(0.0D), packet.getYRot(0.0F), packet.getXRot(0.0F))) { @@ -200,7 +200,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } else { ServerLevel worldserver = this.player.getLevel(); -@@ -1687,7 +1695,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1753,7 +1761,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.dropCount++; if (this.dropCount >= 20) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!"); @@ -209,7 +209,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } } -@@ -1895,7 +1903,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1961,7 +1969,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); @@ -218,7 +218,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } // Paper start PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()]; -@@ -2008,7 +2016,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2074,7 +2082,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.resetLastActionTime(); } else { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -227,34 +227,25 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } } -@@ -2021,7 +2029,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2087,7 +2095,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end - if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.getMessage())) { + if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) { - this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters")); + this.disconnect(Component.translatable("multiplayer.disconnect.illegal_characters"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_CHARACTERS); // Paper - add cause } else { - if (this.tryHandleChat(packet.getMessage(), packet.getTimeStamp())) { - // CraftBukkit start -@@ -2304,7 +2312,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - Waitable waitable = new Waitable() { - @Override - protected Object evaluate() { -- ServerGamePacketListenerImpl.this.disconnect(Component.translatable("disconnect.spam")); -+ ServerGamePacketListenerImpl.this.disconnect(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause - return null; - } - }; -@@ -2319,7 +2327,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - throw new RuntimeException(e); - } - } else { -- this.disconnect(Component.translatable("disconnect.spam")); -+ this.disconnect(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause - } + if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { + // this.server.submit(() -> { // CraftBukkit - async chat +@@ -2478,7 +2486,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + // this.chatSpamTickCount += 20; + if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // CraftBukkit end +- this.disconnect(Component.translatable("disconnect.spam")); ++ this.disconnect(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause } -@@ -2537,7 +2545,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser + + } +@@ -2740,7 +2748,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Spigot Start if ( entity == this.player && !this.player.isSpectator() ) { @@ -263,7 +254,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } // Spigot End -@@ -2630,7 +2638,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2833,7 +2841,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end } else { @@ -272,7 +263,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString()); } } -@@ -3036,7 +3044,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -3241,7 +3249,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -281,7 +272,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 return; } } -@@ -3227,7 +3235,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -3444,7 +3452,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else if (!this.isSingleplayerOwner()) { // Paper start - This needs to be handled on the main thread for plugins server.submit(() -> { @@ -290,7 +281,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 }); // Paper end } -@@ -3273,7 +3281,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -3490,7 +3498,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex); @@ -299,7 +290,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } } else if (packet.identifier.equals(CUSTOM_UNREGISTER)) { try { -@@ -3283,7 +3291,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -3500,7 +3508,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex); @@ -308,7 +299,7 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } } else { try { -@@ -3301,7 +3309,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -3518,7 +3526,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); @@ -318,10 +309,10 @@ index de2d10a57b8146bd8d039577b8d48889a2c96d93..00f78ce251301217317698a659390654 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a4278a4ca0b41813b8f88d01dcc8d75b4f458908..be163c1cc4c8982b89be86c004299cdcb8ba7387 100644 +index 3e8934a141bc8c650549afaef7b4f8b02371f9ab..9dece3470d617be02248f41847ebf77ed083653a 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -719,7 +719,7 @@ public abstract class PlayerList { +@@ -723,7 +723,7 @@ public abstract class PlayerList { while (iterator.hasNext()) { entityplayer = (ServerPlayer) iterator.next(); this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved @@ -330,7 +321,7 @@ index a4278a4ca0b41813b8f88d01dcc8d75b4f458908..be163c1cc4c8982b89be86c004299cdc } // Instead of kicking then returning, we need to store the kick reason -@@ -1350,8 +1350,8 @@ public abstract class PlayerList { +@@ -1354,8 +1354,8 @@ public abstract class PlayerList { // Paper end // CraftBukkit start - disconnect safely for (ServerPlayer player : this.players) { @@ -342,7 +333,7 @@ index a4278a4ca0b41813b8f88d01dcc8d75b4f458908..be163c1cc4c8982b89be86c004299cdc // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8c07b6e92a7329d72ccf1adf9f788322a4e9b28c..3ca8adc4b8cd76b5d2ec827a439cb47564c0b028 100644 +index cacadcbffdc9629e693dfea6185009ebca2740f6..8ffef2843d8d4fa6ddfc0fb1403c6eacdafa63a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -516,7 +516,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/unapplied/server/0657-Add-PufferFishStateChangeEvent.patch b/patches/server/0657-Add-PufferFishStateChangeEvent.patch similarity index 100% rename from patches/unapplied/server/0657-Add-PufferFishStateChangeEvent.patch rename to patches/server/0657-Add-PufferFishStateChangeEvent.patch diff --git a/patches/unapplied/server/0658-Fix-PlayerBucketEmptyEvent-result-itemstack.patch b/patches/server/0658-Fix-PlayerBucketEmptyEvent-result-itemstack.patch similarity index 100% rename from patches/unapplied/server/0658-Fix-PlayerBucketEmptyEvent-result-itemstack.patch rename to patches/server/0658-Fix-PlayerBucketEmptyEvent-result-itemstack.patch diff --git a/patches/unapplied/server/0659-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch b/patches/server/0659-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch similarity index 93% rename from patches/unapplied/server/0659-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch rename to patches/server/0659-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch index e2333c8ac7..0c92b3cd69 100644 --- a/patches/unapplied/server/0659-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch +++ b/patches/server/0659-Synchronize-PalettedContainer-instead-of-ThreadingDe.patch @@ -14,7 +14,7 @@ contention situations. And this is extremely a low contention situation. diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index c36de77b3124a519b3f324c5a187337884fe9e28..0c309a2f10ca75dc90076156b2d666deb37f72ba 100644 +index 723608946947fa2792c7284fa5faa85ab9507897..e77b516995666402cc8814ac78a6c11077108b2e 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java @@ -32,14 +32,14 @@ public class PalettedContainer implements PaletteResize, PalettedContainer @@ -84,8 +84,8 @@ index c36de77b3124a519b3f324c5a187337884fe9e28..0c309a2f10ca75dc90076156b2d666de } @Override -- public PalettedContainerRO.PackedData pack(IdMap idMap, PalettedContainer.Strategy strategy) { -+ public synchronized PalettedContainerRO.PackedData pack(IdMap idMap, PalettedContainer.Strategy strategy) { // Paper - synchronize +- public PalettedContainerRO.PackedData pack(IdMap idList, PalettedContainer.Strategy paletteProvider) { ++ public synchronized PalettedContainerRO.PackedData pack(IdMap idList, PalettedContainer.Strategy paletteProvider) { // Paper - synchronize this.acquire(); PalettedContainerRO.PackedData var12; diff --git a/patches/unapplied/server/0660-Add-option-to-fix-items-merging-through-walls.patch b/patches/server/0660-Add-option-to-fix-items-merging-through-walls.patch similarity index 90% rename from patches/unapplied/server/0660-Add-option-to-fix-items-merging-through-walls.patch rename to patches/server/0660-Add-option-to-fix-items-merging-through-walls.patch index 4cde97de50..0c6f1b92fc 100644 --- a/patches/unapplied/server/0660-Add-option-to-fix-items-merging-through-walls.patch +++ b/patches/server/0660-Add-option-to-fix-items-merging-through-walls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to fix items merging through walls diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index b491186d66609046016370e56b96e2c09e7d3a32..ae4b251e10babb07055d031ff48ac7dd5d4be4a0 100644 +index 7e293167e73238f42fc213ee29d89aa775cf9e60..30c417c3169c1df43662fd77ac6816db64a42802 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -247,6 +247,14 @@ public class ItemEntity extends Entity { +@@ -245,6 +245,14 @@ public class ItemEntity extends Entity { ItemEntity entityitem = (ItemEntity) iterator.next(); if (entityitem.isMergable()) { diff --git a/patches/unapplied/server/0661-Add-BellRevealRaiderEvent.patch b/patches/server/0661-Add-BellRevealRaiderEvent.patch similarity index 100% rename from patches/unapplied/server/0661-Add-BellRevealRaiderEvent.patch rename to patches/server/0661-Add-BellRevealRaiderEvent.patch diff --git a/patches/unapplied/server/0662-Fix-invulnerable-end-crystals.patch b/patches/server/0662-Fix-invulnerable-end-crystals.patch similarity index 100% rename from patches/unapplied/server/0662-Fix-invulnerable-end-crystals.patch rename to patches/server/0662-Fix-invulnerable-end-crystals.patch diff --git a/patches/unapplied/server/0663-Add-ElderGuardianAppearanceEvent.patch b/patches/server/0663-Add-ElderGuardianAppearanceEvent.patch similarity index 100% rename from patches/unapplied/server/0663-Add-ElderGuardianAppearanceEvent.patch rename to patches/server/0663-Add-ElderGuardianAppearanceEvent.patch diff --git a/patches/unapplied/server/0664-Fix-dangerous-end-portal-logic.patch b/patches/server/0664-Fix-dangerous-end-portal-logic.patch similarity index 96% rename from patches/unapplied/server/0664-Fix-dangerous-end-portal-logic.patch rename to patches/server/0664-Fix-dangerous-end-portal-logic.patch index da5922b67d..f8757be01f 100644 --- a/patches/unapplied/server/0664-Fix-dangerous-end-portal-logic.patch +++ b/patches/server/0664-Fix-dangerous-end-portal-logic.patch @@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was designed to happen in the first place. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 12d067202cbd861362d782c21c924a5641471b11..7c239cf6a05ac427cbd1bee0ae05709632538bc8 100644 +index bfac12f0e89c4c7d48321ea608363518742304af..4888873a5efa026a1082c9f216eecc950b6f2471 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -459,6 +459,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -51,7 +51,7 @@ index 12d067202cbd861362d782c21c924a5641471b11..7c239cf6a05ac427cbd1bee0ae057096 public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); -@@ -2624,6 +2654,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2621,6 +2651,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } this.processPortalCooldown(); diff --git a/patches/unapplied/server/0665-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch b/patches/server/0665-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch similarity index 100% rename from patches/unapplied/server/0665-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch rename to patches/server/0665-Optimize-Biome-Mob-Lookups-for-Mob-Spawning.patch diff --git a/patches/unapplied/server/0666-Make-item-validations-configurable.patch b/patches/server/0666-Make-item-validations-configurable.patch similarity index 100% rename from patches/unapplied/server/0666-Make-item-validations-configurable.patch rename to patches/server/0666-Make-item-validations-configurable.patch diff --git a/patches/unapplied/server/0667-Line-Of-Sight-Changes.patch b/patches/server/0667-Line-Of-Sight-Changes.patch similarity index 96% rename from patches/unapplied/server/0667-Line-Of-Sight-Changes.patch rename to patches/server/0667-Line-Of-Sight-Changes.patch index e20e5491d4..23a60d3d62 100644 --- a/patches/unapplied/server/0667-Line-Of-Sight-Changes.patch +++ b/patches/server/0667-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 85a0a295ce7739e340ada69e5a970b742dd95004..ca484fdd712a0815fc44521e42550b1529dc3edb 100644 +index 644d71c024103c39d7532559c810038d687106e5..2694f7af35deff5c94929350589b2564f7bbdeff 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3481,7 +3481,8 @@ public abstract class LivingEntity extends Entity { +@@ -3484,7 +3484,8 @@ public abstract class LivingEntity extends Entity { Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ()); Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ()); diff --git a/patches/unapplied/server/0668-add-per-world-spawn-limits.patch b/patches/server/0668-add-per-world-spawn-limits.patch similarity index 100% rename from patches/unapplied/server/0668-add-per-world-spawn-limits.patch rename to patches/server/0668-add-per-world-spawn-limits.patch diff --git a/patches/unapplied/server/0669-Fix-PotionSplashEvent-for-water-splash-potions.patch b/patches/server/0669-Fix-PotionSplashEvent-for-water-splash-potions.patch similarity index 100% rename from patches/unapplied/server/0669-Fix-PotionSplashEvent-for-water-splash-potions.patch rename to patches/server/0669-Fix-PotionSplashEvent-for-water-splash-potions.patch diff --git a/patches/unapplied/server/0670-Add-more-LimitedRegion-API.patch b/patches/server/0670-Add-more-LimitedRegion-API.patch similarity index 100% rename from patches/unapplied/server/0670-Add-more-LimitedRegion-API.patch rename to patches/server/0670-Add-more-LimitedRegion-API.patch diff --git a/patches/unapplied/server/0671-Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/0671-Fix-PlayerDropItemEvent-using-wrong-item.patch similarity index 82% rename from patches/unapplied/server/0671-Fix-PlayerDropItemEvent-using-wrong-item.patch rename to patches/server/0671-Fix-PlayerDropItemEvent-using-wrong-item.patch index 7e329e49be..c053f7f56a 100644 --- a/patches/unapplied/server/0671-Fix-PlayerDropItemEvent-using-wrong-item.patch +++ b/patches/server/0671-Fix-PlayerDropItemEvent-using-wrong-item.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix PlayerDropItemEvent using wrong item diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3c50ec169546a9e6e071e5c54ad3c77eb495f1d8..84501f85bea47056cf16c06ad275dfc9d853351e 100644 +index 607a44d2db927e579d8be7c52021d7bb205a379c..6e53214042ab515d9c66fb24f6aa1c07d6c3539d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2207,7 +2207,7 @@ public class ServerPlayer extends Player { +@@ -2196,7 +2196,7 @@ public class ServerPlayer extends Player { if (retainOwnership) { if (!itemstack1.isEmpty()) { @@ -18,10 +18,10 @@ index 3c50ec169546a9e6e071e5c54ad3c77eb495f1d8..84501f85bea47056cf16c06ad275dfc9 this.awardStat(Stats.DROP); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 2c65305037583d55fa20783d0f264382467f8c3f..494ecf80d856bb3030aaf3892a5b175d8827aeff 100644 +index a6bd94ed379ef1ab0ffe71183aef3cf3061fd092..92a5aadef076cb905962dab86f32d4ff253fef93 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -722,6 +722,11 @@ public abstract class Player extends LivingEntity { +@@ -723,6 +723,11 @@ public abstract class Player extends LivingEntity { } double d0 = this.getEyeY() - 0.30000001192092896D; diff --git a/patches/unapplied/server/0672-Missing-Entity-Behavior-API.patch b/patches/server/0672-Missing-Entity-Behavior-API.patch similarity index 99% rename from patches/unapplied/server/0672-Missing-Entity-Behavior-API.patch rename to patches/server/0672-Missing-Entity-Behavior-API.patch index 6cd7611b8d..6e76bcfa3a 100644 --- a/patches/unapplied/server/0672-Missing-Entity-Behavior-API.patch +++ b/patches/server/0672-Missing-Entity-Behavior-API.patch @@ -119,7 +119,7 @@ index 1f3506d38894fea224f3b2f125b45c3b68d705c7..bb2cb17e4e5ce142eeec18951c8948e3 protected boolean shouldDespawnInPeaceful() { return true; diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -index b75c0ff18aa7adb673fbb2b5ada7775dd8ac1e29..05cf30e6572c9bb7e11d71de1cd79df987bf062a 100644 +index e93a2634cd80cd4f1caf6bd60e569783bc6b577c..fb0a77b4cf1ba47c73c00993bd9b7454240fe5d6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java @@ -197,6 +197,12 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { diff --git a/patches/unapplied/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch similarity index 85% rename from patches/unapplied/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch rename to patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch index 46f3ae638b..008cf58220 100644 --- a/patches/unapplied/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch +++ b/patches/server/0673-Ensure-disconnect-for-book-edit-is-called-on-main.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 00f78ce251301217317698a65939065403b6580a..9331bd6d74feea033ce78a3a708ceaa0042f00e1 100644 +index a768e09c5ce6718435b50f1502c5ace773fff470..dfe1966bfb30b3d2e60e6b88d0a7c2331b02e9a4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1146,7 +1146,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1210,7 +1210,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper end // CraftBukkit start if (this.lastBookTick + 20 > MinecraftServer.currentTick) { diff --git a/patches/unapplied/server/0674-Fix-return-value-of-Block-applyBoneMeal-always-being.patch b/patches/server/0674-Fix-return-value-of-Block-applyBoneMeal-always-being.patch similarity index 100% rename from patches/unapplied/server/0674-Fix-return-value-of-Block-applyBoneMeal-always-being.patch rename to patches/server/0674-Fix-return-value-of-Block-applyBoneMeal-always-being.patch diff --git a/patches/unapplied/server/0675-Use-getChunkIfLoadedImmediately-in-places.patch b/patches/server/0675-Use-getChunkIfLoadedImmediately-in-places.patch similarity index 92% rename from patches/unapplied/server/0675-Use-getChunkIfLoadedImmediately-in-places.patch rename to patches/server/0675-Use-getChunkIfLoadedImmediately-in-places.patch index e5d3069ee5..c7ae795f55 100644 --- a/patches/unapplied/server/0675-Use-getChunkIfLoadedImmediately-in-places.patch +++ b/patches/server/0675-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 a19be39c5b4552ebfa74634c0cc004f9de0a9eff..8c61dc53f4874ab7013938abdf5d65a608369474 100644 +index 428272c1cace3a87fbcade90b5f9ee9236532418..4bebe9bc9dea53d57543e65d7300f50b0f907017 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -221,7 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -222,7 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI @@ -20,7 +20,7 @@ index a19be39c5b4552ebfa74634c0cc004f9de0a9eff..8c61dc53f4874ab7013938abdf5d65a6 } @Override -@@ -1436,7 +1436,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1437,7 +1437,7 @@ public class ServerLevel extends Level implements WorldGenLevel { for (int l1 = j; l1 <= i1; ++l1) { for (int i2 = l; i2 <= k1; ++i2) { diff --git a/patches/unapplied/server/0676-Fix-commands-from-signs-not-firing-command-events.patch b/patches/server/0676-Fix-commands-from-signs-not-firing-command-events.patch similarity index 100% rename from patches/unapplied/server/0676-Fix-commands-from-signs-not-firing-command-events.patch rename to patches/server/0676-Fix-commands-from-signs-not-firing-command-events.patch diff --git a/patches/unapplied/server/0677-Adds-PlayerArmSwingEvent.patch b/patches/server/0677-Adds-PlayerArmSwingEvent.patch similarity index 85% rename from patches/unapplied/server/0677-Adds-PlayerArmSwingEvent.patch rename to patches/server/0677-Adds-PlayerArmSwingEvent.patch index a95fff2058..1365f149cf 100644 --- a/patches/unapplied/server/0677-Adds-PlayerArmSwingEvent.patch +++ b/patches/server/0677-Adds-PlayerArmSwingEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Adds PlayerArmSwingEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9331bd6d74feea033ce78a3a708ceaa0042f00e1..d44a60ba363b2e24e96c72dc950c6a4a0959b307 100644 +index dfe1966bfb30b3d2e60e6b88d0a7c2331b02e9a4..4d3874b5f44d0162e245a73b5543c9f2cc75c9ce 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2437,7 +2437,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2617,7 +2617,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Arm swing animation diff --git a/patches/unapplied/server/0678-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0678-Fixes-kick-event-leave-message-not-being-sent.patch similarity index 84% rename from patches/unapplied/server/0678-Fixes-kick-event-leave-message-not-being-sent.patch rename to patches/server/0678-Fixes-kick-event-leave-message-not-being-sent.patch index 538277e6b2..501d605db6 100644 --- a/patches/unapplied/server/0678-Fixes-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/0678-Fixes-kick-event-leave-message-not-being-sent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fixes kick event leave message not being sent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 84501f85bea47056cf16c06ad275dfc9d853351e..1c745fe2c1ef75a1270108d1a88d6c220bd1643a 100644 +index 6e53214042ab515d9c66fb24f6aa1c07d6c3539d..7670c02dca163d360e64a1491f2efe69aaaab411 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -259,7 +259,6 @@ public class ServerPlayer extends Player { +@@ -260,7 +260,6 @@ public class ServerPlayer extends Player { public boolean supressTrackerForLogin = false; // Paper public boolean didPlayerJoinEvent = false; // Paper public Integer clientViewDistance; @@ -17,10 +17,10 @@ index 84501f85bea47056cf16c06ad275dfc9d853351e..1c745fe2c1ef75a1270108d1a88d6c22 public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d44a60ba363b2e24e96c72dc950c6a4a0959b307..8d7da9affb98f3d660e049685139a6e53cc0faa1 100644 +index 4d3874b5f44d0162e245a73b5543c9f2cc75c9ce..e1993c9f08b73e4366f60369e7f147c9c8bda958 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -474,7 +474,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -523,7 +523,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Do not kick the player return; } @@ -28,16 +28,16 @@ index d44a60ba363b2e24e96c72dc950c6a4a0959b307..8d7da9affb98f3d660e049685139a6e5 // Send the possibly modified leave message final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end -@@ -483,7 +482,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), (future) -> { +@@ -532,7 +531,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> { this.connection.disconnect(ichatbasecomponent); - }); + })); - this.onDisconnect(ichatbasecomponent); // CraftBukkit - fire quit instantly + this.onDisconnect(ichatbasecomponent, event.leaveMessage()); // CraftBukkit - fire quit instantly // Paper - use kick event leave message this.connection.setReadOnly(); MinecraftServer minecraftserver = this.server; Connection networkmanager = this.connection; -@@ -1928,6 +1927,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1994,6 +1993,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void onDisconnect(Component reason) { @@ -49,20 +49,20 @@ index d44a60ba363b2e24e96c72dc950c6a4a0959b307..8d7da9affb98f3d660e049685139a6e5 // CraftBukkit start - Rarely it would send a disconnect line twice if (this.processedDisconnect) { return; -@@ -1944,7 +1948,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2010,7 +2014,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.disconnect(); // Paper start - Adventure - net.kyori.adventure.text.Component quitMessage = this.server.getPlayerList().remove(this.player); + quitMessage = quitMessage == null ? this.server.getPlayerList().remove(this.player) : this.server.getPlayerList().remove(this.player, quitMessage); // Paper - pass in quitMessage to fix kick message not being used if ((quitMessage != null) && !quitMessage.equals(net.kyori.adventure.text.Component.empty())) { - this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), ChatType.SYSTEM); + 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 be163c1cc4c8982b89be86c004299cdcb8ba7387..56c9dc2bf76204cd40775d9f47a9ba20919bc04f 100644 +index 9dece3470d617be02248f41847ebf77ed083653a..1a48a03e70b282847dba1da796e5b8211debb603 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -591,6 +591,11 @@ public abstract class PlayerList { +@@ -595,6 +595,11 @@ public abstract class PlayerList { } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // Paper - return Component @@ -74,7 +74,7 @@ index be163c1cc4c8982b89be86c004299cdcb8ba7387..56c9dc2bf76204cd40775d9f47a9ba20 ServerLevel worldserver = entityplayer.getLevel(); entityplayer.awardStat(Stats.LEAVE_GAME); -@@ -601,7 +606,7 @@ public abstract class PlayerList { +@@ -605,7 +610,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } diff --git a/patches/unapplied/server/0679-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0679-Add-config-for-mobs-immune-to-default-effects.patch similarity index 97% rename from patches/unapplied/server/0679-Add-config-for-mobs-immune-to-default-effects.patch rename to patches/server/0679-Add-config-for-mobs-immune-to-default-effects.patch index 84d669db48..600a8111cd 100644 --- a/patches/unapplied/server/0679-Add-config-for-mobs-immune-to-default-effects.patch +++ b/patches/server/0679-Add-config-for-mobs-immune-to-default-effects.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add config for mobs immune to default effects diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index ca484fdd712a0815fc44521e42550b1529dc3edb..7f39a4955b4819e8a908f4cbf951d707c34fa4a8 100644 +index 2694f7af35deff5c94929350589b2564f7bbdeff..b0f38933d25397773ac8668f9d1e759d6b43884d 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1153,7 +1153,7 @@ public abstract class LivingEntity extends Entity { diff --git a/patches/unapplied/server/0680-Fix-incorrect-message-for-outdated-client.patch b/patches/server/0680-Fix-incorrect-message-for-outdated-client.patch similarity index 100% rename from patches/unapplied/server/0680-Fix-incorrect-message-for-outdated-client.patch rename to patches/server/0680-Fix-incorrect-message-for-outdated-client.patch diff --git a/patches/unapplied/server/0681-Don-t-apply-cramming-damage-to-players.patch b/patches/server/0681-Don-t-apply-cramming-damage-to-players.patch similarity index 89% rename from patches/unapplied/server/0681-Don-t-apply-cramming-damage-to-players.patch rename to patches/server/0681-Don-t-apply-cramming-damage-to-players.patch index 506b29a65c..42b7636a7a 100644 --- a/patches/unapplied/server/0681-Don-t-apply-cramming-damage-to-players.patch +++ b/patches/server/0681-Don-t-apply-cramming-damage-to-players.patch @@ -11,10 +11,10 @@ It does not make a lot of sense to damage players if they get crammed, For those who really want it a config option is provided. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 1c745fe2c1ef75a1270108d1a88d6c220bd1643a..99bac7e1975559165653df973e6eef79450b1254 100644 +index 7670c02dca163d360e64a1491f2efe69aaaab411..f523311e822af9cbef571338fd8fef177b9fc73d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1448,7 +1448,7 @@ public class ServerPlayer extends Player { +@@ -1446,7 +1446,7 @@ public class ServerPlayer extends Player { @Override public boolean isInvulnerableTo(DamageSource damageSource) { diff --git a/patches/unapplied/server/0682-Rate-options-and-timings-for-sensors-and-behaviors.patch b/patches/server/0682-Rate-options-and-timings-for-sensors-and-behaviors.patch similarity index 100% rename from patches/unapplied/server/0682-Rate-options-and-timings-for-sensors-and-behaviors.patch rename to patches/server/0682-Rate-options-and-timings-for-sensors-and-behaviors.patch diff --git a/patches/unapplied/server/0683-Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/0683-Add-a-bunch-of-missing-forceDrop-toggles.patch similarity index 100% rename from patches/unapplied/server/0683-Add-a-bunch-of-missing-forceDrop-toggles.patch rename to patches/server/0683-Add-a-bunch-of-missing-forceDrop-toggles.patch diff --git a/patches/unapplied/server/0684-Stinger-API.patch b/patches/server/0684-Stinger-API.patch similarity index 100% rename from patches/unapplied/server/0684-Stinger-API.patch rename to patches/server/0684-Stinger-API.patch diff --git a/patches/unapplied/server/0685-Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/0685-Fix-incosistency-issue-with-empty-map-items-in-CB.patch similarity index 100% rename from patches/unapplied/server/0685-Fix-incosistency-issue-with-empty-map-items-in-CB.patch rename to patches/server/0685-Fix-incosistency-issue-with-empty-map-items-in-CB.patch diff --git a/patches/unapplied/server/0686-Add-System.out-err-catcher.patch b/patches/server/0686-Add-System.out-err-catcher.patch similarity index 100% rename from patches/unapplied/server/0686-Add-System.out-err-catcher.patch rename to patches/server/0686-Add-System.out-err-catcher.patch diff --git a/patches/unapplied/server/0687-Fix-test-not-bootstrapping.patch b/patches/server/0687-Fix-test-not-bootstrapping.patch similarity index 100% rename from patches/unapplied/server/0687-Fix-test-not-bootstrapping.patch rename to patches/server/0687-Fix-test-not-bootstrapping.patch diff --git a/patches/unapplied/server/0688-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/server/0688-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/unapplied/server/0688-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/server/0688-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/unapplied/server/0689-Improve-boat-collision-performance.patch b/patches/server/0689-Improve-boat-collision-performance.patch similarity index 94% rename from patches/unapplied/server/0689-Improve-boat-collision-performance.patch rename to patches/server/0689-Improve-boat-collision-performance.patch index 853da317a0..242644a66c 100644 --- a/patches/unapplied/server/0689-Improve-boat-collision-performance.patch +++ b/patches/server/0689-Improve-boat-collision-performance.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Improve boat collision performance diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 67567eb58beddc06eae4d8e7af3b3c0962405512..206c6ce227ba19620185ac835af28d67caa76c40 100644 +index 4fce18c52c8144460ebf0c1e336dce712d796cc6..384ddb03af26ae360fd22e2e231d9d14d6ad0865 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java -@@ -110,6 +110,7 @@ public class Util { +@@ -112,6 +112,7 @@ public class Util { }).findFirst().orElseThrow(() -> { return new IllegalStateException("No jar file system provider found"); }); @@ -17,7 +17,7 @@ index 67567eb58beddc06eae4d8e7af3b3c0962405512..206c6ce227ba19620185ac835af28d67 }; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 7f39a4955b4819e8a908f4cbf951d707c34fa4a8..b6af4e6b146cc6ceb769a0d1e0d253f0b0f844d2 100644 +index b0f38933d25397773ac8668f9d1e759d6b43884d..bc01742e3e762fbb5b7eb712a9211e4a8d411e03 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1341,7 +1341,7 @@ public abstract class LivingEntity extends Entity { diff --git a/patches/unapplied/server/0690-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0690-Prevent-AFK-kick-while-watching-end-credits.patch similarity index 87% rename from patches/unapplied/server/0690-Prevent-AFK-kick-while-watching-end-credits.patch rename to patches/server/0690-Prevent-AFK-kick-while-watching-end-credits.patch index 8f8b86f47e..0b2683b9e2 100644 --- a/patches/unapplied/server/0690-Prevent-AFK-kick-while-watching-end-credits.patch +++ b/patches/server/0690-Prevent-AFK-kick-while-watching-end-credits.patch @@ -5,10 +5,10 @@ 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 8d7da9affb98f3d660e049685139a6e53cc0faa1..6ec86b033063066b231462b75c4b1190cc452cdd 100644 +index e1993c9f08b73e4366f60369e7f147c9c8bda958..e8cd8adad14c6bcab3ccef7fcc458b38d90592c3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -413,7 +413,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -441,7 +441,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic --this.dropSpamTickCount; } diff --git a/patches/unapplied/server/0691-Allow-skipping-writing-of-comments-to-server.propert.patch b/patches/server/0691-Allow-skipping-writing-of-comments-to-server.propert.patch similarity index 100% rename from patches/unapplied/server/0691-Allow-skipping-writing-of-comments-to-server.propert.patch rename to patches/server/0691-Allow-skipping-writing-of-comments-to-server.propert.patch diff --git a/patches/unapplied/server/0692-Add-PlayerSetSpawnEvent.patch b/patches/server/0692-Add-PlayerSetSpawnEvent.patch similarity index 94% rename from patches/unapplied/server/0692-Add-PlayerSetSpawnEvent.patch rename to patches/server/0692-Add-PlayerSetSpawnEvent.patch index 6ff40263a0..ae2b3bf6c2 100644 --- a/patches/unapplied/server/0692-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0692-Add-PlayerSetSpawnEvent.patch @@ -32,10 +32,10 @@ index ce1c7512cc368e196ae94ee22c6a228c975b4980..1e41de9523c5fa3b9cfced798a5c35a2 String string = resourceKey.location().toString(); if (targets.size() == 1) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 99bac7e1975559165653df973e6eef79450b1254..2e205bd42101889097c08a1ffa1103c3e838240c 100644 +index f523311e822af9cbef571338fd8fef177b9fc73d..ec713ffb7c4cba53dc983ebde5596e4749107493 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1289,7 +1289,7 @@ public class ServerPlayer extends Player { +@@ -1287,7 +1287,7 @@ public class ServerPlayer extends Player { } else if (this.bedBlocked(blockposition, enumdirection)) { return Either.left(Player.BedSleepingProblem.OBSTRUCTED); } else { @@ -44,7 +44,7 @@ index 99bac7e1975559165653df973e6eef79450b1254..2e205bd42101889097c08a1ffa1103c3 if (this.level.isDay()) { return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW); } else { -@@ -2134,12 +2134,33 @@ public class ServerPlayer extends Player { +@@ -2123,12 +2123,33 @@ public class ServerPlayer extends Player { return this.respawnForced; } @@ -80,7 +80,7 @@ index 99bac7e1975559165653df973e6eef79450b1254..2e205bd42101889097c08a1ffa1103c3 } this.respawnPosition = pos; -@@ -2153,6 +2174,7 @@ public class ServerPlayer extends Player { +@@ -2142,6 +2163,7 @@ public class ServerPlayer extends Player { this.respawnForced = false; } @@ -89,10 +89,10 @@ index 99bac7e1975559165653df973e6eef79450b1254..2e205bd42101889097c08a1ffa1103c3 public void trackChunk(ChunkPos chunkPos, Packet chunkDataPacket) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 56c9dc2bf76204cd40775d9f47a9ba20919bc04f..bf2888b678567ace5959d989e5dd119c65a9500d 100644 +index 1a48a03e70b282847dba1da796e5b8211debb603..dda357b4f52030435c012f10b11f1ccb3f6688be 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -895,13 +895,13 @@ public abstract class PlayerList { +@@ -899,13 +899,13 @@ public abstract class PlayerList { f1 = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D); } @@ -129,7 +129,7 @@ index c3e49a781f838e6a46cb89744f3f1846de182275..c2f3d3a09327e7cb7d3167609eb3ce68 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3ca8adc4b8cd76b5d2ec827a439cb47564c0b028..89d30891defdf3b1ee71f31e7fd06a87e13a25d2 100644 +index 8ffef2843d8d4fa6ddfc0fb1403c6eacdafa63a9..0d7da68faa8c3401dcc12c67ae9edd977c436e55 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1204,9 +1204,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/unapplied/server/0693-Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/0693-Make-hoppers-respect-inventory-max-stack-size.patch similarity index 100% rename from patches/unapplied/server/0693-Make-hoppers-respect-inventory-max-stack-size.patch rename to patches/server/0693-Make-hoppers-respect-inventory-max-stack-size.patch diff --git a/patches/unapplied/server/0694-Optimize-entity-tracker-passenger-checks.patch b/patches/server/0694-Optimize-entity-tracker-passenger-checks.patch similarity index 100% rename from patches/unapplied/server/0694-Optimize-entity-tracker-passenger-checks.patch rename to patches/server/0694-Optimize-entity-tracker-passenger-checks.patch diff --git a/patches/unapplied/server/0695-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0695-Config-option-for-Piglins-guarding-chests.patch similarity index 100% rename from patches/unapplied/server/0695-Config-option-for-Piglins-guarding-chests.patch rename to patches/server/0695-Config-option-for-Piglins-guarding-chests.patch diff --git a/patches/unapplied/server/0696-Added-EntityDamageItemEvent.patch b/patches/server/0696-Added-EntityDamageItemEvent.patch similarity index 97% rename from patches/unapplied/server/0696-Added-EntityDamageItemEvent.patch rename to patches/server/0696-Added-EntityDamageItemEvent.patch index bff8b22585..ec43bd00c9 100644 --- a/patches/unapplied/server/0696-Added-EntityDamageItemEvent.patch +++ b/patches/server/0696-Added-EntityDamageItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Added EntityDamageItemEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 494a39cfafa5a632ccb61b196b0ec4e5772aa180..c8943bbd72d7ea12298af710d465983cdaa394e8 100644 +index b4ad1610d30396be344a04f5f3a565ae2b8f2265..5c987e863a6ef257caebf8321fa3048dfc7a93c5 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -547,7 +547,7 @@ public final class ItemStack { diff --git a/patches/unapplied/server/0697-Optimize-indirect-passenger-iteration.patch b/patches/server/0697-Optimize-indirect-passenger-iteration.patch similarity index 93% rename from patches/unapplied/server/0697-Optimize-indirect-passenger-iteration.patch rename to patches/server/0697-Optimize-indirect-passenger-iteration.patch index 53bcccd48d..6ae8c4e698 100644 --- a/patches/unapplied/server/0697-Optimize-indirect-passenger-iteration.patch +++ b/patches/server/0697-Optimize-indirect-passenger-iteration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7c239cf6a05ac427cbd1bee0ae05709632538bc8..b756f333d8a016d277bc8a2767d7639b7ab12d36 100644 +index 4888873a5efa026a1082c9f216eecc950b6f2471..460b51374e41c3d88e1c3641fb9f2f0205399b54 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3599,26 +3599,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3596,26 +3596,41 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } private Stream getIndirectPassengersStream() { diff --git a/patches/unapplied/server/0698-Fix-block-drops-position-losing-precision-millions-o.patch b/patches/server/0698-Fix-block-drops-position-losing-precision-millions-o.patch similarity index 96% rename from patches/unapplied/server/0698-Fix-block-drops-position-losing-precision-millions-o.patch rename to patches/server/0698-Fix-block-drops-position-losing-precision-millions-o.patch index 418540c464..6b5cd596c4 100644 --- a/patches/unapplied/server/0698-Fix-block-drops-position-losing-precision-millions-o.patch +++ b/patches/server/0698-Fix-block-drops-position-losing-precision-millions-o.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix block drops position losing precision millions of blocks 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 d63c320051b9d58c3503d268c7913673679c79dd..718c67c630f7799c20df9850d9c2056a7218c220 100644 +index cb11cef117fc896ddcb40993ddb852a2e717c2ad..2db7b9f145b53df5ef79ae235a0de7ccff50db7e 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -346,9 +346,11 @@ public class Block extends BlockBehaviour implements ItemLike { diff --git a/patches/unapplied/server/0699-Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/0699-Configurable-item-frame-map-cursor-update-interval.patch similarity index 100% rename from patches/unapplied/server/0699-Configurable-item-frame-map-cursor-update-interval.patch rename to patches/server/0699-Configurable-item-frame-map-cursor-update-interval.patch diff --git a/patches/unapplied/server/0700-Make-EntityUnleashEvent-cancellable.patch b/patches/server/0700-Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/unapplied/server/0700-Make-EntityUnleashEvent-cancellable.patch rename to patches/server/0700-Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/unapplied/server/0701-Clear-bucket-NBT-after-dispense.patch b/patches/server/0701-Clear-bucket-NBT-after-dispense.patch similarity index 100% rename from patches/unapplied/server/0701-Clear-bucket-NBT-after-dispense.patch rename to patches/server/0701-Clear-bucket-NBT-after-dispense.patch diff --git a/patches/unapplied/server/0702-Change-EnderEye-target-without-changing-other-things.patch b/patches/server/0702-Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/unapplied/server/0702-Change-EnderEye-target-without-changing-other-things.patch rename to patches/server/0702-Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/unapplied/server/0703-Add-BlockBreakBlockEvent.patch b/patches/server/0703-Add-BlockBreakBlockEvent.patch similarity index 98% rename from patches/unapplied/server/0703-Add-BlockBreakBlockEvent.patch rename to patches/server/0703-Add-BlockBreakBlockEvent.patch index b139762722..a69de03ab7 100644 --- a/patches/unapplied/server/0703-Add-BlockBreakBlockEvent.patch +++ b/patches/server/0703-Add-BlockBreakBlockEvent.patch @@ -5,7 +5,7 @@ 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 718c67c630f7799c20df9850d9c2056a7218c220..224ce424b9a22548212ac157ec273c6dd80d6cfb 100644 +index 2db7b9f145b53df5ef79ae235a0de7ccff50db7e..2e65b44f10aeb44fd524a58e7eb815a566c1ad61 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -333,6 +333,23 @@ public class Block extends BlockBehaviour implements ItemLike { diff --git a/patches/unapplied/server/0704-Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/server/0704-Option-to-prevent-NBT-copy-in-smithing-recipes.patch similarity index 100% rename from patches/unapplied/server/0704-Option-to-prevent-NBT-copy-in-smithing-recipes.patch rename to patches/server/0704-Option-to-prevent-NBT-copy-in-smithing-recipes.patch diff --git a/patches/unapplied/server/0705-More-CommandBlock-API.patch b/patches/server/0705-More-CommandBlock-API.patch similarity index 100% rename from patches/unapplied/server/0705-More-CommandBlock-API.patch rename to patches/server/0705-More-CommandBlock-API.patch diff --git a/patches/unapplied/server/0706-Add-missing-team-sidebar-display-slots.patch b/patches/server/0706-Add-missing-team-sidebar-display-slots.patch similarity index 100% rename from patches/unapplied/server/0706-Add-missing-team-sidebar-display-slots.patch rename to patches/server/0706-Add-missing-team-sidebar-display-slots.patch diff --git a/patches/unapplied/server/0707-Add-back-EntityPortalExitEvent.patch b/patches/server/0707-Add-back-EntityPortalExitEvent.patch similarity index 93% rename from patches/unapplied/server/0707-Add-back-EntityPortalExitEvent.patch rename to patches/server/0707-Add-back-EntityPortalExitEvent.patch index 46ae47d5cd..79c8ecd49d 100644 --- a/patches/unapplied/server/0707-Add-back-EntityPortalExitEvent.patch +++ b/patches/server/0707-Add-back-EntityPortalExitEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b756f333d8a016d277bc8a2767d7639b7ab12d36..9b2445319daa55a7e818d8ee3985a3101254a097 100644 +index 460b51374e41c3d88e1c3641fb9f2f0205399b54..3f4436a2257376f604926ff35c8589ba59c859e2 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3101,6 +3101,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3098,6 +3098,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } else { // CraftBukkit start worldserver = shapedetectorshape.world; @@ -32,7 +32,7 @@ index b756f333d8a016d277bc8a2767d7639b7ab12d36..9b2445319daa55a7e818d8ee3985a310 if (worldserver == this.level) { // SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot); -@@ -3120,8 +3137,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3117,8 +3134,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (entity != null) { entity.restoreFrom(this); diff --git a/patches/unapplied/server/0708-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0708-Add-methods-to-find-targets-for-lightning-strikes.patch similarity index 92% rename from patches/unapplied/server/0708-Add-methods-to-find-targets-for-lightning-strikes.patch rename to patches/server/0708-Add-methods-to-find-targets-for-lightning-strikes.patch index 40d2624aa6..5c117e0e16 100644 --- a/patches/unapplied/server/0708-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0708-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 8c61dc53f4874ab7013938abdf5d65a608369474..9b9653e2a88e63932884cfd392ac372a1b0da12b 100644 +index 4bebe9bc9dea53d57543e65d7300f50b0f907017..8c95d537c7bf5cc9b63f0e412c9ad67f5e6fe51e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -775,6 +775,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -776,6 +776,11 @@ public class ServerLevel extends Level implements WorldGenLevel { } protected BlockPos findLightningTargetAround(BlockPos pos) { @@ -20,7 +20,7 @@ index 8c61dc53f4874ab7013938abdf5d65a608369474..9b9653e2a88e63932884cfd392ac372a BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos); Optional optional = this.findLightningRod(blockposition1); -@@ -789,6 +794,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -790,6 +795,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (!list.isEmpty()) { return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition(); } else { diff --git a/patches/unapplied/server/0709-Get-entity-default-attributes.patch b/patches/server/0709-Get-entity-default-attributes.patch similarity index 98% rename from patches/unapplied/server/0709-Get-entity-default-attributes.patch rename to patches/server/0709-Get-entity-default-attributes.patch index fe8d293a99..49b00d01a0 100644 --- a/patches/unapplied/server/0709-Get-entity-default-attributes.patch +++ b/patches/server/0709-Get-entity-default-attributes.patch @@ -90,7 +90,7 @@ index 0000000000000000000000000000000000000000..4ecba0b02c2813a890aecc5586987879 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 5345ab40f18437fc60080f9feff4ee0d59a9ed6d..23c0a1cbff74067bb1700ec443f14ee441085b3c 100644 +index c98c5e070349e5c9356a3dec2344a135ad8f0b56..7e024b0f0a5201b4e9e7fcd7a160b146d7f12b52 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -562,6 +562,18 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0710-Left-handed-API.patch b/patches/server/0710-Left-handed-API.patch similarity index 100% rename from patches/unapplied/server/0710-Left-handed-API.patch rename to patches/server/0710-Left-handed-API.patch diff --git a/patches/unapplied/server/0711-Add-advancement-display-API.patch b/patches/server/0711-Add-advancement-display-API.patch similarity index 100% rename from patches/unapplied/server/0711-Add-advancement-display-API.patch rename to patches/server/0711-Add-advancement-display-API.patch diff --git a/patches/unapplied/server/0712-Add-ItemFactory-getMonsterEgg-API.patch b/patches/server/0712-Add-ItemFactory-getMonsterEgg-API.patch similarity index 100% rename from patches/unapplied/server/0712-Add-ItemFactory-getMonsterEgg-API.patch rename to patches/server/0712-Add-ItemFactory-getMonsterEgg-API.patch diff --git a/patches/unapplied/server/0713-Add-critical-damage-API.patch b/patches/server/0713-Add-critical-damage-API.patch similarity index 96% rename from patches/unapplied/server/0713-Add-critical-damage-API.patch rename to patches/server/0713-Add-critical-damage-API.patch index b7f4539a3c..980b435d42 100644 --- a/patches/unapplied/server/0713-Add-critical-damage-API.patch +++ b/patches/server/0713-Add-critical-damage-API.patch @@ -29,10 +29,10 @@ index 752f9f11227a47b7bed675b93e95af89c6732f63..67bce77093dcc126098731047447da20 public static DamageSource sting(LivingEntity attacker) { return new EntityDamageSource("sting", attacker); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 494ecf80d856bb3030aaf3892a5b175d8827aeff..d6458ad451c9c7665f5ff0101962af4469029e2c 100644 +index 92a5aadef076cb905962dab86f32d4ff253fef93..5451b1d61ae2ee4fa461c2a334bfe8f794868030 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1273,7 +1273,7 @@ public abstract class Player extends LivingEntity { +@@ -1274,7 +1274,7 @@ public abstract class Player extends LivingEntity { flag1 = true; } @@ -41,7 +41,7 @@ index 494ecf80d856bb3030aaf3892a5b175d8827aeff..d6458ad451c9c7665f5ff0101962af44 flag2 = flag2 && !level.paperConfig().entities.behavior.disablePlayerCrits; // Paper flag2 = flag2 && !this.isSprinting(); -@@ -1313,7 +1313,7 @@ public abstract class Player extends LivingEntity { +@@ -1314,7 +1314,7 @@ public abstract class Player extends LivingEntity { } Vec3 vec3d = target.getDeltaMovement(); @@ -50,7 +50,7 @@ index 494ecf80d856bb3030aaf3892a5b175d8827aeff..d6458ad451c9c7665f5ff0101962af44 if (flag5) { if (i > 0) { -@@ -1341,7 +1341,7 @@ public abstract class Player extends LivingEntity { +@@ -1342,7 +1342,7 @@ public abstract class Player extends LivingEntity { if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) { // CraftBukkit start - Only apply knockback if the damage hits diff --git a/patches/unapplied/server/0714-Fix-issues-with-mob-conversion.patch b/patches/server/0714-Fix-issues-with-mob-conversion.patch similarity index 100% rename from patches/unapplied/server/0714-Fix-issues-with-mob-conversion.patch rename to patches/server/0714-Fix-issues-with-mob-conversion.patch diff --git a/patches/unapplied/server/0715-Add-isCollidable-methods-to-various-places.patch b/patches/server/0715-Add-isCollidable-methods-to-various-places.patch similarity index 96% rename from patches/unapplied/server/0715-Add-isCollidable-methods-to-various-places.patch rename to patches/server/0715-Add-isCollidable-methods-to-various-places.patch index a553062120..70c5cdaf6e 100644 --- a/patches/unapplied/server/0715-Add-isCollidable-methods-to-various-places.patch +++ b/patches/server/0715-Add-isCollidable-methods-to-various-places.patch @@ -37,7 +37,7 @@ index 7b9e943b391c061782fccd2b8d705ceec8db50fe..966ac60daebb7bb211ab8096fc0c5f33 + // 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 23c0a1cbff74067bb1700ec443f14ee441085b3c..142451a2aa0ba9e9eae6e62294e2cbdfd5361ca2 100644 +index 7e024b0f0a5201b4e9e7fcd7a160b146d7f12b52..c3ac503bd2c04a94bc3c172b2c6bfe1308da29aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -574,6 +574,12 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0716-Goat-ram-API.patch b/patches/server/0716-Goat-ram-API.patch similarity index 100% rename from patches/unapplied/server/0716-Goat-ram-API.patch rename to patches/server/0716-Goat-ram-API.patch diff --git a/patches/unapplied/server/0717-Add-API-for-resetting-a-single-score.patch b/patches/server/0717-Add-API-for-resetting-a-single-score.patch similarity index 100% rename from patches/unapplied/server/0717-Add-API-for-resetting-a-single-score.patch rename to patches/server/0717-Add-API-for-resetting-a-single-score.patch diff --git a/patches/unapplied/server/0718-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0718-Add-Raw-Byte-Entity-Serialization.patch similarity index 94% rename from patches/unapplied/server/0718-Add-Raw-Byte-Entity-Serialization.patch rename to patches/server/0718-Add-Raw-Byte-Entity-Serialization.patch index 3f416ce6e5..fe3844bf5b 100644 --- a/patches/unapplied/server/0718-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/server/0718-Add-Raw-Byte-Entity-Serialization.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 9b2445319daa55a7e818d8ee3985a3101254a097..e8d9f41334e0de72672f01276fe86568f7528d89 100644 +index 3f4436a2257376f604926ff35c8589ba59c859e2..6f3147713b5bec3b2771e1ec52917fd4aee681bc 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1926,6 +1926,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1921,6 +1921,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } } @@ -45,7 +45,7 @@ index b8e5205c165bcba5b8383334f3d0d1daf9d0a8cd..ff8562821ebb363c755e9d316679226d // 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 142451a2aa0ba9e9eae6e62294e2cbdfd5361ca2..e8787c6d674178be3beadf3391e77948d9460b0c 100644 +index c3ac503bd2c04a94bc3c172b2c6bfe1308da29aa..1f491d48b591281e3a054c33683ac4cf76ada802 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -457,6 +457,30 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0719-Vanilla-command-permission-fixes.patch b/patches/server/0719-Vanilla-command-permission-fixes.patch similarity index 96% rename from patches/unapplied/server/0719-Vanilla-command-permission-fixes.patch rename to patches/server/0719-Vanilla-command-permission-fixes.patch index 8cdc94788c..777e0e5339 100644 --- a/patches/unapplied/server/0719-Vanilla-command-permission-fixes.patch +++ b/patches/server/0719-Vanilla-command-permission-fixes.patch @@ -30,10 +30,10 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b private RedirectModifier modifier = null; private boolean forks; diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index f34e8f5b6837473b5aef96fea89ec7564a86f430..af00f7dcbc1c4fb8da25128d5603b3ef041db7da 100644 +index edf980cf8992ddfe003ced279fe1324fc2364e5a..e70e5af7e49e4ccf332d9ce44e1a106344b35490 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -210,7 +210,13 @@ public class Commands { +@@ -213,7 +213,13 @@ public class Commands { if (environment.includeIntegrated) { PublishCommand.register(this.dispatcher); } diff --git a/patches/unapplied/server/0720-Make-CallbackExecutor-strict-again.patch b/patches/server/0720-Make-CallbackExecutor-strict-again.patch similarity index 93% rename from patches/unapplied/server/0720-Make-CallbackExecutor-strict-again.patch rename to patches/server/0720-Make-CallbackExecutor-strict-again.patch index 06de400e59..5a1db21f68 100644 --- a/patches/unapplied/server/0720-Make-CallbackExecutor-strict-again.patch +++ b/patches/server/0720-Make-CallbackExecutor-strict-again.patch @@ -10,10 +10,10 @@ schedules. Effectively, use the callback executor as a tool of finding issues rather than hiding these issues. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 13c4bfa296c854b5dbbffc495a029c6822131529..ddfb27d71ad6472760ac23fd31cf10780408525b 100644 +index b659a058a0b6eb6b1827aacbd703e15fcbb1609c..2418f1c0dc050d224bb866e62f414a55900d9652 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -168,17 +168,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -165,17 +165,28 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final CallbackExecutor callbackExecutor = new CallbackExecutor(); public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { diff --git a/patches/unapplied/server/0721-Do-not-allow-the-server-to-unload-chunks-at-request-.patch b/patches/server/0721-Do-not-allow-the-server-to-unload-chunks-at-request-.patch similarity index 100% rename from patches/unapplied/server/0721-Do-not-allow-the-server-to-unload-chunks-at-request-.patch rename to patches/server/0721-Do-not-allow-the-server-to-unload-chunks-at-request-.patch diff --git a/patches/unapplied/server/0722-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0722-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch similarity index 88% rename from patches/unapplied/server/0722-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch rename to patches/server/0722-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index 2f433c8c32..f323665a82 100644 --- a/patches/unapplied/server/0722-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/server/0722-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 9b9653e2a88e63932884cfd392ac372a1b0da12b..9d871a9dfeca169db3b598fe2ad5a23bfc88dd6f 100644 +index 8c95d537c7bf5cc9b63f0e412c9ad67f5e6fe51e..2634eba0537648c0e013455e813e25897ea71ff0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1333,9 +1333,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1334,9 +1334,13 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot Start for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) { if (tileentity instanceof net.minecraft.world.Container) { @@ -28,10 +28,10 @@ index 9b9653e2a88e63932884cfd392ac372a1b0da12b..9d871a9dfeca169db3b598fe2ad5a23b } // Spigot End diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 2e205bd42101889097c08a1ffa1103c3e838240c..c5f0bb56844f54ac7a5f248e1d05f9609847ca56 100644 +index ec713ffb7c4cba53dc983ebde5596e4749107493..62f2c9645a3bf5b2bfd9fe99d3e6ec08c7dafa9a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1590,6 +1590,18 @@ public class ServerPlayer extends Player { +@@ -1588,6 +1588,18 @@ public class ServerPlayer extends Player { this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId)); this.doCloseContainer(); } @@ -51,10 +51,10 @@ index 2e205bd42101889097c08a1ffa1103c3e838240c..c5f0bb56844f54ac7a5f248e1d05f960 public void doCloseContainer() { this.containerMenu.removed(this); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index d6458ad451c9c7665f5ff0101962af4469029e2c..cd9cbfa5ef94994b3f7f2ecdde843620e7e6c071 100644 +index 5451b1d61ae2ee4fa461c2a334bfe8f794868030..9b131f0a827413e9f5d6d0f7491c5481576cb8b1 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -505,6 +505,11 @@ public abstract class Player extends LivingEntity { +@@ -506,6 +506,11 @@ public abstract class Player extends LivingEntity { this.containerMenu = this.inventoryMenu; } // Paper end diff --git a/patches/unapplied/server/0723-Correctly-handle-recursion-for-chunkholder-updates.patch b/patches/server/0723-Correctly-handle-recursion-for-chunkholder-updates.patch similarity index 100% rename from patches/unapplied/server/0723-Correctly-handle-recursion-for-chunkholder-updates.patch rename to patches/server/0723-Correctly-handle-recursion-for-chunkholder-updates.patch diff --git a/patches/unapplied/server/0724-Fix-GameProfileCache-concurrency.patch b/patches/server/0724-Fix-GameProfileCache-concurrency.patch similarity index 98% rename from patches/unapplied/server/0724-Fix-GameProfileCache-concurrency.patch rename to patches/server/0724-Fix-GameProfileCache-concurrency.patch index 400971f5f6..68ce86c24e 100644 --- a/patches/unapplied/server/0724-Fix-GameProfileCache-concurrency.patch +++ b/patches/server/0724-Fix-GameProfileCache-concurrency.patch @@ -7,7 +7,7 @@ Separate lookup and state access locks prevent lookups from stalling simple state access/write calls diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java -index 2347c7b44793aabe431b57bb1b44935fefbda6fe..4dff88bdf14675718572e4b3720c0250ce6e730e 100644 +index 5e3bc0590e59770490b1c6c818d99be054214a8a..84bdf4a849b09a90da6c22f4080386e85a53f6b3 100644 --- a/src/main/java/net/minecraft/server/players/GameProfileCache.java +++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java @@ -62,6 +62,11 @@ public class GameProfileCache { diff --git a/patches/unapplied/server/0725-Fix-chunks-refusing-to-unload-at-low-TPS.patch b/patches/server/0725-Fix-chunks-refusing-to-unload-at-low-TPS.patch similarity index 88% rename from patches/unapplied/server/0725-Fix-chunks-refusing-to-unload-at-low-TPS.patch rename to patches/server/0725-Fix-chunks-refusing-to-unload-at-low-TPS.patch index 59e935284f..bbdf10fb3e 100644 --- a/patches/unapplied/server/0725-Fix-chunks-refusing-to-unload-at-low-TPS.patch +++ b/patches/server/0725-Fix-chunks-refusing-to-unload-at-low-TPS.patch @@ -10,10 +10,10 @@ chunk future to complete. We can simply schedule to the immediate executor to get this effect, rather than the main mailbox. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index ddfb27d71ad6472760ac23fd31cf10780408525b..da22b189483075b4439538dbfd6185001ca41e64 100644 +index 2418f1c0dc050d224bb866e62f414a55900d9652..f29d77572a3cd977fc492ada8ffc8b77467fabc5 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1331,9 +1331,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1328,9 +1328,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider return chunk; }); diff --git a/patches/unapplied/server/0726-Do-not-allow-ticket-level-changes-while-unloading-pl.patch b/patches/server/0726-Do-not-allow-ticket-level-changes-while-unloading-pl.patch similarity index 92% rename from patches/unapplied/server/0726-Do-not-allow-ticket-level-changes-while-unloading-pl.patch rename to patches/server/0726-Do-not-allow-ticket-level-changes-while-unloading-pl.patch index 44ba7aa7b3..5a943a25f6 100644 --- a/patches/unapplied/server/0726-Do-not-allow-ticket-level-changes-while-unloading-pl.patch +++ b/patches/server/0726-Do-not-allow-ticket-level-changes-while-unloading-pl.patch @@ -8,10 +8,10 @@ Sync loading the chunk at this stage would cause it to load older data, as well as screwing our region state. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index da22b189483075b4439538dbfd6185001ca41e64..d9d9f2c6bf56a89ba92856caadf9f52bc9f5d931 100644 +index f29d77572a3cd977fc492ada8ffc8b77467fabc5..ae0d7295c88005749f13dd230136f4a39d0a578e 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -317,6 +317,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -314,6 +314,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } // Paper end @@ -19,7 +19,7 @@ index da22b189483075b4439538dbfd6185001ca41e64..d9d9f2c6bf56a89ba92856caadf9f52b public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory, int viewDistance, boolean dsync) { super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync); this.visibleChunkMap = this.updatingChunkMap.clone(); -@@ -728,6 +729,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -725,6 +726,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Nullable ChunkHolder updateChunkScheduling(long pos, int level, @Nullable ChunkHolder holder, int k) { @@ -27,7 +27,7 @@ index da22b189483075b4439538dbfd6185001ca41e64..d9d9f2c6bf56a89ba92856caadf9f52b if (k > ChunkMap.MAX_CHUNK_DISTANCE && level > ChunkMap.MAX_CHUNK_DISTANCE) { return holder; } else { -@@ -931,6 +933,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -928,6 +930,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (completablefuture1 != completablefuture) { this.scheduleUnload(pos, holder); } else { @@ -40,7 +40,7 @@ index da22b189483075b4439538dbfd6185001ca41e64..d9d9f2c6bf56a89ba92856caadf9f52b // Paper start boolean removed; if ((removed = this.pendingUnloads.remove(pos, holder)) && ichunkaccess != null) { -@@ -968,6 +976,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -965,6 +973,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.regionManagers.get(index).removeChunk(holder.pos.x, holder.pos.z); } } // Paper end diff --git a/patches/unapplied/server/0727-Do-not-allow-ticket-level-changes-when-updating-chun.patch b/patches/server/0727-Do-not-allow-ticket-level-changes-when-updating-chun.patch similarity index 100% rename from patches/unapplied/server/0727-Do-not-allow-ticket-level-changes-when-updating-chun.patch rename to patches/server/0727-Do-not-allow-ticket-level-changes-when-updating-chun.patch diff --git a/patches/unapplied/server/0728-Log-when-the-async-catcher-is-tripped.patch b/patches/server/0728-Log-when-the-async-catcher-is-tripped.patch similarity index 100% rename from patches/unapplied/server/0728-Log-when-the-async-catcher-is-tripped.patch rename to patches/server/0728-Log-when-the-async-catcher-is-tripped.patch diff --git a/patches/unapplied/server/0729-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0729-Add-paper-mobcaps-and-paper-playermobcaps.patch similarity index 100% rename from patches/unapplied/server/0729-Add-paper-mobcaps-and-paper-playermobcaps.patch rename to patches/server/0729-Add-paper-mobcaps-and-paper-playermobcaps.patch diff --git a/patches/unapplied/server/0730-Prevent-unload-calls-removing-tickets-for-sync-loads.patch b/patches/server/0730-Prevent-unload-calls-removing-tickets-for-sync-loads.patch similarity index 100% rename from patches/unapplied/server/0730-Prevent-unload-calls-removing-tickets-for-sync-loads.patch rename to patches/server/0730-Prevent-unload-calls-removing-tickets-for-sync-loads.patch diff --git a/patches/unapplied/server/0731-Sanitize-ResourceLocation-error-logging.patch b/patches/server/0731-Sanitize-ResourceLocation-error-logging.patch similarity index 100% rename from patches/unapplied/server/0731-Sanitize-ResourceLocation-error-logging.patch rename to patches/server/0731-Sanitize-ResourceLocation-error-logging.patch diff --git a/patches/unapplied/server/0732-Allow-controlled-flushing-for-network-manager.patch b/patches/server/0732-Allow-controlled-flushing-for-network-manager.patch similarity index 74% rename from patches/unapplied/server/0732-Allow-controlled-flushing-for-network-manager.patch rename to patches/server/0732-Allow-controlled-flushing-for-network-manager.patch index b0edf138e4..4f18ab4af5 100644 --- a/patches/unapplied/server/0732-Allow-controlled-flushing-for-network-manager.patch +++ b/patches/server/0732-Allow-controlled-flushing-for-network-manager.patch @@ -9,10 +9,10 @@ This patch will be used to optimise out flush calls in later patches. diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 45598a94524519257c5ffb03800f0b081f4d7a78..0ace0209dd21b708ccf5afa7ef3f53d9dea8d521 100644 +index ca6b12b61874913f6d4abac97a3df67d0053cd8f..2195024a7b2626f4e6844db56071130226cf1364 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -103,6 +103,39 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -99,6 +99,39 @@ public class Connection extends SimpleChannelInboundHandler> { public ConnectionProtocol protocol; // Paper end @@ -52,23 +52,23 @@ index 45598a94524519257c5ffb03800f0b081f4d7a78..0ace0209dd21b708ccf5afa7ef3f53d9 public Connection(PacketFlow side) { this.receiving = side; } -@@ -268,7 +301,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -264,7 +297,7 @@ public class Connection extends SimpleChannelInboundHandler> { net.minecraft.server.MCUtil.isMainThread() && packet.isReady() && this.queue.isEmpty() && (packet.getExtraPackets() == null || packet.getExtraPackets().isEmpty()) ))) { -- this.sendPacket(packet, callback); -+ this.writePacket(packet, callback, null); // Paper +- this.sendPacket(packet, packetsendlistener); ++ this.sendPacket(packet, packetsendlistener, null); // Paper return; } // write the packets to the queue, then flush - antixray hooks there already -@@ -292,6 +325,14 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -288,6 +321,14 @@ public class Connection extends SimpleChannelInboundHandler> { } - private void sendPacket(Packet packet, @Nullable GenericFutureListener> callback) { + private void sendPacket(Packet packet, @Nullable PacketSendListener packetsendlistener) { + // Paper start - add flush parameter -+ this.writePacket(packet, callback, Boolean.TRUE); ++ this.sendPacket(packet, packetsendlistener, Boolean.TRUE); + } -+ private void writePacket(Packet packet, @Nullable GenericFutureListener> callback, Boolean flushConditional) { ++ private void sendPacket(Packet packet, @Nullable PacketSendListener packetsendlistener, Boolean flushConditional) { + this.packetWrites.getAndIncrement(); // must be befeore using canFlush + boolean effectiveFlush = flushConditional == null ? this.canFlush : flushConditional.booleanValue(); + final boolean flush = effectiveFlush || packet instanceof net.minecraft.network.protocol.game.ClientboundKeepAlivePacket || packet instanceof ClientboundDisconnectPacket; // no delay for certain packets @@ -76,40 +76,40 @@ index 45598a94524519257c5ffb03800f0b081f4d7a78..0ace0209dd21b708ccf5afa7ef3f53d9 ConnectionProtocol enumprotocol = ConnectionProtocol.getProtocolForPacket(packet); ConnectionProtocol enumprotocol1 = this.getCurrentProtocol(); -@@ -302,16 +343,21 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -298,16 +339,21 @@ public class Connection extends SimpleChannelInboundHandler> { } if (this.channel.eventLoop().inEventLoop()) { -- this.doSendPacket(packet, callback, enumprotocol, enumprotocol1); -+ this.doSendPacket(packet, callback, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter +- this.doSendPacket(packet, packetsendlistener, enumprotocol, enumprotocol1); ++ this.doSendPacket(packet, packetsendlistener, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter } else { this.channel.eventLoop().execute(() -> { -- this.doSendPacket(packet, callback, enumprotocol, enumprotocol1); -+ this.doSendPacket(packet, callback, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter +- this.doSendPacket(packet, packetsendlistener, enumprotocol, enumprotocol1); ++ this.doSendPacket(packet, packetsendlistener, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter }); } } - private void doSendPacket(Packet packet, @Nullable GenericFutureListener> callback, ConnectionProtocol packetState, ConnectionProtocol currentState) { + private void doSendPacket(Packet packet, @Nullable PacketSendListener packetsendlistener, ConnectionProtocol packetState, ConnectionProtocol currentState) { + // Paper start - add flush parameter -+ this.doSendPacket(packet, callback, packetState, currentState, true); ++ this.doSendPacket(packet, packetsendlistener, packetState, currentState, true); + } -+ private void doSendPacket(Packet packet, @Nullable GenericFutureListener> callback, ConnectionProtocol packetState, ConnectionProtocol currentState, boolean flush) { ++ private void doSendPacket(Packet packet, @Nullable PacketSendListener packetsendlistener, ConnectionProtocol packetState, ConnectionProtocol currentState, boolean flush) { + // Paper end - add flush parameter if (packetState != currentState) { this.setProtocol(packetState); } -@@ -325,7 +371,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -321,7 +367,7 @@ public class Connection extends SimpleChannelInboundHandler> { try { // Paper end - ChannelFuture channelfuture = this.channel.writeAndFlush(packet); + ChannelFuture channelfuture = flush ? this.channel.writeAndFlush(packet) : this.channel.write(packet); // Paper - add flush parameter - if (callback != null) { - channelfuture.addListener(callback); -@@ -367,6 +413,10 @@ public class Connection extends SimpleChannelInboundHandler> { + if (packetsendlistener != null) { + channelfuture.addListener((future) -> { +@@ -376,6 +422,10 @@ public class Connection extends SimpleChannelInboundHandler> { } private boolean processQueue() { if (this.queue.isEmpty()) return true; @@ -120,7 +120,7 @@ index 45598a94524519257c5ffb03800f0b081f4d7a78..0ace0209dd21b708ccf5afa7ef3f53d9 // If we are on main, we are safe here in that nothing else should be processing queue off main anymore // But if we are not on main due to login/status, the parent is synchronized on packetQueue java.util.Iterator iterator = this.queue.iterator(); -@@ -374,16 +424,22 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -383,16 +433,22 @@ public class Connection extends SimpleChannelInboundHandler> { PacketHolder queued = iterator.next(); // poll -> peek // Fix NPE (Spigot bug caused by handleDisconnection()) diff --git a/patches/unapplied/server/0733-Optimise-general-POI-access.patch b/patches/server/0733-Optimise-general-POI-access.patch similarity index 100% rename from patches/unapplied/server/0733-Optimise-general-POI-access.patch rename to patches/server/0733-Optimise-general-POI-access.patch diff --git a/patches/unapplied/server/0734-Add-more-async-catchers.patch b/patches/server/0734-Add-more-async-catchers.patch similarity index 100% rename from patches/unapplied/server/0734-Add-more-async-catchers.patch rename to patches/server/0734-Add-more-async-catchers.patch diff --git a/patches/unapplied/server/0735-Rewrite-entity-bounding-box-lookup-calls.patch b/patches/server/0735-Rewrite-entity-bounding-box-lookup-calls.patch similarity index 99% rename from patches/unapplied/server/0735-Rewrite-entity-bounding-box-lookup-calls.patch rename to patches/server/0735-Rewrite-entity-bounding-box-lookup-calls.patch index 273d68bf8a..4348e1948f 100644 --- a/patches/unapplied/server/0735-Rewrite-entity-bounding-box-lookup-calls.patch +++ b/patches/server/0735-Rewrite-entity-bounding-box-lookup-calls.patch @@ -914,10 +914,10 @@ index 0000000000000000000000000000000000000000..3ba094e640d7fe7803e2bbdab8ff3beb + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9d871a9dfeca169db3b598fe2ad5a23bfc88dd6f..dc00bbc9642c9c112f930e669e84c11de7375414 100644 +index 2634eba0537648c0e013455e813e25897ea71ff0..306e40f7fa6435cfb3c2da7382daf71a51b58e18 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -449,7 +449,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -450,7 +450,7 @@ public class ServerLevel extends Level implements WorldGenLevel { DataFixer datafixer = minecraftserver.getFixerUpper(); EntityPersistentStorage entitypersistentstorage = new EntityStorage(this, convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, minecraftserver); @@ -927,10 +927,10 @@ index 9d871a9dfeca169db3b598fe2ad5a23bfc88dd6f..dc00bbc9642c9c112f930e669e84c11d int j = this.spigotConfig.viewDistance; // Spigot int k = this.spigotConfig.simulationDistance; // Spigot diff --git a/src/main/java/net/minecraft/server/level/WorldGenRegion.java b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -index ba3023c7dd5b3bcf66f829fe5dc9757f96d16b45..05ff7bcc79e617904903cf082f6687d24e587547 100644 +index 32d6e4b194c3c4eca7009059f8d185896b5ae556..51d3150e732f95be13f5f54d994dab1fa89ed3f2 100644 --- a/src/main/java/net/minecraft/server/level/WorldGenRegion.java +++ b/src/main/java/net/minecraft/server/level/WorldGenRegion.java -@@ -497,4 +497,21 @@ public class WorldGenRegion implements WorldGenLevel { +@@ -498,4 +498,21 @@ public class WorldGenRegion implements WorldGenLevel { public long nextSubTickCount() { return this.subTickCount.getAndIncrement(); } @@ -953,7 +953,7 @@ index ba3023c7dd5b3bcf66f829fe5dc9757f96d16b45..05ff7bcc79e617904903cf082f6687d2 + // Paper end } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index e8d9f41334e0de72672f01276fe86568f7528d89..43bbf654d97bbf4009e5ea59c756926a05089f68 100644 +index 6f3147713b5bec3b2771e1ec52917fd4aee681bc..9567822f314cd3978ed63bb867e57b610d76228e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -490,6 +490,56 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -1013,7 +1013,7 @@ index e8d9f41334e0de72672f01276fe86568f7528d89..43bbf654d97bbf4009e5ea59c756926a public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); this.passengers = ImmutableList.of(); -@@ -2361,11 +2411,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2358,11 +2408,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return InteractionResult.PASS; } diff --git a/patches/unapplied/server/0736-Optimise-chunk-tick-iteration.patch b/patches/server/0736-Optimise-chunk-tick-iteration.patch similarity index 98% rename from patches/unapplied/server/0736-Optimise-chunk-tick-iteration.patch rename to patches/server/0736-Optimise-chunk-tick-iteration.patch index 9b47592223..3789453481 100644 --- a/patches/unapplied/server/0736-Optimise-chunk-tick-iteration.patch +++ b/patches/server/0736-Optimise-chunk-tick-iteration.patch @@ -70,10 +70,10 @@ index b75b3c4d274252a3a5c53059b9702728eeada389..8bea90cb57f38f33e8b3162e24e35399 int i = 0; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index d9d9f2c6bf56a89ba92856caadf9f52bc9f5d931..0110a63e96a22bc179f5e2451d5c67927fd10ee5 100644 +index ae0d7295c88005749f13dd230136f4a39d0a578e..1bbb15354e457a6056d380f9ef318a4661f460e3 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -163,6 +163,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -160,6 +160,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private final Queue unloadQueue; int viewDistance; public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobDistanceMap; // Paper diff --git a/patches/unapplied/server/0737-Execute-chunk-tasks-mid-tick.patch b/patches/server/0737-Execute-chunk-tasks-mid-tick.patch similarity index 94% rename from patches/unapplied/server/0737-Execute-chunk-tasks-mid-tick.patch rename to patches/server/0737-Execute-chunk-tasks-mid-tick.patch index faee0ae897..11d226c606 100644 --- a/patches/unapplied/server/0737-Execute-chunk-tasks-mid-tick.patch +++ b/patches/server/0737-Execute-chunk-tasks-mid-tick.patch @@ -19,7 +19,7 @@ index 23e564b05ba438924180c91f9b19a60731eedd1b..5ec241d49ff5e3a161a39006f05823a5 private MinecraftTimings() {} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c4a2fd7a2104ad94c4835981b08ebb4ce2529629..ec269017109b062db6f73702f36319829c8feaf6 100644 +index d605c4355674644e47ea5ea9e979f7806aed1607..421872f7cc1a3cbb4dc596d0e0fa0f9b63602a8a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1303,6 +1303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop allChunks = new ArrayList<>(visibleChunks.values()); List players = world.players; diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b16543621 100644 +index 1bbb15354e457a6056d380f9ef318a4661f460e3..b3dc2e71230304ab42b9dd935025f0bd3117bd01 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -126,9 +126,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -123,9 +123,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider private static final int MIN_VIEW_DISTANCE = 3; public static final int MAX_VIEW_DISTANCE = 33; public static final int MAX_CHUNK_DISTANCE = 33 + ChunkStatus.maxDistance(); @@ -52,7 +52,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b private final Long2ObjectLinkedOpenHashMap pendingUnloads; public final LongSet entitiesInLevel; public final ServerLevel level; -@@ -321,7 +323,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -318,7 +320,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider boolean unloadingPlayerChunk = false; // Paper - do not allow ticket level changes while unloading chunks public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier persistentStateManagerFactory, int viewDistance, boolean dsync) { super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync); @@ -61,7 +61,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b this.pendingUnloads = new Long2ObjectLinkedOpenHashMap(); this.entitiesInLevel = new LongOpenHashSet(); this.toDrop = new LongOpenHashSet(); -@@ -562,12 +564,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -559,12 +561,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @Nullable public ChunkHolder getUpdatingChunkIfPresent(long pos) { @@ -81,7 +81,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b } protected IntSupplier getChunkQueueLevel(long pos) { -@@ -707,9 +714,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -704,9 +711,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider }; stringbuilder.append("Updating:").append(System.lineSeparator()); @@ -93,7 +93,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b CrashReport crashreport = CrashReport.forThrowable(exception, "Chunk loading"); CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Chunk loading"); -@@ -760,7 +767,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -757,7 +764,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end } @@ -102,7 +102,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b this.modified = true; } -@@ -840,7 +847,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -837,7 +844,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider protected void saveAllChunks(boolean flush) { if (flush) { @@ -111,7 +111,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b MutableBoolean mutableboolean = new MutableBoolean(); do { -@@ -871,7 +878,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -868,7 +875,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider //this.flushWorker(); // Paper - nuke IOWorker this.level.asyncChunkTaskManager.flush(); // Paper - flush to preserve behavior compat with pre-async behaviour } else { @@ -120,7 +120,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b } } -@@ -894,14 +901,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -891,14 +898,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public boolean hasWork() { @@ -137,7 +137,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b if (playerchunk != null) { playerchunk.onChunkRemove(); // Paper -@@ -996,7 +1003,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -993,7 +1000,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (!this.modified) { return false; } else { @@ -151,7 +151,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b this.modified = false; return true; } -@@ -1496,7 +1508,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1493,7 +1505,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.viewDistance = j; this.distanceManager.updatePlayerTickets(this.viewDistance + 1); @@ -160,7 +160,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b while (objectiterator.hasNext()) { ChunkHolder playerchunk = (ChunkHolder) objectiterator.next(); -@@ -1539,7 +1551,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1536,7 +1548,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public int size() { @@ -169,7 +169,7 @@ index 0110a63e96a22bc179f5e2451d5c67927fd10ee5..f5b22082aabc30235ca0c1633273e15b } public DistanceManager getDistanceManager() { -@@ -1547,13 +1559,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1544,13 +1556,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } protected Iterable getChunks() { diff --git a/patches/unapplied/server/0739-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/server/0739-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch similarity index 100% rename from patches/unapplied/server/0739-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch rename to patches/server/0739-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch diff --git a/patches/unapplied/server/0740-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/server/0740-Custom-table-implementation-for-blockstate-state-loo.patch similarity index 100% rename from patches/unapplied/server/0740-Custom-table-implementation-for-blockstate-state-loo.patch rename to patches/server/0740-Custom-table-implementation-for-blockstate-state-loo.patch diff --git a/patches/unapplied/server/0741-Detail-more-information-in-watchdog-dumps.patch b/patches/server/0741-Detail-more-information-in-watchdog-dumps.patch similarity index 93% rename from patches/unapplied/server/0741-Detail-more-information-in-watchdog-dumps.patch rename to patches/server/0741-Detail-more-information-in-watchdog-dumps.patch index 487e57b4e9..9c11781e84 100644 --- a/patches/unapplied/server/0741-Detail-more-information-in-watchdog-dumps.patch +++ b/patches/server/0741-Detail-more-information-in-watchdog-dumps.patch @@ -7,18 +7,19 @@ Subject: [PATCH] Detail more information in watchdog dumps - Dump player name, player uuid, position, and world for packet handling diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 0ace0209dd21b708ccf5afa7ef3f53d9dea8d521..363829a3bce2803e234ff81ae4b0cba3072fd5f9 100644 +index 2195024a7b2626f4e6844db56071130226cf1364..92b36499c7b655b1b7d866fe116486962aef1803 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -465,7 +465,14 @@ public class Connection extends SimpleChannelInboundHandler> { - } +@@ -475,9 +475,15 @@ public class Connection extends SimpleChannelInboundHandler> { + PacketListener packetlistener = this.packetListener; - if (this.packetListener instanceof ServerGamePacketListenerImpl) { + if (packetlistener instanceof TickablePacketListener) { + // Paper start - detailed watchdog information + net.minecraft.network.protocol.PacketUtils.packetProcessing.push(this.packetListener); -+ try { -+ // Paper end - detailed watchdog information - ((ServerGamePacketListenerImpl) this.packetListener).tick(); ++ try { // Paper end - detailed watchdog information + TickablePacketListener tickablepacketlistener = (TickablePacketListener) packetlistener; + + tickablepacketlistener.tick(); + } finally { // Paper start - detailed watchdog information + net.minecraft.network.protocol.PacketUtils.packetProcessing.pop(); + } // Paper start - detailed watchdog information @@ -77,10 +78,10 @@ index a34f22cadc09e53ea4de787b04d050b99dddbcac..c8012de68b997d6270ba4a5d79bc93c0 }); throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a82c81f8a4178fc049ffaa2e5a837836ef5b42a6..9ab6f7df04b56012413f2485dd5a8785f95390dc 100644 +index 53105ca96f5056adbba6a97ac428587e7c3b683a..a9b23308c89aef277394821cb883540a0c9e7056 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1001,7 +1001,26 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1002,7 +1002,26 @@ public class ServerLevel extends Level implements WorldGenLevel { } @@ -107,7 +108,7 @@ index a82c81f8a4178fc049ffaa2e5a837836ef5b42a6..9ab6f7df04b56012413f2485dd5a8785 ++TimingHistory.entityTicks; // Paper - timings // Spigot start co.aikar.timings.Timing timer; // Paper -@@ -1041,7 +1060,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1042,7 +1061,13 @@ public class ServerLevel extends Level implements WorldGenLevel { this.tickPassenger(entity, entity1); } // } finally { timer.stopTiming(); } // Paper - timings - move up @@ -123,7 +124,7 @@ index a82c81f8a4178fc049ffaa2e5a837836ef5b42a6..9ab6f7df04b56012413f2485dd5a8785 private void tickPassenger(Entity vehicle, Entity passenger) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 43bbf654d97bbf4009e5ea59c756926a05089f68..a325b145be3efda4c3521871c6b1cffddbd68c00 100644 +index 9567822f314cd3978ed63bb867e57b610d76228e..37123198bdf0188f59f289a31570663938fdc3c1 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -971,7 +971,42 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -183,7 +184,7 @@ index 43bbf654d97bbf4009e5ea59c756926a05089f68..a325b145be3efda4c3521871c6b1cffd } protected boolean isHorizontalCollisionMinor(Vec3 adjustedMovement) { -@@ -3951,7 +3993,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3948,7 +3990,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void setDeltaMovement(Vec3 velocity) { @@ -193,7 +194,7 @@ index 43bbf654d97bbf4009e5ea59c756926a05089f68..a325b145be3efda4c3521871c6b1cffd } public void setDeltaMovement(double x, double y, double z) { -@@ -4027,7 +4071,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4024,7 +4068,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } // Paper end - fix MC-4 if (this.position.x != x || this.position.y != y || this.position.z != z) { diff --git a/patches/unapplied/server/0742-Manually-inline-methods-in-BlockPosition.patch b/patches/server/0742-Manually-inline-methods-in-BlockPosition.patch similarity index 100% rename from patches/unapplied/server/0742-Manually-inline-methods-in-BlockPosition.patch rename to patches/server/0742-Manually-inline-methods-in-BlockPosition.patch diff --git a/patches/unapplied/server/0743-Distance-manager-tick-timings.patch b/patches/server/0743-Distance-manager-tick-timings.patch similarity index 100% rename from patches/unapplied/server/0743-Distance-manager-tick-timings.patch rename to patches/server/0743-Distance-manager-tick-timings.patch diff --git a/patches/unapplied/server/0744-Name-craft-scheduler-threads-according-to-the-plugin.patch b/patches/server/0744-Name-craft-scheduler-threads-according-to-the-plugin.patch similarity index 100% rename from patches/unapplied/server/0744-Name-craft-scheduler-threads-according-to-the-plugin.patch rename to patches/server/0744-Name-craft-scheduler-threads-according-to-the-plugin.patch diff --git a/patches/unapplied/server/0745-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/server/0745-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch similarity index 100% rename from patches/unapplied/server/0745-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch rename to patches/server/0745-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch diff --git a/patches/unapplied/server/0746-Add-packet-limiter-config.patch b/patches/server/0746-Add-packet-limiter-config.patch similarity index 95% rename from patches/unapplied/server/0746-Add-packet-limiter-config.patch rename to patches/server/0746-Add-packet-limiter-config.patch index 9dfffd0e37..4f7e98a16e 100644 --- a/patches/unapplied/server/0746-Add-packet-limiter-config.patch +++ b/patches/server/0746-Add-packet-limiter-config.patch @@ -24,10 +24,10 @@ and an action can be defined: DROP or KICK If interval or rate are less-than 0, the limit is ignored diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 363829a3bce2803e234ff81ae4b0cba3072fd5f9..7f089f7451b956e4c8cb6581354beb5fc4e45318 100644 +index 92b36499c7b655b1b7d866fe116486962aef1803..80cc3b62af324512f695e971cce2b01f6eadbdbf 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -135,6 +135,22 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -131,6 +131,22 @@ public class Connection extends SimpleChannelInboundHandler> { } } // Paper end - allow controlled flushing @@ -50,7 +50,7 @@ index 363829a3bce2803e234ff81ae4b0cba3072fd5f9..7f089f7451b956e4c8cb6581354beb5f public Connection(PacketFlow side) { this.receiving = side; -@@ -215,6 +231,45 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -211,6 +227,45 @@ public class Connection extends SimpleChannelInboundHandler> { protected void channelRead0(ChannelHandlerContext channelhandlercontext, Packet packet) { if (this.channel.isOpen()) { diff --git a/patches/unapplied/server/0747-Use-correct-LevelStem-registry-when-loading-default-.patch b/patches/server/0747-Use-correct-LevelStem-registry-when-loading-default-.patch similarity index 94% rename from patches/unapplied/server/0747-Use-correct-LevelStem-registry-when-loading-default-.patch rename to patches/server/0747-Use-correct-LevelStem-registry-when-loading-default-.patch index 56b7f40b2f..0fb83af7c8 100644 --- a/patches/unapplied/server/0747-Use-correct-LevelStem-registry-when-loading-default-.patch +++ b/patches/server/0747-Use-correct-LevelStem-registry-when-loading-default-.patch @@ -24,10 +24,10 @@ index 8da1226a6c293abb038d10c7921a77ed71ad06cc..f958f0ae738a6fb26400e17e54c8d69e } else { Holder holder = registry.getOrCreateHolderOrThrow(entryKey); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ec269017109b062db6f73702f36319829c8feaf6..64a4a56d4bb929fddfa415ffea4118cc9c94a4dc 100644 +index 421872f7cc1a3cbb4dc596d0e0fa0f9b63602a8a..8a36c0bacb71cd9e31affa6290d28bf0f0374d07 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -551,7 +551,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver)); diff --git a/patches/unapplied/server/0748-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch b/patches/server/0748-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch similarity index 100% rename from patches/unapplied/server/0748-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch rename to patches/server/0748-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch diff --git a/patches/unapplied/server/0749-Consolidate-flush-calls-for-entity-tracker-packets.patch b/patches/server/0749-Consolidate-flush-calls-for-entity-tracker-packets.patch similarity index 100% rename from patches/unapplied/server/0749-Consolidate-flush-calls-for-entity-tracker-packets.patch rename to patches/server/0749-Consolidate-flush-calls-for-entity-tracker-packets.patch diff --git a/patches/unapplied/server/0750-Don-t-lookup-fluid-state-when-raytracing.patch b/patches/server/0750-Don-t-lookup-fluid-state-when-raytracing.patch similarity index 100% rename from patches/unapplied/server/0750-Don-t-lookup-fluid-state-when-raytracing.patch rename to patches/server/0750-Don-t-lookup-fluid-state-when-raytracing.patch diff --git a/patches/unapplied/server/0751-Time-scoreboard-search.patch b/patches/server/0751-Time-scoreboard-search.patch similarity index 100% rename from patches/unapplied/server/0751-Time-scoreboard-search.patch rename to patches/server/0751-Time-scoreboard-search.patch diff --git a/patches/unapplied/server/0752-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0752-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/unapplied/server/0752-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/server/0752-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/unapplied/server/0753-Do-not-run-raytrace-logic-for-AIR.patch b/patches/server/0753-Do-not-run-raytrace-logic-for-AIR.patch similarity index 100% rename from patches/unapplied/server/0753-Do-not-run-raytrace-logic-for-AIR.patch rename to patches/server/0753-Do-not-run-raytrace-logic-for-AIR.patch diff --git a/patches/unapplied/server/0754-Oprimise-map-impl-for-tracked-players.patch b/patches/server/0754-Oprimise-map-impl-for-tracked-players.patch similarity index 87% rename from patches/unapplied/server/0754-Oprimise-map-impl-for-tracked-players.patch rename to patches/server/0754-Oprimise-map-impl-for-tracked-players.patch index c583ec8590..a7f5f938d1 100644 --- a/patches/unapplied/server/0754-Oprimise-map-impl-for-tracked-players.patch +++ b/patches/server/0754-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 f5b22082aabc30235ca0c1633273e15b16543621..603b5275221494b146b0f30680362d695c55f30b 100644 +index b3dc2e71230304ab42b9dd935025f0bd3117bd01..5507f6982bfc02f648a7aa4e4860378fc442cf34 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -113,6 +113,7 @@ import org.slf4j.Logger; +@@ -110,6 +110,7 @@ import org.slf4j.Logger; import org.bukkit.craftbukkit.generator.CustomChunkGenerator; import org.bukkit.entity.Player; // CraftBukkit end @@ -18,7 +18,7 @@ index f5b22082aabc30235ca0c1633273e15b16543621..603b5275221494b146b0f30680362d69 public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider { -@@ -2203,7 +2204,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -2200,7 +2201,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider final Entity entity; private final int range; SectionPos lastSectionPos; diff --git a/patches/unapplied/server/0755-Optimise-BlockSoil-nearby-water-lookup.patch b/patches/server/0755-Optimise-BlockSoil-nearby-water-lookup.patch similarity index 100% rename from patches/unapplied/server/0755-Optimise-BlockSoil-nearby-water-lookup.patch rename to patches/server/0755-Optimise-BlockSoil-nearby-water-lookup.patch diff --git a/patches/unapplied/server/0756-Allow-removal-addition-of-entities-to-entity-ticklis.patch b/patches/server/0756-Allow-removal-addition-of-entities-to-entity-ticklis.patch similarity index 100% rename from patches/unapplied/server/0756-Allow-removal-addition-of-entities-to-entity-ticklis.patch rename to patches/server/0756-Allow-removal-addition-of-entities-to-entity-ticklis.patch diff --git a/patches/unapplied/server/0757-Optimise-random-block-ticking.patch b/patches/server/0757-Optimise-random-block-ticking.patch similarity index 98% rename from patches/unapplied/server/0757-Optimise-random-block-ticking.patch rename to patches/server/0757-Optimise-random-block-ticking.patch index c74ca4535f..14c7a5c17d 100644 --- a/patches/unapplied/server/0757-Optimise-random-block-ticking.patch +++ b/patches/server/0757-Optimise-random-block-ticking.patch @@ -90,10 +90,10 @@ index 0000000000000000000000000000000000000000..7d93652c1abbb6aee6eb7c26cf35d4d0 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9ab6f7df04b56012413f2485dd5a8785f95390dc..a856089e292580d20876603efda688d7ab18b3d5 100644 +index a9b23308c89aef277394821cb883540a0c9e7056..b779656482325416ef37d6909b01a136e7f97656 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -665,6 +665,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -666,6 +666,10 @@ public class ServerLevel extends Level implements WorldGenLevel { entityplayer.stopSleepInBed(false, false); }); } @@ -104,7 +104,7 @@ index 9ab6f7df04b56012413f2485dd5a8785f95390dc..a856089e292580d20876603efda688d7 public void tickChunk(LevelChunk chunk, int randomTickSpeed) { ChunkPos chunkcoordintpair = chunk.getPos(); -@@ -674,10 +678,10 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -675,10 +679,10 @@ public class ServerLevel extends Level implements WorldGenLevel { ProfilerFiller gameprofilerfiller = this.getProfiler(); gameprofilerfiller.push("thunder"); @@ -117,7 +117,7 @@ index 9ab6f7df04b56012413f2485dd5a8785f95390dc..a856089e292580d20876603efda688d7 if (this.isRainingAt(blockposition)) { DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition); boolean flag1 = this.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.getEffectiveDifficulty() * this.paperConfig().entities.spawning.skeletonHorseThunderSpawnChance.or(0.01D) && !this.getBlockState(blockposition.below()).is(Blocks.LIGHTNING_ROD); // Paper -@@ -701,64 +705,75 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -702,64 +706,75 @@ public class ServerLevel extends Level implements WorldGenLevel { gameprofilerfiller.popPush("iceandsnow"); if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow @@ -429,7 +429,7 @@ index 066874d27495dcaa3dea254b7328257e46920357..c3f1334b2bb97f0633f3ea43b97ee49a public PalettedContainer getStates() { diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java -index 0c309a2f10ca75dc90076156b2d666deb37f72ba..d71954c3b080e0d4a082b84925592350d8259aac 100644 +index e77b516995666402cc8814ac78a6c11077108b2e..1326dc1239e00e7001c9ea98713b955b37e759b9 100644 --- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java +++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java @@ -383,6 +383,14 @@ public class PalettedContainer implements PaletteResize, PalettedContainer diff --git a/patches/unapplied/server/0758-Optimise-non-flush-packet-sending.patch b/patches/server/0758-Optimise-non-flush-packet-sending.patch similarity index 73% rename from patches/unapplied/server/0758-Optimise-non-flush-packet-sending.patch rename to patches/server/0758-Optimise-non-flush-packet-sending.patch index 3bd4d0232f..1b2114c376 100644 --- a/patches/unapplied/server/0758-Optimise-non-flush-packet-sending.patch +++ b/patches/server/0758-Optimise-non-flush-packet-sending.patch @@ -20,10 +20,10 @@ up on this optimisation before he came along. Locally this patch drops the entity tracker tick by a full 1.5x. diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 7f089f7451b956e4c8cb6581354beb5fc4e45318..e0a29625d17d315b2f614c65a0a82c6d1a82676d 100644 +index 80cc3b62af324512f695e971cce2b01f6eadbdbf..549c82b2bd91db70bc83b4e33131774a0d2d17ac 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -50,6 +50,8 @@ import org.slf4j.Logger; +@@ -46,6 +46,8 @@ import org.slf4j.Logger; import org.slf4j.Marker; import org.slf4j.MarkerFactory; @@ -32,22 +32,22 @@ index 7f089f7451b956e4c8cb6581354beb5fc4e45318..e0a29625d17d315b2f614c65a0a82c6d public class Connection extends SimpleChannelInboundHandler> { private static final float AVERAGE_PACKETS_SMOOTHING = 0.75F; -@@ -400,9 +402,19 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -396,9 +398,19 @@ public class Connection extends SimpleChannelInboundHandler> { if (this.channel.eventLoop().inEventLoop()) { - this.doSendPacket(packet, callback, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter + this.doSendPacket(packet, packetsendlistener, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter } else { + // Paper start - optimise packets that are not flushed + // note: since the type is not dynamic here, we need to actually copy the old executor code + // into two branches. On conflict, just re-copy - no changes were made inside the executor code. + if (!flush) { + AbstractEventExecutor.LazyRunnable run = () -> { -+ this.doSendPacket(packet, callback, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter ++ this.doSendPacket(packet, packetsendlistener, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter + }; + this.channel.eventLoop().execute(run); + } else { // Paper end - optimise packets that are not flushed this.channel.eventLoop().execute(() -> { -- this.doSendPacket(packet, callback, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter -+ this.doSendPacket(packet, callback, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter // Paper - diff on change +- this.doSendPacket(packet, packetsendlistener, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter ++ this.doSendPacket(packet, packetsendlistener, enumprotocol, enumprotocol1, flush); // Paper - add flush parameter // Paper - diff on change }); + } // Paper } diff --git a/patches/unapplied/server/0759-Optimise-nearby-player-lookups.patch b/patches/server/0759-Optimise-nearby-player-lookups.patch similarity index 97% rename from patches/unapplied/server/0759-Optimise-nearby-player-lookups.patch rename to patches/server/0759-Optimise-nearby-player-lookups.patch index d1b84b529f..3d88aaad37 100644 --- a/patches/unapplied/server/0759-Optimise-nearby-player-lookups.patch +++ b/patches/server/0759-Optimise-nearby-player-lookups.patch @@ -39,10 +39,10 @@ index 8bea90cb57f38f33e8b3162e24e353993a98ebbf..5b4c3ca92dffff876af18db106310cb1 // Paper end - optimise anyPlayerCloseEnoughForSpawning long lastAutoSaveTime; // Paper - incremental autosave diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 603b5275221494b146b0f30680362d695c55f30b..640b87d6acb4faf78bb4d6930bf0ac17691f89f7 100644 +index 5507f6982bfc02f648a7aa4e4860378fc442cf34..97ec72dc383a2637c60cfc988bca2a8a86954ffb 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -168,6 +168,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -165,6 +165,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobDistanceMap; // Paper public final ReferenceOpenHashSet needsChangeBroadcasting = new ReferenceOpenHashSet<>(); @@ -56,7 +56,7 @@ index 603b5275221494b146b0f30680362d695c55f30b..640b87d6acb4faf78bb4d6930bf0ac17 // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback() public final CallbackExecutor callbackExecutor = new CallbackExecutor(); public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable { -@@ -245,6 +252,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -242,6 +249,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end - use distance map to optimise entity tracker // Note: players need to be explicitly added to distance maps before they can be updated this.playerChunkTickRangeMap.add(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise ChunkMap#anyPlayerCloseEnoughForSpawning @@ -64,7 +64,7 @@ index 603b5275221494b146b0f30680362d695c55f30b..640b87d6acb4faf78bb4d6930bf0ac17 // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.add(player, chunkX, chunkZ, this.distanceManager.getSimulationDistance()); -@@ -263,6 +271,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -260,6 +268,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.playerMobSpawnMap.remove(player); this.playerChunkTickRangeMap.remove(player); // Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning @@ -72,7 +72,7 @@ index 603b5275221494b146b0f30680362d695c55f30b..640b87d6acb4faf78bb4d6930bf0ac17 // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.remove(player); -@@ -283,6 +292,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -280,6 +289,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } // Paper end - use distance map to optimise entity tracker this.playerChunkTickRangeMap.update(player, chunkX, chunkZ, DistanceManager.MOB_SPAWN_RANGE); // Paper - optimise ChunkMap#anyPlayerCloseEnoughForSpawning @@ -80,7 +80,7 @@ index 603b5275221494b146b0f30680362d695c55f30b..640b87d6acb4faf78bb4d6930bf0ac17 // Paper start - per player mob spawning if (this.playerMobDistanceMap != null) { this.playerMobDistanceMap.update(player, chunkX, chunkZ, this.distanceManager.getSimulationDistance()); -@@ -457,6 +467,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -454,6 +464,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } }); // Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning @@ -105,10 +105,10 @@ index 603b5275221494b146b0f30680362d695c55f30b..640b87d6acb4faf78bb4d6930bf0ac17 protected ChunkGenerator generator() { diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a856089e292580d20876603efda688d7ab18b3d5..ecd025798205691892819863a50d7767f663d3d1 100644 +index b779656482325416ef37d6909b01a136e7f97656..091e678a736f291b546ce1e684d4e03055734e02 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -405,6 +405,83 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -406,6 +406,83 @@ public class ServerLevel extends Level implements WorldGenLevel { return this.getServer().getPlayerList().getPlayer(uuid); } // Paper end @@ -192,7 +192,7 @@ index a856089e292580d20876603efda688d7ab18b3d5..ecd025798205691892819863a50d7767 // 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, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { -@@ -508,6 +585,14 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -509,6 +586,14 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void tick(BooleanSupplier shouldKeepTicking) { diff --git a/patches/unapplied/server/0760-Optimise-WorldServer-notify.patch b/patches/server/0760-Optimise-WorldServer-notify.patch similarity index 96% rename from patches/unapplied/server/0760-Optimise-WorldServer-notify.patch rename to patches/server/0760-Optimise-WorldServer-notify.patch index 47d3d5dd31..3ef336f5c5 100644 --- a/patches/unapplied/server/0760-Optimise-WorldServer-notify.patch +++ b/patches/server/0760-Optimise-WorldServer-notify.patch @@ -8,10 +8,10 @@ Instead, only iterate over navigators in the current region that are eligible for repathing. diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 640b87d6acb4faf78bb4d6930bf0ac17691f89f7..1a9e6544fed4cab0a2058ba9f576ad1285f6bf08 100644 +index 97ec72dc383a2637c60cfc988bca2a8a86954ffb..236ba4c1950a3cced590f520b5349eede75fd59b 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -305,15 +305,81 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -302,15 +302,81 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider public final io.papermc.paper.chunk.SingleThreadChunkRegionManager dataRegionManager; public static final class DataRegionData implements io.papermc.paper.chunk.SingleThreadChunkRegionManager.RegionData { @@ -93,7 +93,7 @@ index 640b87d6acb4faf78bb4d6930bf0ac17691f89f7..1a9e6544fed4cab0a2058ba9f576ad12 } @Override -@@ -323,6 +389,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -320,6 +386,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider final DataRegionSectionData sectionData = (DataRegionSectionData)section.sectionData; final DataRegionData oldRegionData = oldRegion == null ? null : (DataRegionData)oldRegion.regionData; final DataRegionData newRegionData = (DataRegionData)newRegion.regionData; @@ -110,10 +110,10 @@ index 640b87d6acb4faf78bb4d6930bf0ac17691f89f7..1a9e6544fed4cab0a2058ba9f576ad12 } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ecd025798205691892819863a50d7767f663d3d1..7e4c387871c84541712a9b4b0c97d5027d2a30c9 100644 +index 091e678a736f291b546ce1e684d4e03055734e02..1d0273a9ec5afc9287b9153a3746299a2ec9adfa 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1116,6 +1116,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1117,6 +1117,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void tickNonPassenger(Entity entity) { // Paper start - log detailed entity tick information io.papermc.paper.util.TickThread.ensureTickThread("Cannot tick an entity off-main"); @@ -121,7 +121,7 @@ index ecd025798205691892819863a50d7767f663d3d1..7e4c387871c84541712a9b4b0c97d502 try { if (currentlyTickingEntity.get() == null) { currentlyTickingEntity.lazySet(entity); -@@ -1633,9 +1634,18 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1634,9 +1635,18 @@ public class ServerLevel extends Level implements WorldGenLevel { if (Shapes.joinIsNotEmpty(voxelshape, voxelshape1, BooleanOp.NOT_SAME)) { List list = new ObjectArrayList(); @@ -142,7 +142,7 @@ index ecd025798205691892819863a50d7767f663d3d1..7e4c387871c84541712a9b4b0c97d502 // CraftBukkit start - fix SPIGOT-6362 Mob entityinsentient; try { -@@ -1657,16 +1667,23 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1658,16 +1668,23 @@ public class ServerLevel extends Level implements WorldGenLevel { try { this.isUpdatingNavigations = true; @@ -169,7 +169,7 @@ index ecd025798205691892819863a50d7767f663d3d1..7e4c387871c84541712a9b4b0c97d502 } } // Paper -@@ -2464,10 +2481,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2465,10 +2482,12 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTickingStart(Entity entity) { ServerLevel.this.entityTickList.add(entity); diff --git a/patches/unapplied/server/0761-Remove-streams-for-villager-AI.patch b/patches/server/0761-Remove-streams-for-villager-AI.patch similarity index 100% rename from patches/unapplied/server/0761-Remove-streams-for-villager-AI.patch rename to patches/server/0761-Remove-streams-for-villager-AI.patch diff --git a/patches/unapplied/server/0762-Rewrite-dataconverter-system.patch b/patches/server/0762-Rewrite-dataconverter-system.patch similarity index 100% rename from patches/unapplied/server/0762-Rewrite-dataconverter-system.patch rename to patches/server/0762-Rewrite-dataconverter-system.patch diff --git a/patches/unapplied/server/0763-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0763-Use-Velocity-compression-and-cipher-natives.patch similarity index 96% rename from patches/unapplied/server/0763-Use-Velocity-compression-and-cipher-natives.patch rename to patches/server/0763-Use-Velocity-compression-and-cipher-natives.patch index 64a5cad490..e204eda85d 100644 --- a/patches/unapplied/server/0763-Use-Velocity-compression-and-cipher-natives.patch +++ b/patches/server/0763-Use-Velocity-compression-and-cipher-natives.patch @@ -268,10 +268,10 @@ index 792883afe53d2b7989c25a81c2f9a639d5e21d20..c04379ca8a4db0f4de46ad2b3b338431 return this.threshold; } diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index e0a29625d17d315b2f614c65a0a82c6d1a82676d..f018d07cbea3785876a547da158cf60eb831a5fb 100644 +index 549c82b2bd91db70bc83b4e33131774a0d2d17ac..56a93ea07f4e90b084f9a8da4cd9f53afde4c0d5 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -641,11 +641,28 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -652,11 +652,28 @@ public class Connection extends SimpleChannelInboundHandler> { return networkmanager; } @@ -304,7 +304,7 @@ index e0a29625d17d315b2f614c65a0a82c6d1a82676d..f018d07cbea3785876a547da158cf60e public boolean isEncrypted() { return this.encrypted; -@@ -674,16 +691,17 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -685,16 +702,17 @@ public class Connection extends SimpleChannelInboundHandler> { public void setupCompression(int compressionThreshold, boolean rejectsBadPackets) { if (compressionThreshold >= 0) { @@ -325,10 +325,10 @@ index e0a29625d17d315b2f614c65a0a82c6d1a82676d..f018d07cbea3785876a547da158cf60e this.channel.pipeline().fireUserEventTriggered(io.papermc.paper.network.ConnectionEvent.COMPRESSION_THRESHOLD_SET); // Paper } else { diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -index 9e7154c9df96d5a0577886d43a98a73626a8f189..af3e70920221b6bd127bb3aed7f1e0a7e9e4c322 100644 +index b80aedd2002959b4026c27ce76b3ed17f0acfb5b..2985271132c9ae822dcb0d7a7e6f0c268d1736cc 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -@@ -105,6 +105,11 @@ public class ServerConnectionListener { +@@ -106,6 +106,11 @@ public class ServerConnectionListener { ServerConnectionListener.LOGGER.info("Using default channel type"); } @@ -341,10 +341,10 @@ index 9e7154c9df96d5a0577886d43a98a73626a8f189..af3e70920221b6bd127bb3aed7f1e0a7 protected void initChannel(Channel channel) { try { diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 2d718967cacad744a4fe1ee7cf48e613172e1b03..5064ea6767ce17dde271e80f4360549462f6cca0 100644 +index c8a29ec3eac3ae61731cdc4f142578d98ec993ff..547abc18f1e03945977bd38947d9db5e201045c4 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -340,12 +340,14 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -342,12 +342,14 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se } SecretKey secretkey = packet.getSecretKey(privatekey); diff --git a/patches/unapplied/server/0764-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch b/patches/server/0764-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch similarity index 90% rename from patches/unapplied/server/0764-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch rename to patches/server/0764-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch index 7291e1cb36..c8dd06ca73 100644 --- a/patches/unapplied/server/0764-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch +++ b/patches/server/0764-Reduce-worldgen-thread-worker-count-for-low-core-cou.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reduce worldgen thread worker count for low core count CPUs diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 206c6ce227ba19620185ac835af28d67caa76c40..e8f5f87962cd3dbd383096fc4df9c3f0d5399211 100644 +index 384ddb03af26ae360fd22e2e231d9d14d6ad0865..23a999c19809a4fb62b37400e3767dc44692adb3 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java -@@ -140,7 +140,19 @@ public class Util { +@@ -146,7 +146,19 @@ public class Util { private static ExecutorService makeExecutor(String s, int priorityModifier) { // Paper - add priority // Paper start - use simpler thread pool that allows 1 thread diff --git a/patches/unapplied/server/0765-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch b/patches/server/0765-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch similarity index 100% rename from patches/unapplied/server/0765-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch rename to patches/server/0765-Do-not-process-entity-loads-in-CraftChunk-getEntitie.patch diff --git a/patches/unapplied/server/0766-Async-catch-modifications-to-critical-entity-state.patch b/patches/server/0766-Async-catch-modifications-to-critical-entity-state.patch similarity index 100% rename from patches/unapplied/server/0766-Async-catch-modifications-to-critical-entity-state.patch rename to patches/server/0766-Async-catch-modifications-to-critical-entity-state.patch diff --git a/patches/unapplied/server/0767-Fix-Bukkit-NamespacedKey-shenanigans.patch b/patches/server/0767-Fix-Bukkit-NamespacedKey-shenanigans.patch similarity index 100% rename from patches/unapplied/server/0767-Fix-Bukkit-NamespacedKey-shenanigans.patch rename to patches/server/0767-Fix-Bukkit-NamespacedKey-shenanigans.patch