From 27e29ccaf24065325acf1b70b18f99157a924893 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 13 Jun 2024 13:57:13 -0700 Subject: [PATCH] 487/1053 --- patches/api/0004-Code-Generation.patch | 11 +++-- ...gistryAccess-for-managing-registries.patch | 12 ++++- .../api/0242-Add-StructuresLocateEvent.patch | 2 +- .../api/0335-More-PotionEffectType-API.patch | 2 +- patches/api/0440-Improve-Registry.patch | 2 +- .../1.21}/0393-Fix-SPIGOT-5989.patch | 0 .../1.21}/0441-Expose-world-spawn-angle.patch | 0 patches/server/0005-Paper-config-files.patch | 7 +-- .../0386-Add-PrepareResultEvent.patch} | 24 +++++----- ...-for-portal-on-world-gen-entity-add.patch} | 4 +- ...x-arrows-never-despawning-MC-125757.patch} | 4 +- ...Vanilla-Command-permission-checking.patch} | 0 ...-Bukkit-world-container-is-not-used.patch} | 0 ...5885-Unable-to-disable-advancements.patch} | 0 ...taPlayer-leak-due-from-quitting-ear.patch} | 2 +- ...e-NetworkManager-Exception-Handling.patch} | 0 ...ix-some-rails-connecting-improperly.patch} | 0 ...stake-in-CB-NBT-int-deserialization.patch} | 0 .../0396-Brand-support.patch} | 16 +++---- ...PickupItemAnimation-to-LivingEntity.patch} | 4 +- .../0398-Don-t-require-FACING-data.patch} | 8 ++-- ...eEvent-not-firing-for-all-use-cases.patch} | 6 +-- .../0400-Add-moon-phase-API.patch} | 4 +- ...rver-load-chunks-from-newer-version.patch} | 8 ++-- ...headless-pistons-from-being-created.patch} | 4 +- .../0403-Add-BellRingEvent.patch} | 4 +- ...dd-zombie-targets-turtle-egg-config.patch} | 4 +- .../0405-Buffer-joins-to-world.patch} | 4 +- ...s-not-working-in-some-kick-messages.patch} | 10 ++--- ...reateEvent-needs-to-know-its-entity.patch} | 18 ++++---- .../0408-Add-more-Evoker-API.patch} | 0 ...Add-methods-to-get-translation-keys.patch} | 8 ++-- ...te-HoverEvent-from-ItemStack-Entity.patch} | 4 +- .../0411-Cache-block-data-strings.patch} | 4 +- ...rtation-and-cancel-velocity-if-tele.patch} | 18 ++++---- ...l-open-container-api-to-HumanEntity.patch} | 0 ...aFixerUpper-Rewrite-Rules-on-demand.patch} | 22 +++++----- ...-capture-to-capture-all-items-added.patch} | 8 ++-- ...-Counter-to-allow-plugins-to-use-va.patch} | 6 +-- ...track-plugin-scoreboards-by-default.patch} | 0 .../0418-Entity-isTicking.patch} | 8 ++-- ...non-whitelisted-player-when-white-l.patch} | 6 +-- ...-Concurrency-issue-in-ShufflingList.patch} | 0 ...eset-Ender-Crystals-on-Dragon-Spawn.patch} | 0 ...-large-move-vectors-crashing-server.patch} | 6 +-- .../0423-Optimise-getType-calls.patch} | 0 .../0424-Villager-resetOffers.patch} | 4 +- ...ce-order-when-capturing-blockstates.patch} | 4 +- ...em-locations-dropped-from-campfires.patch} | 4 +- ...7-Fix-bell-block-entity-memory-leak.patch} | 0 ...ing-up-when-item-stack-is-empty-in-.patch} | 6 +-- ...Add-getOfflinePlayerIfCached-String.patch} | 4 +- .../0430-Add-ignore-discounts-API.patch} | 6 +-- ...Toggle-for-removing-existing-dragon.patch} | 0 ...x-client-lag-on-advancement-loading.patch} | 2 +- .../0433-Item-no-age-no-player-pickup.patch} | 0 ...434-Beacon-API-custom-effect-ranges.patch} | 2 +- .../0435-Add-API-for-quit-reason.patch} | 27 +++++++----- ...ng-Trader-spawn-rate-config-options.patch} | 0 .../0437-Add-Destroy-Speed-API.patch} | 0 ...-spawnParticle-x-y-z-precision-loss.patch} | 4 +- ...39-Add-LivingEntity-clearActiveItem.patch} | 4 +- .../0440-Add-PlayerItemCooldownEvent.patch} | 0 ...rove-performance-of-the-end-generat.patch} | 0 .../0442-More-lightning-API.patch} | 0 ...should-not-bypass-cramming-gamerule.patch} | 28 ++++++------ ...-missing-default-perms-for-commands.patch} | 0 .../0445-Add-PlayerShearBlockEvent.patch} | 2 +- .../0446-Limit-recipe-packets.patch} | 4 +- ...-CraftSound-backwards-compatibility.patch} | 0 ...448-Player-Chunk-Load-Unload-Events.patch} | 2 +- ...9-Optimize-Dynamic-get-Missing-Keys.patch} | 0 ...-Expose-LivingEntity-hurt-direction.patch} | 6 +-- ...OBSTRUCTED-reason-to-BedEnterResult.patch} | 4 +- ...valid-ingredient-lists-in-VillagerA.patch} | 4 +- .../0453-Add-TargetHitEvent.patch} | 0 .../0454-MC-4-Fix-item-position-desync.patch} | 6 +-- .../0455-Additional-Block-Material-API.patch} | 0 .../0456-Fix-harming-potion-dupe.patch} | 2 +- ...t-Material-from-Boats-and-Minecarts.patch} | 0 ...ob-spawner-spawn-egg-transformation.patch} | 0 ...ix-Not-a-string-Map-Conversion-spam.patch} | 4 +- ...-Add-PlayerFlowerPotManipulateEvent.patch} | 0 ...ct-event-not-being-called-sometimes.patch} | 6 +-- .../0462-Zombie-API-breaking-doors.patch} | 0 ...463-Fix-nerfed-slime-when-splitting.patch} | 4 +- .../0464-Add-EntityLoadCrossbowEvent.patch} | 44 +++++++++---------- .../0465-Add-WorldGameRuleChangeEvent.patch} | 2 +- ...66-Add-ServerResourcesReloadedEvent.patch} | 6 +-- ...d-settings-for-mobs-picking-up-loot.patch} | 10 ++--- .../0468-Add-BlockFailedDispenseEvent.patch} | 6 +-- ...69-Add-PlayerLecternPageChangeEvent.patch} | 0 ...70-Add-PlayerLoomPatternSelectEvent.patch} | 0 ...nfigurable-door-breaking-difficulty.patch} | 8 ++-- ...ty-commands-shall-not-be-dispatched.patch} | 4 +- .../0473-Remove-stale-POIs.patch} | 4 +- .../0474-Fix-villager-boat-exploit.patch} | 4 +- .../0475-Add-sendOpLevel-API.patch} | 10 ++--- ...istryAccess-for-managing-Registries.patch} | 44 +++++++++++-------- .../0477-Add-StructuresLocateEvent.patch} | 8 ++-- ...-for-requiring-a-player-participant.patch} | 10 ++--- ...leHitEvent-call-when-fireballs-dead.patch} | 4 +- ...nent-with-empty-text-instead-of-thr.patch} | 0 ...481-Make-schedule-command-per-world.patch} | 0 ...0482-Configurable-max-leash-distance.patch | 19 ++++++++ ...0487-Configurable-max-leash-distance.patch | 28 ------------ 106 files changed, 308 insertions(+), 292 deletions(-) rename patches/{unapplied/server => removed/1.21}/0393-Fix-SPIGOT-5989.patch (100%) rename patches/{unapplied/server => removed/1.21}/0441-Expose-world-spawn-angle.patch (100%) rename patches/{unapplied/server/0389-Add-PrepareResultEvent.patch => server/0386-Add-PrepareResultEvent.patch} (90%) rename patches/{unapplied/server/0390-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch => server/0387-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch} (85%) rename patches/{unapplied/server/0391-Fix-arrows-never-despawning-MC-125757.patch => server/0388-Fix-arrows-never-despawning-MC-125757.patch} (86%) rename patches/{unapplied/server/0392-Thread-Safe-Vanilla-Command-permission-checking.patch => server/0389-Thread-Safe-Vanilla-Command-permission-checking.patch} (100%) rename patches/{unapplied/server/0394-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch => server/0390-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch} (100%) rename patches/{unapplied/server/0395-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch => server/0391-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch} (100%) rename patches/{unapplied/server/0396-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch => server/0392-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch} (97%) rename patches/{unapplied/server/0397-Optimize-NetworkManager-Exception-Handling.patch => server/0393-Optimize-NetworkManager-Exception-Handling.patch} (100%) rename patches/{unapplied/server/0398-Fix-some-rails-connecting-improperly.patch => server/0394-Fix-some-rails-connecting-improperly.patch} (100%) rename patches/{unapplied/server/0399-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch => server/0395-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch} (100%) rename patches/{unapplied/server/0400-Brand-support.patch => server/0396-Brand-support.patch} (87%) rename patches/{unapplied/server/0401-Add-playPickupItemAnimation-to-LivingEntity.patch => server/0397-Add-playPickupItemAnimation-to-LivingEntity.patch} (84%) rename patches/{unapplied/server/0402-Don-t-require-FACING-data.patch => server/0398-Don-t-require-FACING-data.patch} (88%) rename patches/{unapplied/server/0403-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch => server/0399-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch} (90%) rename patches/{unapplied/server/0404-Add-moon-phase-API.patch => server/0400-Add-moon-phase-API.patch} (83%) rename patches/{unapplied/server/0405-Do-not-let-the-server-load-chunks-from-newer-version.patch => server/0401-Do-not-let-the-server-load-chunks-from-newer-version.patch} (91%) rename patches/{unapplied/server/0406-Prevent-headless-pistons-from-being-created.patch => server/0402-Prevent-headless-pistons-from-being-created.patch} (92%) rename patches/{unapplied/server/0407-Add-BellRingEvent.patch => server/0403-Add-BellRingEvent.patch} (90%) rename patches/{unapplied/server/0408-Add-zombie-targets-turtle-egg-config.patch => server/0404-Add-zombie-targets-turtle-egg-config.patch} (87%) rename patches/{unapplied/server/0409-Buffer-joins-to-world.patch => server/0405-Buffer-joins-to-world.patch} (92%) rename patches/{unapplied/server/0410-Fix-hex-colors-not-working-in-some-kick-messages.patch => server/0406-Fix-hex-colors-not-working-in-some-kick-messages.patch} (89%) rename patches/{unapplied/server/0411-PortalCreateEvent-needs-to-know-its-entity.patch => server/0407-PortalCreateEvent-needs-to-know-its-entity.patch} (90%) rename patches/{unapplied/server/0412-Add-more-Evoker-API.patch => server/0408-Add-more-Evoker-API.patch} (100%) rename patches/{unapplied/server/0413-Add-methods-to-get-translation-keys.patch => server/0409-Add-methods-to-get-translation-keys.patch} (96%) rename patches/{unapplied/server/0414-Create-HoverEvent-from-ItemStack-Entity.patch => server/0410-Create-HoverEvent-from-ItemStack-Entity.patch} (94%) rename patches/{unapplied/server/0415-Cache-block-data-strings.patch => server/0411-Cache-block-data-strings.patch} (95%) rename patches/{unapplied/server/0416-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch => server/0412-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch} (87%) rename patches/{unapplied/server/0417-Add-additional-open-container-api-to-HumanEntity.patch => server/0413-Add-additional-open-container-api-to-HumanEntity.patch} (100%) rename patches/{unapplied/server/0418-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch => server/0414-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch} (74%) rename patches/{unapplied/server/0419-Extend-block-drop-capture-to-capture-all-items-added.patch => server/0415-Extend-block-drop-capture-to-capture-all-items-added.patch} (89%) rename patches/{unapplied/server/0420-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch => server/0416-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch} (85%) rename patches/{unapplied/server/0421-Lazily-track-plugin-scoreboards-by-default.patch => server/0417-Lazily-track-plugin-scoreboards-by-default.patch} (100%) rename patches/{unapplied/server/0422-Entity-isTicking.patch => server/0418-Entity-isTicking.patch} (80%) rename patches/{unapplied/server/0423-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch => server/0419-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch} (82%) rename patches/{unapplied/server/0424-Fix-Concurrency-issue-in-ShufflingList.patch => server/0420-Fix-Concurrency-issue-in-ShufflingList.patch} (100%) rename patches/{unapplied/server/0425-Reset-Ender-Crystals-on-Dragon-Spawn.patch => server/0421-Reset-Ender-Crystals-on-Dragon-Spawn.patch} (100%) rename patches/{unapplied/server/0426-Fix-for-large-move-vectors-crashing-server.patch => server/0422-Fix-for-large-move-vectors-crashing-server.patch} (96%) rename patches/{unapplied/server/0427-Optimise-getType-calls.patch => server/0423-Optimise-getType-calls.patch} (100%) rename patches/{unapplied/server/0428-Villager-resetOffers.patch => server/0424-Villager-resetOffers.patch} (92%) rename patches/{unapplied/server/0429-Retain-block-place-order-when-capturing-blockstates.patch => server/0425-Retain-block-place-order-when-capturing-blockstates.patch} (89%) rename patches/{unapplied/server/0430-Fix-item-locations-dropped-from-campfires.patch => server/0426-Fix-item-locations-dropped-from-campfires.patch} (92%) rename patches/{unapplied/server/0431-Fix-bell-block-entity-memory-leak.patch => server/0427-Fix-bell-block-entity-memory-leak.patch} (100%) rename patches/{unapplied/server/0432-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch => server/0428-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch} (93%) rename patches/{unapplied/server/0433-Add-getOfflinePlayerIfCached-String.patch => server/0429-Add-getOfflinePlayerIfCached-String.patch} (89%) rename patches/{unapplied/server/0434-Add-ignore-discounts-API.patch => server/0430-Add-ignore-discounts-API.patch} (97%) rename patches/{unapplied/server/0435-Toggle-for-removing-existing-dragon.patch => server/0431-Toggle-for-removing-existing-dragon.patch} (100%) rename patches/{unapplied/server/0436-Fix-client-lag-on-advancement-loading.patch => server/0432-Fix-client-lag-on-advancement-loading.patch} (95%) rename patches/{unapplied/server/0437-Item-no-age-no-player-pickup.patch => server/0433-Item-no-age-no-player-pickup.patch} (100%) rename patches/{unapplied/server/0438-Beacon-API-custom-effect-ranges.patch => server/0434-Beacon-API-custom-effect-ranges.patch} (98%) rename patches/{unapplied/server/0439-Add-API-for-quit-reason.patch => server/0435-Add-API-for-quit-reason.patch} (79%) rename patches/{unapplied/server/0440-Add-Wandering-Trader-spawn-rate-config-options.patch => server/0436-Add-Wandering-Trader-spawn-rate-config-options.patch} (100%) rename patches/{unapplied/server/0442-Add-Destroy-Speed-API.patch => server/0437-Add-Destroy-Speed-API.patch} (100%) rename patches/{unapplied/server/0443-Fix-Player-spawnParticle-x-y-z-precision-loss.patch => server/0438-Fix-Player-spawnParticle-x-y-z-precision-loss.patch} (89%) rename patches/{unapplied/server/0444-Add-LivingEntity-clearActiveItem.patch => server/0439-Add-LivingEntity-clearActiveItem.patch} (84%) rename patches/{unapplied/server/0445-Add-PlayerItemCooldownEvent.patch => server/0440-Add-PlayerItemCooldownEvent.patch} (100%) rename patches/{unapplied/server/0446-Significantly-improve-performance-of-the-end-generat.patch => server/0441-Significantly-improve-performance-of-the-end-generat.patch} (100%) rename patches/{unapplied/server/0447-More-lightning-API.patch => server/0442-More-lightning-API.patch} (100%) rename patches/{unapplied/server/0448-Climbing-should-not-bypass-cramming-gamerule.patch => server/0443-Climbing-should-not-bypass-cramming-gamerule.patch} (86%) rename patches/{unapplied/server/0449-Add-missing-default-perms-for-commands.patch => server/0444-Add-missing-default-perms-for-commands.patch} (100%) rename patches/{unapplied/server/0450-Add-PlayerShearBlockEvent.patch => server/0445-Add-PlayerShearBlockEvent.patch} (98%) rename patches/{unapplied/server/0451-Limit-recipe-packets.patch => server/0446-Limit-recipe-packets.patch} (94%) rename patches/{unapplied/server/0452-Fix-CraftSound-backwards-compatibility.patch => server/0447-Fix-CraftSound-backwards-compatibility.patch} (100%) rename patches/{unapplied/server/0453-Player-Chunk-Load-Unload-Events.patch => server/0448-Player-Chunk-Load-Unload-Events.patch} (95%) rename patches/{unapplied/server/0454-Optimize-Dynamic-get-Missing-Keys.patch => server/0449-Optimize-Dynamic-get-Missing-Keys.patch} (100%) rename patches/{unapplied/server/0455-Expose-LivingEntity-hurt-direction.patch => server/0450-Expose-LivingEntity-hurt-direction.patch} (90%) rename patches/{unapplied/server/0456-Add-OBSTRUCTED-reason-to-BedEnterResult.patch => server/0451-Add-OBSTRUCTED-reason-to-BedEnterResult.patch} (86%) rename patches/{unapplied/server/0457-Fix-crash-from-invalid-ingredient-lists-in-VillagerA.patch => server/0452-Fix-crash-from-invalid-ingredient-lists-in-VillagerA.patch} (89%) rename patches/{unapplied/server/0458-Add-TargetHitEvent.patch => server/0453-Add-TargetHitEvent.patch} (100%) rename patches/{unapplied/server/0459-MC-4-Fix-item-position-desync.patch => server/0454-MC-4-Fix-item-position-desync.patch} (89%) rename patches/{unapplied/server/0460-Additional-Block-Material-API.patch => server/0455-Additional-Block-Material-API.patch} (100%) rename patches/{unapplied/server/0461-Fix-harming-potion-dupe.patch => server/0456-Fix-harming-potion-dupe.patch} (97%) rename patches/{unapplied/server/0462-API-to-get-Material-from-Boats-and-Minecarts.patch => server/0457-API-to-get-Material-from-Boats-and-Minecarts.patch} (100%) rename patches/{unapplied/server/0463-Allow-disabling-mob-spawner-spawn-egg-transformation.patch => server/0458-Allow-disabling-mob-spawner-spawn-egg-transformation.patch} (100%) rename patches/{unapplied/server/0464-Fix-Not-a-string-Map-Conversion-spam.patch => server/0459-Fix-Not-a-string-Map-Conversion-spam.patch} (94%) rename patches/{unapplied/server/0465-Add-PlayerFlowerPotManipulateEvent.patch => server/0460-Add-PlayerFlowerPotManipulateEvent.patch} (100%) rename patches/{unapplied/server/0466-Fix-interact-event-not-being-called-sometimes.patch => server/0461-Fix-interact-event-not-being-called-sometimes.patch} (94%) rename patches/{unapplied/server/0467-Zombie-API-breaking-doors.patch => server/0462-Zombie-API-breaking-doors.patch} (100%) rename patches/{unapplied/server/0468-Fix-nerfed-slime-when-splitting.patch => server/0463-Fix-nerfed-slime-when-splitting.patch} (84%) rename patches/{unapplied/server/0469-Add-EntityLoadCrossbowEvent.patch => server/0464-Add-EntityLoadCrossbowEvent.patch} (63%) rename patches/{unapplied/server/0470-Add-WorldGameRuleChangeEvent.patch => server/0465-Add-WorldGameRuleChangeEvent.patch} (98%) rename patches/{unapplied/server/0471-Add-ServerResourcesReloadedEvent.patch => server/0466-Add-ServerResourcesReloadedEvent.patch} (94%) rename patches/{unapplied/server/0472-Add-world-settings-for-mobs-picking-up-loot.patch => server/0467-Add-world-settings-for-mobs-picking-up-loot.patch} (83%) rename patches/{unapplied/server/0473-Add-BlockFailedDispenseEvent.patch => server/0468-Add-BlockFailedDispenseEvent.patch} (92%) rename patches/{unapplied/server/0474-Add-PlayerLecternPageChangeEvent.patch => server/0469-Add-PlayerLecternPageChangeEvent.patch} (100%) rename patches/{unapplied/server/0475-Add-PlayerLoomPatternSelectEvent.patch => server/0470-Add-PlayerLoomPatternSelectEvent.patch} (100%) rename patches/{unapplied/server/0476-Configurable-door-breaking-difficulty.patch => server/0471-Configurable-door-breaking-difficulty.patch} (86%) rename patches/{unapplied/server/0477-Empty-commands-shall-not-be-dispatched.patch => server/0472-Empty-commands-shall-not-be-dispatched.patch} (84%) rename patches/{unapplied/server/0478-Remove-stale-POIs.patch => server/0473-Remove-stale-POIs.patch} (87%) rename patches/{unapplied/server/0479-Fix-villager-boat-exploit.patch => server/0474-Fix-villager-boat-exploit.patch} (89%) rename patches/{unapplied/server/0480-Add-sendOpLevel-API.patch => server/0475-Add-sendOpLevel-API.patch} (85%) rename patches/{unapplied/server/0481-Add-RegistryAccess-for-managing-Registries.patch => server/0476-Add-RegistryAccess-for-managing-Registries.patch} (97%) rename patches/{unapplied/server/0482-Add-StructuresLocateEvent.patch => server/0477-Add-StructuresLocateEvent.patch} (97%) rename patches/{unapplied/server/0483-Collision-option-for-requiring-a-player-participant.patch => server/0478-Collision-option-for-requiring-a-player-participant.patch} (86%) rename patches/{unapplied/server/0484-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch => server/0479-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch} (87%) rename patches/{unapplied/server/0485-Return-chat-component-with-empty-text-instead-of-thr.patch => server/0480-Return-chat-component-with-empty-text-instead-of-thr.patch} (100%) rename patches/{unapplied/server/0486-Make-schedule-command-per-world.patch => server/0481-Make-schedule-command-per-world.patch} (100%) create mode 100644 patches/server/0482-Configurable-max-leash-distance.patch delete mode 100644 patches/unapplied/server/0487-Configurable-max-leash-distance.patch diff --git a/patches/api/0004-Code-Generation.patch b/patches/api/0004-Code-Generation.patch index dc253118c4..5beaa783a2 100644 --- a/patches/api/0004-Code-Generation.patch +++ b/patches/api/0004-Code-Generation.patch @@ -85,16 +85,17 @@ index 0000000000000000000000000000000000000000..2512dba27edfdccbc4430815b6cba048 +} diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java new file mode 100644 -index 0000000000000000000000000000000000000000..7b79bf33074355020e0b3b5ef40c7f2e6ba644b4 +index 0000000000000000000000000000000000000000..adf24eb062460e2fd08d3e91337eba379d76a27d --- /dev/null +++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java -@@ -0,0 +1,141 @@ +@@ -0,0 +1,146 @@ +package io.papermc.paper.registry; + +import net.kyori.adventure.key.Keyed; +import org.bukkit.Art; +import org.bukkit.Fluid; +import org.bukkit.GameEvent; ++import org.bukkit.JukeboxSong; +import org.bukkit.MusicInstrument; +import org.bukkit.Particle; +import org.bukkit.Sound; @@ -206,10 +207,14 @@ index 0000000000000000000000000000000000000000..7b79bf33074355020e0b3b5ef40c7f2e + */ + RegistryKey DAMAGE_TYPE = create("damage_type"); + /** -+ * Data-driven registry for wolf variants ++ * Data-driven registry for wolf variants. + * @see io.papermc.paper.registry.keys.WolfVariantKeys + */ + RegistryKey WOLF_VARIANT = create("wolf_variant"); ++ /** ++ * Data-driven registry for jukebox songs. ++ */ ++ RegistryKey JUKEBOX_SONG = create("jukebox_song"); + + + /* ******************* * diff --git a/patches/api/0241-Add-RegistryAccess-for-managing-registries.patch b/patches/api/0241-Add-RegistryAccess-for-managing-registries.patch index 5ef38910f9..9740622000 100644 --- a/patches/api/0241-Add-RegistryAccess-for-managing-registries.patch +++ b/patches/api/0241-Add-RegistryAccess-for-managing-registries.patch @@ -206,7 +206,7 @@ index 188280a8fdf35a70a5a358f8cfe7cf44f05855b1..ceaa901fa830e904d6ac7a1727d1e7d1 return server.getRegistry(tClass); } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..9daa96d4e87a6b11eef7abd6e0f9fbf05a57bb97 100644 +index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..d40c2b492a2be6ce87105ce910a05c7c344ddf84 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -102,7 +102,7 @@ public interface Registry extends Iterable { @@ -273,7 +273,7 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..9daa96d4e87a6b11eef7abd6e0f9fbf0 /** * Sound keys. * -@@ -219,21 +221,26 @@ public interface Registry extends Iterable { +@@ -219,28 +221,33 @@ public interface Registry extends Iterable { * Trim materials. * * @see TrimMaterial @@ -304,6 +304,14 @@ index 3effaea369d9c7a6a22979fbfc270f55f9f25cf2..9daa96d4e87a6b11eef7abd6e0f9fbf0 /** * Jukebox songs. * + * @see JukeboxSong + */ + @ApiStatus.Experimental +- Registry JUKEBOX_SONG = Objects.requireNonNull(Bukkit.getRegistry(JukeboxSong.class), "No registry present for JukeboxSong. This is a bug."); ++ Registry JUKEBOX_SONG = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.JUKEBOX_SONG); // Paper + /** + * Villager profession. + * @@ -294,8 +301,10 @@ public interface Registry extends Iterable { * Wolf variants. * diff --git a/patches/api/0242-Add-StructuresLocateEvent.patch b/patches/api/0242-Add-StructuresLocateEvent.patch index f8c97aa625..a4edf0a695 100644 --- a/patches/api/0242-Add-StructuresLocateEvent.patch +++ b/patches/api/0242-Add-StructuresLocateEvent.patch @@ -513,7 +513,7 @@ index 0000000000000000000000000000000000000000..1e7b53f9bc13dcd5a0a4a40004591e4f + } +} diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 9daa96d4e87a6b11eef7abd6e0f9fbf05a57bb97..acfc52e692c9361a6bf407ce046435fd5d364d29 100644 +index d40c2b492a2be6ce87105ce910a05c7c344ddf84..c5001f4d54ec05a416b357538b94ea5ec4a17849 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -318,6 +318,15 @@ public interface Registry extends Iterable { diff --git a/patches/api/0335-More-PotionEffectType-API.patch b/patches/api/0335-More-PotionEffectType-API.patch index a3f79f780f..e247835a90 100644 --- a/patches/api/0335-More-PotionEffectType-API.patch +++ b/patches/api/0335-More-PotionEffectType-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] More PotionEffectType API diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index acfc52e692c9361a6bf407ce046435fd5d364d29..1d0e734b3200214f97ccd5b65c0fd3192e0b0dc1 100644 +index c5001f4d54ec05a416b357538b94ea5ec4a17849..afd132dab5eb2826b600592429b9e4a8d1fe0b73 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -326,6 +326,31 @@ public interface Registry extends Iterable { diff --git a/patches/api/0440-Improve-Registry.patch b/patches/api/0440-Improve-Registry.patch index 1bc5004d46..4106b895dc 100644 --- a/patches/api/0440-Improve-Registry.patch +++ b/patches/api/0440-Improve-Registry.patch @@ -31,7 +31,7 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..704dba92f9246ef398ed8d162ebee3cf @Override public @NotNull String translationKey() { diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 1d0e734b3200214f97ccd5b65c0fd3192e0b0dc1..eada6d6c4340a345750f63bf49f14711596f706e 100644 +index afd132dab5eb2826b600592429b9e4a8d1fe0b73..b159863568c56202968ac0f9024d3e1f5f118dac 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -361,6 +361,49 @@ public interface Registry extends Iterable { diff --git a/patches/unapplied/server/0393-Fix-SPIGOT-5989.patch b/patches/removed/1.21/0393-Fix-SPIGOT-5989.patch similarity index 100% rename from patches/unapplied/server/0393-Fix-SPIGOT-5989.patch rename to patches/removed/1.21/0393-Fix-SPIGOT-5989.patch diff --git a/patches/unapplied/server/0441-Expose-world-spawn-angle.patch b/patches/removed/1.21/0441-Expose-world-spawn-angle.patch similarity index 100% rename from patches/unapplied/server/0441-Expose-world-spawn-angle.patch rename to patches/removed/1.21/0441-Expose-world-spawn-angle.patch diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index 65cb89f76d..44c61dacc7 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -1401,10 +1401,10 @@ index 0000000000000000000000000000000000000000..990d1bb46e0f9719f4e9af928d80ac6f +} diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java new file mode 100644 -index 0000000000000000000000000000000000000000..efc91ff91827872c62b8bd060282549ccdcf67dd +index 0000000000000000000000000000000000000000..7509b17414f836e8b53fc62b02b386ba4e8c5ca9 --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java -@@ -0,0 +1,550 @@ +@@ -0,0 +1,551 @@ +package io.papermc.paper.configuration; + +import com.google.common.collect.HashBasedTable; @@ -1444,6 +1444,7 @@ index 0000000000000000000000000000000000000000..efc91ff91827872c62b8bd060282549c +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.ExperienceOrb; ++import net.minecraft.world.entity.Leashable; +import net.minecraft.world.entity.MobCategory; +import net.minecraft.world.entity.boss.enderdragon.EnderDragon; +import net.minecraft.world.entity.decoration.HangingEntity; @@ -1945,7 +1946,7 @@ index 0000000000000000000000000000000000000000..efc91ff91827872c62b8bd060282549c + public boolean showSignClickCommandFailureMsgsToPlayer = false; + public RedstoneImplementation redstoneImplementation = RedstoneImplementation.VANILLA; + public boolean disableEndCredits = false; -+ public float maxLeashDistance = 10f; ++ public double maxLeashDistance = Leashable.LEASH_TOO_FAR_DIST; + public boolean disableSprintInterruptionOnAttack = false; + public int shieldBlockingDelay = 5; + public boolean disableRelativeProjectileVelocity = false; diff --git a/patches/unapplied/server/0389-Add-PrepareResultEvent.patch b/patches/server/0386-Add-PrepareResultEvent.patch similarity index 90% rename from patches/unapplied/server/0389-Add-PrepareResultEvent.patch rename to patches/server/0386-Add-PrepareResultEvent.patch index d23bf3868b..9dd5d5231f 100644 --- a/patches/unapplied/server/0389-Add-PrepareResultEvent.patch +++ b/patches/server/0386-Add-PrepareResultEvent.patch @@ -8,7 +8,7 @@ Adds a new event for all crafting stations that generate a result slot item Anvil, Grindstone and Smithing now extend this event diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index 4c766b879f935298ffa4249e9ce4045601cedb20..2bd91b48eaa06f85a5b9b1ae052c70e966ae8e4c 100644 +index c6ec9fc6ccde2a5c086a2bfe32686954c074c31d..7198dc9ffc9a37dab3654e12aa497c442a9993c5 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java @@ -327,6 +327,7 @@ public class AnvilMenu extends ItemCombinerMenu { @@ -32,10 +32,10 @@ index 11d7bf4f90083991cfc8c6c5f9a1e8ad6a162843..c52c4c4210bc6ae082443318d9795c48 private void setupResultSlot(ItemStack map, ItemStack item, ItemStack oldResult) { diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java -index d41197db6bbf9e17b67bb1faa5d370eea0212bd3..ecf3cdc16d1ea830c4d45b57f69204118af3218a 100644 +index 637d77d6b07ff9ee5ac1cb0470cbefcba5c7495e..15ec798e149d80aace186f84b9236ddeaba690c3 100644 --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java -@@ -159,6 +159,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { +@@ -160,6 +160,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { super.slotsChanged(inventory); if (inventory == this.repairSlots) { this.createResult(); @@ -70,10 +70,10 @@ index fb7027985c6442fc50573e96031a05a3c64f4426..4bd720a97da27c4fd97788d4c504c017 this.resultSlot.set(ItemStack.EMPTY); this.selectablePatterns = List.of(); diff --git a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java -index 59d9f990a87ab5214fa51e3a6e933bf5ae71b613..1e9e70263996afa294458364aa70e738b5aabea1 100644 +index 0735705def4f9505b7f16df2497cc78bbf5a8373..86e51fcce767d265ee0d3beb611be2119085830b 100644 --- a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java +++ b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java -@@ -115,6 +115,7 @@ public class SmithingMenu extends ItemCombinerMenu { +@@ -121,6 +121,7 @@ public class SmithingMenu extends ItemCombinerMenu { } } @@ -82,22 +82,22 @@ index 59d9f990a87ab5214fa51e3a6e933bf5ae71b613..1e9e70263996afa294458364aa70e738 @Override diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -index 9c2fe69ced7a46bbd8b0fbe10fa67d0a39b0f375..e40d9dbdbe5359c38af6d764d01c9be422654aaa 100644 +index 04d9793a83c724350f74616558f650082f9805d9..bb29107cb15e2ec644a14cabb3cf91f4bde5471d 100644 --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -@@ -181,6 +181,7 @@ public class StonecutterMenu extends AbstractContainerMenu { +@@ -182,6 +182,7 @@ public class StonecutterMenu extends AbstractContainerMenu { this.setupRecipeList(inventory, itemstack); } + org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareResultEvent(this, RESULT_SLOT); // Paper - Add PrepareResultEvent } - private void setupRecipeList(Container input, ItemStack stack) { + private static SingleRecipeInput createRecipeInput(Container inventory) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 943c452e1d3d1273a2ef304aa2a52f328dfb5d37..2006573ca4bed3c3ed02bf2f38cdd248e6b123c9 100644 +index 805aec84b57f0a426c1337445dfdd084cb0a0507..5cd934897dde1fc54bfe93e8d585ff05bb9293c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1650,6 +1650,12 @@ public class CraftEventFactory { +@@ -1651,6 +1651,12 @@ public class CraftEventFactory { } public static PrepareAnvilEvent callPrepareAnvilEvent(InventoryView view, ItemStack item) { @@ -110,7 +110,7 @@ index 943c452e1d3d1273a2ef304aa2a52f328dfb5d37..2006573ca4bed3c3ed02bf2f38cdd248 PrepareAnvilEvent event = new PrepareAnvilEvent(view, CraftItemStack.asCraftMirror(item).clone()); event.getView().getPlayer().getServer().getPluginManager().callEvent(event); event.getInventory().setItem(2, event.getResult()); -@@ -1657,6 +1663,12 @@ public class CraftEventFactory { +@@ -1658,6 +1664,12 @@ public class CraftEventFactory { } public static PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) { @@ -123,7 +123,7 @@ index 943c452e1d3d1273a2ef304aa2a52f328dfb5d37..2006573ca4bed3c3ed02bf2f38cdd248 PrepareGrindstoneEvent event = new PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone()); event.getView().getPlayer().getServer().getPluginManager().callEvent(event); event.getInventory().setItem(2, event.getResult()); -@@ -1664,12 +1676,39 @@ public class CraftEventFactory { +@@ -1665,12 +1677,39 @@ public class CraftEventFactory { } public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) { diff --git a/patches/unapplied/server/0390-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0387-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch similarity index 85% rename from patches/unapplied/server/0390-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch rename to patches/server/0387-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch index f000d8d820..f6bb2bdc44 100644 --- a/patches/unapplied/server/0390-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch +++ b/patches/server/0387-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a4d5e0ffbdade4e1b15d30de6e60feddda697c24..dd5a32360f4b49e9544009d3874da3f4af7b386a 100644 +index 94c0de0a50e2a076e5aed86a673fe03d9698ba36..a85321f1dc8b0bc4338bf5f23c5686c0ca733cec 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3608,7 +3608,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3630,7 +3630,7 @@ public abstract class LivingEntity extends Entity implements Attackable { Entity entity = this.getVehicle(); super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation diff --git a/patches/unapplied/server/0391-Fix-arrows-never-despawning-MC-125757.patch b/patches/server/0388-Fix-arrows-never-despawning-MC-125757.patch similarity index 86% rename from patches/unapplied/server/0391-Fix-arrows-never-despawning-MC-125757.patch rename to patches/server/0388-Fix-arrows-never-despawning-MC-125757.patch index d5c0c8aec4..1ff81316ae 100644 --- a/patches/unapplied/server/0391-Fix-arrows-never-despawning-MC-125757.patch +++ b/patches/server/0388-Fix-arrows-never-despawning-MC-125757.patch @@ -9,10 +9,10 @@ instead of getting stuck in a never despawn state (bubble columns, etc). diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index ccb5de967a83c01b69161af0c1c922fc31c7a0d9..49dc01532f9b60b3f594abca56b7d807fe6716d5 100644 +index a2617881999ea61bf132ff75fb36e783261e5835..1f881f71d5698bc7b36bc029287ac8e873a46107 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -214,6 +214,7 @@ public abstract class AbstractArrow extends Projectile { +@@ -231,6 +231,7 @@ public abstract class AbstractArrow extends Projectile { ++this.inGroundTime; } else { diff --git a/patches/unapplied/server/0392-Thread-Safe-Vanilla-Command-permission-checking.patch b/patches/server/0389-Thread-Safe-Vanilla-Command-permission-checking.patch similarity index 100% rename from patches/unapplied/server/0392-Thread-Safe-Vanilla-Command-permission-checking.patch rename to patches/server/0389-Thread-Safe-Vanilla-Command-permission-checking.patch diff --git a/patches/unapplied/server/0394-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch b/patches/server/0390-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch similarity index 100% rename from patches/unapplied/server/0394-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch rename to patches/server/0390-Fix-SPIGOT-5824-Bukkit-world-container-is-not-used.patch diff --git a/patches/unapplied/server/0395-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch b/patches/server/0391-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch similarity index 100% rename from patches/unapplied/server/0395-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch rename to patches/server/0391-Fix-SPIGOT-5885-Unable-to-disable-advancements.patch diff --git a/patches/unapplied/server/0396-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch b/patches/server/0392-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch similarity index 97% rename from patches/unapplied/server/0396-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch rename to patches/server/0392-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch index 817e925f2f..5f0bca47b3 100644 --- a/patches/unapplied/server/0396-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch +++ b/patches/server/0392-Fix-AdvancementDataPlayer-leak-due-from-quitting-ear.patch @@ -52,7 +52,7 @@ index 9a387d5dc0925304d4163e3caa22206aaa68e3b7..f43053ba082f9772b6ec02828fa2d6f3 LootContext lootContext = EntityPredicate.createContext(player, player); List> list = null; diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java -index 6e8ccafe8966970d1665be21266f2ffe95e1d3ed..f46fa0fbfec19904d21729847788c6c624a3e97f 100644 +index 4c85abf29441645039b6a554a50e1d3274229de6..d85fb1e2ea0eaef81e9039b47d18f83507e05a59 100644 --- a/src/main/java/net/minecraft/server/PlayerAdvancements.java +++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java @@ -63,6 +63,7 @@ public class PlayerAdvancements { diff --git a/patches/unapplied/server/0397-Optimize-NetworkManager-Exception-Handling.patch b/patches/server/0393-Optimize-NetworkManager-Exception-Handling.patch similarity index 100% rename from patches/unapplied/server/0397-Optimize-NetworkManager-Exception-Handling.patch rename to patches/server/0393-Optimize-NetworkManager-Exception-Handling.patch diff --git a/patches/unapplied/server/0398-Fix-some-rails-connecting-improperly.patch b/patches/server/0394-Fix-some-rails-connecting-improperly.patch similarity index 100% rename from patches/unapplied/server/0398-Fix-some-rails-connecting-improperly.patch rename to patches/server/0394-Fix-some-rails-connecting-improperly.patch diff --git a/patches/unapplied/server/0399-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch b/patches/server/0395-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch similarity index 100% rename from patches/unapplied/server/0399-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch rename to patches/server/0395-Fix-regex-mistake-in-CB-NBT-int-deserialization.patch diff --git a/patches/unapplied/server/0400-Brand-support.patch b/patches/server/0396-Brand-support.patch similarity index 87% rename from patches/unapplied/server/0400-Brand-support.patch rename to patches/server/0396-Brand-support.patch index 1d5ae0d361..eb4a88b700 100644 --- a/patches/unapplied/server/0400-Brand-support.patch +++ b/patches/server/0396-Brand-support.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e6a24484ef11a1d815a85126aec221547479f7d3..ffd9ff7db5180cb351839a3ce331353d16b662d2 100644 +index b808d9c710d6cd59ac34ea537f603fd4002073d0..45d36070735cd7a8baee585165a95a169d7059b4 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -290,6 +290,7 @@ public class ServerPlayer extends Player { +@@ -294,6 +294,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { public boolean isRealPlayer; // Paper public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent @@ -17,10 +17,10 @@ index e6a24484ef11a1d815a85126aec221547479f7d3..ffd9ff7db5180cb351839a3ce331353d public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 289a74e35836717bd20c777e9fc8c17722e90411..a5dce1e83e63292054b21ec693ec3006e08d3ff2 100644 +index adf953994d2c7e8f1e15075722ee2b9213e4bf94..4761a8d8f342c649bc2e5f530819fa88f43542ec 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -77,6 +77,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -78,6 +78,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack private volatile boolean suspendFlushingOnServerThread = false; public final java.util.Map packCallbacks = new java.util.concurrent.ConcurrentHashMap<>(); // Paper - adventure resource pack callbacks private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit @@ -28,7 +28,7 @@ index 289a74e35836717bd20c777e9fc8c17722e90411..a5dce1e83e63292054b21ec693ec3006 public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit this.server = minecraftserver; -@@ -142,6 +143,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -143,6 +144,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @Override public void handleCustomPayload(ServerboundCustomPayloadPacket packet) { @@ -40,7 +40,7 @@ index 289a74e35836717bd20c777e9fc8c17722e90411..a5dce1e83e63292054b21ec693ec3006 if (!(packet.payload() instanceof DiscardedPayload)) { return; } -@@ -173,6 +179,15 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -174,6 +180,15 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack try { byte[] data = new byte[payload.readableBytes()]; payload.readBytes(data); @@ -57,10 +57,10 @@ index 289a74e35836717bd20c777e9fc8c17722e90411..a5dce1e83e63292054b21ec693ec3006 } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 61b9dabaa74ee9e2b357316382ecbdf6c822b916..b623d3242c5166ee16cf5e334f7c04f801ac5e9d 100644 +index e837939d35ee168f5640b28fae07675817492cb9..8b89959fa688f17ea9f16597cc0cc49f1d94a0ff 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3121,6 +3121,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3134,6 +3134,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end }; diff --git a/patches/unapplied/server/0401-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/0397-Add-playPickupItemAnimation-to-LivingEntity.patch similarity index 84% rename from patches/unapplied/server/0401-Add-playPickupItemAnimation-to-LivingEntity.patch rename to patches/server/0397-Add-playPickupItemAnimation-to-LivingEntity.patch index 00d87adf6c..d7cbebee88 100644 --- a/patches/unapplied/server/0401-Add-playPickupItemAnimation-to-LivingEntity.patch +++ b/patches/server/0397-Add-playPickupItemAnimation-to-LivingEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a5026d470b8651ddf4b79fc29cbc598ac55217ff..aff940a7bacf53571f8e7bcd520419994596ebb3 100644 +index 1544242abfbd0f9accf5fe515a95d9ac0db50d4f..7c5f873ed2962244d8a17583b26c29b7caffe5d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -977,4 +977,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -979,4 +979,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } } // Paper end - entity jump API diff --git a/patches/unapplied/server/0402-Don-t-require-FACING-data.patch b/patches/server/0398-Don-t-require-FACING-data.patch similarity index 88% rename from patches/unapplied/server/0402-Don-t-require-FACING-data.patch rename to patches/server/0398-Don-t-require-FACING-data.patch index 98d0ef923f..2cec1e5276 100644 --- a/patches/unapplied/server/0402-Don-t-require-FACING-data.patch +++ b/patches/server/0398-Don-t-require-FACING-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't require FACING data diff --git a/src/main/java/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java -index f25e28098df0a21fd1ae55f5527cddcef9a36b0d..f28705547a62da790f5df071400986aacba39367 100644 +index c90bce6777d24821758d1830e6c6c6c72e19703f..39c96f5db6e90a470404c6387fa0c1d5531822e5 100644 --- a/src/main/java/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java @@ -14,6 +14,7 @@ import org.bukkit.event.block.BlockDispenseEvent; @@ -14,9 +14,9 @@ index f25e28098df0a21fd1ae55f5527cddcef9a36b0d..f28705547a62da790f5df071400986aa public class DefaultDispenseItemBehavior implements DispenseItemBehavior { + private Direction enumdirection; // Paper - cache facing direction - // CraftBukkit start - private boolean dropper; -@@ -27,15 +28,16 @@ public class DefaultDispenseItemBehavior implements DispenseItemBehavior { + private static final int DEFAULT_ACCURACY = 6; + +@@ -29,15 +30,16 @@ public class DefaultDispenseItemBehavior implements DispenseItemBehavior { @Override public final ItemStack dispense(BlockSource pointer, ItemStack stack) { diff --git a/patches/unapplied/server/0403-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0399-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch similarity index 90% rename from patches/unapplied/server/0403-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch rename to patches/server/0399-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 4bec5c2cbd..ab9e54610d 100644 --- a/patches/unapplied/server/0403-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0399-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index df623f10def1ecf071971119f449a773063b3ce1..f079192644e3b366dc58c4a77c10cbbe65c25eca 100644 +index a87782c3cb0a751f532feda0b827d7c7eac163e1..2c70df4d6ba8188ef7e1ab30b70bcfaa1a660eca 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1668,7 +1668,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1666,7 +1666,9 @@ public class ServerLevel extends Level implements WorldGenLevel { float f1 = this.levelData.getSpawnAngle(); if (!blockposition1.equals(pos) || f1 != angle) { @@ -19,7 +19,7 @@ index df623f10def1ecf071971119f449a773063b3ce1..f079192644e3b366dc58c4a77c10cbbe } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8db6209b22c838d01b0b8032ad0608713cc8a54c..a493c8d12935336bb3049aa6d00eb1a4f2194c25 100644 +index 78b3e22cd720f204d11d56be3ec272d75f042e31..97ab6b50288b0d9303cbe20c5aa2af26ff3e72fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -269,12 +269,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0404-Add-moon-phase-API.patch b/patches/server/0400-Add-moon-phase-API.patch similarity index 83% rename from patches/unapplied/server/0404-Add-moon-phase-API.patch rename to patches/server/0400-Add-moon-phase-API.patch index 4d31dd9704..539ccca6de 100644 --- a/patches/unapplied/server/0404-Add-moon-phase-API.patch +++ b/patches/server/0400-Add-moon-phase-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add moon phase API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 3cae8eba83fdf7f99d0c0d9dc96f4b3ebc29a4ca..f129fa38d079dc57ca2cf3b6738dd9dc0fa95991 100644 +index 454f3a08c4d319f3d3fe2b1209c4d8b9fa9d4d08..1963e826548c5a8859c50f57654784c3aef50e44 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -508,4 +508,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -509,4 +509,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor { throw new IllegalArgumentException("Cannot spawn an entity for " + clazz.getName()); } diff --git a/patches/unapplied/server/0405-Do-not-let-the-server-load-chunks-from-newer-version.patch b/patches/server/0401-Do-not-let-the-server-load-chunks-from-newer-version.patch similarity index 91% rename from patches/unapplied/server/0405-Do-not-let-the-server-load-chunks-from-newer-version.patch rename to patches/server/0401-Do-not-let-the-server-load-chunks-from-newer-version.patch index 4c1742107a..9ada63fcdf 100644 --- a/patches/unapplied/server/0405-Do-not-let-the-server-load-chunks-from-newer-version.patch +++ b/patches/server/0401-Do-not-let-the-server-load-chunks-from-newer-version.patch @@ -9,7 +9,7 @@ the game, immediately stop the server to prevent data corruption. You can override this functionality at your own peril. diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java -index b3f8df13e97cbde7dd914b42004d186f90b78646..2ca1f01ab59000949cbde1766c9811a72dbfb4ff 100644 +index 0dd6f1bce4913cb84ba21a20df5573bab3a64645..5e1a68e3a920aab10a459b9b54f6abd59e7855e0 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java @@ -86,6 +86,10 @@ public class ChunkSerializer { @@ -23,10 +23,10 @@ index b3f8df13e97cbde7dd914b42004d186f90b78646..2ca1f01ab59000949cbde1766c9811a7 public ChunkSerializer() {} // Paper start - guard against serializing mismatching coordinates -@@ -101,6 +105,15 @@ public class ChunkSerializer { - } +@@ -102,6 +106,15 @@ public class ChunkSerializer { // Paper end - guard against serializing mismatching coordinates - public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, ChunkPos chunkPos, CompoundTag nbt) { + + public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, RegionStorageInfo key, ChunkPos chunkPos, CompoundTag nbt) { + // Paper start - Do not let the server load chunks from newer versions + if (nbt.contains("DataVersion", net.minecraft.nbt.Tag.TAG_ANY_NUMERIC)) { + final int dataVersion = nbt.getInt("DataVersion"); diff --git a/patches/unapplied/server/0406-Prevent-headless-pistons-from-being-created.patch b/patches/server/0402-Prevent-headless-pistons-from-being-created.patch similarity index 92% rename from patches/unapplied/server/0406-Prevent-headless-pistons-from-being-created.patch rename to patches/server/0402-Prevent-headless-pistons-from-being-created.patch index 9e9737ddde..e375acc68a 100644 --- a/patches/unapplied/server/0406-Prevent-headless-pistons-from-being-created.patch +++ b/patches/server/0402-Prevent-headless-pistons-from-being-created.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent headless pistons from being created Prevent headless pistons from being created by explosions or tree/mushroom growth. diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 03c25fec51562f652a8060cde4aabfe9e8bbcfe0..4107756fb31e4ad99f643184118d877aef09e9f4 100644 +index 1350c8df69b4ffcf9daa73549e496627db8bc6f7..69914a048987c21ee2ed2c489aab269862fda8f2 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -206,6 +206,15 @@ public class Explosion { +@@ -207,6 +207,15 @@ public class Explosion { if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f)) { set.add(blockposition); diff --git a/patches/unapplied/server/0407-Add-BellRingEvent.patch b/patches/server/0403-Add-BellRingEvent.patch similarity index 90% rename from patches/unapplied/server/0407-Add-BellRingEvent.patch rename to patches/server/0403-Add-BellRingEvent.patch index fd9371e9d1..877e586128 100644 --- a/patches/unapplied/server/0407-Add-BellRingEvent.patch +++ b/patches/server/0403-Add-BellRingEvent.patch @@ -7,10 +7,10 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a village bell. Passes along the bell block and the player who rang it. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2006573ca4bed3c3ed02bf2f38cdd248e6b123c9..50f0ea8f6892b8a3323fb5ebf5731b8245d7788a 100644 +index 5cd934897dde1fc54bfe93e8d585ff05bb9293c3..b0497ecb6d0963104ef178ede62dbc630059ad8d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -367,10 +367,11 @@ public class CraftEventFactory { +@@ -368,10 +368,11 @@ public class CraftEventFactory { return tradeSelectEvent; } diff --git a/patches/unapplied/server/0408-Add-zombie-targets-turtle-egg-config.patch b/patches/server/0404-Add-zombie-targets-turtle-egg-config.patch similarity index 87% rename from patches/unapplied/server/0408-Add-zombie-targets-turtle-egg-config.patch rename to patches/server/0404-Add-zombie-targets-turtle-egg-config.patch index 553e712827..56529e1fd4 100644 --- a/patches/unapplied/server/0408-Add-zombie-targets-turtle-egg-config.patch +++ b/patches/server/0404-Add-zombie-targets-turtle-egg-config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add zombie targets turtle egg config diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 66fa70762ba3387aa200caa4d8a4e557498cfff1..bb3c46c9faaf300f7c755c3b8316434e51d0c408 100644 +index e2a3978899497b6622829d6577cfaa723092da9d..78254df3e5fbcb0a90c2f9eb9c9343792238f685 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -106,7 +106,7 @@ public class Zombie extends Monster { +@@ -110,7 +110,7 @@ public class Zombie extends Monster { @Override protected void registerGoals() { diff --git a/patches/unapplied/server/0409-Buffer-joins-to-world.patch b/patches/server/0405-Buffer-joins-to-world.patch similarity index 92% rename from patches/unapplied/server/0409-Buffer-joins-to-world.patch rename to patches/server/0405-Buffer-joins-to-world.patch index 26675cacaf..2e31ea4385 100644 --- a/patches/unapplied/server/0409-Buffer-joins-to-world.patch +++ b/patches/server/0405-Buffer-joins-to-world.patch @@ -8,10 +8,10 @@ the world per tick, this attempts to reduce the impact that join floods has on the server diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 9885dec92cd26dec61c303dda687b0f910d49749..68d5be903a0d13e59c9e4bd6d85baaf0773547a0 100644 +index 38947f40864f3661df2eb4baa0aef5740b82f9d9..134810ac91d828d67759cd1ed56f11b71e292917 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -437,12 +437,26 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -445,12 +445,26 @@ public class Connection extends SimpleChannelInboundHandler> { } } diff --git a/patches/unapplied/server/0410-Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/0406-Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 89% rename from patches/unapplied/server/0410-Fix-hex-colors-not-working-in-some-kick-messages.patch rename to patches/server/0406-Fix-hex-colors-not-working-in-some-kick-messages.patch index 05d525bde0..f6f865ab1a 100644 --- a/patches/unapplied/server/0410-Fix-hex-colors-not-working-in-some-kick-messages.patch +++ b/patches/server/0406-Fix-hex-colors-not-working-in-some-kick-messages.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix hex colors not working in some kick messages diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index f9314bee1ed9b0e4c4591c0acf8a305721765850..ffe3048d16809b177d2fb495a25a16ed78b50e6b 100644 +index 946b423d2184f903dc29c923d7dbe05aaa469c09..0c1bdf2329936ce479a2cc53e8a46bd2ad685ec1 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -@@ -112,14 +112,16 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -113,14 +113,16 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL } // CraftBukkit end if (packet.protocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) { @@ -26,13 +26,13 @@ index f9314bee1ed9b0e4c4591c0acf8a305721765850..ffe3048d16809b177d2fb495a25a16ed + Component ichatmutablecomponent = io.papermc.paper.adventure.PaperAdventure.asVanilla(adventureComponent); // Paper - Fix hex colors not working in some kick messages + this.connection.send(new ClientboundLoginDisconnectPacket(ichatmutablecomponent)); - this.connection.disconnect(ichatmutablecomponent); + this.connection.disconnect((Component) ichatmutablecomponent); } else { diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 5bb7b0ab8a1e566f07f7f39bf072abcbe44e73d2..b968026728b8b4e549eed9fa9b43919c6c19eb7a 100644 +index 53b1fd2d1328bde3fe195964ce39ff5c0f5a7c05..baedae23865ea80c6546d1f6f439e1d7712258b9 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -126,7 +126,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, +@@ -128,7 +128,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, // CraftBukkit start @Deprecated public void disconnect(String s) { diff --git a/patches/unapplied/server/0411-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0407-PortalCreateEvent-needs-to-know-its-entity.patch similarity index 90% rename from patches/unapplied/server/0411-PortalCreateEvent-needs-to-know-its-entity.patch rename to patches/server/0407-PortalCreateEvent-needs-to-know-its-entity.patch index 8ba6264b62..97b795bec5 100644 --- a/patches/unapplied/server/0411-PortalCreateEvent-needs-to-know-its-entity.patch +++ b/patches/server/0407-PortalCreateEvent-needs-to-know-its-entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index b5f1d223a3955e1b478712c581080904f86a2a2a..e5fbb6dac3b1869797f2141e82993374a9f18e94 100644 +index cc8825acea0d84b36194313656a6f70d8c049072..7f7445a2b68fd2e6e5fcd509d950a0f8d680c1fe 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -501,7 +501,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -522,7 +522,7 @@ public final class ItemStack implements DataComponentHolder { net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition); if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically @@ -18,7 +18,7 @@ index b5f1d223a3955e1b478712c581080904f86a2a2a..e5fbb6dac3b1869797f2141e82993374 world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -index 233236733537e036d3a37a3102f3ca6b887d076f..83f48d543eac94276ee4d7f7a4c21abdfa8eb8e6 100644 +index e499a5eb843af3e2417bcb31add3c63443c0deff..993538f613e52ecd009f01e7b68fddba76b6a3e8 100644 --- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java @@ -144,12 +144,19 @@ public abstract class BaseFireBlock extends Block { @@ -60,10 +60,10 @@ index ceaa2a7048afc4955d3695af5291e83a79d83c5d..5dad1aa26a8908cba6a08398a4bad27f } diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 3e76f1baa321f1c2551a027a705bbeed48936e2b..24c2ec8e637373876a00bf292ac9318f79da7aef 100644 +index d02f7a547dbe8943f82c07103b1fff203e4533c2..335f43e49d31acecfec8b6da9be9afe88cd95ca9 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -155,6 +155,12 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -154,6 +154,12 @@ public abstract class BlockBehaviour implements FeatureElement { DebugPackets.sendNeighborsUpdatePacket(world, pos); } @@ -76,7 +76,7 @@ index 3e76f1baa321f1c2551a027a705bbeed48936e2b..24c2ec8e637373876a00bf292ac9318f protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { org.spigotmc.AsyncCatcher.catchOp("block onPlace"); // Spigot } -@@ -1080,6 +1086,12 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1086,6 +1092,12 @@ public abstract class BlockBehaviour implements FeatureElement { this.getBlock().updateIndirectNeighbourShapes(this.asState(), world, pos, flags, maxUpdateDepth); } @@ -90,10 +90,10 @@ index 3e76f1baa321f1c2551a027a705bbeed48936e2b..24c2ec8e637373876a00bf292ac9318f this.getBlock().onPlace(this.asState(), world, pos, state, notify); } diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java -index 766884046e2c22da4cb99712ff09d1f439394523..af24467ee37cfc06f692b3b02e68f6cfbaaa8d59 100644 +index bb22b12b05de29bed00e433630c91f233fa9a366..57139a0b8adcd1ea25cd100be78402681856ee75 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java -@@ -190,7 +190,14 @@ public class PortalShape { +@@ -189,7 +189,14 @@ public class PortalShape { } // CraftBukkit start - return boolean @@ -108,7 +108,7 @@ index 766884046e2c22da4cb99712ff09d1f439394523..af24467ee37cfc06f692b3b02e68f6cf org.bukkit.World bworld = this.level.getMinecraftWorld().getWorld(); // Copy below for loop -@@ -200,7 +207,7 @@ public class PortalShape { +@@ -199,7 +206,7 @@ public class PortalShape { this.blocks.setBlock(blockposition, iblockdata, 18); }); diff --git a/patches/unapplied/server/0412-Add-more-Evoker-API.patch b/patches/server/0408-Add-more-Evoker-API.patch similarity index 100% rename from patches/unapplied/server/0412-Add-more-Evoker-API.patch rename to patches/server/0408-Add-more-Evoker-API.patch diff --git a/patches/unapplied/server/0413-Add-methods-to-get-translation-keys.patch b/patches/server/0409-Add-methods-to-get-translation-keys.patch similarity index 96% rename from patches/unapplied/server/0413-Add-methods-to-get-translation-keys.patch rename to patches/server/0409-Add-methods-to-get-translation-keys.patch index ec41d0f4c5..d5d4dd918c 100644 --- a/patches/unapplied/server/0413-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0409-Add-methods-to-get-translation-keys.patch @@ -42,10 +42,10 @@ index f6ffb81b68e0cf3afebe901a5ba8e305bb94b77a..f2f62667ddf082796011ad7dd025e885 + // Paper end - add Translatable } diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index 5ed90ed0461165da02c7a1acae805c12466e38d6..faf0f726453aa957d17b75dfd8de5b40d984e69c 100644 +index 97a7dc31fe7a2defed2202ccc518c66b7ff4b0da..3ea6e6678432957c5caaff15ba20f8a8ddb393c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -@@ -168,6 +168,11 @@ public class CraftEnchantment extends Enchantment implements Handleable implements ItemType.Typed, Han +@@ -237,4 +237,11 @@ public class CraftItemType implements ItemType.Typed, Han public Material asMaterial() { return Registry.MATERIAL.get(this.key); } diff --git a/patches/unapplied/server/0414-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0410-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 94% rename from patches/unapplied/server/0414-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/0410-Create-HoverEvent-from-ItemStack-Entity.patch index c24c8bca07..d7b9b11116 100644 --- a/patches/unapplied/server/0414-Create-HoverEvent-from-ItemStack-Entity.patch +++ b/patches/server/0410-Create-HoverEvent-from-ItemStack-Entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index fa4de12ba4fdce7a632923af8007e888141904c8..7c32802947fd5318009a02724c85206b250e7143 100644 +index d1a214e8d8fd7fd774a9629d5ca2d9f7a14de0e7..a96a09bb39fc35f3c4dfcd0da0ce1fe283b8377e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -539,4 +539,44 @@ public final class CraftItemFactory implements ItemFactory { +@@ -550,4 +550,44 @@ public final class CraftItemFactory implements ItemFactory { return nms != null ? net.minecraft.locale.Language.getInstance().getOrDefault(nms.getItem().getDescriptionId(nms)) : null; } // Paper end - add getI18NDisplayName diff --git a/patches/unapplied/server/0415-Cache-block-data-strings.patch b/patches/server/0411-Cache-block-data-strings.patch similarity index 95% rename from patches/unapplied/server/0415-Cache-block-data-strings.patch rename to patches/server/0411-Cache-block-data-strings.patch index dcbb1a9127..de40dce04c 100644 --- a/patches/unapplied/server/0415-Cache-block-data-strings.patch +++ b/patches/server/0411-Cache-block-data-strings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f5a2645afc64f3ba9ee21e6442697d6eb2fabb13..8e88345ad3514380cd88e38e81d6359324afd569 100644 +index 1d141c9ee7b8193d46ba47a8586fc334cabb62a1..eddb8792be0581d8f1c87d18b5ab7a02571addc7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2125,6 +2125,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= level; } -@@ -1808,6 +1809,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1874,6 +1875,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public void moveTo(double x, double y, double z, float yaw, float pitch) { @@ -69,10 +69,10 @@ index b90127f9f805fdb5bb43a4b8ad2b10499b0b6b78..8efc06d29c62fa2be8515ed3359d52a6 if (entity instanceof Mob) { Mob entityinsentient = (Mob) entity; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 40e4b8233e27b8ebd94a89bb43b5c14808edaa68..3da47cf8968c1917e2f216a410eece51a693dfb2 100644 +index 34321f095e12ea0cca34ff1ec00819c6350205a8..5f5788a502642463091fb76e98703aaec7a86836 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -238,7 +238,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -240,7 +240,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } // entity.setLocation() throws no event, and so cannot be cancelled diff --git a/patches/unapplied/server/0417-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0413-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from patches/unapplied/server/0417-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/0413-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/patches/unapplied/server/0418-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/0414-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 74% rename from patches/unapplied/server/0418-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/0414-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch index 572dc995c0..9a0c6f1492 100644 --- a/patches/unapplied/server/0418-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch +++ b/patches/server/0414-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch @@ -30,12 +30,12 @@ This patch will significantly reduce CPU use on startup, reduce memory usage, and improve server startup time. diff --git a/src/main/java/com/mojang/datafixers/DataFixerBuilder.java b/src/main/java/com/mojang/datafixers/DataFixerBuilder.java -index cd812f3fe362de5ddc414862dedab2e9727ca776..2bc69e84b4e2ba8f816322d649e42570ab9242e5 100644 +index 4232ce05ad7dd122a78a04ccef3b59d4caf542df..2cce259c738de2680e219d30dc3020458f4442d6 100644 --- a/src/main/java/com/mojang/datafixers/DataFixerBuilder.java +++ b/src/main/java/com/mojang/datafixers/DataFixerBuilder.java -@@ -30,8 +30,10 @@ public class DataFixerBuilder { +@@ -29,8 +29,10 @@ public class DataFixerBuilder { private final Int2ObjectSortedMap schemas = new Int2ObjectAVLTreeMap<>(); - private final List globalList = Lists.newArrayList(); + private final List globalList = new ArrayList<>(); private final IntSortedSet fixerVersions = new IntAVLTreeSet(); + private final int minDataFixPrecacheVersion; // Paper - Perf: Cache DataFixerUpper Rewrite Rules on demand @@ -44,11 +44,11 @@ index cd812f3fe362de5ddc414862dedab2e9727ca776..2bc69e84b4e2ba8f816322d649e42570 this.dataVersion = dataVersion; } -@@ -78,6 +80,7 @@ public class DataFixerBuilder { - final IntBidirectionalIterator iterator = fixerUpper.fixerVersions().iterator(); - while (iterator.hasNext()) { - final int versionKey = iterator.nextInt(); -+ if (versionKey < minDataFixPrecacheVersion) continue; // Paper - Perf: Cache DataFixerUpper Rewrite Rules on demand - final Schema schema = schemas.get(versionKey); - for (final String typeName : schema.types()) { - if (!requiredTypeNames.contains(typeName)) { +@@ -88,6 +90,7 @@ public class DataFixerBuilder { + final IntIterator iterator = fixerUpper.fixerVersions().iterator(); + while (iterator.hasNext()) { + final int versionKey = iterator.nextInt(); ++ if (versionKey < minDataFixPrecacheVersion) continue; // Paper - Perf: Cache DataFixerUpper Rewrite Rules on demand + final Schema schema = schemas.get(versionKey); + for (final String typeName : schema.types()) { + if (!requiredTypeNames.contains(typeName)) { diff --git a/patches/unapplied/server/0419-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0415-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 89% rename from patches/unapplied/server/0419-Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/0415-Extend-block-drop-capture-to-capture-all-items-added.patch index d4e854a598..9531e0f695 100644 --- a/patches/unapplied/server/0419-Extend-block-drop-capture-to-capture-all-items-added.patch +++ b/patches/server/0415-Extend-block-drop-capture-to-capture-all-items-added.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f079192644e3b366dc58c4a77c10cbbe65c25eca..17985c75deaa8d317ea4019f73eafe118d347f41 100644 +index 2c70df4d6ba8188ef7e1ab30b70bcfaa1a660eca..c9dad47ef14e0a021685fab710c920419611d151 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1230,6 +1230,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1228,6 +1228,12 @@ public class ServerLevel extends Level implements WorldGenLevel { // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit return false; } else { @@ -23,10 +23,10 @@ index f079192644e3b366dc58c4a77c10cbbe65c25eca..17985c75deaa8d317ea4019f73eafe11 if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) { return false; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 84c31fe944fc39109d48b6dc68d0c2b15bef6cf2..de3ec353ea32d5d71e2f1b4b369b79b85d7ce5e8 100644 +index d4bd44210d58b30696feeea48e1909472a546702..5de472df78940d1b8320f73d18b2edf3a796227e 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -432,10 +432,12 @@ public class ServerPlayerGameMode { +@@ -437,10 +437,12 @@ public class ServerPlayerGameMode { // return true; // CraftBukkit } // CraftBukkit start diff --git a/patches/unapplied/server/0420-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0416-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 85% rename from patches/unapplied/server/0420-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/0416-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index ac6a33ac0f..0c0efd8dc4 100644 --- a/patches/unapplied/server/0420-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0416-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f66c382a1365f559c833cbfd70f8b6db34e8133a..90a4eaeccedc588ac7131757421e5230e1c43e4a 100644 +index 1e65bfa3d2f3a178803c530e1610c94065ed6110..70952ec99d049c3b133629e41eeb1d725ffb5917 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4444,4 +4444,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4510,4 +4510,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess void accept(Entity entity, double x, double y, double z); } @@ -21,7 +21,7 @@ index f66c382a1365f559c833cbfd70f8b6db34e8133a..90a4eaeccedc588ac7131757421e5230 + // Paper end - Expose entity id counter } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 3fc189cd1e54f91c1713315214da9b6af2923074..b4df6f9b25da2b772b099e8cb46a50c3d006734f 100644 +index 890beb473c240c084c4dd12c5dd792895117358e..5eeb2a46cb093d21ce7276373a838041be7a47b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -530,6 +530,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0421-Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/0417-Lazily-track-plugin-scoreboards-by-default.patch similarity index 100% rename from patches/unapplied/server/0421-Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/0417-Lazily-track-plugin-scoreboards-by-default.patch diff --git a/patches/unapplied/server/0422-Entity-isTicking.patch b/patches/server/0418-Entity-isTicking.patch similarity index 80% rename from patches/unapplied/server/0422-Entity-isTicking.patch rename to patches/server/0418-Entity-isTicking.patch index bc34ad8413..527bcb79ce 100644 --- a/patches/unapplied/server/0422-Entity-isTicking.patch +++ b/patches/server/0418-Entity-isTicking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 90a4eaeccedc588ac7131757421e5230e1c43e4a..4187fc3722b7e27ccf4fcb2617c00c3af8241f9f 100644 +index 70952ec99d049c3b133629e41eeb1d725ffb5917..fef25470049fb0ac6f741920c057814ea437cd07 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4449,5 +4449,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4515,5 +4515,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public static int nextEntityId() { return ENTITY_COUNTER.incrementAndGet(); } @@ -19,10 +19,10 @@ index 90a4eaeccedc588ac7131757421e5230e1c43e4a..4187fc3722b7e27ccf4fcb2617c00c3a // Paper end - Expose entity id counter } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 3da47cf8968c1917e2f216a410eece51a693dfb2..2080733ebae1af51b7b4d3cd2fbd1a4a2703a920 100644 +index 5f5788a502642463091fb76e98703aaec7a86836..98e8ad81b8c9c0636abe59f70ce891fe926a37fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1045,4 +1045,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1062,4 +1062,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return getHandle().isInLava(); } // Paper end - entity liquid API diff --git a/patches/unapplied/server/0423-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0419-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 82% rename from patches/unapplied/server/0423-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/0419-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch index 2d50f7c1da..b387ab8612 100644 --- a/patches/unapplied/server/0423-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch +++ b/patches/server/0419-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8e88345ad3514380cd88e38e81d6359324afd569..595ce35e5a51811c12a02c3c845de44ba03d1a38 100644 +index eddb8792be0581d8f1c87d18b5ab7a02571addc7..b47110e9b5d8effdc9e768488f99a614c1070814 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2250,13 +2250,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 1.0D) { -@@ -1315,9 +1333,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1310,9 +1328,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl AABB axisalignedbb = this.player.getBoundingBox(); diff --git a/patches/unapplied/server/0427-Optimise-getType-calls.patch b/patches/server/0423-Optimise-getType-calls.patch similarity index 100% rename from patches/unapplied/server/0427-Optimise-getType-calls.patch rename to patches/server/0423-Optimise-getType-calls.patch diff --git a/patches/unapplied/server/0428-Villager-resetOffers.patch b/patches/server/0424-Villager-resetOffers.patch similarity index 92% rename from patches/unapplied/server/0428-Villager-resetOffers.patch rename to patches/server/0424-Villager-resetOffers.patch index e8e71e6b5c..77f071ec77 100644 --- a/patches/unapplied/server/0428-Villager-resetOffers.patch +++ b/patches/server/0424-Villager-resetOffers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Villager#resetOffers diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java -index 521c9602db7c532470adcd5f024d3dd0f1e88780..79e81fd5490a493b595dc1034641e13451e5a61a 100644 +index 5ee34073e4bd5a4765d7954b6620c0d05d8c7bc9..80fe2e3e5b97e9b6af98b73f19f8c2f5fca279fe 100644 --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java @@ -116,6 +116,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa @@ -21,7 +21,7 @@ index 521c9602db7c532470adcd5f024d3dd0f1e88780..79e81fd5490a493b595dc1034641e134 + @Override public MerchantOffers getOffers() { - if (this.offers == null) { + if (this.level().isClientSide) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java index 19833c1fc6ee85e031e3c6aac3b00f44730c5e02..34e4c763c7ec971885147ab2509281fad56e1ca6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java diff --git a/patches/unapplied/server/0429-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0425-Retain-block-place-order-when-capturing-blockstates.patch similarity index 89% rename from patches/unapplied/server/0429-Retain-block-place-order-when-capturing-blockstates.patch rename to patches/server/0425-Retain-block-place-order-when-capturing-blockstates.patch index 9de684873f..e7d46e41eb 100644 --- a/patches/unapplied/server/0429-Retain-block-place-order-when-capturing-blockstates.patch +++ b/patches/server/0425-Retain-block-place-order-when-capturing-blockstates.patch @@ -10,10 +10,10 @@ In general, look at making this logic more robust (i.e properly handling cases where a captured entry is overriden) - but for now this will do. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 895c263570acf0f8ac2e8d680a6187bc189a205e..88b09635590958b4edf992490dd30616c35d4d6d 100644 +index 5a3a89c568d42a2adbc2b6e2631fd4b70e54f0bf..cfd5d3e50197b38d0ffef6debbb7f5b4b208382a 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -151,7 +151,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -152,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; public Map capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper diff --git a/patches/unapplied/server/0430-Fix-item-locations-dropped-from-campfires.patch b/patches/server/0426-Fix-item-locations-dropped-from-campfires.patch similarity index 92% rename from patches/unapplied/server/0430-Fix-item-locations-dropped-from-campfires.patch rename to patches/server/0426-Fix-item-locations-dropped-from-campfires.patch index 65034de65e..26a43eb186 100644 --- a/patches/unapplied/server/0430-Fix-item-locations-dropped-from-campfires.patch +++ b/patches/server/0426-Fix-item-locations-dropped-from-campfires.patch @@ -7,10 +7,10 @@ Fixes #4259 by not flooring the blockposition among other weirdness Vanilla Issue: MC-267622 diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java -index 0de294a2aec50a39d6dbc56b6a61b01b1e538828..66fbad74c2ec2f853ec6c74482c6cae1c1746007 100644 +index 391acc9dadc653e9e1285a71b4f1e7c063e8ca49..80f911692c97585a696a19ebbe616d6aa312b2d9 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java -@@ -87,7 +87,14 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { +@@ -86,7 +86,14 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { result = blockCookEvent.getResult(); itemstack1 = CraftItemStack.asNMSCopy(result); // CraftBukkit end diff --git a/patches/unapplied/server/0431-Fix-bell-block-entity-memory-leak.patch b/patches/server/0427-Fix-bell-block-entity-memory-leak.patch similarity index 100% rename from patches/unapplied/server/0431-Fix-bell-block-entity-memory-leak.patch rename to patches/server/0427-Fix-bell-block-entity-memory-leak.patch diff --git a/patches/unapplied/server/0432-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/0428-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 93% rename from patches/unapplied/server/0432-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to patches/server/0428-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch index 87a4da70da..6ab78855c4 100644 --- a/patches/unapplied/server/0432-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch +++ b/patches/server/0428-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch @@ -8,10 +8,10 @@ This can realistically only happen if there's custom loot active on fishing which can return 0 items. This would disconnect the player who's fishing. diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index c3a035742271611f2d26cf4af0d5877369dd6558..7d557c7ec6fb1763395f4920a170bd4e4ba6747f 100644 +index 0b4c67b9de6893601f032a8fae103e8a98f2c767..5b7734020b496ade3740d92908ad2d399bfd55e6 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -@@ -505,9 +505,15 @@ public class FishingHook extends Projectile { +@@ -506,9 +506,15 @@ public class FishingHook extends Projectile { while (iterator.hasNext()) { ItemStack itemstack1 = (ItemStack) iterator.next(); @@ -29,7 +29,7 @@ index c3a035742271611f2d26cf4af0d5877369dd6558..7d557c7ec6fb1763395f4920a170bd4e playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1); this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent); -@@ -520,8 +526,12 @@ public class FishingHook extends Projectile { +@@ -521,8 +527,12 @@ public class FishingHook extends Projectile { double d2 = entityhuman.getZ() - this.getZ(); double d3 = 0.1D; diff --git a/patches/unapplied/server/0433-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0429-Add-getOfflinePlayerIfCached-String.patch similarity index 89% rename from patches/unapplied/server/0433-Add-getOfflinePlayerIfCached-String.patch rename to patches/server/0429-Add-getOfflinePlayerIfCached-String.patch index 228e7d895b..88f95ee405 100644 --- a/patches/unapplied/server/0433-Add-getOfflinePlayerIfCached-String.patch +++ b/patches/server/0429-Add-getOfflinePlayerIfCached-String.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f5079f1bb3f66392e663cac495f555edb6a08a09..aee62eef2a67be2ca0d1c19143cc7f42e5e32390 100644 +index 010ab9cdf3dbe9b89b58744f37b33a232167f445..92e0f1a948962d4c71f1288dfb8b482d3207cf4c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1952,6 +1952,28 @@ public final class CraftServer implements Server { +@@ -1955,6 +1955,28 @@ public final class CraftServer implements Server { return result; } diff --git a/patches/unapplied/server/0434-Add-ignore-discounts-API.patch b/patches/server/0430-Add-ignore-discounts-API.patch similarity index 97% rename from patches/unapplied/server/0434-Add-ignore-discounts-API.patch rename to patches/server/0430-Add-ignore-discounts-API.patch index 2f9c40bb4c..5a2d4be36b 100644 --- a/patches/unapplied/server/0434-Add-ignore-discounts-API.patch +++ b/patches/server/0430-Add-ignore-discounts-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ignore discounts API diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 4d7f95d2bd415bacccee145bfc47f2b480530c11..4d3a04e1d7910c4e71ac9a1cebb58e482958671a 100644 +index e23674dd5db3c429efd3b7c71fe36b420494c03a..9d5a5a7fff7f75871e167f83edb0e9d5348748d7 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -491,6 +491,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -493,6 +493,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler while (iterator.hasNext()) { MerchantOffer merchantrecipe = (MerchantOffer) iterator.next(); @@ -16,7 +16,7 @@ index 4d7f95d2bd415bacccee145bfc47f2b480530c11..4d3a04e1d7910c4e71ac9a1cebb58e48 merchantrecipe.addToSpecialPriceDiff(-Mth.floor((float) i * merchantrecipe.getPriceMultiplier())); } -@@ -503,6 +504,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -505,6 +506,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler while (iterator1.hasNext()) { MerchantOffer merchantrecipe1 = (MerchantOffer) iterator1.next(); diff --git a/patches/unapplied/server/0435-Toggle-for-removing-existing-dragon.patch b/patches/server/0431-Toggle-for-removing-existing-dragon.patch similarity index 100% rename from patches/unapplied/server/0435-Toggle-for-removing-existing-dragon.patch rename to patches/server/0431-Toggle-for-removing-existing-dragon.patch diff --git a/patches/unapplied/server/0436-Fix-client-lag-on-advancement-loading.patch b/patches/server/0432-Fix-client-lag-on-advancement-loading.patch similarity index 95% rename from patches/unapplied/server/0436-Fix-client-lag-on-advancement-loading.patch rename to patches/server/0432-Fix-client-lag-on-advancement-loading.patch index d00dc1771e..b21d181e44 100644 --- a/patches/unapplied/server/0436-Fix-client-lag-on-advancement-loading.patch +++ b/patches/server/0432-Fix-client-lag-on-advancement-loading.patch @@ -15,7 +15,7 @@ manually reload the advancement data for all players, which normally takes place as a part of the datapack reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index b4df6f9b25da2b772b099e8cb46a50c3d006734f..176557c1910eff297cfedc11ae95f0f03c73812d 100644 +index 5eeb2a46cb093d21ce7276373a838041be7a47b3..50322927460ec9464363617e3f7fe5ff8faa1f6f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -337,7 +337,13 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0437-Item-no-age-no-player-pickup.patch b/patches/server/0433-Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/unapplied/server/0437-Item-no-age-no-player-pickup.patch rename to patches/server/0433-Item-no-age-no-player-pickup.patch diff --git a/patches/unapplied/server/0438-Beacon-API-custom-effect-ranges.patch b/patches/server/0434-Beacon-API-custom-effect-ranges.patch similarity index 98% rename from patches/unapplied/server/0438-Beacon-API-custom-effect-ranges.patch rename to patches/server/0434-Beacon-API-custom-effect-ranges.patch index b8790eb9fa..b80f1772cd 100644 --- a/patches/unapplied/server/0438-Beacon-API-custom-effect-ranges.patch +++ b/patches/server/0434-Beacon-API-custom-effect-ranges.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Beacon API - custom effect ranges diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index cf48d4531821c2b1b031a63c8f007aa7d3fbef1d..dc39e7e3d166b0f7fb09e04b222b8db00d42b11b 100644 +index fc915797d2a085447747d9ce23a5a354fb3eb6b6..52776ce9b7b4edd1eb474f14705d7fd83f5a66ca 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -86,6 +86,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name diff --git a/patches/unapplied/server/0439-Add-API-for-quit-reason.patch b/patches/server/0435-Add-API-for-quit-reason.patch similarity index 79% rename from patches/unapplied/server/0439-Add-API-for-quit-reason.patch rename to patches/server/0435-Add-API-for-quit-reason.patch index 16f5c58e27..1354ba8696 100644 --- a/patches/unapplied/server/0439-Add-API-for-quit-reason.patch +++ b/patches/server/0435-Add-API-for-quit-reason.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add API for quit reason diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 68d5be903a0d13e59c9e4bd6d85baaf0773547a0..fe89e8f509f3972ceb71c9aa6277524baa39985b 100644 +index 134810ac91d828d67759cd1ed56f11b71e292917..ba41646a5edb57c4d9766df08bbc57016e2de189 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -167,12 +167,15 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -167,8 +167,10 @@ public class Connection extends SimpleChannelInboundHandler> { this.handlingFault = true; if (this.channel.isOpen()) { @@ -16,19 +16,22 @@ index 68d5be903a0d13e59c9e4bd6d85baaf0773547a0..fe89e8f509f3972ceb71c9aa6277524b if (throwable instanceof TimeoutException) { Connection.LOGGER.debug("Timeout", throwable); + if (player != null) player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.TIMED_OUT; // Paper - Add API for quit reason - this.disconnect(Component.translatable("disconnect.timeout")); + this.disconnect((Component) Component.translatable("disconnect.timeout")); } else { MutableComponent ichatmutablecomponent = Component.translatable("disconnect.genericReason", "Internal Exception: " + String.valueOf(throwable)); +@@ -181,6 +183,7 @@ public class Connection extends SimpleChannelInboundHandler> { + disconnectiondetails = new DisconnectionDetails(ichatmutablecomponent); + } + if (player != null) player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.ERRONEOUS_STATE; // Paper - Add API for quit reason if (flag) { Connection.LOGGER.debug("Failed to sent packet", throwable); if (this.getSending() == PacketFlow.CLIENTBOUND) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index ffd9ff7db5180cb351839a3ce331353d16b662d2..d262946f729a5621f311e266b6b316d445b9e02a 100644 +index 45d36070735cd7a8baee585165a95a169d7059b4..2c24de44e48a1c55b81e2ecfb92c57e42546cc41 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -291,6 +291,7 @@ public class ServerPlayer extends Player { +@@ -295,6 +295,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent public @Nullable String clientBrandName = null; // Paper - Brand support @@ -37,22 +40,22 @@ index ffd9ff7db5180cb351839a3ce331353d16b662d2..d262946f729a5621f311e266b6b316d4 public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index a5dce1e83e63292054b21ec693ec3006e08d3ff2..661765a9fe1c2e49299262190501ee3b3294a2f1 100644 +index 4761a8d8f342c649bc2e5f530819fa88f43542ec..125a80951f6e4d19c6aa61e104339242de7a4b00 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -371,6 +371,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack - final Component ichatbasecomponent = io.papermc.paper.adventure.PaperAdventure.asVanilla(event.reason()); // Paper - Adventure - // CraftBukkit end + private void disconnect0(DisconnectionDetails disconnectiondetails) { + // CraftBukkit end + this.player.quitReason = org.bukkit.event.player.PlayerQuitEvent.QuitReason.KICKED; // Paper - Add API for quit reason - this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> { - this.connection.disconnect(ichatbasecomponent); + this.connection.send(new ClientboundDisconnectPacket(disconnectiondetails.reason()), PacketSendListener.thenRun(() -> { + this.connection.disconnect(disconnectiondetails); })); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 97a3f29414cd9f11e6a790cb30f7ef25a836b06c..8b0b9ef372c595340c43c5882ad71587833d86bc 100644 +index fa35bc76575a3ffe6435ff24db0c7ad78b53e309..858bbd4add280f0cd04aa94fb0b2f8f9423299cf 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -576,7 +576,7 @@ public abstract class PlayerList { +@@ -570,7 +570,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper - Inventory close reason } diff --git a/patches/unapplied/server/0440-Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/0436-Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 100% rename from patches/unapplied/server/0440-Add-Wandering-Trader-spawn-rate-config-options.patch rename to patches/server/0436-Add-Wandering-Trader-spawn-rate-config-options.patch diff --git a/patches/unapplied/server/0442-Add-Destroy-Speed-API.patch b/patches/server/0437-Add-Destroy-Speed-API.patch similarity index 100% rename from patches/unapplied/server/0442-Add-Destroy-Speed-API.patch rename to patches/server/0437-Add-Destroy-Speed-API.patch diff --git a/patches/unapplied/server/0443-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0438-Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 89% rename from patches/unapplied/server/0443-Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to patches/server/0438-Fix-Player-spawnParticle-x-y-z-precision-loss.patch index c497a0c5eb..b845d58398 100644 --- a/patches/unapplied/server/0443-Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/patches/server/0438-Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b623d3242c5166ee16cf5e334f7c04f801ac5e9d..37d6be0ae176569971659b4a83895f386eeef863 100644 +index 8b89959fa688f17ea9f16597cc0cc49f1d94a0ff..721f4fb6bc18fc3ca6a22e8a42f564220042fa42 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2689,7 +2689,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2702,7 +2702,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/patches/unapplied/server/0444-Add-LivingEntity-clearActiveItem.patch b/patches/server/0439-Add-LivingEntity-clearActiveItem.patch similarity index 84% rename from patches/unapplied/server/0444-Add-LivingEntity-clearActiveItem.patch rename to patches/server/0439-Add-LivingEntity-clearActiveItem.patch index 50382e523c..4a037aa1eb 100644 --- a/patches/unapplied/server/0444-Add-LivingEntity-clearActiveItem.patch +++ b/patches/server/0439-Add-LivingEntity-clearActiveItem.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index aff940a7bacf53571f8e7bcd520419994596ebb3..7158f88e90c624b7ed3345ad7fb47745d4491d88 100644 +index 7c5f873ed2962244d8a17583b26c29b7caffe5d4..671fb1d1bffd7cdffcb56193e0b4f08a0eda0682 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -934,6 +934,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -936,6 +936,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return this.getHandle().getUseItem().asBukkitMirror(); } diff --git a/patches/unapplied/server/0445-Add-PlayerItemCooldownEvent.patch b/patches/server/0440-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/unapplied/server/0445-Add-PlayerItemCooldownEvent.patch rename to patches/server/0440-Add-PlayerItemCooldownEvent.patch diff --git a/patches/unapplied/server/0446-Significantly-improve-performance-of-the-end-generat.patch b/patches/server/0441-Significantly-improve-performance-of-the-end-generat.patch similarity index 100% rename from patches/unapplied/server/0446-Significantly-improve-performance-of-the-end-generat.patch rename to patches/server/0441-Significantly-improve-performance-of-the-end-generat.patch diff --git a/patches/unapplied/server/0447-More-lightning-API.patch b/patches/server/0442-More-lightning-API.patch similarity index 100% rename from patches/unapplied/server/0447-More-lightning-API.patch rename to patches/server/0442-More-lightning-API.patch diff --git a/patches/unapplied/server/0448-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0443-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 86% rename from patches/unapplied/server/0448-Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/0443-Climbing-should-not-bypass-cramming-gamerule.patch index cc3c81d97c..924f825c02 100644 --- a/patches/unapplied/server/0448-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/0443-Climbing-should-not-bypass-cramming-gamerule.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4187fc3722b7e27ccf4fcb2617c00c3af8241f9f..f7964a9ef04d35b5bf46ff18071ef22f53b9a3b5 100644 +index fef25470049fb0ac6f741920c057814ea437cd07..7e4fe51b276df05f41c5603140ed198b7aef9585 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2010,6 +2010,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2081,6 +2081,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean isPushable() { @@ -44,10 +44,10 @@ index ee4495b67c46cf1282cdd6ad15b224b0b7b10bfb..e382a29b441b656f35bc24cb90f95cb4 } else if (entity.level().isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) { return false; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index dd5a32360f4b49e9544009d3874da3f4af7b386a..e2cd1097756832a2bb60cdd73fdd05d1c64e38d0 100644 +index a85321f1dc8b0bc4338bf5f23c5686c0ca733cec..f26f7760a2452af9b59c1b64d27700f56b32af97 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3524,7 +3524,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3544,7 +3544,7 @@ public abstract class LivingEntity extends Entity implements Attackable { return; } // Paper end - don't run getEntities if we're not going to use its result @@ -56,7 +56,7 @@ index dd5a32360f4b49e9544009d3874da3f4af7b386a..e2cd1097756832a2bb60cdd73fdd05d1 if (!list.isEmpty()) { // Paper - don't run getEntities if we're not going to use its result; moved up -@@ -3714,9 +3714,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3736,9 +3736,16 @@ public abstract class LivingEntity extends Entity implements Attackable { return !this.isRemoved() && this.collides; // CraftBukkit } @@ -88,10 +88,10 @@ index 934fa26b8f347b8b2d90f79370b62165c0cdc312..dc27ddf5131e7398a5390a5187261d4c } diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -index 1a129f43dc737218746b21ae5d03e3749bfee092..5ca96541abbb754f4d9fbe01f37ebaf19c532bbb 100644 +index 12b2267cba476547d510d9161b25a28f4f5c798e..97931bfd360725945ab9606ff698b518ae101076 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -@@ -367,8 +367,8 @@ public class Parrot extends ShoulderRidingEntity implements VariantHolder { +@@ -154,7 +154,7 @@ public class Boat extends VehicleEntity implements Leashable, VariantHolder 0) { --this.chatSpamTickCount; -@@ -3053,6 +3055,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3070,6 +3072,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { diff --git a/patches/unapplied/server/0452-Fix-CraftSound-backwards-compatibility.patch b/patches/server/0447-Fix-CraftSound-backwards-compatibility.patch similarity index 100% rename from patches/unapplied/server/0452-Fix-CraftSound-backwards-compatibility.patch rename to patches/server/0447-Fix-CraftSound-backwards-compatibility.patch diff --git a/patches/unapplied/server/0453-Player-Chunk-Load-Unload-Events.patch b/patches/server/0448-Player-Chunk-Load-Unload-Events.patch similarity index 95% rename from patches/unapplied/server/0453-Player-Chunk-Load-Unload-Events.patch rename to patches/server/0448-Player-Chunk-Load-Unload-Events.patch index bd58a9a7ec..0fee853cd3 100644 --- a/patches/unapplied/server/0453-Player-Chunk-Load-Unload-Events.patch +++ b/patches/server/0448-Player-Chunk-Load-Unload-Events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Player Chunk Load/Unload Events diff --git a/src/main/java/net/minecraft/server/network/PlayerChunkSender.java b/src/main/java/net/minecraft/server/network/PlayerChunkSender.java -index 3548be0bfacc7ff2cf0ed5fac4d8de09bd2a415f..c502d9b85eb68b277ae17dfea34e0475f0156647 100644 +index 7c4b795b8a0f58dd07bc5acb1e309476bf4cbe90..cdd66e6ce96e2613afe7f06ca8da3cfaa6704b2d 100644 --- a/src/main/java/net/minecraft/server/network/PlayerChunkSender.java +++ b/src/main/java/net/minecraft/server/network/PlayerChunkSender.java @@ -44,6 +44,11 @@ public class PlayerChunkSender { diff --git a/patches/unapplied/server/0454-Optimize-Dynamic-get-Missing-Keys.patch b/patches/server/0449-Optimize-Dynamic-get-Missing-Keys.patch similarity index 100% rename from patches/unapplied/server/0454-Optimize-Dynamic-get-Missing-Keys.patch rename to patches/server/0449-Optimize-Dynamic-get-Missing-Keys.patch diff --git a/patches/unapplied/server/0455-Expose-LivingEntity-hurt-direction.patch b/patches/server/0450-Expose-LivingEntity-hurt-direction.patch similarity index 90% rename from patches/unapplied/server/0455-Expose-LivingEntity-hurt-direction.patch rename to patches/server/0450-Expose-LivingEntity-hurt-direction.patch index d5a3d7734d..32452b749b 100644 --- a/patches/unapplied/server/0455-Expose-LivingEntity-hurt-direction.patch +++ b/patches/server/0450-Expose-LivingEntity-hurt-direction.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction 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 37190eb2d7a8f81989908f58aa13de1ba964e43a..389da4ed8d166f840e881579db51058f44e9ee24 100644 +index 1d8aa3b3c3deba7d04dd115d1f0b70b078111f1e..5abd72b1a80967bd2502537978d8f5456075f357 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java @@ -187,7 +187,7 @@ public abstract class Player extends LivingEntity { @@ -36,10 +36,10 @@ index 9393e9d21fcc41cb0f20b98d9f28c95b0e523f62..796945fb1a8b43987ed9f01375113b2c public int getSleepTicks() { return this.getHandle().sleepCounter; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 7158f88e90c624b7ed3345ad7fb47745d4491d88..b88077ac1ed99057b8a9361ea550cd2b00040f88 100644 +index 671fb1d1bffd7cdffcb56193e0b4f08a0eda0682..aad17b34fedd7030939f3b834b313b7f79b69ce1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -991,4 +991,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -993,4 +993,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.getHandle().take(((CraftItem) item).getHandle(), quantity); } // Paper end - pickup animation API diff --git a/patches/unapplied/server/0456-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0451-Add-OBSTRUCTED-reason-to-BedEnterResult.patch similarity index 86% rename from patches/unapplied/server/0456-Add-OBSTRUCTED-reason-to-BedEnterResult.patch rename to patches/server/0451-Add-OBSTRUCTED-reason-to-BedEnterResult.patch index d71012cfe7..1fde31e64f 100644 --- a/patches/unapplied/server/0456-Add-OBSTRUCTED-reason-to-BedEnterResult.patch +++ b/patches/server/0451-Add-OBSTRUCTED-reason-to-BedEnterResult.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 50f0ea8f6892b8a3323fb5ebf5731b8245d7788a..962f4d7453433392331cd68d207cb1c6c1c8fd67 100644 +index b0497ecb6d0963104ef178ede62dbc630059ad8d..7d99c696bec2ea338612d1376e2d24a952b74791 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -302,6 +302,10 @@ public class CraftEventFactory { +@@ -303,6 +303,10 @@ public class CraftEventFactory { return BedEnterResult.TOO_FAR_AWAY; case NOT_SAFE: return BedEnterResult.NOT_SAFE; diff --git a/patches/unapplied/server/0457-Fix-crash-from-invalid-ingredient-lists-in-VillagerA.patch b/patches/server/0452-Fix-crash-from-invalid-ingredient-lists-in-VillagerA.patch similarity index 89% rename from patches/unapplied/server/0457-Fix-crash-from-invalid-ingredient-lists-in-VillagerA.patch rename to patches/server/0452-Fix-crash-from-invalid-ingredient-lists-in-VillagerA.patch index 762023bb09..4186b39237 100644 --- a/patches/unapplied/server/0457-Fix-crash-from-invalid-ingredient-lists-in-VillagerA.patch +++ b/patches/server/0452-Fix-crash-from-invalid-ingredient-lists-in-VillagerA.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix crash from invalid ingredient lists in diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java -index 79e81fd5490a493b595dc1034641e13451e5a61a..6e29b5729b8184d13065c9c4e18f6e450c9d88a6 100644 +index 80fe2e3e5b97e9b6af98b73f19f8c2f5fca279fe..6139361c0e733f981506abdd7101e5ca20eeb88f 100644 --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java -@@ -269,7 +269,11 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa +@@ -275,7 +275,11 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa Bukkit.getPluginManager().callEvent(event); } if (!event.isCancelled()) { diff --git a/patches/unapplied/server/0458-Add-TargetHitEvent.patch b/patches/server/0453-Add-TargetHitEvent.patch similarity index 100% rename from patches/unapplied/server/0458-Add-TargetHitEvent.patch rename to patches/server/0453-Add-TargetHitEvent.patch diff --git a/patches/unapplied/server/0459-MC-4-Fix-item-position-desync.patch b/patches/server/0454-MC-4-Fix-item-position-desync.patch similarity index 89% rename from patches/unapplied/server/0459-MC-4-Fix-item-position-desync.patch rename to patches/server/0454-MC-4-Fix-item-position-desync.patch index 06b13f7a14..9420ce8945 100644 --- a/patches/unapplied/server/0459-MC-4-Fix-item-position-desync.patch +++ b/patches/server/0454-MC-4-Fix-item-position-desync.patch @@ -9,7 +9,7 @@ loss, which forces the server to lose the same precision as the client keeping them in sync. diff --git a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java -index ffec3deb9bcd31d51974c1deda2e76bc8374e5c5..a3d247c93ac1a2d872ff0e3841efc3d7b84fcbc1 100644 +index 488ebd443903af812913437f1ade3002093f2470..a043ac10834562d357ef0b5aded2e916e2a0d056 100644 --- a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java +++ b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java @@ -9,12 +9,12 @@ public class VecDeltaCodec { @@ -28,10 +28,10 @@ index ffec3deb9bcd31d51974c1deda2e76bc8374e5c5..a3d247c93ac1a2d872ff0e3841efc3d7 public Vec3 decode(long x, long y, long z) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f7964a9ef04d35b5bf46ff18071ef22f53b9a3b5..cac4c1bd5d4ee89e4366b7e11fbf01903e953ed9 100644 +index 7e4fe51b276df05f41c5603140ed198b7aef9585..b5f45ce710ea9bf1e37c4fd71b75d0e2d537cf45 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4217,6 +4217,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4262,6 +4262,16 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return; } // Paper end - Block invalid positions and bounding box diff --git a/patches/unapplied/server/0460-Additional-Block-Material-API.patch b/patches/server/0455-Additional-Block-Material-API.patch similarity index 100% rename from patches/unapplied/server/0460-Additional-Block-Material-API.patch rename to patches/server/0455-Additional-Block-Material-API.patch diff --git a/patches/unapplied/server/0461-Fix-harming-potion-dupe.patch b/patches/server/0456-Fix-harming-potion-dupe.patch similarity index 97% rename from patches/unapplied/server/0461-Fix-harming-potion-dupe.patch rename to patches/server/0456-Fix-harming-potion-dupe.patch index 8fdd027d4f..b184bf641c 100644 --- a/patches/unapplied/server/0461-Fix-harming-potion-dupe.patch +++ b/patches/server/0456-Fix-harming-potion-dupe.patch @@ -8,7 +8,7 @@ Before this patch, instant effects would be applied before the potion ItemStack This patch makes it so that instant effects are applied after the potion ItemStack is removed, and the glass bottle is only put into the player's inventory if the player is not dead. Otherwise, the glass bottle is dropped on the ground. diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java -index de0b68b128e6ffbd31aebb4361e4859d495f89b5..042a9cf9c15fd30bc30e03d0e0311c70e40e6950 100644 +index 017b0745753ea1907bad7022405db9a5a487d069..92fa6523f2bba105a74fff228e36e58666ed56ae 100644 --- a/src/main/java/net/minecraft/world/item/PotionItem.java +++ b/src/main/java/net/minecraft/world/item/PotionItem.java @@ -55,12 +55,13 @@ public class PotionItem extends Item { diff --git a/patches/unapplied/server/0462-API-to-get-Material-from-Boats-and-Minecarts.patch b/patches/server/0457-API-to-get-Material-from-Boats-and-Minecarts.patch similarity index 100% rename from patches/unapplied/server/0462-API-to-get-Material-from-Boats-and-Minecarts.patch rename to patches/server/0457-API-to-get-Material-from-Boats-and-Minecarts.patch diff --git a/patches/unapplied/server/0463-Allow-disabling-mob-spawner-spawn-egg-transformation.patch b/patches/server/0458-Allow-disabling-mob-spawner-spawn-egg-transformation.patch similarity index 100% rename from patches/unapplied/server/0463-Allow-disabling-mob-spawner-spawn-egg-transformation.patch rename to patches/server/0458-Allow-disabling-mob-spawner-spawn-egg-transformation.patch diff --git a/patches/unapplied/server/0464-Fix-Not-a-string-Map-Conversion-spam.patch b/patches/server/0459-Fix-Not-a-string-Map-Conversion-spam.patch similarity index 94% rename from patches/unapplied/server/0464-Fix-Not-a-string-Map-Conversion-spam.patch rename to patches/server/0459-Fix-Not-a-string-Map-Conversion-spam.patch index 00f5d0e877..5b2328afe8 100644 --- a/patches/unapplied/server/0464-Fix-Not-a-string-Map-Conversion-spam.patch +++ b/patches/server/0459-Fix-Not-a-string-Map-Conversion-spam.patch @@ -12,7 +12,7 @@ requesting the world. Track spigot issue to see when fixed: https://hub.spigotmc.org/jira/browse/SPIGOT-6181 diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index d42d39dff5aeb91c5b1e6a7fb967ce70f1a88b7e..38c0855a6f9398f8d075f304288cf9e9f695770a 100644 +index 5e469bd4d9ca428abdd9d758993164635dc86f27..d6a0a882331226c3ae4ced09e449eb7931740f8f 100644 --- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -21,6 +21,8 @@ import net.minecraft.core.component.DataComponents; @@ -24,7 +24,7 @@ index d42d39dff5aeb91c5b1e6a7fb967ce70f1a88b7e..38c0855a6f9398f8d075f304288cf9e9 import net.minecraft.nbt.Tag; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.Component; -@@ -120,7 +122,26 @@ public class MapItemSavedData extends SavedData { +@@ -121,7 +123,26 @@ public class MapItemSavedData extends SavedData { } public static MapItemSavedData load(CompoundTag nbt, HolderLookup.Provider registryLookup) { diff --git a/patches/unapplied/server/0465-Add-PlayerFlowerPotManipulateEvent.patch b/patches/server/0460-Add-PlayerFlowerPotManipulateEvent.patch similarity index 100% rename from patches/unapplied/server/0465-Add-PlayerFlowerPotManipulateEvent.patch rename to patches/server/0460-Add-PlayerFlowerPotManipulateEvent.patch diff --git a/patches/unapplied/server/0466-Fix-interact-event-not-being-called-sometimes.patch b/patches/server/0461-Fix-interact-event-not-being-called-sometimes.patch similarity index 94% rename from patches/unapplied/server/0466-Fix-interact-event-not-being-called-sometimes.patch rename to patches/server/0461-Fix-interact-event-not-being-called-sometimes.patch index 96d7a637db..12805c473b 100644 --- a/patches/unapplied/server/0466-Fix-interact-event-not-being-called-sometimes.patch +++ b/patches/server/0461-Fix-interact-event-not-being-called-sometimes.patch @@ -11,10 +11,10 @@ Subject: [PATCH] Fix interact event not being called sometimes Co-authored-by: Moulberry diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 35c8aa3971de05be66acd49b6a0b76cba59f93ac..362bd15dc359762095bdc5120a25460227a0175e 100644 +index 9029bc0df227a1dbfab0ab337efa4087d57e7f08..1725451dcd7c62319b282ee7543202e56ca49b26 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1759,7 +1759,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1771,7 +1771,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED); this.player.sendSystemMessage(ichatmutablecomponent, true); @@ -23,7 +23,7 @@ index 35c8aa3971de05be66acd49b6a0b76cba59f93ac..362bd15dc359762095bdc5120a254602 this.player.swing(enumhand, true); } } -@@ -2375,13 +2375,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2392,13 +2392,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl double d3 = this.player.gameMode.getGameModeForPlayer() == GameType.CREATIVE ? 5.0D : 4.5D; // SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time // SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities diff --git a/patches/unapplied/server/0467-Zombie-API-breaking-doors.patch b/patches/server/0462-Zombie-API-breaking-doors.patch similarity index 100% rename from patches/unapplied/server/0467-Zombie-API-breaking-doors.patch rename to patches/server/0462-Zombie-API-breaking-doors.patch diff --git a/patches/unapplied/server/0468-Fix-nerfed-slime-when-splitting.patch b/patches/server/0463-Fix-nerfed-slime-when-splitting.patch similarity index 84% rename from patches/unapplied/server/0468-Fix-nerfed-slime-when-splitting.patch rename to patches/server/0463-Fix-nerfed-slime-when-splitting.patch index 2ebdf09288..a32a88f5ad 100644 --- a/patches/unapplied/server/0468-Fix-nerfed-slime-when-splitting.patch +++ b/patches/server/0463-Fix-nerfed-slime-when-splitting.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix nerfed slime when splitting diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index 7062ef1cfd7d6279a4c6693cbdb80da49f23c542..b32213c5a3a1ecaf602cf34bed44c537521c2846 100644 +index ef27b0af849f071f79271689783b7a557e6d660a..b54c30ba73b6ab069c0c7c1cd2b193090da79667 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java -@@ -252,6 +252,7 @@ public class Slime extends Mob implements Enemy { +@@ -254,6 +254,7 @@ public class Slime extends Mob implements Enemy { entityslime.setPersistenceRequired(); } diff --git a/patches/unapplied/server/0469-Add-EntityLoadCrossbowEvent.patch b/patches/server/0464-Add-EntityLoadCrossbowEvent.patch similarity index 63% rename from patches/unapplied/server/0469-Add-EntityLoadCrossbowEvent.patch rename to patches/server/0464-Add-EntityLoadCrossbowEvent.patch index 3c63e2be5a..a2f95139f8 100644 --- a/patches/unapplied/server/0469-Add-EntityLoadCrossbowEvent.patch +++ b/patches/server/0464-Add-EntityLoadCrossbowEvent.patch @@ -5,26 +5,26 @@ Subject: [PATCH] Add EntityLoadCrossbowEvent diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java -index 65f23bfb2de91be7560800ff87eab7ad88cb1849..1f52feb5684ee1bab710e1557cf69b43b4d4dfd4 100644 +index f64cdfac1fc1333845ea4ea5efb7922f0ae39619..c39fa953accd6cf35672f452052cca42fe6f29d0 100644 --- a/src/main/java/net/minecraft/world/item/CrossbowItem.java +++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java -@@ -80,7 +80,14 @@ public class CrossbowItem extends ProjectileWeaponItem { +@@ -89,7 +89,14 @@ public class CrossbowItem extends ProjectileWeaponItem { public void releaseUsing(ItemStack stack, Level world, LivingEntity user, int remainingUseTicks) { - int i = this.getUseDuration(stack) - remainingUseTicks; - float f = getPowerForTime(i, stack); + int i = this.getUseDuration(stack, user) - remainingUseTicks; + float f = getPowerForTime(i, stack, user); - if (f >= 1.0F && !isCharged(stack) && tryLoadProjectiles(user, stack)) { -+ // Paper start ++ // Paper start - Add EntityLoadCrossbowEvent + if (f >= 1.0F && !isCharged(stack)) { + final io.papermc.paper.event.entity.EntityLoadCrossbowEvent event = new io.papermc.paper.event.entity.EntityLoadCrossbowEvent(user.getBukkitLivingEntity(), stack.asBukkitMirror(), org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(user.getUsedItemHand())); + if (!event.callEvent() || !tryLoadProjectiles(user, stack, event.shouldConsumeItem()) || !event.shouldConsumeItem()) { + if (user instanceof ServerPlayer player) player.containerMenu.sendAllDataToRemote(); + return; + } -+ // Paper end - Add EntityLoadCrossbowEvent - world.playSound( - null, - user.getX(), -@@ -94,8 +101,14 @@ public class CrossbowItem extends ProjectileWeaponItem { ++ // Paper end - Add EntityLoadCrossbowEvent + CrossbowItem.ChargingSounds chargingSounds = this.getChargingSounds(stack); + chargingSounds.end() + .ifPresent( +@@ -107,8 +114,14 @@ public class CrossbowItem extends ProjectileWeaponItem { } } @@ -42,27 +42,27 @@ index 65f23bfb2de91be7560800ff87eab7ad88cb1849..1f52feb5684ee1bab710e1557cf69b43 crossbow.set(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.of(list)); return true; diff --git a/src/main/java/net/minecraft/world/item/ProjectileWeaponItem.java b/src/main/java/net/minecraft/world/item/ProjectileWeaponItem.java -index 416bdff5cda842143038180592ad231a1d19d926..d27e83c08c45b8514207f26e48ceb1a91ded94be 100644 +index 56595dd3a0b7df4b5f9819ade797212278c8fd40..32dd0b13a0819f597d8a93c6bc3a155781067544 100644 --- a/src/main/java/net/minecraft/world/item/ProjectileWeaponItem.java +++ b/src/main/java/net/minecraft/world/item/ProjectileWeaponItem.java -@@ -139,6 +139,11 @@ public abstract class ProjectileWeaponItem extends Item { +@@ -114,6 +114,11 @@ public abstract class ProjectileWeaponItem extends Item { } - protected static List draw(ItemStack weaponStack, ItemStack projectileStack, LivingEntity shooter) { -+ // Paper start -+ return draw(weaponStack, projectileStack, shooter, true); + protected static List draw(ItemStack stack, ItemStack projectileStack, LivingEntity shooter) { ++ // Paper start ++ return draw(stack, projectileStack, shooter, true); + } -+ protected static List draw(ItemStack weaponStack, ItemStack projectileStack, LivingEntity shooter, boolean consume) { -+ // Paper end ++ protected static List draw(ItemStack stack, ItemStack projectileStack, LivingEntity shooter, boolean consume) { ++ // Paper end if (projectileStack.isEmpty()) { return List.of(); } else { -@@ -148,7 +153,7 @@ public abstract class ProjectileWeaponItem extends Item { +@@ -133,7 +138,7 @@ public abstract class ProjectileWeaponItem extends Item { ItemStack itemstack2 = projectileStack.copy(); for (int k = 0; k < j; ++k) { -- list.add(ProjectileWeaponItem.useAmmo(weaponStack, k == 0 ? projectileStack : itemstack2, shooter, k > 0)); -+ list.add(ProjectileWeaponItem.useAmmo(weaponStack, k == 0 ? projectileStack : itemstack2, shooter, k > 0 || !consume)); // Paper - } +- ItemStack itemstack3 = ProjectileWeaponItem.useAmmo(stack, k == 0 ? projectileStack : itemstack2, shooter, k > 0); ++ ItemStack itemstack3 = ProjectileWeaponItem.useAmmo(stack, k == 0 ? projectileStack : itemstack2, shooter, k > 0 || !consume); // Paper - return list; + if (!itemstack3.isEmpty()) { + list.add(itemstack3); diff --git a/patches/unapplied/server/0470-Add-WorldGameRuleChangeEvent.patch b/patches/server/0465-Add-WorldGameRuleChangeEvent.patch similarity index 98% rename from patches/unapplied/server/0470-Add-WorldGameRuleChangeEvent.patch rename to patches/server/0465-Add-WorldGameRuleChangeEvent.patch index 332e03e32c..40e2bb8cc9 100644 --- a/patches/unapplied/server/0470-Add-WorldGameRuleChangeEvent.patch +++ b/patches/server/0465-Add-WorldGameRuleChangeEvent.patch @@ -64,7 +64,7 @@ index 0b46ad360be919e4aeb0ffc0eebae9fe712fb861..51e560d7856f230c5aa2dc32706c3a49 public int get() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a493c8d12935336bb3049aa6d00eb1a4f2194c25..a78922dc4a1f0719753d7349fc6abd473fd96eed 100644 +index 97ab6b50288b0d9303cbe20c5aa2af26ff3e72fb..ab5b7ed7ebc1205cb9e4aa017f5d69ccb4fc8ac2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1908,8 +1908,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0471-Add-ServerResourcesReloadedEvent.patch b/patches/server/0466-Add-ServerResourcesReloadedEvent.patch similarity index 94% rename from patches/unapplied/server/0471-Add-ServerResourcesReloadedEvent.patch rename to patches/server/0466-Add-ServerResourcesReloadedEvent.patch index 80bf4d876c..2268c27b1c 100644 --- a/patches/unapplied/server/0471-Add-ServerResourcesReloadedEvent.patch +++ b/patches/server/0466-Add-ServerResourcesReloadedEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add ServerResourcesReloadedEvent diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 595ce35e5a51811c12a02c3c845de44ba03d1a38..9284466fb576b3320f17fc946da03d362cb67dde 100644 +index b47110e9b5d8effdc9e768488f99a614c1070814..691d9d18e72a07b85bf13c6990b44e5cf56dffb5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2094,7 +2094,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop completablefuture = CompletableFuture.supplyAsync(() -> { Stream stream = dataPacks.stream(); // CraftBukkit - decompile error PackRepository resourcepackrepository = this.packRepository; -@@ -2126,6 +2132,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java -index d4ed75afc61620cbc79da07b6511c247b829e41f..b3da310d6fd1d533da805c38c2f449cf06d01492 100644 +index 7c3aff97ba777af131d7efad0b08b844bf6e8946..0615bb305d70f660a6baa7f78078990d6db227d3 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Vindicator.java +++ b/src/main/java/net/minecraft/world/entity/monster/Vindicator.java -@@ -176,7 +176,7 @@ public class Vindicator extends AbstractIllager { +@@ -179,7 +179,7 @@ public class Vindicator extends AbstractIllager { static class VindicatorBreakDoorGoal extends BreakDoorGoal { public VindicatorBreakDoorGoal(Mob mob) { @@ -23,10 +23,10 @@ index d4ed75afc61620cbc79da07b6511c247b829e41f..b3da310d6fd1d533da805c38c2f449cf } diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 18b147c9488e8dffd25da139ff4c9d2197d72616..8f8bba0e6690443823c8e2301db82cae3eb66551 100644 +index 5908f1646b542d61b5a2b23b284b1532e4b276c1..fd304e7d8305877d56de7a38b8664e5a70bf0c33 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -@@ -97,7 +97,7 @@ public class Zombie extends Monster { +@@ -101,7 +101,7 @@ public class Zombie extends Monster { public Zombie(EntityType type, Level world) { super(type, world); diff --git a/patches/unapplied/server/0477-Empty-commands-shall-not-be-dispatched.patch b/patches/server/0472-Empty-commands-shall-not-be-dispatched.patch similarity index 84% rename from patches/unapplied/server/0477-Empty-commands-shall-not-be-dispatched.patch rename to patches/server/0472-Empty-commands-shall-not-be-dispatched.patch index 947eb79c2e..42a615398b 100644 --- a/patches/unapplied/server/0477-Empty-commands-shall-not-be-dispatched.patch +++ b/patches/server/0472-Empty-commands-shall-not-be-dispatched.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Empty commands shall not be dispatched diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 5044a7dc120c8b040ee23365d2bf97e6180e3ee4..43695b31cf23555d3d8a28b031ae6245f96ad1f7 100644 +index 52818e877c797ed82f7eecc8e1e1716168422b29..937b5fe4be3573bc47754d627b60a112122a8d83 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -288,6 +288,7 @@ public class Commands { +@@ -286,6 +286,7 @@ public class Commands { command = event.getCommand(); String[] args = command.split(" "); diff --git a/patches/unapplied/server/0478-Remove-stale-POIs.patch b/patches/server/0473-Remove-stale-POIs.patch similarity index 87% rename from patches/unapplied/server/0478-Remove-stale-POIs.patch rename to patches/server/0473-Remove-stale-POIs.patch index fece7e3371..221b65719b 100644 --- a/patches/unapplied/server/0478-Remove-stale-POIs.patch +++ b/patches/server/0473-Remove-stale-POIs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 17985c75deaa8d317ea4019f73eafe118d347f41..a9a39c99874001f1024f71bfc97130e8c9a507e7 100644 +index c9dad47ef14e0a021685fab710c920419611d151..deabbf30a550ff1835530257177b8f47e4710414 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1743,6 +1743,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1741,6 +1741,11 @@ public class ServerLevel extends Level implements WorldGenLevel { }); optional1.ifPresent((holder) -> { this.getServer().execute(() -> { diff --git a/patches/unapplied/server/0479-Fix-villager-boat-exploit.patch b/patches/server/0474-Fix-villager-boat-exploit.patch similarity index 89% rename from patches/unapplied/server/0479-Fix-villager-boat-exploit.patch rename to patches/server/0474-Fix-villager-boat-exploit.patch index 91f979915f..d840c66bf3 100644 --- a/patches/unapplied/server/0479-Fix-villager-boat-exploit.patch +++ b/patches/server/0474-Fix-villager-boat-exploit.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c020f18f356f537a1557a3367dd801f9bbabacdc..505af87eaf8209437978848be1dde86f879f82f2 100644 +index 858bbd4add280f0cd04aa94fb0b2f8f9423299cf..f565dd3ae7cce3de0aa230155fb955efbab681af 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -601,6 +601,14 @@ public abstract class PlayerList { +@@ -595,6 +595,14 @@ public abstract class PlayerList { PlayerList.LOGGER.debug("Removing player mount"); entityplayer.stopRiding(); entity.getPassengersAndSelf().forEach((entity1) -> { diff --git a/patches/unapplied/server/0480-Add-sendOpLevel-API.patch b/patches/server/0475-Add-sendOpLevel-API.patch similarity index 85% rename from patches/unapplied/server/0480-Add-sendOpLevel-API.patch rename to patches/server/0475-Add-sendOpLevel-API.patch index d5f99e88a6..32db44d5d8 100644 --- a/patches/unapplied/server/0480-Add-sendOpLevel-API.patch +++ b/patches/server/0475-Add-sendOpLevel-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 505af87eaf8209437978848be1dde86f879f82f2..d5071f9f2d433706fc378f77906bb5f04fca0540 100644 +index f565dd3ae7cce3de0aa230155fb955efbab681af..05365355fe54d2ed37724d17b174b32fbe6f417f 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1100,6 +1100,11 @@ public abstract class PlayerList { +@@ -1062,6 +1062,11 @@ public abstract class PlayerList { } private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) { @@ -20,7 +20,7 @@ index 505af87eaf8209437978848be1dde86f879f82f2..d5071f9f2d433706fc378f77906bb5f0 if (player.connection != null) { byte b0; -@@ -1114,8 +1119,10 @@ public abstract class PlayerList { +@@ -1076,8 +1081,10 @@ public abstract class PlayerList { player.connection.send(new ClientboundEntityEventPacket(player, b0)); } @@ -32,10 +32,10 @@ index 505af87eaf8209437978848be1dde86f879f82f2..d5071f9f2d433706fc378f77906bb5f0 public boolean isWhiteListed(GameProfile profile) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 37d6be0ae176569971659b4a83895f386eeef863..2d6de1734cb715554ca732d850b8df9591a3efb7 100644 +index 721f4fb6bc18fc3ca6a22e8a42f564220042fa42..0c224de84b797856814f5378c87e6d048205e8d9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -675,6 +675,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -677,6 +677,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/unapplied/server/0481-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0476-Add-RegistryAccess-for-managing-Registries.patch similarity index 97% rename from patches/unapplied/server/0481-Add-RegistryAccess-for-managing-Registries.patch rename to patches/server/0476-Add-RegistryAccess-for-managing-Registries.patch index 140aee8bd1..a6a851ef17 100644 --- a/patches/unapplied/server/0481-Add-RegistryAccess-for-managing-Registries.patch +++ b/patches/server/0476-Add-RegistryAccess-for-managing-Registries.patch @@ -12,10 +12,10 @@ public net.minecraft.server.RegistryLayer STATIC_ACCESS diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java new file mode 100644 -index 0000000000000000000000000000000000000000..5b6d0c5c788bfd158494a88665a2b9b8c45a9ffe +index 0000000000000000000000000000000000000000..55feffc03d2924e5ec0f55fc65e8aa148cb0cc62 --- /dev/null +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -@@ -0,0 +1,119 @@ +@@ -0,0 +1,122 @@ +package io.papermc.paper.registry; + +import io.papermc.paper.registry.entry.RegistryEntry; @@ -30,10 +30,12 @@ index 0000000000000000000000000000000000000000..5b6d0c5c788bfd158494a88665a2b9b8 +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.level.levelgen.structure.Structure; +import org.bukkit.GameEvent; ++import org.bukkit.JukeboxSong; +import org.bukkit.Keyed; +import org.bukkit.MusicInstrument; +import org.bukkit.block.BlockType; +import org.bukkit.craftbukkit.CraftGameEvent; ++import org.bukkit.craftbukkit.CraftJukeboxSong; +import org.bukkit.craftbukkit.CraftMusicInstrument; +import org.bukkit.craftbukkit.block.CraftBlockType; +import org.bukkit.craftbukkit.damage.CraftDamageType; @@ -84,6 +86,7 @@ index 0000000000000000000000000000000000000000..5b6d0c5c788bfd158494a88665a2b9b8 + entry(Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, TrimPattern.class, CraftTrimPattern::new).delayed(), + entry(Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, DamageType.class, CraftDamageType::new).delayed(), + entry(Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, Wolf.Variant.class, CraftWolf.CraftVariant::new).delayed(), ++ entry(Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, JukeboxSong.class, CraftJukeboxSong::new).delayed(), + + // api-only + apiOnly(Registries.BIOME, RegistryKey.BIOME, () -> org.bukkit.Registry.BIOME), @@ -670,10 +673,10 @@ index 0000000000000000000000000000000000000000..4396982af55872fafbfeaf8161ad6f39 +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.framework.qual.DefaultQualifier; diff --git a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java -index b43af53960978ac04bccde08544a562841492791..8daee5a7935e3253834c4cbe81d5e8886f776dad 100644 +index cbc1658e0df4070605a6b2fbe99167b3bc001223..44b7927081b476813505cab6b3a2da2ec2942c54 100644 --- a/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java +++ b/src/main/java/net/minecraft/core/registries/BuiltInRegistries.java -@@ -297,6 +297,7 @@ public class BuiltInRegistries { +@@ -315,6 +315,7 @@ public class BuiltInRegistries { ResourceKey> key, R registry, BuiltInRegistries.RegistryBootstrap initializer ) { Bootstrap.checkBootstrapCalled(() -> "registry " + key); @@ -682,11 +685,11 @@ index b43af53960978ac04bccde08544a562841492791..8daee5a7935e3253834c4cbe81d5e888 LOADERS.put(resourceLocation, () -> initializer.run(registry)); WRITABLE_REGISTRY.register((ResourceKey)key, registry, RegistrationInfo.BUILT_IN); // Paper - decompile fix diff --git a/src/main/java/net/minecraft/resources/RegistryDataLoader.java b/src/main/java/net/minecraft/resources/RegistryDataLoader.java -index 1a40a600b8a9716ef26f3143f361a47b76ec2510..d59356df2d98de873fc5accc749f87fa3d685267 100644 +index deaf62913850a0e0fdffd3d52fd383bcdda979af..abadf4abe08dc3bb6612b42cbb3f7df3ffa28ce9 100644 --- a/src/main/java/net/minecraft/resources/RegistryDataLoader.java +++ b/src/main/java/net/minecraft/resources/RegistryDataLoader.java -@@ -284,6 +284,7 @@ public class RegistryDataLoader { - public static record RegistryData(ResourceKey> key, Codec elementCodec) { +@@ -299,6 +299,7 @@ public class RegistryDataLoader { + RegistryDataLoader.Loader create(Lifecycle lifecycle, Map, Exception> errors) { WritableRegistry writableRegistry = new MappedRegistry<>(this.key, lifecycle); + io.papermc.paper.registry.PaperRegistryAccess.instance().registerRegistry(this.key, writableRegistry); // Paper - initialize API registry @@ -694,7 +697,7 @@ index 1a40a600b8a9716ef26f3143f361a47b76ec2510..d59356df2d98de873fc5accc749f87fa } diff --git a/src/main/java/net/minecraft/server/ReloadableServerRegistries.java b/src/main/java/net/minecraft/server/ReloadableServerRegistries.java -index cf08819dd7ef6db807053a52aaf66a7fdea18ab6..69682d7be64a2163d574de939f5146f5a7a642ef 100644 +index 1dd22f11b7e2983a3069dea94c0f02b43ff1f736..397bdacab9517354875ebc0bc68d35059b3c318b 100644 --- a/src/main/java/net/minecraft/server/ReloadableServerRegistries.java +++ b/src/main/java/net/minecraft/server/ReloadableServerRegistries.java @@ -60,6 +60,7 @@ public class ReloadableServerRegistries { @@ -703,13 +706,13 @@ index cf08819dd7ef6db807053a52aaf66a7fdea18ab6..69682d7be64a2163d574de939f5146f5 WritableRegistry writableRegistry = new MappedRegistry<>(type.registryKey(), Lifecycle.experimental()); + io.papermc.paper.registry.PaperRegistryAccess.instance().registerReloadableRegistry(type.registryKey(), writableRegistry); // Paper - register reloadable registry Map map = new HashMap<>(); - SimpleJsonResourceReloadListener.scanDirectory(resourceManager, type.directory(), GSON, map); - map.forEach( + String string = Registries.elementsDirPath(type.registryKey()); + SimpleJsonResourceReloadListener.scanDirectory(resourceManager, string, GSON, map); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index 107734d32d8bb6384b96e11d99d36cb9a203750f..a644309edb612d97da290f86a1ef6fe597c7d85d 100644 +index d129f7c15c143843429cf8a56fd1e52684531257..f8cf246913040ea4064f8addee0ec6927eb06237 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -@@ -110,57 +110,12 @@ public class CraftRegistry implements Registry { +@@ -111,60 +111,12 @@ public class CraftRegistry implements Registry { + ", this can happen if a plugin creates its own registry entry with out properly registering it."); } @@ -748,6 +751,9 @@ index 107734d32d8bb6384b96e11d99d36cb9a203750f..a644309edb612d97da290f86a1ef6fe5 - if (bukkitClass == DamageType.class) { - return new CraftRegistry<>(DamageType.class, registryHolder.registryOrThrow(Registries.DAMAGE_TYPE), CraftDamageType::new, FieldRename.NONE); - } +- if (bukkitClass == JukeboxSong.class) { +- return new CraftRegistry<>(JukeboxSong.class, registryHolder.registryOrThrow(Registries.JUKEBOX_SONG), CraftJukeboxSong::new, FieldRename.NONE); +- } - if (bukkitClass == Wolf.Variant.class) { - return new CraftRegistry<>(Wolf.Variant.class, registryHolder.registryOrThrow(Registries.WOLF_VARIANT), CraftWolf.CraftVariant::new, FieldRename.NONE); - } @@ -770,7 +776,7 @@ index 107734d32d8bb6384b96e11d99d36cb9a203750f..a644309edb612d97da290f86a1ef6fe5 } if (bukkit instanceof Registry.SimpleRegistry simple) { -@@ -186,23 +141,21 @@ public class CraftRegistry implements Registry { +@@ -190,23 +142,21 @@ public class CraftRegistry implements Registry { return bukkit.get(namespacedKey); } @@ -800,10 +806,10 @@ index 107734d32d8bb6384b96e11d99d36cb9a203750f..a644309edb612d97da290f86a1ef6fe5 @Override public B get(NamespacedKey namespacedKey) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index aee62eef2a67be2ca0d1c19143cc7f42e5e32390..740b34322aeb566248abfe0e34b8919078982217 100644 +index 92e0f1a948962d4c71f1288dfb8b482d3207cf4c..24c8e9a43affa8ca99c03562aefc3d6402c23281 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -280,7 +280,7 @@ public final class CraftServer implements Server { +@@ -281,7 +281,7 @@ public final class CraftServer implements Server { protected final DedicatedServer console; protected final DedicatedPlayerList playerList; private final Map worlds = new LinkedHashMap(); @@ -812,7 +818,7 @@ index aee62eef2a67be2ca0d1c19143cc7f42e5e32390..740b34322aeb566248abfe0e34b89190 private YamlConfiguration configuration; private YamlConfiguration commandsConfiguration; private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions())); -@@ -2713,7 +2713,7 @@ public final class CraftServer implements Server { +@@ -2721,7 +2721,7 @@ public final class CraftServer implements Server { @Override public Registry getRegistry(Class aClass) { @@ -1067,7 +1073,7 @@ index c94dae13e8edfdb0adf73a5b3fda4eb1bc97f4bc..f8e363e9c10e30598185a91cbb5cafc0 // Paper start - testing additions final Thread currentThread = Thread.currentThread(); diff --git a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java -index d57713c3f995e6b381f2a31ab7e93b073d42222d..24f01242513d6c815f60599d7118fe12bc577804 100644 +index 23819f05563a1d8c9f13335bc9a77964e3f8b7c6..a480944e1fc1b79b91be7e8d3e3799b9168cf5a0 100644 --- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java +++ b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java @@ -1,6 +1,7 @@ @@ -1078,7 +1084,7 @@ index d57713c3f995e6b381f2a31ab7e93b073d42222d..24f01242513d6c815f60599d7118fe12 import java.util.List; import java.util.stream.Stream; import net.minecraft.core.registries.Registries; -@@ -41,28 +42,28 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { +@@ -43,29 +44,29 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { private static final List DATA = Lists.newArrayList(); static { @@ -1092,6 +1098,7 @@ index d57713c3f995e6b381f2a31ab7e93b073d42222d..24f01242513d6c815f60599d7118fe12 - register(TrimMaterial.class, Registries.TRIM_MATERIAL, CraftTrimMaterial.class, net.minecraft.world.item.armortrim.TrimMaterial.class); - register(TrimPattern.class, Registries.TRIM_PATTERN, CraftTrimPattern.class, net.minecraft.world.item.armortrim.TrimPattern.class); - register(DamageType.class, Registries.DAMAGE_TYPE, CraftDamageType.class, net.minecraft.world.damagesource.DamageType.class); +- register(JukeboxSong.class, Registries.JUKEBOX_SONG, CraftJukeboxSong.class, net.minecraft.world.item.JukeboxSong.class); - register(Wolf.Variant.class, Registries.WOLF_VARIANT, CraftWolf.CraftVariant.class, WolfVariant.class); - register(ItemType.class, Registries.ITEM, CraftItemType.class, net.minecraft.world.item.Item.class, true); - register(BlockType.class, Registries.BLOCK, CraftBlockType.class, net.minecraft.world.level.block.Block.class, true); @@ -1105,6 +1112,7 @@ index d57713c3f995e6b381f2a31ab7e93b073d42222d..24f01242513d6c815f60599d7118fe12 + register(RegistryKey.TRIM_MATERIAL, TrimMaterial.class, Registries.TRIM_MATERIAL, CraftTrimMaterial.class, net.minecraft.world.item.armortrim.TrimMaterial.class); + register(RegistryKey.TRIM_PATTERN, TrimPattern.class, Registries.TRIM_PATTERN, CraftTrimPattern.class, net.minecraft.world.item.armortrim.TrimPattern.class); + register(RegistryKey.DAMAGE_TYPE, DamageType.class, Registries.DAMAGE_TYPE, CraftDamageType.class, net.minecraft.world.damagesource.DamageType.class); ++ register(RegistryKey.JUKEBOX_SONG, JukeboxSong.class, Registries.JUKEBOX_SONG, CraftJukeboxSong.class, net.minecraft.world.item.JukeboxSong.class); + register(RegistryKey.WOLF_VARIANT, Wolf.Variant.class, Registries.WOLF_VARIANT, CraftWolf.CraftVariant.class, WolfVariant.class); + register(RegistryKey.ITEM, ItemType.class, Registries.ITEM, CraftItemType.class, net.minecraft.world.item.Item.class, true); + register(RegistryKey.BLOCK, BlockType.class, Registries.BLOCK, CraftBlockType.class, net.minecraft.world.level.block.Block.class, true); diff --git a/patches/unapplied/server/0482-Add-StructuresLocateEvent.patch b/patches/server/0477-Add-StructuresLocateEvent.patch similarity index 97% rename from patches/unapplied/server/0482-Add-StructuresLocateEvent.patch rename to patches/server/0477-Add-StructuresLocateEvent.patch index 856b096609..48c0824bd5 100644 --- a/patches/unapplied/server/0482-Add-StructuresLocateEvent.patch +++ b/patches/server/0477-Add-StructuresLocateEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add StructuresLocateEvent Co-authored-by: Jake Potrebic diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -index 5b6d0c5c788bfd158494a88665a2b9b8c45a9ffe..51979b3c3f1f3a3c63e0559c70bed9193fd35dbb 100644 +index 55feffc03d2924e5ec0f55fc65e8aa148cb0cc62..1b5a791e4cca089774cb3519012a538f3f88eac4 100644 --- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -@@ -46,6 +46,12 @@ import static io.papermc.paper.registry.entry.RegistryEntry.entry; +@@ -48,6 +48,12 @@ import static io.papermc.paper.registry.entry.RegistryEntry.entry; @DefaultQualifier(NonNull.class) public final class PaperRegistries { @@ -76,10 +76,10 @@ index 0000000000000000000000000000000000000000..013d614a1cf1ab2b5a6ec190c2b4ba77 + } +} diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -index 7cdb59cd2f2ffe1195d21519ef97dae0e430285b..a8768f1925d5824ca985be1b53694ee233273758 100644 +index 0a779632c9d11496fcfc147870fba2699d9cc274..5adc1952504b26772116b55a5144b7704136edfa 100644 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java -@@ -127,6 +127,24 @@ public abstract class ChunkGenerator { +@@ -126,6 +126,24 @@ public abstract class ChunkGenerator { @Nullable public Pair> findNearestMapStructure(ServerLevel world, HolderSet structures, BlockPos center, int radius, boolean skipReferencedStructures) { diff --git a/patches/unapplied/server/0483-Collision-option-for-requiring-a-player-participant.patch b/patches/server/0478-Collision-option-for-requiring-a-player-participant.patch similarity index 86% rename from patches/unapplied/server/0483-Collision-option-for-requiring-a-player-participant.patch rename to patches/server/0478-Collision-option-for-requiring-a-player-participant.patch index 9066faae54..663c5bd3d9 100644 --- a/patches/unapplied/server/0483-Collision-option-for-requiring-a-player-participant.patch +++ b/patches/server/0478-Collision-option-for-requiring-a-player-participant.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Collision option for requiring a player participant diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index cac4c1bd5d4ee89e4366b7e11fbf01903e953ed9..21150f44e4f71aba3801d5392e45243112d012c0 100644 +index b5f45ce710ea9bf1e37c4fd71b75d0e2d537cf45..959a3f1abd2a2d6224f9d130fc6136aef20ef904 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1871,6 +1871,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1937,6 +1937,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void push(Entity entity) { if (!this.isPassengerOfSameVehicle(entity)) { if (!entity.noPhysics && !this.noPhysics) { @@ -17,7 +17,7 @@ index cac4c1bd5d4ee89e4366b7e11fbf01903e953ed9..21150f44e4f71aba3801d5392e452431 double d1 = entity.getZ() - this.getZ(); double d2 = Mth.absMax(d0, d1); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index 1aecb6cc62b4b411ab0ff3b7fb11a5d9d050b959..2f73ca283f2d6e6bc5265c95ef767b3f606a3d69 100644 +index 119d6f4ec8ca6867f75f9fd2f1dc46962f16afee..2bd3ba073843b1680eeb81f7dede5973bb4f446d 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java @@ -789,6 +789,7 @@ public abstract class AbstractMinecart extends VehicleEntity { @@ -29,10 +29,10 @@ index 1aecb6cc62b4b411ab0ff3b7fb11a5d9d050b959..2f73ca283f2d6e6bc5265c95ef767b3f // CraftBukkit start VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.getBukkitEntity(), entity.getBukkitEntity()); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -index d1eaadba8ce1f472a174afcfe8e0d059a121612c..549202706396fee91c23f6e34f7faa7672e4b03f 100644 +index 2cb535639bff0e867c1b1e845fee6e34bb237044..907f751c859855484151fb5d607acee2f2a35076 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java -@@ -200,6 +200,7 @@ public class Boat extends VehicleEntity implements VariantHolder { +@@ -204,6 +204,7 @@ public class Boat extends VehicleEntity implements Leashable, VariantHolder +Date: Sun, 3 Jan 2021 21:04:03 -0800 +Subject: [PATCH] Configurable max leash distance + + +diff --git a/src/main/java/net/minecraft/world/entity/Leashable.java b/src/main/java/net/minecraft/world/entity/Leashable.java +index 1f2d04a456c383815b0c5ef331471593556fd128..30d7dd9646ba9d6a9396dc140a61eb2cac07dfc6 100644 +--- a/src/main/java/net/minecraft/world/entity/Leashable.java ++++ b/src/main/java/net/minecraft/world/entity/Leashable.java +@@ -179,7 +179,7 @@ public interface Leashable { + return; + } + +- if ((double) f > 10.0D) { ++ if ((double) f > entity.level().paperConfig().misc.maxLeashDistance) { // Paper - Configurable max leash distance + ((Leashable) entity).leashTooFarBehaviour(); + } else if ((double) f > 6.0D) { + ((Leashable) entity).elasticRangeLeashBehaviour(entity1, f); diff --git a/patches/unapplied/server/0487-Configurable-max-leash-distance.patch b/patches/unapplied/server/0487-Configurable-max-leash-distance.patch deleted file mode 100644 index e228b633f0..0000000000 --- a/patches/unapplied/server/0487-Configurable-max-leash-distance.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Sun, 3 Jan 2021 21:04:03 -0800 -Subject: [PATCH] Configurable max leash distance - - -diff --git a/src/main/java/net/minecraft/world/entity/PathfinderMob.java b/src/main/java/net/minecraft/world/entity/PathfinderMob.java -index 5e2f10f5fd7219ebaefb1c5b5ac9bc7c71fae179..e92831739603ef1b5678c9d44e85ab70d62be0e7 100644 ---- a/src/main/java/net/minecraft/world/entity/PathfinderMob.java -+++ b/src/main/java/net/minecraft/world/entity/PathfinderMob.java -@@ -71,7 +71,7 @@ public abstract class PathfinderMob extends Mob { - float f = this.distanceTo(entity); - - if (this instanceof TamableAnimal && ((TamableAnimal) this).isInSittingPose()) { -- if (f > 10.0F) { -+ if (f > entity.level().paperConfig().misc.maxLeashDistance) { // Paper - Configurable max leash distance - this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit - this.dropLeash(true, true); - } -@@ -80,7 +80,7 @@ public abstract class PathfinderMob extends Mob { - } - - this.onLeashDistance(f); -- if (f > 10.0F) { -+ if (f > entity.level().paperConfig().misc.maxLeashDistance) { // Paper - Configurable max leash distance - this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE)); // CraftBukkit - this.dropLeash(true, true); - this.goalSelector.disableControlFlag(Goal.Flag.MOVE);