From 26dcf812a4cb38096c4c08a711a452d8c377395c Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 24 Nov 2021 17:39:04 +0100 Subject: [PATCH] More more more more more more more more more more more more more more more work --- .../0221-Add-more-Evoker-API.patch} | 0 ...Add-methods-to-get-translation-keys.patch} | 4 +- ...te-HoverEvent-from-ItemStack-Entity.patch} | 0 ...l-open-container-api-to-HumanEntity.patch} | 0 ...-Counter-to-allow-plugins-to-use-va.patch} | 0 .../0226-Entity-isTicking.patch} | 2 +- ...ocs-for-Entity.getEntitySpawnReason.patch} | 2 +- .../0228-Villager-resetOffers.patch} | 0 .../0229-Player-elytra-boost-API.patch} | 0 ...Add-getOfflinePlayerIfCached-String.patch} | 8 +-- .../0231-Add-ignore-discounts-API.patch} | 0 .../0232-Item-no-age-no-player-pickup.patch} | 0 ...233-Beacon-API-custom-effect-ranges.patch} | 0 .../0234-Add-API-for-quit-reason.patch} | 0 .../0235-Add-Destroy-Speed-API.patch} | 4 +- ...36-Add-LivingEntity-clearActiveItem.patch} | 0 .../0237-Add-PlayerItemCooldownEvent.patch} | 0 .../0238-More-lightning-API.patch} | 0 .../0239-Add-PlayerShearBlockEvent.patch} | 0 ...40-Enable-multi-release-plugin-jars.patch} | 2 +- .../0525-Seed-based-feature-search.patch} | 18 +++---- ...s-not-working-in-some-kick-messages.patch} | 2 +- ...reateEvent-needs-to-know-its-entity.patch} | 52 ++++++++----------- .../0491-Fix-CraftTeam-null-check.patch} | 0 .../0492-Add-more-Evoker-API.patch} | 0 ...Add-methods-to-get-translation-keys.patch} | 6 +-- ...te-HoverEvent-from-ItemStack-Entity.patch} | 0 .../0495-Cache-block-data-strings.patch} | 4 +- ...rtation-and-cancel-velocity-if-tele.patch} | 18 +++---- ...l-open-container-api-to-HumanEntity.patch} | 2 +- ...aFixerUpper-Rewrite-Rules-on-demand.patch} | 0 ...-capture-to-capture-all-items-added.patch} | 20 +++---- ...ty-in-invalid-locations-SPIGOT-6086.patch} | 6 +-- ...-Counter-to-allow-plugins-to-use-va.patch} | 6 +-- ...track-plugin-scoreboards-by-default.patch} | 14 ++--- .../0503-Entity-isTicking.patch} | 10 ++-- ...non-whitelisted-player-when-white-l.patch} | 4 +- ...x-Concurrency-issue-in-WeightedList.patch} | 2 +- ...eset-Ender-Crystals-on-Dragon-Spawn.patch} | 4 +- ...-large-move-vectors-crashing-server.patch} | 10 ++-- .../0508-Optimise-getType-calls.patch} | 18 +++---- .../0509-Villager-resetOffers.patch} | 2 +- ...nig-for-some-hot-IBlockData-methods.patch} | 12 ++--- ...ce-order-when-capturing-blockstates.patch} | 4 +- ...lockpos-allocation-from-pathfinding.patch} | 2 +- ...em-locations-dropped-from-campfires.patch} | 4 +- .../0514-Player-elytra-boost-API.patch} | 4 +- ...15-Fixed-TileEntityBell-memory-leak.patch} | 2 +- ...ing-up-when-item-stack-is-empty-in-.patch} | 6 +-- ...Add-getOfflinePlayerIfCached-String.patch} | 4 +- .../0518-Add-ignore-discounts-API.patch} | 8 +-- ...Toggle-for-removing-existing-dragon.patch} | 8 +-- ...x-client-lag-on-advancement-loading.patch} | 2 +- .../0521-Item-no-age-no-player-pickup.patch} | 0 ...er-Remove-Streams-Optimized-collect.patch} | 0 ...523-Beacon-API-custom-effect-ranges.patch} | 18 +++---- .../0524-Add-API-for-quit-reason.patch} | 18 +++---- ...ng-Trader-spawn-rate-config-options.patch} | 8 +-- ...rove-performance-of-the-end-generat.patch} | 6 +-- .../0527-Expose-world-spawn-angle.patch} | 6 +-- .../0528-Add-Destroy-Speed-API.patch} | 4 +- ...-spawnParticle-x-y-z-precision-loss.patch} | 4 +- ...30-Add-LivingEntity-clearActiveItem.patch} | 2 +- .../0531-Add-PlayerItemCooldownEvent.patch} | 0 .../0532-More-lightning-API.patch} | 0 ...should-not-bypass-cramming-gamerule.patch} | 42 +++++++-------- ...-missing-default-perms-for-commands.patch} | 0 .../0535-Add-PlayerShearBlockEvent.patch} | 6 +-- ...ng-zombie-villager-discount-exploit.patch} | 8 +-- .../0537-Limit-recipe-packets.patch} | 14 ++--- ...-CraftSound-backwards-compatibility.patch} | 0 71 files changed, 199 insertions(+), 213 deletions(-) rename patches/{unapplied/api/0223-Add-more-Evoker-API.patch => api/0221-Add-more-Evoker-API.patch} (100%) rename patches/{unapplied/api/0224-Add-methods-to-get-translation-keys.patch => api/0222-Add-methods-to-get-translation-keys.patch} (98%) rename patches/{unapplied/api/0225-Create-HoverEvent-from-ItemStack-Entity.patch => api/0223-Create-HoverEvent-from-ItemStack-Entity.patch} (100%) rename patches/{unapplied/api/0226-Add-additional-open-container-api-to-HumanEntity.patch => api/0224-Add-additional-open-container-api-to-HumanEntity.patch} (100%) rename patches/{unapplied/api/0227-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch => api/0225-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch} (100%) rename patches/{unapplied/api/0228-Entity-isTicking.patch => api/0226-Entity-isTicking.patch} (88%) rename patches/{unapplied/api/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch => api/0227-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch} (91%) rename patches/{unapplied/api/0230-Villager-resetOffers.patch => api/0228-Villager-resetOffers.patch} (100%) rename patches/{unapplied/api/0231-Player-elytra-boost-API.patch => api/0229-Player-elytra-boost-API.patch} (100%) rename patches/{unapplied/api/0232-Add-getOfflinePlayerIfCached-String.patch => api/0230-Add-getOfflinePlayerIfCached-String.patch} (88%) rename patches/{unapplied/api/0233-Add-ignore-discounts-API.patch => api/0231-Add-ignore-discounts-API.patch} (100%) rename patches/{unapplied/api/0234-Item-no-age-no-player-pickup.patch => api/0232-Item-no-age-no-player-pickup.patch} (100%) rename patches/{unapplied/api/0235-Beacon-API-custom-effect-ranges.patch => api/0233-Beacon-API-custom-effect-ranges.patch} (100%) rename patches/{unapplied/api/0236-Add-API-for-quit-reason.patch => api/0234-Add-API-for-quit-reason.patch} (100%) rename patches/{unapplied/api/0237-Add-Destroy-Speed-API.patch => api/0235-Add-Destroy-Speed-API.patch} (90%) rename patches/{unapplied/api/0238-Add-LivingEntity-clearActiveItem.patch => api/0236-Add-LivingEntity-clearActiveItem.patch} (100%) rename patches/{unapplied/api/0239-Add-PlayerItemCooldownEvent.patch => api/0237-Add-PlayerItemCooldownEvent.patch} (100%) rename patches/{unapplied/api/0240-More-lightning-API.patch => api/0238-More-lightning-API.patch} (100%) rename patches/{unapplied/api/0241-Add-PlayerShearBlockEvent.patch => api/0239-Add-PlayerShearBlockEvent.patch} (100%) rename patches/{unapplied/api/0242-Enable-multi-release-plugin-jars.patch => api/0240-Enable-multi-release-plugin-jars.patch} (91%) rename patches/{unapplied/server/0551-Seed-based-feature-search.patch => removed/1.18/0525-Seed-based-feature-search.patch} (82%) rename patches/{unapplied/server/0515-Fix-hex-colors-not-working-in-some-kick-messages.patch => server/0489-Fix-hex-colors-not-working-in-some-kick-messages.patch} (98%) rename patches/{unapplied/server/0516-PortalCreateEvent-needs-to-know-its-entity.patch => server/0490-PortalCreateEvent-needs-to-know-its-entity.patch} (78%) rename patches/{unapplied/server/0517-Fix-CraftTeam-null-check.patch => server/0491-Fix-CraftTeam-null-check.patch} (100%) rename patches/{unapplied/server/0518-Add-more-Evoker-API.patch => server/0492-Add-more-Evoker-API.patch} (100%) rename patches/{unapplied/server/0519-Add-methods-to-get-translation-keys.patch => server/0493-Add-methods-to-get-translation-keys.patch} (95%) rename patches/{unapplied/server/0520-Create-HoverEvent-from-ItemStack-Entity.patch => server/0494-Create-HoverEvent-from-ItemStack-Entity.patch} (100%) rename patches/{unapplied/server/0521-Cache-block-data-strings.patch => server/0495-Cache-block-data-strings.patch} (95%) rename patches/{unapplied/server/0522-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch => server/0496-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch} (86%) rename patches/{unapplied/server/0523-Add-additional-open-container-api-to-HumanEntity.patch => server/0497-Add-additional-open-container-api-to-HumanEntity.patch} (97%) rename patches/{unapplied/server/0524-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch => server/0498-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch} (100%) rename patches/{unapplied/server/0525-Extend-block-drop-capture-to-capture-all-items-added.patch => server/0499-Extend-block-drop-capture-to-capture-all-items-added.patch} (70%) rename patches/{unapplied/server/0526-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch => server/0500-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch} (75%) rename patches/{unapplied/server/0527-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch => server/0501-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch} (82%) rename patches/{unapplied/server/0528-Lazily-track-plugin-scoreboards-by-default.patch => server/0502-Lazily-track-plugin-scoreboards-by-default.patch} (92%) rename patches/{unapplied/server/0529-Entity-isTicking.patch => server/0503-Entity-isTicking.patch} (78%) rename patches/{unapplied/server/0530-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch => server/0504-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch} (90%) rename patches/{unapplied/server/0531-Fix-Concurrency-issue-in-WeightedList.patch => server/0505-Fix-Concurrency-issue-in-WeightedList.patch} (97%) rename patches/{unapplied/server/0532-Reset-Ender-Crystals-on-Dragon-Spawn.patch => server/0506-Reset-Ender-Crystals-on-Dragon-Spawn.patch} (87%) rename patches/{unapplied/server/0533-Fix-for-large-move-vectors-crashing-server.patch => server/0507-Fix-for-large-move-vectors-crashing-server.patch} (95%) rename patches/{unapplied/server/0534-Optimise-getType-calls.patch => server/0508-Optimise-getType-calls.patch} (85%) rename patches/{unapplied/server/0535-Villager-resetOffers.patch => server/0509-Villager-resetOffers.patch} (94%) rename patches/{unapplied/server/0536-Improve-inlinig-for-some-hot-IBlockData-methods.patch => server/0510-Improve-inlinig-for-some-hot-IBlockData-methods.patch} (89%) rename patches/{unapplied/server/0537-Retain-block-place-order-when-capturing-blockstates.patch => server/0511-Retain-block-place-order-when-capturing-blockstates.patch} (88%) rename patches/{unapplied/server/0538-Reduce-blockpos-allocation-from-pathfinding.patch => server/0512-Reduce-blockpos-allocation-from-pathfinding.patch} (94%) rename patches/{unapplied/server/0539-Fix-item-locations-dropped-from-campfires.patch => server/0513-Fix-item-locations-dropped-from-campfires.patch} (91%) rename patches/{unapplied/server/0540-Player-elytra-boost-API.patch => server/0514-Player-elytra-boost-API.patch} (90%) rename patches/{unapplied/server/0541-Fixed-TileEntityBell-memory-leak.patch => server/0515-Fixed-TileEntityBell-memory-leak.patch} (94%) rename patches/{unapplied/server/0542-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch => server/0516-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch} (93%) rename patches/{unapplied/server/0543-Add-getOfflinePlayerIfCached-String.patch => server/0517-Add-getOfflinePlayerIfCached-String.patch} (88%) rename patches/{unapplied/server/0544-Add-ignore-discounts-API.patch => server/0518-Add-ignore-discounts-API.patch} (96%) rename patches/{unapplied/server/0545-Toggle-for-removing-existing-dragon.patch => server/0519-Toggle-for-removing-existing-dragon.patch} (85%) rename patches/{unapplied/server/0546-Fix-client-lag-on-advancement-loading.patch => server/0520-Fix-client-lag-on-advancement-loading.patch} (95%) rename patches/{unapplied/server/0547-Item-no-age-no-player-pickup.patch => server/0521-Item-no-age-no-player-pickup.patch} (100%) rename patches/{unapplied/server/0548-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch => server/0522-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch} (100%) rename patches/{unapplied/server/0549-Beacon-API-custom-effect-ranges.patch => server/0523-Beacon-API-custom-effect-ranges.patch} (90%) rename patches/{unapplied/server/0550-Add-API-for-quit-reason.patch => server/0524-Add-API-for-quit-reason.patch} (86%) rename patches/{unapplied/server/0552-Add-Wandering-Trader-spawn-rate-config-options.patch => server/0525-Add-Wandering-Trader-spawn-rate-config-options.patch} (95%) rename patches/{unapplied/server/0553-Significantly-improve-performance-of-the-end-generat.patch => server/0526-Significantly-improve-performance-of-the-end-generat.patch} (94%) rename patches/{unapplied/server/0554-Expose-world-spawn-angle.patch => server/0527-Expose-world-spawn-angle.patch} (88%) rename patches/{unapplied/server/0555-Add-Destroy-Speed-API.patch => server/0528-Add-Destroy-Speed-API.patch} (90%) rename patches/{unapplied/server/0556-Fix-Player-spawnParticle-x-y-z-precision-loss.patch => server/0529-Fix-Player-spawnParticle-x-y-z-precision-loss.patch} (89%) rename patches/{unapplied/server/0557-Add-LivingEntity-clearActiveItem.patch => server/0530-Add-LivingEntity-clearActiveItem.patch} (90%) rename patches/{unapplied/server/0558-Add-PlayerItemCooldownEvent.patch => server/0531-Add-PlayerItemCooldownEvent.patch} (100%) rename patches/{unapplied/server/0559-More-lightning-API.patch => server/0532-More-lightning-API.patch} (100%) rename patches/{unapplied/server/0560-Climbing-should-not-bypass-cramming-gamerule.patch => server/0533-Climbing-should-not-bypass-cramming-gamerule.patch} (78%) rename patches/{unapplied/server/0561-Added-missing-default-perms-for-commands.patch => server/0534-Added-missing-default-perms-for-commands.patch} (100%) rename patches/{unapplied/server/0562-Add-PlayerShearBlockEvent.patch => server/0535-Add-PlayerShearBlockEvent.patch} (95%) rename patches/{unapplied/server/0564-Fix-curing-zombie-villager-discount-exploit.patch => server/0536-Fix-curing-zombie-villager-discount-exploit.patch} (89%) rename patches/{unapplied/server/0565-Limit-recipe-packets.patch => server/0537-Limit-recipe-packets.patch} (86%) rename patches/{unapplied/server/0566-Fix-CraftSound-backwards-compatibility.patch => server/0538-Fix-CraftSound-backwards-compatibility.patch} (100%) diff --git a/patches/unapplied/api/0223-Add-more-Evoker-API.patch b/patches/api/0221-Add-more-Evoker-API.patch similarity index 100% rename from patches/unapplied/api/0223-Add-more-Evoker-API.patch rename to patches/api/0221-Add-more-Evoker-API.patch diff --git a/patches/unapplied/api/0224-Add-methods-to-get-translation-keys.patch b/patches/api/0222-Add-methods-to-get-translation-keys.patch similarity index 98% rename from patches/unapplied/api/0224-Add-methods-to-get-translation-keys.patch rename to patches/api/0222-Add-methods-to-get-translation-keys.patch index f58b047a71..2b9a77d231 100644 --- a/patches/unapplied/api/0224-Add-methods-to-get-translation-keys.patch +++ b/patches/api/0222-Add-methods-to-get-translation-keys.patch @@ -212,7 +212,7 @@ index 13eac9ad2c1672051635d1c35cc49239252e7a61..107e36ef02a9481954bd770ce9a55a0b + // Paper end } diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 25294bd8c4faa05af1429d934c5666742e3ee23c..271ebba09fd9248717750e998668ae6fe013bacc 100644 +index 20463f92d83dea3130d4a3f0ac70e5f399c97711..9bc8e82c1f5192e32781958ecd17fe8467eaeb80 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java @@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable; @@ -224,7 +224,7 @@ index 25294bd8c4faa05af1429d934c5666742e3ee23c..271ebba09fd9248717750e998668ae6f /** * Gets the metadata for this block -@@ -618,5 +618,15 @@ public interface Block extends Metadatable { +@@ -627,5 +627,15 @@ public interface Block extends Metadatable { */ @NotNull com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup(); diff --git a/patches/unapplied/api/0225-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/api/0223-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 100% rename from patches/unapplied/api/0225-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/api/0223-Create-HoverEvent-from-ItemStack-Entity.patch diff --git a/patches/unapplied/api/0226-Add-additional-open-container-api-to-HumanEntity.patch b/patches/api/0224-Add-additional-open-container-api-to-HumanEntity.patch similarity index 100% rename from patches/unapplied/api/0226-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/api/0224-Add-additional-open-container-api-to-HumanEntity.patch diff --git a/patches/unapplied/api/0227-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/api/0225-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 100% rename from patches/unapplied/api/0227-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/api/0225-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch diff --git a/patches/unapplied/api/0228-Entity-isTicking.patch b/patches/api/0226-Entity-isTicking.patch similarity index 88% rename from patches/unapplied/api/0228-Entity-isTicking.patch rename to patches/api/0226-Entity-isTicking.patch index de2af45358..b5692bf27c 100644 --- a/patches/unapplied/api/0228-Entity-isTicking.patch +++ b/patches/api/0226-Entity-isTicking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index c729cb44290cd719e7684fd919bf74300484b883..57717976b5281ecf316064793f300426d0983a32 100644 +index b7d3cd271cccbc250914c5bc17ae892ffcf14b57..81de9c7af05224cc866e814a7bbc7efda26947dd 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -755,5 +755,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent diff --git a/patches/unapplied/api/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch b/patches/api/0227-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch similarity index 91% rename from patches/unapplied/api/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch rename to patches/api/0227-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch index f34361722e..ba98b40571 100644 --- a/patches/unapplied/api/0229-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch +++ b/patches/api/0227-Clarify-the-Javadocs-for-Entity.getEntitySpawnReason.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Clarify the Javadocs for Entity.getEntitySpawnReason() diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 57717976b5281ecf316064793f300426d0983a32..b02704b0535522c5535b560105eec2885fdd3e77 100644 +index 81de9c7af05224cc866e814a7bbc7efda26947dd..2c892de67ecca09e490246186c8d2eccf91f3536 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -721,7 +721,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent diff --git a/patches/unapplied/api/0230-Villager-resetOffers.patch b/patches/api/0228-Villager-resetOffers.patch similarity index 100% rename from patches/unapplied/api/0230-Villager-resetOffers.patch rename to patches/api/0228-Villager-resetOffers.patch diff --git a/patches/unapplied/api/0231-Player-elytra-boost-API.patch b/patches/api/0229-Player-elytra-boost-API.patch similarity index 100% rename from patches/unapplied/api/0231-Player-elytra-boost-API.patch rename to patches/api/0229-Player-elytra-boost-API.patch diff --git a/patches/unapplied/api/0232-Add-getOfflinePlayerIfCached-String.patch b/patches/api/0230-Add-getOfflinePlayerIfCached-String.patch similarity index 88% rename from patches/unapplied/api/0232-Add-getOfflinePlayerIfCached-String.patch rename to patches/api/0230-Add-getOfflinePlayerIfCached-String.patch index 4e026a3098..e68ca79d44 100644 --- a/patches/unapplied/api/0232-Add-getOfflinePlayerIfCached-String.patch +++ b/patches/api/0230-Add-getOfflinePlayerIfCached-String.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String) diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 1171971a8f9b566ddc6f529845bc8e4ac11a112f..5b95ef65a8cffbb303952c071d0addc7430bd1c4 100644 +index 899a9dbd277b755195a67b6a0c56ac266a52e4c8..60528523299f92f842700cafd513a8ef6fd3c290 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1081,6 +1081,27 @@ public final class Bukkit { +@@ -1095,6 +1095,27 @@ public final class Bukkit { return server.getOfflinePlayer(name); } @@ -37,10 +37,10 @@ index 1171971a8f9b566ddc6f529845bc8e4ac11a112f..5b95ef65a8cffbb303952c071d0addc7 * Gets the player by the given UUID, regardless if they are offline or * online. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 221bc443695289a21aee9f7ac7d8453fea3f774e..95b07b5c13291203cde6653b2de400ff8430011f 100644 +index ad19ce0418ce3477d21583cb83c9ced639b250ff..5e0124fbfa7caa4ed321bf1e01ad0fde9941d7ef 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -914,6 +914,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -926,6 +926,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull public OfflinePlayer getOfflinePlayer(@NotNull String name); diff --git a/patches/unapplied/api/0233-Add-ignore-discounts-API.patch b/patches/api/0231-Add-ignore-discounts-API.patch similarity index 100% rename from patches/unapplied/api/0233-Add-ignore-discounts-API.patch rename to patches/api/0231-Add-ignore-discounts-API.patch diff --git a/patches/unapplied/api/0234-Item-no-age-no-player-pickup.patch b/patches/api/0232-Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/unapplied/api/0234-Item-no-age-no-player-pickup.patch rename to patches/api/0232-Item-no-age-no-player-pickup.patch diff --git a/patches/unapplied/api/0235-Beacon-API-custom-effect-ranges.patch b/patches/api/0233-Beacon-API-custom-effect-ranges.patch similarity index 100% rename from patches/unapplied/api/0235-Beacon-API-custom-effect-ranges.patch rename to patches/api/0233-Beacon-API-custom-effect-ranges.patch diff --git a/patches/unapplied/api/0236-Add-API-for-quit-reason.patch b/patches/api/0234-Add-API-for-quit-reason.patch similarity index 100% rename from patches/unapplied/api/0236-Add-API-for-quit-reason.patch rename to patches/api/0234-Add-API-for-quit-reason.patch diff --git a/patches/unapplied/api/0237-Add-Destroy-Speed-API.patch b/patches/api/0235-Add-Destroy-Speed-API.patch similarity index 90% rename from patches/unapplied/api/0237-Add-Destroy-Speed-API.patch rename to patches/api/0235-Add-Destroy-Speed-API.patch index 44f150d6fc..f1b58f766c 100644 --- a/patches/unapplied/api/0237-Add-Destroy-Speed-API.patch +++ b/patches/api/0235-Add-Destroy-Speed-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Destroy Speed API Co-authored-by: Jake Potrebic diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index 271ebba09fd9248717750e998668ae6fe013bacc..33fa378176d2a46e60de539246e5e13a34cb4bac 100644 +index 9bc8e82c1f5192e32781958ecd17fe8467eaeb80..f53377f1d860ef89d016ffd9068f261a09a8a556 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java -@@ -628,5 +628,29 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran +@@ -637,5 +637,29 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran @NotNull @Deprecated String getTranslationKey(); diff --git a/patches/unapplied/api/0238-Add-LivingEntity-clearActiveItem.patch b/patches/api/0236-Add-LivingEntity-clearActiveItem.patch similarity index 100% rename from patches/unapplied/api/0238-Add-LivingEntity-clearActiveItem.patch rename to patches/api/0236-Add-LivingEntity-clearActiveItem.patch diff --git a/patches/unapplied/api/0239-Add-PlayerItemCooldownEvent.patch b/patches/api/0237-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/unapplied/api/0239-Add-PlayerItemCooldownEvent.patch rename to patches/api/0237-Add-PlayerItemCooldownEvent.patch diff --git a/patches/unapplied/api/0240-More-lightning-API.patch b/patches/api/0238-More-lightning-API.patch similarity index 100% rename from patches/unapplied/api/0240-More-lightning-API.patch rename to patches/api/0238-More-lightning-API.patch diff --git a/patches/unapplied/api/0241-Add-PlayerShearBlockEvent.patch b/patches/api/0239-Add-PlayerShearBlockEvent.patch similarity index 100% rename from patches/unapplied/api/0241-Add-PlayerShearBlockEvent.patch rename to patches/api/0239-Add-PlayerShearBlockEvent.patch diff --git a/patches/unapplied/api/0242-Enable-multi-release-plugin-jars.patch b/patches/api/0240-Enable-multi-release-plugin-jars.patch similarity index 91% rename from patches/unapplied/api/0242-Enable-multi-release-plugin-jars.patch rename to patches/api/0240-Enable-multi-release-plugin-jars.patch index 53da5ebe06..84f78040fc 100644 --- a/patches/unapplied/api/0242-Enable-multi-release-plugin-jars.patch +++ b/patches/api/0240-Enable-multi-release-plugin-jars.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Enable multi-release plugin jars diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index 6b5d7c350c216b7a234d96ecacae1d39a1acd814..81292899918c4dc880661ee628384cb840a6244f 100644 +index 9e14c95deaca0044a3e9284ceefbb2b5c54ede07..c4ffe80bc7b4903eb8b8b2dbb18b5ff2d9877508 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -58,7 +58,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot diff --git a/patches/unapplied/server/0551-Seed-based-feature-search.patch b/patches/removed/1.18/0525-Seed-based-feature-search.patch similarity index 82% rename from patches/unapplied/server/0551-Seed-based-feature-search.patch rename to patches/removed/1.18/0525-Seed-based-feature-search.patch index 80e5bda521..adf205fc13 100644 --- a/patches/unapplied/server/0551-Seed-based-feature-search.patch +++ b/patches/removed/1.18/0525-Seed-based-feature-search.patch @@ -21,10 +21,10 @@ changes but this should usually not happen. A config option to disable this completely is added though in case that should ever be necessary. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 568da8f2ef3c5e1412cf13c10b425100af75e902..7ef45c941dacaa1f5cc4f0544af9ec76424cc783 100644 +index d985472c7982130cfa3a7d85694fd692717fa295..52c2373e1277e3f98bdfeafae0ef79158622b753 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -417,6 +417,14 @@ public class PaperWorldConfig { +@@ -400,6 +400,14 @@ public class PaperWorldConfig { } } @@ -40,14 +40,14 @@ index 568da8f2ef3c5e1412cf13c10b425100af75e902..7ef45c941dacaa1f5cc4f0544af9ec76 private void maxEntityCollision() { maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) ); diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java -index d7129f3379f2edecbcfd85f83d75e4d7064ce71d..7705ad4460ddf5166d922888f3a1368c50bb11ca 100644 +index 0670c1f72d9d0c4f8ea32ed314f75a106b2e2b09..6389e94abf3bae3e3cbeac11e0c99b1e50964563 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java +++ b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java -@@ -171,7 +171,24 @@ public abstract class StructureFeature { - if (!world.getWorldBorder().isChunkInBounds(chunkPos.x, chunkPos.z)) { continue; } // Paper - boolean bl3 = world.getBiomeManager().getPrimaryBiomeAtChunk(chunkPos).getGenerationSettings().isValidStart(this); - if (bl3) { -- ChunkAccess chunkAccess = world.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS); +@@ -175,7 +175,24 @@ public class StructureFeature { + return this.getLocatePos(chunkPos); + } + +- ChunkAccess chunkAccess = levelReader.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS); + // Paper start - seed based feature search + ChunkAccess chunkAccess = null; + if (structureAccessor.getWorld().paperConfig.seedBasedFeatureSearch) { @@ -63,7 +63,7 @@ index d7129f3379f2edecbcfd85f83d75e4d7064ce71d..7705ad4460ddf5166d922888f3a1368c + } + } + if (chunkAccess == null) { -+ chunkAccess = world.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS); ++ chunkAccess = levelReader.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS); + } + // Paper end StructureStart structureStart = structureAccessor.getStartForFeature(SectionPos.bottomOf(chunkAccess), this, chunkAccess); diff --git a/patches/unapplied/server/0515-Fix-hex-colors-not-working-in-some-kick-messages.patch b/patches/server/0489-Fix-hex-colors-not-working-in-some-kick-messages.patch similarity index 98% rename from patches/unapplied/server/0515-Fix-hex-colors-not-working-in-some-kick-messages.patch rename to patches/server/0489-Fix-hex-colors-not-working-in-some-kick-messages.patch index ae103d20a7..31e71d4263 100644 --- a/patches/unapplied/server/0515-Fix-hex-colors-not-working-in-some-kick-messages.patch +++ b/patches/server/0489-Fix-hex-colors-not-working-in-some-kick-messages.patch @@ -43,7 +43,7 @@ index c09d3cdb3acb04b6a833c30a619ff2af5e8b6b18..2384ae5082afd01c4f28fe2f3f782cdc this.connection.disconnect(chatmessage); return; diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 6468a675862ee2956308b760012fe25cf505563f..f4cff18afa816aa7efb2f80e0af51216129963a4 100644 +index 1766a22e65af2e08611a9435c7384377120406de..8dc1e8bba37986c75966e321614ebb6366729c29 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -106,14 +106,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener diff --git a/patches/unapplied/server/0516-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0490-PortalCreateEvent-needs-to-know-its-entity.patch similarity index 78% rename from patches/unapplied/server/0516-PortalCreateEvent-needs-to-know-its-entity.patch rename to patches/server/0490-PortalCreateEvent-needs-to-know-its-entity.patch index 5ea110b360..3909c7026d 100644 --- a/patches/unapplied/server/0516-PortalCreateEvent-needs-to-know-its-entity.patch +++ b/patches/server/0490-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 ab5c59676451e6b338cd8678689bce776513d921..e4736190358181a6a7e7e81f4452045f41134060 100644 +index a18cf051b374cbf294e319b619b7e2fba10a6268..77785840754651b914c069d37a084a60995acd41 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -409,7 +409,7 @@ public final class ItemStack { +@@ -410,7 +410,7 @@ public final class ItemStack { net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition); if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically @@ -18,18 +18,10 @@ index ab5c59676451e6b338cd8678689bce776513d921..e4736190358181a6a7e7e81f4452045f 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 a36d31caa5bfc82a5fd9b16dc42334955fe7511d..177d1da44c83da5f99ae91891dec41dc210bd31d 100644 +index adcfa3cac4f11557e0f27ae905c035e188bae25f..ed216f0b6cf031883c4ca4123d82c9fc542b915e 100644 --- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java -@@ -11,6 +11,7 @@ import net.minecraft.world.damagesource.DamageSource; - import net.minecraft.world.entity.Entity; - import net.minecraft.world.entity.player.Player; - import net.minecraft.world.item.context.BlockPlaceContext; -+import net.minecraft.world.item.context.UseOnContext; - import net.minecraft.world.level.BlockGetter; - import net.minecraft.world.level.Level; - import net.minecraft.world.level.LevelAccessor; -@@ -141,20 +142,23 @@ public abstract class BaseFireBlock extends Block { +@@ -140,20 +140,23 @@ public abstract class BaseFireBlock extends Block { super.entityInside(state, world, pos, entity); } @@ -38,16 +30,16 @@ index a36d31caa5bfc82a5fd9b16dc42334955fe7511d..177d1da44c83da5f99ae91891dec41dc @Override - public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { - if (!oldState.is(state.getBlock())) { -+ public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext itemActionContext) { ++ public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, net.minecraft.world.item.context.UseOnContext itemActionContext) { + // Paper end + if (!iblockdata1.is(iblockdata.getBlock())) { if (BaseFireBlock.inPortalDimension(world)) { -- Optional optional = PortalShape.findEmptyPortalShape((LevelAccessor) world, pos, Direction.Axis.X); -+ Optional optional = PortalShape.findEmptyPortalShape((LevelAccessor) world, blockposition, Direction.Axis.X); +- Optional optional = PortalShape.findEmptyPortalShape(world, pos, Direction.Axis.X); ++ Optional optional = PortalShape.findEmptyPortalShape(world, blockposition, Direction.Axis.X); if (optional.isPresent()) { -- ((PortalShape) optional.get()).createPortal(); -+ ((PortalShape) optional.get()).createPortal(itemActionContext); // Paper - pass ItemActionContext param +- ((PortalShape) optional.get()).createPortalBlocks(); ++ ((PortalShape) optional.get()).createPortalBlocks(itemActionContext); // Paper - pass ItemActionContext param return; } } @@ -60,37 +52,37 @@ index a36d31caa5bfc82a5fd9b16dc42334955fe7511d..177d1da44c83da5f99ae91891dec41dc } diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 4156f212461201e8f8001f3fbcd7fb683e86ed6b..c8a58cd67bb7f7491de04bda703e2a1f166fb845 100644 +index 08bc35b40720ca001d3f6c1185bdd11c61ec9ee1..d8e4fda2d501545e5f891bca317e2aa5f9368f47 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java -@@ -13,6 +13,7 @@ import net.minecraft.core.Direction; - import net.minecraft.core.Vec3i; +@@ -12,6 +12,7 @@ import net.minecraft.core.BlockPos; + import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.GameRules; import net.minecraft.world.level.Level; -@@ -359,9 +360,11 @@ public class FireBlock extends BaseFireBlock { +@@ -358,9 +359,11 @@ public class FireBlock extends BaseFireBlock { } @Override - public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { - super.onPlace(state, world, pos, oldState, notify); -- world.getBlockTicks().scheduleTick(pos, this, FireBlock.getFireTickDelay(world.random)); +- world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random)); + // Paper start - ItemActionContext param + public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext itemActionContext) { + super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, itemActionContext); + // Paper end -+ world.getBlockTicks().scheduleTick(blockposition, this, getFireTickDelay(world.random)); ++ world.scheduleTick(blockposition, this, getFireTickDelay(world.random)); } private static int getFireTickDelay(Random random) { 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 bea9c7ac0fe08c3ca3309e8311f192cc557ca67d..983ca190dadc6f0b552133e6296f1c4165b75ad4 100644 +index e1beb18dfb5529f48c312bf7ff85be18f6c935b5..23662570869de3bb1f6207a7d5104fdaff75163e 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 -@@ -32,6 +32,7 @@ import net.minecraft.world.item.DyeColor; +@@ -31,6 +31,7 @@ import net.minecraft.world.item.DyeColor; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; @@ -98,7 +90,7 @@ index bea9c7ac0fe08c3ca3309e8311f192cc557ca67d..983ca190dadc6f0b552133e6296f1c41 import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.EmptyBlockGetter; import net.minecraft.world.level.Level; -@@ -128,6 +129,12 @@ public abstract class BlockBehaviour { +@@ -127,6 +128,12 @@ public abstract class BlockBehaviour { DebugPackets.sendNeighborsUpdatePacket(world, pos); } @@ -112,7 +104,7 @@ index bea9c7ac0fe08c3ca3309e8311f192cc557ca67d..983ca190dadc6f0b552133e6296f1c41 public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { org.spigotmc.AsyncCatcher.catchOp("block onPlace"); // Spigot 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 b68fa6cb68bb8fa078d4572bad338f43f20e8dc7..c07b5d1f1ef8b5e6026c7555d476880c8802d6c5 100644 +index c327308dd0209b952e738a01cc9cefdaece393e4..5d76674d5e181f012c0686e9915556bc93087706 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java @@ -11,6 +11,7 @@ import net.minecraft.tags.BlockTags; @@ -127,10 +119,10 @@ index b68fa6cb68bb8fa078d4572bad338f43f20e8dc7..c07b5d1f1ef8b5e6026c7555d476880c } // CraftBukkit start - return boolean -- public boolean createPortal() { +- public boolean createPortalBlocks() { + // Paper start - ItemActionContext param -+ @Deprecated public boolean createPortal() { return this.createPortal(null); } -+ public boolean createPortal(UseOnContext itemActionContext) { ++ @Deprecated public boolean createPortalBlocks() { return this.createPortalBlocks(null); } ++ public boolean createPortalBlocks(UseOnContext itemActionContext) { + // Paper end org.bukkit.World bworld = this.level.getMinecraftWorld().getWorld(); diff --git a/patches/unapplied/server/0517-Fix-CraftTeam-null-check.patch b/patches/server/0491-Fix-CraftTeam-null-check.patch similarity index 100% rename from patches/unapplied/server/0517-Fix-CraftTeam-null-check.patch rename to patches/server/0491-Fix-CraftTeam-null-check.patch diff --git a/patches/unapplied/server/0518-Add-more-Evoker-API.patch b/patches/server/0492-Add-more-Evoker-API.patch similarity index 100% rename from patches/unapplied/server/0518-Add-more-Evoker-API.patch rename to patches/server/0492-Add-more-Evoker-API.patch diff --git a/patches/unapplied/server/0519-Add-methods-to-get-translation-keys.patch b/patches/server/0493-Add-methods-to-get-translation-keys.patch similarity index 95% rename from patches/unapplied/server/0519-Add-methods-to-get-translation-keys.patch rename to patches/server/0493-Add-methods-to-get-translation-keys.patch index 3177ac1369..94fdbfae73 100644 --- a/patches/unapplied/server/0519-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0493-Add-methods-to-get-translation-keys.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add methods to get translation keys Co-authored-by: MeFisto94 diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 5f9f35c25a6247b6cd1ba31888a0afb8cea31da2..4febad176d8dc7c56e9cb09c8e5ce55f4c9f3288 100644 +index 00056d5b3426df121242de2ae01fca492d20089a..ce97c1cafc520db5670004e00aee6b08045e9e00 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -612,5 +612,15 @@ public class CraftBlock implements Block { +@@ -625,5 +625,15 @@ public class CraftBlock implements Block { public com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup() { return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMS().getBlock().defaultBlockState().getSoundType()); } @@ -42,7 +42,7 @@ index eb99e0c2462a2d1ab4508a5c3f1580b6e31d7465..c536eceef3365a7b726cd970df345ba1 public net.minecraft.world.item.enchantment.Enchantment getHandle() { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 3b727b96c4166e88ec23df3e3e1e98d6aed58637..aceb11620972d13324aa05c841b5251d0fda3fab 100644 +index 114890cceaf786ca7f76f8d2a62d6243b039285b..458be5e7cff9f9d97323360b7deaf045dff36fa6 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -425,6 +425,30 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0520-Create-HoverEvent-from-ItemStack-Entity.patch b/patches/server/0494-Create-HoverEvent-from-ItemStack-Entity.patch similarity index 100% rename from patches/unapplied/server/0520-Create-HoverEvent-from-ItemStack-Entity.patch rename to patches/server/0494-Create-HoverEvent-from-ItemStack-Entity.patch diff --git a/patches/unapplied/server/0521-Cache-block-data-strings.patch b/patches/server/0495-Cache-block-data-strings.patch similarity index 95% rename from patches/unapplied/server/0521-Cache-block-data-strings.patch rename to patches/server/0495-Cache-block-data-strings.patch index 64953f18ae..9de33fb7d3 100644 --- a/patches/unapplied/server/0521-Cache-block-data-strings.patch +++ b/patches/server/0495-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 968476493bcea8b4d961e838b142912d3eac91cd..b9c628b2786df4b85329b4d1da55452f61d80dfd 100644 +index f7a0976488732e41e197a3a77f20a937d44c7be3..461ee423bfdcc63267f32f2b29ed9d87b1423f8c 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2043,6 +2043,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop= level; } -@@ -1568,6 +1569,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -1562,6 +1563,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public void moveTo(double x, double y, double z, float yaw, float pitch) { @@ -57,10 +57,10 @@ index 8df955a0aa6cd0c7d10619fb63abd16af4754be8..a652bbc4b3c768fecfb6f067d21a9031 this.setYRot(yaw); this.setXRot(pitch); diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 409467ca9a8a21d1e22e3a08f462e54d6124f6a1..56d3867f748d92a55976820215d9b8316989677b 100644 +index dba24bb35085a14a3780c10762f229eb40f84ef9..135abdd46561cfdcb2186c5872802fdcedc86359 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java -@@ -171,6 +171,7 @@ public abstract class BaseSpawner { +@@ -161,6 +161,7 @@ public abstract class BaseSpawner { return; } diff --git a/patches/unapplied/server/0523-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0497-Add-additional-open-container-api-to-HumanEntity.patch similarity index 97% rename from patches/unapplied/server/0523-Add-additional-open-container-api-to-HumanEntity.patch rename to patches/server/0497-Add-additional-open-container-api-to-HumanEntity.patch index b7632ae14c..ce59f1dbfc 100644 --- a/patches/unapplied/server/0523-Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/server/0497-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add additional open container api to HumanEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 2be54303ad01fd2b464a8962ec1afe81d045b098..01c235d48d9b5276c5b754b25c5585654591ec1c 100644 +index a0af465056786f0c8e177a3f48bbf51c0f79b949..45fe3d2d728b984651c478ff050a7c69b1eebef3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -458,6 +458,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/patches/unapplied/server/0524-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch b/patches/server/0498-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch similarity index 100% rename from patches/unapplied/server/0524-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch rename to patches/server/0498-Cache-DataFixerUpper-Rewrite-Rules-on-demand.patch diff --git a/patches/unapplied/server/0525-Extend-block-drop-capture-to-capture-all-items-added.patch b/patches/server/0499-Extend-block-drop-capture-to-capture-all-items-added.patch similarity index 70% rename from patches/unapplied/server/0525-Extend-block-drop-capture-to-capture-all-items-added.patch rename to patches/server/0499-Extend-block-drop-capture-to-capture-all-items-added.patch index beff1740a2..1f124fb3b3 100644 --- a/patches/unapplied/server/0525-Extend-block-drop-capture-to-capture-all-items-added.patch +++ b/patches/server/0499-Extend-block-drop-capture-to-capture-all-items-added.patch @@ -6,11 +6,11 @@ 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 1b13c67441c46208a9b2adde5ca109f90bbb92e2..3563690e404a68b8940d9c06a0198dd0a4b2d220 100644 +index f9daa7183e29d203e73b242c285d10cda44aab11..bc57099ffc447a713b92896a1348728702ef51b2 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1252,6 +1252,13 @@ public class ServerLevel extends Level implements WorldGenLevel { - // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit +@@ -1226,6 +1226,13 @@ 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 { + // Paper start - capture all item additions to the world @@ -24,22 +24,14 @@ index 1b13c67441c46208a9b2adde5ca109f90bbb92e2..3563690e404a68b8940d9c06a0198dd0 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 784e6c2db5bb346408948cff8ac3cc9b964dd6d8..0b274a5b9e0bf68769637f10e43dbff6d909512b 100644 +index f087f48ad9e0b28d9874f3a9c1e3988ce6b60d87..2ac2100b6ae006ab490742424b682395e7513156 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -7,6 +7,7 @@ import net.minecraft.world.InteractionResult; - import net.minecraft.world.InteractionResultHolder; - import net.minecraft.world.MenuProvider; - import net.minecraft.world.entity.EquipmentSlot; -+import net.minecraft.world.entity.item.ItemEntity; - import net.minecraft.world.entity.player.Player; - import net.minecraft.world.item.DoubleHighBlockItem; - import net.minecraft.world.item.ItemStack; -@@ -424,10 +425,12 @@ public class ServerPlayerGameMode { +@@ -421,10 +421,12 @@ public class ServerPlayerGameMode { // return true; // CraftBukkit } // CraftBukkit start -+ java.util.List itemsToDrop = level.captureDrops; // Paper - store current list ++ java.util.List itemsToDrop = level.captureDrops; // Paper - store current list + level.captureDrops = null; // Paper - Remove this earlier so that we can actually drop stuff if (event.isDropItems()) { - org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, state, this.player, level.captureDrops); diff --git a/patches/unapplied/server/0526-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch b/patches/server/0500-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch similarity index 75% rename from patches/unapplied/server/0526-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch rename to patches/server/0500-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch index a08e406923..192ec5831d 100644 --- a/patches/unapplied/server/0526-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch +++ b/patches/server/0500-Don-t-mark-dirty-in-invalid-locations-SPIGOT-6086.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086) diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java -index 96759f349e10c8ef634a11a6b48f9affae77d65a..823451570e02ee75bfce1c106779a0502187fcea 100644 +index 26a787864058dccc0365680b0259ddf0dad22b58..292a26a2e13d97e4796bfe00c4d5789f94e67cc1 100644 --- a/src/main/java/net/minecraft/server/level/ChunkHolder.java +++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java -@@ -381,6 +381,7 @@ public class ChunkHolder { +@@ -206,6 +206,7 @@ public class ChunkHolder { } public void blockChanged(BlockPos pos) { + if (!pos.isValidLocation(levelHeightAccessor)) return; // Paper - SPIGOT-6086 for all invalid locations; avoid acquiring locks - LevelChunk chunk = this.getSendingChunk(); // Paper - no-tick view distance + LevelChunk chunk = this.getTickingChunk(); if (chunk != null) { diff --git a/patches/unapplied/server/0527-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0501-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch similarity index 82% rename from patches/unapplied/server/0527-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch rename to patches/server/0501-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 835ba5b5b4..20bcb9ab00 100644 --- a/patches/unapplied/server/0527-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0501-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 dd98f228135c634235dc28c8edd396fb90fc98bc..595428849a32374678fc4125cb4a6f90186a1340 100644 +index 8ec3e8056b0a4f3994e27f9bb1dc5ccfb7ebfa52..d7403f6a2fc2574768c2751e5bfa816b87906117 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3958,4 +3958,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -3970,4 +3970,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i void accept(Entity entity, double x, double y, double z); } @@ -21,7 +21,7 @@ index dd98f228135c634235dc28c8edd396fb90fc98bc..595428849a32374678fc4125cb4a6f90 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index aceb11620972d13324aa05c841b5251d0fda3fab..ee974e615096f78906a31b4774e3dde7a156d023 100644 +index 458be5e7cff9f9d97323360b7deaf045dff36fa6..5d5720b2a6cbf9d73b6c7413e4ddc5cc114b9448 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -449,6 +449,10 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0528-Lazily-track-plugin-scoreboards-by-default.patch b/patches/server/0502-Lazily-track-plugin-scoreboards-by-default.patch similarity index 92% rename from patches/unapplied/server/0528-Lazily-track-plugin-scoreboards-by-default.patch rename to patches/server/0502-Lazily-track-plugin-scoreboards-by-default.patch index 57028e8a9a..674cb15f4d 100644 --- a/patches/unapplied/server/0528-Lazily-track-plugin-scoreboards-by-default.patch +++ b/patches/server/0502-Lazily-track-plugin-scoreboards-by-default.patch @@ -14,21 +14,23 @@ this breaks your workflow you can always force all scoreboards to be tracked wit settings.track-plugin-scoreboards in paper.yml. diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 6733e78ba6bf2993bb2adde4cf9f1f6ca366679c..380c4f46b98e6296cf28568abb1e74a80278ffa0 100644 +index 9a66cddbf9863aa6ff566a337153883c07c08e41..c0c807522aaa82ca74c47849b47e6b6b48b9a6f8 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -486,4 +486,9 @@ public class PaperConfig { - private static void maxJoinsPerTick() { +@@ -96,6 +96,11 @@ public class PaperConfig { maxJoinsPerTick = getInt("settings.max-joins-per-tick", 3); } -+ + + public static boolean trackPluginScoreboards; + private static void trackPluginScoreboards() { + trackPluginScoreboards = getBoolean("settings.track-plugin-scoreboards", false); + } - } ++ + public static void registerCommands() { + for (Map.Entry entry : commands.entrySet()) { + MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue()); diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java -index 68aa66c340b7a686a353e2a15084d811a3955a0a..b1fbbfeadb63d495b57f6c29b00de5327ca713cd 100644 +index 59f60fcadd8767cf8698482547e8c771d970732a..7b61a2be2be0bdf06592b65be9acd4cbbae5bf7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java @@ -18,6 +18,7 @@ import org.bukkit.scoreboard.Team; diff --git a/patches/unapplied/server/0529-Entity-isTicking.patch b/patches/server/0503-Entity-isTicking.patch similarity index 78% rename from patches/unapplied/server/0529-Entity-isTicking.patch rename to patches/server/0503-Entity-isTicking.patch index da19a06e1c..15efeefd1f 100644 --- a/patches/unapplied/server/0529-Entity-isTicking.patch +++ b/patches/server/0503-Entity-isTicking.patch @@ -5,18 +5,18 @@ 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 9e6a2c5fc55674ab144ebd46da6152e51d3c1dba..9524771be6268b28f14618523d59cff00a127d9b 100644 +index d7403f6a2fc2574768c2751e5bfa816b87906117..2da1f5611d4c515107895692b9456e0800fb3cd3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -52,6 +52,7 @@ import net.minecraft.resources.ResourceKey; +@@ -52,6 +52,7 @@ import net.minecraft.network.syncher.SynchedEntityData; + import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; - import net.minecraft.server.MCUtil; import net.minecraft.server.MinecraftServer; +import net.minecraft.server.level.ServerChunkCache; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.TicketType; -@@ -3963,5 +3964,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -3975,5 +3976,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i public static int nextEntityId() { return ENTITY_COUNTER.incrementAndGet(); } @@ -27,7 +27,7 @@ index 9e6a2c5fc55674ab144ebd46da6152e51d3c1dba..9524771be6268b28f14618523d59cff0 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index a0a24a46624b3d174d08c806c8ad45d8a9028a09..2712aa554383a3b2b742c945e2f0be7ee96eea69 100644 +index 0547727afbd1b37c1a75fd8b4da585d80d54245a..986f045a2e6a040c6e2aab7420c8cb2d4ac3a726 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1259,5 +1259,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/unapplied/server/0530-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch b/patches/server/0504-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch similarity index 90% rename from patches/unapplied/server/0530-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch rename to patches/server/0504-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch index f80b07acdc..a0cd11b301 100644 --- a/patches/unapplied/server/0530-Fix-deop-kicking-non-whitelisted-player-when-white-l.patch +++ b/patches/server/0504-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 b9c628b2786df4b85329b4d1da55452f61d80dfd..1e163dd6f1f1038cb7945347982407969962e277 100644 +index 461ee423bfdcc63267f32f2b29ed9d87b1423f8c..c739e90c4f015aea555c455e336e079a59c948bb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2109,13 +2109,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop, MemoryStatus> requiredMemoryState, Set> memoriesToForgetWhenStopped, GateBehavior.OrderPolicy order, GateBehavior.RunningPolicy runMode, List, Integer>> tasks) { super(requiredMemoryState); diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java -index d4c9def80154c3e62a0b6928057062a0808f339f..4fa64b1e2004810906bb0b174436c8e687a75ada 100644 +index ca4c067ae99f4a1f2e62f8d92928d65ab29bc517..1bc34453933bc7590af45a5559a4fc75eb3e0c5c 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java @@ -14,12 +14,25 @@ import java.util.stream.Stream; diff --git a/patches/unapplied/server/0532-Reset-Ender-Crystals-on-Dragon-Spawn.patch b/patches/server/0506-Reset-Ender-Crystals-on-Dragon-Spawn.patch similarity index 87% rename from patches/unapplied/server/0532-Reset-Ender-Crystals-on-Dragon-Spawn.patch rename to patches/server/0506-Reset-Ender-Crystals-on-Dragon-Spawn.patch index c91bcad15a..0e429e17b8 100644 --- a/patches/unapplied/server/0532-Reset-Ender-Crystals-on-Dragon-Spawn.patch +++ b/patches/server/0506-Reset-Ender-Crystals-on-Dragon-Spawn.patch @@ -11,10 +11,10 @@ This ensures the crystals/pillars are in expected state when the dragon spawns. See #3522 diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 711be01abe9d47bdc9bfe8b09a2719d666b986fb..9899c70b88fc371963e33caccd7125ef8c333df4 100644 +index 9a6b2c75b8622b0f9eda85011ef6f2f1dca574c9..01fb5d0c18d50e298a891a42428c5c87d6820194 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -404,6 +404,7 @@ public class EndDragonFight { +@@ -408,6 +408,7 @@ public class EndDragonFight { enderDragon.moveTo(0.0D, 128.0D, 0.0D, this.level.random.nextFloat() * 360.0F, 0.0F); this.level.addFreshEntity(enderDragon); this.dragonUUID = enderDragon.getUUID(); diff --git a/patches/unapplied/server/0533-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0507-Fix-for-large-move-vectors-crashing-server.patch similarity index 95% rename from patches/unapplied/server/0533-Fix-for-large-move-vectors-crashing-server.patch rename to patches/server/0507-Fix-for-large-move-vectors-crashing-server.patch index 36f1043fa5..b66e68dbc7 100644 --- a/patches/unapplied/server/0533-Fix-for-large-move-vectors-crashing-server.patch +++ b/patches/server/0507-Fix-for-large-move-vectors-crashing-server.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix for large move vectors crashing server Check movement distance also based on current position. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index be682e8459bb7293256c3552d90f5cdb8d97a29d..557817c8ac1eadabc11f7f3efc8485b226d7657e 100644 +index 2074760beee6fdc2e94bb0f5dcfbae7b5813e8c9..2dd47eab63cf9322a5844e748709e220272a8cfe 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -506,20 +506,31 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -505,20 +505,31 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) { ServerLevel worldserver = this.player.getLevel(); @@ -49,7 +49,7 @@ index be682e8459bb7293256c3552d90f5cdb8d97a29d..557817c8ac1eadabc11f7f3efc8485b2 // CraftBukkit start - handle custom speeds and skipped ticks this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick; -@@ -562,9 +573,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -561,9 +572,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D)); @@ -62,7 +62,7 @@ index be682e8459bb7293256c3552d90f5cdb8d97a29d..557817c8ac1eadabc11f7f3efc8485b2 entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); double d11 = d7; -@@ -1232,14 +1243,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1231,14 +1242,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser float prevPitch = this.player.getXRot(); // CraftBukkit end double d3 = this.player.getX(); final double toX = d3; // Paper - OBFHELPER @@ -90,7 +90,7 @@ index be682e8459bb7293256c3552d90f5cdb8d97a29d..557817c8ac1eadabc11f7f3efc8485b2 if (this.player.isSleeping()) { if (d11 > 1.0D) { -@@ -1291,9 +1313,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1290,9 +1312,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser AABB axisalignedbb = this.player.getBoundingBox(); diff --git a/patches/unapplied/server/0534-Optimise-getType-calls.patch b/patches/server/0508-Optimise-getType-calls.patch similarity index 85% rename from patches/unapplied/server/0534-Optimise-getType-calls.patch rename to patches/server/0508-Optimise-getType-calls.patch index 99be2ad7e8..9ff04ac330 100644 --- a/patches/unapplied/server/0534-Optimise-getType-calls.patch +++ b/patches/server/0508-Optimise-getType-calls.patch @@ -6,12 +6,12 @@ Subject: [PATCH] Optimise getType calls Remove the map lookup for converting from Block->Bukkit Material diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockState.java b/src/main/java/net/minecraft/world/level/block/state/BlockState.java -index 3581aa7dcba934017896dc947adeb9d548d5f333..6158ef624ddbf02179afcc4aebc8284ae326ffb1 100644 +index 76133c77e8ebce7c9e5402e3e7cd50b30aa1c2e0..348a91a760bd728f8e732e1a35c86ab75d8fc0f1 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockState.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockState.java @@ -10,6 +10,17 @@ import net.minecraft.world.level.block.state.properties.Property; public class BlockState extends BlockBehaviour.BlockStateBase { - public static final Codec CODEC = codec(Registry.BLOCK, Block::defaultBlockState).stable(); + public static final Codec CODEC = codec(Registry.BLOCK.byNameCodec(), Block::defaultBlockState).stable(); + // Paper start - optimise getType calls + org.bukkit.Material cachedMaterial; @@ -28,10 +28,10 @@ index 3581aa7dcba934017896dc947adeb9d548d5f333..6158ef624ddbf02179afcc4aebc8284a super(block, propertyMap, codec); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java -index e2e6652fc227173b69580dba74855c3ed8884a3b..2c23712aadfe32439ae014c62aa16f1b2a677439 100644 +index 10e65d6b9c0fe34414894e0debd17bab6f25d4f2..a37a7bd61df25408fef425cee941f75d0568fe31 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java -@@ -81,7 +81,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { +@@ -80,7 +80,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot { public Material getBlockType(int x, int y, int z) { this.validateChunkCoordinates(x, y, z); @@ -41,10 +41,10 @@ index e2e6652fc227173b69580dba74855c3ed8884a3b..2c23712aadfe32439ae014c62aa16f1b @Override diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index 4febad176d8dc7c56e9cb09c8e5ce55f4c9f3288..fd4a0bbd1438bfc94580f29382d0c5f50531292b 100644 +index ce97c1cafc520db5670004e00aee6b08045e9e00..e69b1831cbfdff3f2b1e4be4d5de313bfe724795 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -212,7 +212,7 @@ public class CraftBlock implements Block { +@@ -215,7 +215,7 @@ public class CraftBlock implements Block { @Override public Material getType() { @@ -54,7 +54,7 @@ index 4febad176d8dc7c56e9cb09c8e5ce55f4c9f3288..fd4a0bbd1438bfc94580f29382d0c5f5 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java -index 8f7da903c75feaaf31e368ac8d798af8ed845ebf..db7a6af045364e7b1e9c0449faaf5f49394f6204 100644 +index 0a755f38fae9dc84440f43113920c5b4c6d8218b..7b9e943b391c061782fccd2b8d705ceec8db50fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -166,7 +166,7 @@ public class CraftBlockState implements BlockState { @@ -80,10 +80,10 @@ index 6dc8f9f269db6971b8b46819e017357899ccd118..7f49c7c7048b5778f20ddce1d844d4b3 public BlockState getState() { diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -index 0b8975b34ef47d5ea91d34acd2ec5a1d548d74ff..68c47608a50a0cb6bd75ecbf73637d6f2e9db361 100644 +index ee88ff2ee86bbd3ccf3e4a0b2310f020f137ef4f..5e15feb408b8a05ec5ee393a604c8d39a91ff106 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java -@@ -99,7 +99,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { +@@ -96,7 +96,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData { @Override public Material getType(int x, int y, int z) { diff --git a/patches/unapplied/server/0535-Villager-resetOffers.patch b/patches/server/0509-Villager-resetOffers.patch similarity index 94% rename from patches/unapplied/server/0535-Villager-resetOffers.patch rename to patches/server/0509-Villager-resetOffers.patch index d82060745c..da091e898a 100644 --- a/patches/unapplied/server/0535-Villager-resetOffers.patch +++ b/patches/server/0509-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 ab701d86b1181e30d74e0e03eef79c43f7fb2513..2610d9cd849aa38cc7a67aef21223707e85682ec 100644 +index dddc84e233e9108f2304694e53990d0654225c5b..68bd3bb6fde77a65b5271631f6ef726dc613019b 100644 --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java @@ -115,6 +115,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa diff --git a/patches/unapplied/server/0536-Improve-inlinig-for-some-hot-IBlockData-methods.patch b/patches/server/0510-Improve-inlinig-for-some-hot-IBlockData-methods.patch similarity index 89% rename from patches/unapplied/server/0536-Improve-inlinig-for-some-hot-IBlockData-methods.patch rename to patches/server/0510-Improve-inlinig-for-some-hot-IBlockData-methods.patch index eee823a9c2..ca3f574b7a 100644 --- a/patches/unapplied/server/0536-Improve-inlinig-for-some-hot-IBlockData-methods.patch +++ b/patches/server/0510-Improve-inlinig-for-some-hot-IBlockData-methods.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Improve inlinig for some hot IBlockData methods 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 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a2143a37bfe 100644 +index 23662570869de3bb1f6207a7d5104fdaff75163e..8fddb02a6266002800a7e31444c6465300d76689 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 -@@ -659,8 +659,14 @@ public abstract class BlockBehaviour { +@@ -658,8 +658,14 @@ public abstract class BlockBehaviour { return this.shapeExceedsCube; } // Paper end @@ -23,7 +23,7 @@ index 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a21 if (!this.getBlock().hasDynamicShape()) { this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState()); } -@@ -704,15 +710,15 @@ public abstract class BlockBehaviour { +@@ -703,15 +709,15 @@ public abstract class BlockBehaviour { return this.shapeExceedsCube; // Paper - moved into shape cache init } @@ -42,7 +42,7 @@ index 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a21 return this.isAir; } -@@ -786,7 +792,7 @@ public abstract class BlockBehaviour { +@@ -785,7 +791,7 @@ public abstract class BlockBehaviour { } } @@ -51,7 +51,7 @@ index 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a21 return this.canOcclude; } -@@ -979,12 +985,12 @@ public abstract class BlockBehaviour { +@@ -978,12 +984,12 @@ public abstract class BlockBehaviour { return this.getBlock() == block; } @@ -69,7 +69,7 @@ index 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a21 public long getSeed(BlockPos pos) { diff --git a/src/main/java/net/minecraft/world/level/material/FluidState.java b/src/main/java/net/minecraft/world/level/material/FluidState.java -index 65911334082f9d53fc930d7c6b0313e8acef0c5e..0ae876f0bbfac74a9d5f06fb73f9cfcf5991b02e 100644 +index b0611b985efc2cc8a528ff4589fd11cbcc84ac39..5e7dc3868dbf676b7ddfc39ec1ea97ff2a9dbaae 100644 --- a/src/main/java/net/minecraft/world/level/material/FluidState.java +++ b/src/main/java/net/minecraft/world/level/material/FluidState.java @@ -23,8 +23,12 @@ public final class FluidState extends StateHolder { diff --git a/patches/unapplied/server/0537-Retain-block-place-order-when-capturing-blockstates.patch b/patches/server/0511-Retain-block-place-order-when-capturing-blockstates.patch similarity index 88% rename from patches/unapplied/server/0537-Retain-block-place-order-when-capturing-blockstates.patch rename to patches/server/0511-Retain-block-place-order-when-capturing-blockstates.patch index d1dae3b7d3..bd424a356a 100644 --- a/patches/unapplied/server/0537-Retain-block-place-order-when-capturing-blockstates.patch +++ b/patches/server/0511-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 1dd4ee6cf037dcc6a8683d79b623165d1be62d57..af3f8bfae033fb77a0428515fa9da80f1851fa1f 100644 +index 9d628996437959e79348679e2c85e07bc138475e..8830f1cf93969a3c74b208227fbc264bede709aa 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -148,7 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -149,7 +149,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/0538-Reduce-blockpos-allocation-from-pathfinding.patch b/patches/server/0512-Reduce-blockpos-allocation-from-pathfinding.patch similarity index 94% rename from patches/unapplied/server/0538-Reduce-blockpos-allocation-from-pathfinding.patch rename to patches/server/0512-Reduce-blockpos-allocation-from-pathfinding.patch index 9fbe5ebecc..9b026b7259 100644 --- a/patches/unapplied/server/0538-Reduce-blockpos-allocation-from-pathfinding.patch +++ b/patches/server/0512-Reduce-blockpos-allocation-from-pathfinding.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reduce blockpos allocation from pathfinding diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java -index b37acb6e6e253529a38f44a518a02c7747d3145e..2ad5ff9a1d7de54e75436e99da8a73db9dc91bde 100644 +index c33fda773ec071d27e924461a30a2938db35c231..46d3640b6556a104889f1d57e61d60b5094c28f2 100644 --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java @@ -471,7 +471,7 @@ public class WalkNodeEvaluator extends NodeEvaluator { diff --git a/patches/unapplied/server/0539-Fix-item-locations-dropped-from-campfires.patch b/patches/server/0513-Fix-item-locations-dropped-from-campfires.patch similarity index 91% rename from patches/unapplied/server/0539-Fix-item-locations-dropped-from-campfires.patch rename to patches/server/0513-Fix-item-locations-dropped-from-campfires.patch index 30515883c1..49b095cf5a 100644 --- a/patches/unapplied/server/0539-Fix-item-locations-dropped-from-campfires.patch +++ b/patches/server/0513-Fix-item-locations-dropped-from-campfires.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix item locations dropped from campfires Fixes #4259 by not flooring the blockposition among other weirdness 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 7a5f748f974429ce4faa8f64fae905994b5e59a9..ad35d82f03f7643507dde6adbb38c911d12ec6c1 100644 +index 05cae0e74c64f5ab659dbfae4e40f1c8d9f15ed7..dd272fe24d330c04f2f3f44db9357b3d35034c4e 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 -@@ -71,7 +71,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { +@@ -70,7 +70,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable { result = blockCookEvent.getResult(); itemstack1 = CraftItemStack.asNMSCopy(result); // CraftBukkit end diff --git a/patches/unapplied/server/0540-Player-elytra-boost-API.patch b/patches/server/0514-Player-elytra-boost-API.patch similarity index 90% rename from patches/unapplied/server/0540-Player-elytra-boost-API.patch rename to patches/server/0514-Player-elytra-boost-API.patch index da08085dd0..d5334002c4 100644 --- a/patches/unapplied/server/0540-Player-elytra-boost-API.patch +++ b/patches/server/0514-Player-elytra-boost-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c661f6f29633fd5b28bb6ce71ed49463a3d7ecf0..434fba86e04894a3a2c4daeb4582980319d64d8e 100644 +index 465961e0e21fe15c366a492a1de94c6da7bbc51c..bb3e706aae719c8cff904425c09cc3b0f82534f1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -539,6 +539,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -562,6 +562,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } throw new RuntimeException("Unknown settings type"); } diff --git a/patches/unapplied/server/0541-Fixed-TileEntityBell-memory-leak.patch b/patches/server/0515-Fixed-TileEntityBell-memory-leak.patch similarity index 94% rename from patches/unapplied/server/0541-Fixed-TileEntityBell-memory-leak.patch rename to patches/server/0515-Fixed-TileEntityBell-memory-leak.patch index 673852d44b..8f350486f1 100644 --- a/patches/unapplied/server/0541-Fixed-TileEntityBell-memory-leak.patch +++ b/patches/server/0515-Fixed-TileEntityBell-memory-leak.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fixed TileEntityBell memory leak TileEntityBell has a list of entities (entitiesAtRing) that was not being cleared at the right time, causing leaks whenever a bell would be rung near a crowd of entities. diff --git a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java -index 58ee348d0934a8d8743005b4b8e9114cfe1bc028..a71bf0802d04217dd11086901b7148957d32ca89 100644 +index 205db12aa5a8161b07efe7f12da79e9d7bff5cd6..b06e911acb825883c93da73358fa81653e8a0d4a 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java @@ -61,6 +61,11 @@ public class BellBlockEntity extends BlockEntity { diff --git a/patches/unapplied/server/0542-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/0516-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch similarity index 93% rename from patches/unapplied/server/0542-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch rename to patches/server/0516-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch index 3ffcccab2e..d61dbeae68 100644 --- a/patches/unapplied/server/0542-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch +++ b/patches/server/0516-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 45d007c519e80415e34eaf404c03bf104b6f9dc1..5c16566f59535ce61fb3f747a745255cfaa439e8 100644 +index abab779379e60d4b775f7b39cc46943e91c8749c..1037d0a0cdd4fd7aa99a958ee969759c5883fdc0 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -@@ -497,9 +497,15 @@ public class FishingHook extends Projectile { +@@ -496,9 +496,15 @@ public class FishingHook extends Projectile { while (iterator.hasNext()) { ItemStack itemstack1 = (ItemStack) iterator.next(); @@ -29,7 +29,7 @@ index 45d007c519e80415e34eaf404c03bf104b6f9dc1..5c16566f59535ce61fb3f747a745255c playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1); this.level.getCraftServer().getPluginManager().callEvent(playerFishEvent); -@@ -512,8 +518,12 @@ public class FishingHook extends Projectile { +@@ -511,8 +517,12 @@ public class FishingHook extends Projectile { double d2 = entityhuman.getZ() - this.getZ(); double d3 = 0.1D; diff --git a/patches/unapplied/server/0543-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0517-Add-getOfflinePlayerIfCached-String.patch similarity index 88% rename from patches/unapplied/server/0543-Add-getOfflinePlayerIfCached-String.patch rename to patches/server/0517-Add-getOfflinePlayerIfCached-String.patch index 5ae4754cbb..6b7a38b267 100644 --- a/patches/unapplied/server/0543-Add-getOfflinePlayerIfCached-String.patch +++ b/patches/server/0517-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 ab7eae6483a8981f6324f9da671b3d41667c3768..374155f592907fc078dd4747ad7710ee83d7da50 100644 +index cd98fa713ecd0cb8d4bb2a9211ee9b9b89a04330..5c8dc52d012117ebf9721fb26d3c0e9d84a751f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1763,6 +1763,28 @@ public final class CraftServer implements Server { +@@ -1808,6 +1808,28 @@ public final class CraftServer implements Server { return result; } diff --git a/patches/unapplied/server/0544-Add-ignore-discounts-API.patch b/patches/server/0518-Add-ignore-discounts-API.patch similarity index 96% rename from patches/unapplied/server/0544-Add-ignore-discounts-API.patch rename to patches/server/0518-Add-ignore-discounts-API.patch index 55a1ac4273..cfd1698df4 100644 --- a/patches/unapplied/server/0544-Add-ignore-discounts-API.patch +++ b/patches/server/0518-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 64d5ddb8ce06e17e1a4dee284ba4c6ecfcdae11e..2eb60384b244a5c1dc8bcbeb59c8adc69e3f18cd 100644 +index 785fcb94d707b6790ef2191f7c9db77d253e9c6d..353ee3699c7c7e40dc920e687055d82e23f02008 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -474,6 +474,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -475,6 +475,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler while (iterator.hasNext()) { MerchantOffer merchantrecipe = (MerchantOffer) iterator.next(); @@ -16,7 +16,7 @@ index 64d5ddb8ce06e17e1a4dee284ba4c6ecfcdae11e..2eb60384b244a5c1dc8bcbeb59c8adc6 // CraftBukkit start int bonus = -Mth.floor((float) i * merchantrecipe.getPriceMultiplier()); -@@ -493,6 +494,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -494,6 +495,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler while (iterator1.hasNext()) { MerchantOffer merchantrecipe1 = (MerchantOffer) iterator1.next(); @@ -25,7 +25,7 @@ index 64d5ddb8ce06e17e1a4dee284ba4c6ecfcdae11e..2eb60384b244a5c1dc8bcbeb59c8adc6 int k = (int) Math.floor(d0 * (double) merchantrecipe1.getBaseCostA().getCount()); diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java -index 75827fcad36a551d832f4be094167936092b6caf..70b703b920752e7301e4f19cdc07a1a4ceac5e0e 100644 +index 29b65a80e890e7e513336cb78d052c9d2c535a35..e0f1857dc100bc4d68e5e308b984e5eeaef976b5 100644 --- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java +++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java @@ -19,6 +19,7 @@ public class MerchantOffer { diff --git a/patches/unapplied/server/0545-Toggle-for-removing-existing-dragon.patch b/patches/server/0519-Toggle-for-removing-existing-dragon.patch similarity index 85% rename from patches/unapplied/server/0545-Toggle-for-removing-existing-dragon.patch rename to patches/server/0519-Toggle-for-removing-existing-dragon.patch index ab1dafcec6..0e3f8f8e50 100644 --- a/patches/unapplied/server/0545-Toggle-for-removing-existing-dragon.patch +++ b/patches/server/0519-Toggle-for-removing-existing-dragon.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for removing existing dragon diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index b70be9eea934aa88a9597581dbd1fd5662876c2d..568da8f2ef3c5e1412cf13c10b425100af75e902 100644 +index aea942ddba54a23733cb32a0a1d0dcb82e247718..d985472c7982130cfa3a7d85694fd692717fa295 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -72,6 +72,14 @@ public class PaperWorldConfig { +@@ -70,6 +70,14 @@ public class PaperWorldConfig { } } @@ -24,10 +24,10 @@ index b70be9eea934aa88a9597581dbd1fd5662876c2d..568da8f2ef3c5e1412cf13c10b425100 private void keepLoadedRange() { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 9899c70b88fc371963e33caccd7125ef8c333df4..e1d689aa65b8d993c7223d306363366f3adff62f 100644 +index 01fb5d0c18d50e298a891a42428c5c87d6820194..ddfaaac55646527ccd5bb4f5b4d35aa3ddaf34f4 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -212,7 +212,7 @@ public class EndDragonFight { +@@ -216,7 +216,7 @@ public class EndDragonFight { this.dragonUUID = enderDragon.getUUID(); LOGGER.info("Found that there's a dragon still alive ({})", (Object)enderDragon); this.dragonKilled = false; diff --git a/patches/unapplied/server/0546-Fix-client-lag-on-advancement-loading.patch b/patches/server/0520-Fix-client-lag-on-advancement-loading.patch similarity index 95% rename from patches/unapplied/server/0546-Fix-client-lag-on-advancement-loading.patch rename to patches/server/0520-Fix-client-lag-on-advancement-loading.patch index f66ea6fcf9..5d872f5877 100644 --- a/patches/unapplied/server/0546-Fix-client-lag-on-advancement-loading.patch +++ b/patches/server/0520-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 f212ca8756782b12a746f86933f46b747481c87e..c0a08c3ac18b3ec0964c61c90df3263c50ece83d 100644 +index 5d5720b2a6cbf9d73b6c7413e4ddc5cc114b9448..ea45befec7e03f48da00f8a77dcae6561745a01e 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -306,7 +306,13 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0547-Item-no-age-no-player-pickup.patch b/patches/server/0521-Item-no-age-no-player-pickup.patch similarity index 100% rename from patches/unapplied/server/0547-Item-no-age-no-player-pickup.patch rename to patches/server/0521-Item-no-age-no-player-pickup.patch diff --git a/patches/unapplied/server/0548-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch b/patches/server/0522-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch similarity index 100% rename from patches/unapplied/server/0548-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch rename to patches/server/0522-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch diff --git a/patches/unapplied/server/0549-Beacon-API-custom-effect-ranges.patch b/patches/server/0523-Beacon-API-custom-effect-ranges.patch similarity index 90% rename from patches/unapplied/server/0549-Beacon-API-custom-effect-ranges.patch rename to patches/server/0523-Beacon-API-custom-effect-ranges.patch index ba5b29b8d5..6da9cb0f32 100644 --- a/patches/unapplied/server/0549-Beacon-API-custom-effect-ranges.patch +++ b/patches/server/0523-Beacon-API-custom-effect-ranges.patch @@ -5,10 +5,10 @@ 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 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba0e1b2788 100644 +index 76a401bcfdacded2137142ed38d739ed65d9fae6..008d486f4166d9f384e3aab48af6d66a255f3564 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 -@@ -79,6 +79,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -78,6 +78,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.secondaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null; } // CraftBukkit end @@ -35,7 +35,7 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba public BeaconBlockEntity(BlockPos pos, BlockState state) { super(BlockEntityType.BEACON, pos, state); -@@ -182,7 +202,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -181,7 +201,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { } if (blockEntity.levels > 0 && !blockEntity.beamSections.isEmpty()) { @@ -44,7 +44,7 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT); } } -@@ -268,8 +288,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -267,8 +287,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { } public static List getHumansInRange(Level world, BlockPos blockposition, int i) { @@ -59,7 +59,7 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D); List list = world.getEntitiesOfClass(Player.class, axisalignedbb); -@@ -310,12 +335,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -309,12 +334,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { } private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect) { @@ -78,7 +78,7 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba BeaconBlockEntity.applyEffect(list, primaryEffect, j, b0, true, pos); // Paper - BeaconEffectEvent -@@ -366,6 +396,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -364,6 +394,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { } this.lockKey = LockCode.fromTag(nbt); @@ -86,16 +86,16 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba } @Override -@@ -379,6 +410,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { +@@ -377,6 +408,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider { } this.lockKey.addToTag(nbt); + nbt.putDouble(PAPER_RANGE_TAG, this.effectRange); // Paper - return nbt; } + public void setCustomName(@Nullable Component customName) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java -index 22e9245b0a0d30972980c6c13a22cb4501c3d3ca..046981c5611d2064811fa34a02218db4a7c1c0c6 100644 +index c186a44b927188ed222f8b2f8f76aaef35d9c654..c47e613cae3d9252a8364ccc4d717e410bb0fc0c 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java @@ -29,7 +29,7 @@ public class CraftBeacon extends CraftBlockEntityState implem diff --git a/patches/unapplied/server/0550-Add-API-for-quit-reason.patch b/patches/server/0524-Add-API-for-quit-reason.patch similarity index 86% rename from patches/unapplied/server/0550-Add-API-for-quit-reason.patch rename to patches/server/0524-Add-API-for-quit-reason.patch index 9e267c361c..dd9103fc8a 100644 --- a/patches/unapplied/server/0550-Add-API-for-quit-reason.patch +++ b/patches/server/0524-Add-API-for-quit-reason.patch @@ -5,7 +5,7 @@ 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 7f6405ac44fef423dc8b21f3dbeaae26a1005077..bdd4f4db9849d9107b5c62d5e83b1277621f49f1 100644 +index d30bc3f1da336b421d9a42070184e07169dd14e4..a6eadf71957b37e2acc5d09f0ce4ee961810891f 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -142,12 +142,15 @@ public class Connection extends SimpleChannelInboundHandler> { @@ -25,22 +25,22 @@ index 7f6405ac44fef423dc8b21f3dbeaae26a1005077..bdd4f4db9849d9107b5c62d5e83b1277 Connection.LOGGER.debug("Failed to sent packet", throwable); ConnectionProtocol enumprotocol = this.getCurrentProtocol(); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index d8df3bcf6ddd87e9fa932f01a41a48a641328f9d..4f1291a1f840000aac782389e4c93b317cbf90d1 100644 +index beebb7a0e6b8b1fa4e7d2f9fdf1962357cc2ebc3..207c566603671685f7d0abbb11274d2027568a05 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -262,6 +262,7 @@ public class ServerPlayer extends Player { - public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks +@@ -254,6 +254,7 @@ public class ServerPlayer extends Player { + public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper + public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper - boolean needsChunkCenterUpdate; // Paper - no-tick view distance + public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 557817c8ac1eadabc11f7f3efc8485b226d7657e..7cfdd686773b8ef67c99f3211c3ed2bf84fb54ea 100644 +index 2dd47eab63cf9322a5844e748709e220272a8cfe..c0a685cfe62aeda3583763ecc1e4fa127f8fb0d4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -443,6 +443,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -442,6 +442,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end @@ -49,10 +49,10 @@ index 557817c8ac1eadabc11f7f3efc8485b226d7657e..7cfdd686773b8ef67c99f3211c3ed2bf this.connection.disconnect(ichatbasecomponent); }); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 4d1d5dacb175e7059a6af036432ef891bcf77970..76e21498b6cfd1c9a601a55e1483eb8dfd892c2e 100644 +index 9cec325fdcfd8b66bbeccb973cbe75ebd423fec4..7b14ca5806afc83f5ba608ec26874244aa3420fd 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -597,7 +597,7 @@ public abstract class PlayerList { +@@ -594,7 +594,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } diff --git a/patches/unapplied/server/0552-Add-Wandering-Trader-spawn-rate-config-options.patch b/patches/server/0525-Add-Wandering-Trader-spawn-rate-config-options.patch similarity index 95% rename from patches/unapplied/server/0552-Add-Wandering-Trader-spawn-rate-config-options.patch rename to patches/server/0525-Add-Wandering-Trader-spawn-rate-config-options.patch index 3c84b3665b..7b341deb90 100644 --- a/patches/unapplied/server/0552-Add-Wandering-Trader-spawn-rate-config-options.patch +++ b/patches/server/0525-Add-Wandering-Trader-spawn-rate-config-options.patch @@ -11,10 +11,10 @@ in IWorldServerData are removed as they were only used in certain places, with h values used in other places. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7ef45c941dacaa1f5cc4f0544af9ec76424cc783..e1aa521a3947b38643866e038c7d0536658c58f2 100644 +index d985472c7982130cfa3a7d85694fd692717fa295..f91cc86a2bf4f77c248ca4f513195b65972e3084 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -80,6 +80,19 @@ public class PaperWorldConfig { +@@ -78,6 +78,19 @@ public class PaperWorldConfig { } } @@ -35,7 +35,7 @@ index 7ef45c941dacaa1f5cc4f0544af9ec76424cc783..e1aa521a3947b38643866e038c7d0536 private void keepLoadedRange() { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index 12aa0fd5b6bada9820c3a08eee47c870f9c183cb..60f08ecd0034e8ef2965b54b3abccce582d0ca54 100644 +index 80a895bad59538acbc88b9cb3392cbc95092a1fe..487dfa0dd39b99994a82ff3858903c28d7676c0d 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java @@ -43,43 +43,53 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -96,7 +96,7 @@ index 12aa0fd5b6bada9820c3a08eee47c870f9c183cb..60f08ecd0034e8ef2965b54b3abccce5 } else { int i = this.spawnChance; -- this.spawnChance = Mth.clamp(this.spawnChance + 25, 25, 75); +- this.spawnChance = Mth.clamp(this.spawnChance + 25, (int) 25, (int) 75); - this.serverLevelData.setWanderingTraderSpawnChance(this.spawnChance); + this.spawnChance = Mth.clamp(i + world.paperConfig.wanderingTraderSpawnChanceFailureIncrement, world.paperConfig.wanderingTraderSpawnChanceMin, world.paperConfig.wanderingTraderSpawnChanceMax); + //this.serverLevelData.setWanderingTraderSpawnChance(this.spawnChance); // Paper - We don't need to save this value to disk if it gets set back to a hardcoded value anyways diff --git a/patches/unapplied/server/0553-Significantly-improve-performance-of-the-end-generat.patch b/patches/server/0526-Significantly-improve-performance-of-the-end-generat.patch similarity index 94% rename from patches/unapplied/server/0553-Significantly-improve-performance-of-the-end-generat.patch rename to patches/server/0526-Significantly-improve-performance-of-the-end-generat.patch index a6386a6a1c..49888cfa4c 100644 --- a/patches/unapplied/server/0553-Significantly-improve-performance-of-the-end-generat.patch +++ b/patches/server/0526-Significantly-improve-performance-of-the-end-generat.patch @@ -12,10 +12,10 @@ Co-authored-by: Dylan Xaldin Co-authored-by: pop4959 diff --git a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java -index 9a64ab092ac8616ed8b9ea5c1e8677dda5c4333c..3f7c4e0938933705ac1bcb8dd676d018088a831a 100644 +index d090bdc063480ee6e28b0d60447ebe4063e6d688..ff0255e7f3c75e9972e8516058c234c7b58a0bd7 100644 --- a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java +++ b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java -@@ -28,6 +28,16 @@ public class TheEndBiomeSource extends BiomeSource { +@@ -29,6 +29,16 @@ public class TheEndBiomeSource extends BiomeSource { private final Biome midlands; private final Biome islands; private final Biome barrens; @@ -32,7 +32,7 @@ index 9a64ab092ac8616ed8b9ea5c1e8677dda5c4333c..3f7c4e0938933705ac1bcb8dd676d018 public TheEndBiomeSource(Registry biomeRegistry, long seed) { this(biomeRegistry, seed, biomeRegistry.getOrThrow(Biomes.THE_END), biomeRegistry.getOrThrow(Biomes.END_HIGHLANDS), biomeRegistry.getOrThrow(Biomes.END_MIDLANDS), biomeRegistry.getOrThrow(Biomes.SMALL_END_ISLANDS), biomeRegistry.getOrThrow(Biomes.END_BARRENS)); -@@ -87,12 +97,26 @@ public class TheEndBiomeSource extends BiomeSource { +@@ -88,12 +98,26 @@ public class TheEndBiomeSource extends BiomeSource { float f = 100.0F - Mth.sqrt((long) i * (long) i + (long) j * (long) j) * 8.0F; // Paper - cast ints to long to avoid integer overflow f = Mth.clamp(f, -100.0F, 80.0F); diff --git a/patches/unapplied/server/0554-Expose-world-spawn-angle.patch b/patches/server/0527-Expose-world-spawn-angle.patch similarity index 88% rename from patches/unapplied/server/0554-Expose-world-spawn-angle.patch rename to patches/server/0527-Expose-world-spawn-angle.patch index 9ff3ea8dfe..da38c20783 100644 --- a/patches/unapplied/server/0554-Expose-world-spawn-angle.patch +++ b/patches/server/0527-Expose-world-spawn-angle.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index d95403513eb3b497187d9a93ea8230a632025d79..51764416bc8adcd3bca28200453e57e6e52cab5b 100644 +index 7b14ca5806afc83f5ba608ec26874244aa3420fd..1d7e5d0f155dd92015dcf287b8a21d0337fc2af7 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -875,7 +875,7 @@ public abstract class PlayerList { +@@ -872,7 +872,7 @@ public abstract class PlayerList { if (location == null) { worldserver1 = this.server.getLevel(Level.OVERWORLD); blockposition = entityplayer1.getSpawnPoint(worldserver1); @@ -18,7 +18,7 @@ index d95403513eb3b497187d9a93ea8230a632025d79..51764416bc8adcd3bca28200453e57e6 Player respawnPlayer = entityplayer1.getBukkitEntity(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c21b98fbd9b410e0e993f3073e5cbb37015776eb..9088d41108fa355850def4a9afcca6439c406fc3 100644 +index 1f12da32b5bc10f77a5b8f4a9b32cbb89d7f2968..48557c6fdf9ffcce52713fc47ccf0ac9a9f73d0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -236,7 +236,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0555-Add-Destroy-Speed-API.patch b/patches/server/0528-Add-Destroy-Speed-API.patch similarity index 90% rename from patches/unapplied/server/0555-Add-Destroy-Speed-API.patch rename to patches/server/0528-Add-Destroy-Speed-API.patch index 4ea9ee5e19..7dd915adbf 100644 --- a/patches/unapplied/server/0555-Add-Destroy-Speed-API.patch +++ b/patches/server/0528-Add-Destroy-Speed-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Destroy Speed API Co-authored-by: Jake Potrebic diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index fd4a0bbd1438bfc94580f29382d0c5f50531292b..6d79409f58715038de1e9e397e73f8739fb9dca2 100644 +index e69b1831cbfdff3f2b1e4be4d5de313bfe724795..f0d5c3a182acc8a2ccb936e98376f2840892be28 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -622,5 +622,23 @@ public class CraftBlock implements Block { +@@ -635,5 +635,23 @@ public class CraftBlock implements Block { public String translationKey() { return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this); } diff --git a/patches/unapplied/server/0556-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0529-Fix-Player-spawnParticle-x-y-z-precision-loss.patch similarity index 89% rename from patches/unapplied/server/0556-Fix-Player-spawnParticle-x-y-z-precision-loss.patch rename to patches/server/0529-Fix-Player-spawnParticle-x-y-z-precision-loss.patch index ccf24cf36a..03d9cdbfc7 100644 --- a/patches/unapplied/server/0556-Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/patches/server/0529-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 23ada9f9b9d4969c7a9e493906d51a4293462305..d082e6e43ac638c353ae22a46c128c151a39424d 100644 +index bb3e706aae719c8cff904425c09cc3b0f82534f1..f4a94bc00a8318af810c3c859decbf88decfa98d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2075,7 +2075,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2069,7 +2069,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (data != null && !particle.getDataType().isInstance(data)) { throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass()); } diff --git a/patches/unapplied/server/0557-Add-LivingEntity-clearActiveItem.patch b/patches/server/0530-Add-LivingEntity-clearActiveItem.patch similarity index 90% rename from patches/unapplied/server/0557-Add-LivingEntity-clearActiveItem.patch rename to patches/server/0530-Add-LivingEntity-clearActiveItem.patch index 7fe7e594b8..6b43687673 100644 --- a/patches/unapplied/server/0557-Add-LivingEntity-clearActiveItem.patch +++ b/patches/server/0530-Add-LivingEntity-clearActiveItem.patch @@ -5,7 +5,7 @@ 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 95f08ceb8cf7ea91a6b7b53ada22b30965384083..37d8519c9c653be0eb60563dc5811a1202a662dd 100644 +index 537d1a6dcf8add34e8dac8aee2fa50c50ce7e5d0..24ffc967391c9ba175f41396a90007ecdc32f55c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -805,6 +805,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0558-Add-PlayerItemCooldownEvent.patch b/patches/server/0531-Add-PlayerItemCooldownEvent.patch similarity index 100% rename from patches/unapplied/server/0558-Add-PlayerItemCooldownEvent.patch rename to patches/server/0531-Add-PlayerItemCooldownEvent.patch diff --git a/patches/unapplied/server/0559-More-lightning-API.patch b/patches/server/0532-More-lightning-API.patch similarity index 100% rename from patches/unapplied/server/0559-More-lightning-API.patch rename to patches/server/0532-More-lightning-API.patch diff --git a/patches/unapplied/server/0560-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0533-Climbing-should-not-bypass-cramming-gamerule.patch similarity index 78% rename from patches/unapplied/server/0560-Climbing-should-not-bypass-cramming-gamerule.patch rename to patches/server/0533-Climbing-should-not-bypass-cramming-gamerule.patch index c8a88b5795..4c1a954b8e 100644 --- a/patches/unapplied/server/0560-Climbing-should-not-bypass-cramming-gamerule.patch +++ b/patches/server/0533-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/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e1aa521a3947b38643866e038c7d0536658c58f2..a6cfc237fe5e06d43732dcd76b3a52a886ae8fe3 100644 +index f91cc86a2bf4f77c248ca4f513195b65972e3084..daab716a75e39dfb62b5d9db5fa55b4dd13ac1ed 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -93,6 +93,11 @@ public class PaperWorldConfig { +@@ -91,6 +91,11 @@ public class PaperWorldConfig { wanderingTraderSpawnChanceMax = getInt("wandering-trader.spawn-chance-max", wanderingTraderSpawnChanceMax); } @@ -21,10 +21,10 @@ index e1aa521a3947b38643866e038c7d0536658c58f2..a6cfc237fe5e06d43732dcd76b3a52a8 private void keepLoadedRange() { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 368c80ac596b66396985521e6e8c6aee6af26697..7e0f711ded0ecf0b94a79f69a3d75c2afa57c5a9 100644 +index 2da1f5611d4c515107895692b9456e0800fb3cd3..11cb360e71b3f2e3d6821162af91d6752e8d17c0 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1749,6 +1749,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -1743,6 +1743,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public boolean isPushable() { @@ -38,10 +38,10 @@ index 368c80ac596b66396985521e6e8c6aee6af26697..7e0f711ded0ecf0b94a79f69a3d75c2a } diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java -index 8fb89326395a7e70982c0d757b506565e98b12a4..a060cca08631fb42041e3a79a9abc422fe7757af 100644 +index 22f36cd3df49160f1b6668befdd05c2268edaa49..e39965c2e50bc8ee424ea07819346e0611398e28 100644 --- a/src/main/java/net/minecraft/world/entity/EntitySelector.java +++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java -@@ -44,11 +44,17 @@ public final class EntitySelector { +@@ -45,11 +45,17 @@ public final class EntitySelector { } public static Predicate pushableBy(Entity entity) { @@ -61,19 +61,19 @@ index 8fb89326395a7e70982c0d757b506565e98b12a4..a060cca08631fb42041e3a79a9abc422 } 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 40964014376aa911f412f6a5b717c6cf523530ab..327199d0e002bb7e7c2194fb54c213e837dd8dd8 100644 +index 2e02fc6d9c54bd246602b8535553dd04c4e26679..de90fc7af633576a33b0d35715c3cb68bb9f5b21 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3277,7 +3277,7 @@ public abstract class LivingEntity extends Entity { +@@ -3276,7 +3276,7 @@ public abstract class LivingEntity extends Entity { return; } // Paper end - don't run getEntities if we're not going to use its result -- List list = this.level.getEntities(this, this.getBoundingBox(), EntitySelector.pushableBy(this)); -+ List list = this.level.getEntities(this, this.getBoundingBox(), EntitySelector.pushable(this, level.paperConfig.fixClimbingBypassingCrammingRule)); // Paper - fix climbing bypassing cramming rule +- List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this)); ++ List list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushable(this, level.paperConfig.fixClimbingBypassingCrammingRule)); // Paper - fix climbing bypassing cramming rule if (!list.isEmpty()) { // Paper - move up -@@ -3444,9 +3444,16 @@ public abstract class LivingEntity extends Entity { +@@ -3447,9 +3447,16 @@ public abstract class LivingEntity extends Entity { return !this.isRemoved() && this.collides; // CraftBukkit } @@ -92,7 +92,7 @@ index 40964014376aa911f412f6a5b717c6cf523530ab..327199d0e002bb7e7c2194fb54c213e8 // CraftBukkit start - collidable API diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java -index ee55623cddc6d9e0dde5f384d66a750b92cc4f0e..9ed2f8f2843c634fd14dda4459f85b7140dd447a 100644 +index 3b34f1e7ae8aa33d957a9ff7ebe4a8e7fed73f3c..29dfbcecfbb2560e6ecde997abd5224a16c08c94 100644 --- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java @@ -83,7 +83,7 @@ public class Bat extends AmbientCreature { @@ -105,10 +105,10 @@ index ee55623cddc6d9e0dde5f384d66a750b92cc4f0e..9ed2f8f2843c634fd14dda4459f85b71 } 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 57378e42d6ef1be70a0abcca846cab9108c76783..ae21d260b2d4673eb4aa56a82e1043d20507adb2 100644 +index daec622f4b47c5ccd474ae7f56042fa6434091e1..dd80d9e0614445ba088c295784dc30584dedaa2b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java -@@ -380,8 +380,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { +@@ -383,8 +383,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal { } @Override @@ -120,10 +120,10 @@ index 57378e42d6ef1be70a0abcca846cab9108c76783..ae21d260b2d4673eb4aa56a82e1043d2 @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -index c613a5e4d3ae360ce3eed312c5eecc553fae0066..630b6491ee186e1e3f17489311a91681e52b7ff5 100644 +index e63f55df91d301b18c63ba94dc19966155916b65..cd278a859c87fc89c421378ffab1bd36a45bd65d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -@@ -239,7 +239,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, +@@ -241,7 +241,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, } @Override @@ -133,10 +133,10 @@ index c613a5e4d3ae360ce3eed312c5eecc553fae0066..630b6491ee186e1e3f17489311a91681 } diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index c5e9273055ff7302941b7475d8175be53eaece1f..02bce120fc93caa9e1e92b61e74c28209a1b2385 100644 +index 0d468631b9c260091e732925da43c177ebda892f..e5ef24d92de21c4c0e6a98e06985e52d47bfdce0 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -345,7 +345,7 @@ public class ArmorStand extends LivingEntity { +@@ -344,7 +344,7 @@ public class ArmorStand extends LivingEntity { } @Override @@ -146,10 +146,10 @@ index c5e9273055ff7302941b7475d8175be53eaece1f..02bce120fc93caa9e1e92b61e74c2820 } 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 fa889f93a5c6782957bdbf803915cb5e80e05f3e..9653b142c199c068e4d6175bcd3cbecb6465853f 100644 +index 6f9cbba0c063b272afd6aacc3eab02df405b3061..75cff07051d3b81d37926fb1da50af5ba27c34dc 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -149,7 +149,7 @@ public abstract class AbstractMinecart extends Entity { +@@ -148,7 +148,7 @@ public abstract class AbstractMinecart extends Entity { } @Override @@ -159,7 +159,7 @@ index fa889f93a5c6782957bdbf803915cb5e80e05f3e..9653b142c199c068e4d6175bcd3cbecb } 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 3f1059569da23bd02c00279050bf7bce7a160462..a1b93f2878e22fa1d0cad639416d2dc5b8339c73 100644 +index 11632004d16fe254e7b20cf6db25d4fc24887867..b4516094996c80886b8d7af599ba7c3d4229ba9d 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java @@ -158,7 +158,7 @@ public class Boat extends Entity { diff --git a/patches/unapplied/server/0561-Added-missing-default-perms-for-commands.patch b/patches/server/0534-Added-missing-default-perms-for-commands.patch similarity index 100% rename from patches/unapplied/server/0561-Added-missing-default-perms-for-commands.patch rename to patches/server/0534-Added-missing-default-perms-for-commands.patch diff --git a/patches/unapplied/server/0562-Add-PlayerShearBlockEvent.patch b/patches/server/0535-Add-PlayerShearBlockEvent.patch similarity index 95% rename from patches/unapplied/server/0562-Add-PlayerShearBlockEvent.patch rename to patches/server/0535-Add-PlayerShearBlockEvent.patch index 0fde3c457f..aa9a8b1203 100644 --- a/patches/unapplied/server/0562-Add-PlayerShearBlockEvent.patch +++ b/patches/server/0535-Add-PlayerShearBlockEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerShearBlockEvent diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java -index 96bc2cc1e3005a5273b8834569f5dee5c3a08293..d3b85a29662d33d458cfd4d7942b8e2d2264b750 100644 +index 56d2e0ca2414c2f1fdde3f1d9a3aa3c93fb46b03..bcfd5bfa7839738396b6137effc3f66c445c2e0c 100644 --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java -@@ -115,7 +115,7 @@ public class BeehiveBlock extends BaseEntityBlock { +@@ -116,7 +116,7 @@ public class BeehiveBlock extends BaseEntityBlock { } public static void dropHoneycomb(Level world, BlockPos pos) { @@ -17,7 +17,7 @@ index 96bc2cc1e3005a5273b8834569f5dee5c3a08293..d3b85a29662d33d458cfd4d7942b8e2d } @Override -@@ -128,8 +128,19 @@ public class BeehiveBlock extends BaseEntityBlock { +@@ -129,8 +129,19 @@ public class BeehiveBlock extends BaseEntityBlock { Item item = itemstack.getItem(); if (itemstack.is(Items.SHEARS)) { diff --git a/patches/unapplied/server/0564-Fix-curing-zombie-villager-discount-exploit.patch b/patches/server/0536-Fix-curing-zombie-villager-discount-exploit.patch similarity index 89% rename from patches/unapplied/server/0564-Fix-curing-zombie-villager-discount-exploit.patch rename to patches/server/0536-Fix-curing-zombie-villager-discount-exploit.patch index cc985dd925..882296d82c 100644 --- a/patches/unapplied/server/0564-Fix-curing-zombie-villager-discount-exploit.patch +++ b/patches/server/0536-Fix-curing-zombie-villager-discount-exploit.patch @@ -8,10 +8,10 @@ and curing a villager on repeat by simply resetting the relevant part of the reputation when it is cured. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index a6cfc237fe5e06d43732dcd76b3a52a886ae8fe3..87e3f45057bde15e10b5bb55a9be6e9b6131e254 100644 +index daab716a75e39dfb62b5d9db5fa55b4dd13ac1ed..458a17d7b0cc1ee9dcdb7ca9e6cd571033ecfacb 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -98,6 +98,11 @@ public class PaperWorldConfig { +@@ -96,6 +96,11 @@ public class PaperWorldConfig { fixClimbingBypassingCrammingRule = getBoolean("fix-climbing-bypassing-cramming-rule", fixClimbingBypassingCrammingRule); } @@ -24,10 +24,10 @@ index a6cfc237fe5e06d43732dcd76b3a52a886ae8fe3..87e3f45057bde15e10b5bb55a9be6e9b private void keepLoadedRange() { keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16); 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 2eb60384b244a5c1dc8bcbeb59c8adc69e3f18cd..b746453774054dd2db023b7eea265a395cfc7cc9 100644 +index 353ee3699c7c7e40dc920e687055d82e23f02008..dbd17107f08c218d88ef075fc04823b83083648b 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -1056,6 +1056,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -1059,6 +1059,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override public void onReputationEventFrom(ReputationEventType interaction, Entity entity) { if (interaction == ReputationEventType.ZOMBIE_VILLAGER_CURED) { diff --git a/patches/unapplied/server/0565-Limit-recipe-packets.patch b/patches/server/0537-Limit-recipe-packets.patch similarity index 86% rename from patches/unapplied/server/0565-Limit-recipe-packets.patch rename to patches/server/0537-Limit-recipe-packets.patch index 570b251e15..78a16a98eb 100644 --- a/patches/unapplied/server/0565-Limit-recipe-packets.patch +++ b/patches/server/0537-Limit-recipe-packets.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 380c4f46b98e6296cf28568abb1e74a80278ffa0..288310df8ca9eff6901d906b48ba7cd1b6bc8ae3 100644 +index c0c807522aaa82ca74c47849b47e6b6b48b9a6f8..1de3d8848419fce792e28c8100eca1b2488ac968 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java -@@ -355,6 +355,13 @@ public class PaperConfig { +@@ -365,6 +365,13 @@ public class PaperConfig { tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit); } @@ -23,18 +23,18 @@ index 380c4f46b98e6296cf28568abb1e74a80278ffa0..288310df8ca9eff6901d906b48ba7cd1 public static boolean velocityOnlineMode; public static byte[] velocitySecretKey; diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7cfdd686773b8ef67c99f3211c3ed2bf84fb54ea..7a4766d4fd86b6f0ab725955e364c631d37752b6 100644 +index c0a685cfe62aeda3583763ecc1e4fa127f8fb0d4..ff36ca2dbdf4a9abb953097f1b6246a177370b02 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -231,6 +231,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -230,6 +230,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser // CraftBukkit start - multithreaded fields - private AtomicInteger chatSpamTickCount = new AtomicInteger(); + private final AtomicInteger chatSpamTickCount = new AtomicInteger(); private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits + private final java.util.concurrent.atomic.AtomicInteger recipeSpamPackets = new java.util.concurrent.atomic.AtomicInteger(); // Paper - auto recipe limit // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -376,6 +377,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -375,6 +376,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable @@ -42,7 +42,7 @@ index 7cfdd686773b8ef67c99f3211c3ed2bf84fb54ea..7a4766d4fd86b6f0ab725955e364c631 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -2801,6 +2803,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2810,6 +2812,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @Override public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { diff --git a/patches/unapplied/server/0566-Fix-CraftSound-backwards-compatibility.patch b/patches/server/0538-Fix-CraftSound-backwards-compatibility.patch similarity index 100% rename from patches/unapplied/server/0566-Fix-CraftSound-backwards-compatibility.patch rename to patches/server/0538-Fix-CraftSound-backwards-compatibility.patch