diff --git a/Paper-MojangAPI/build.gradle.kts b/Paper-MojangAPI/build.gradle.kts index a278ee93d7..e60be45e25 100644 --- a/Paper-MojangAPI/build.gradle.kts +++ b/Paper-MojangAPI/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { testImplementation("junit:junit:4.13.2") testImplementation("org.hamcrest:hamcrest-library:1.3") - testImplementation("org.ow2.asm:asm-tree:9.2") + testImplementation("org.ow2.asm:asm-tree:9.7") } configure { diff --git a/patches/api/0001-Convert-project-to-Gradle.patch b/patches/api/0001-Convert-project-to-Gradle.patch index 4bcaee9295..f58981795e 100644 --- a/patches/api/0001-Convert-project-to-Gradle.patch +++ b/patches/api/0001-Convert-project-to-Gradle.patch @@ -27,7 +27,7 @@ index 5dd700a956e915c00b25d91dea8d6f285ddab72b..97e78e27ee0eea2c8b24886eeb19164d +/.factorypath diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 -index 0000000000000000000000000000000000000000..4311f6dde7372a069f462158fba76d9d4b72e23a +index 0000000000000000000000000000000000000000..4756a5aa04f8a8f0a8f9ff2c7aa6776b5a6892a5 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,91 @@ @@ -63,8 +63,8 @@ index 0000000000000000000000000000000000000000..4311f6dde7372a069f462158fba76d9d + testImplementation("org.apache.commons:commons-lang3:3.12.0") + testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") + testImplementation("org.hamcrest:hamcrest:2.2") -+ testImplementation("org.mockito:mockito-core:5.5.0") -+ testImplementation("org.ow2.asm:asm-tree:9.5") ++ testImplementation("org.mockito:mockito-core:5.11.0") ++ testImplementation("org.ow2.asm:asm-tree:9.7") +} + +configure { @@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..4311f6dde7372a069f462158fba76d9d +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index 0861b44936958613beba670b0d82e21d3aaf388b..0000000000000000000000000000000000000000 +index 931d1a0215f54a4ff172b1b6db2ab06c41cd0c39..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,277 +0,0 @@ @@ -237,13 +237,13 @@ index 0861b44936958613beba670b0d82e21d3aaf388b..00000000000000000000000000000000 - - org.mockito - mockito-core -- 5.5.0 +- 5.11.0 - test - - - org.ow2.asm - asm-tree -- 9.5 +- 9.7 - test - - diff --git a/patches/api/0004-Code-Generation.patch b/patches/api/0004-Code-Generation.patch index 294139088b..33dd524ef9 100644 --- a/patches/api/0004-Code-Generation.patch +++ b/patches/api/0004-Code-Generation.patch @@ -7,7 +7,7 @@ Currently includes generated key holder classes for types used in the Registry Modification API diff --git a/build.gradle.kts b/build.gradle.kts -index 948bd84db9923ef43cf753b7b72bf4d0081ab43a..4ee1aed72727e911bff4ac91bcacfd8eee87ecfc 100644 +index be4d301b305f5cd92d2ff352bfb9c6ff9f82fd9b..01e3a5ba74f8d4c4c2eb010b289e2a7785b11bcc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ @@ -19,7 +19,7 @@ index 948bd84db9923ef43cf753b7b72bf4d0081ab43a..4ee1aed72727e911bff4ac91bcacfd8e java { @@ -45,6 +46,22 @@ dependencies { - testImplementation("org.ow2.asm:asm-tree:9.5") + testImplementation("org.ow2.asm:asm-tree:9.7") } +// Paper start diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch index 6e3f2c5ebd..3bf28e3242 100644 --- a/patches/api/0006-Adventure.patch +++ b/patches/api/0006-Adventure.patch @@ -8,7 +8,7 @@ Co-authored-by: Jake Potrebic Co-authored-by: Yannick Lamprecht diff --git a/build.gradle.kts b/build.gradle.kts -index b3df8cf8d32a4cc99a3a3950f146cdab65826e1b..9011451c6a60db08dcc255a84470f8ce92f7b2a4 100644 +index f605e7e0f812a2297b1cecf3f37b69a8edc6b4a5..e3748b4b39529fde27e5bb00597a56becdf0843c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,12 +11,28 @@ java { @@ -1493,7 +1493,7 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68 + // Paper end } diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 6ca5f7a85087ca1c7e5e2d940bd3c65b84d2d356..0f902aec66ec550f80709f7f314ca90d374ebb53 100644 +index ef3c0410ba4f88ec8b51e79abdc97777fdc00d31..913cf8308840ca1f365eb1f456f64b96046ed060 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -30,6 +30,15 @@ import org.jetbrains.annotations.Nullable; @@ -1525,7 +1525,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb return warning == null || warning.value(); } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 0fd2e9ee1a8cf4456a1e5fe6579d767c5dcb4d9a..d76db156a7eeefaac3c96d2d547fddecefbd863e 100644 +index 28193b8e3c79e14af2ce47857a717f9dd4f1fa42..b53f24c0368ff4e4f5287f1699643a0c00579031 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable; @@ -1537,7 +1537,7 @@ index 0fd2e9ee1a8cf4456a1e5fe6579d767c5dcb4d9a..d76db156a7eeefaac3c96d2d547fddec /** * Gets the {@link Block} at the given coordinates -@@ -608,6 +608,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -617,6 +617,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public List getPlayers(); @@ -2180,10 +2180,10 @@ index b7d8dd30360a38dbdc7bbce40c8e6ced7261f833..0817f2395c2b18828565435568ce651f public void sendRawMessage(@Nullable UUID sender, @NotNull String message); } diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java -index c349cd16de02981392a8788ddaa3152e901aacff..6a915b5b41daa5ea64913a2d5c611a6167168395 100644 +index a456e43308b95f51beed2159e6baf00f32702a71..350d52f4dd97a7e6a6a9a967e1c6a8781feda22e 100644 --- a/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java -@@ -295,6 +295,19 @@ public abstract class Enchantment implements Keyed { +@@ -296,6 +296,19 @@ public abstract class Enchantment implements Keyed, Translatable { * @return True if the enchantment may be applied, otherwise False */ public abstract boolean canEnchantItem(@NotNull ItemStack item); @@ -4356,7 +4356,7 @@ index 88cdce67e6a55712cb56e946f2f09c82ddbc1d15..e76c847e57f3d32757129d56922862a4 + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/meta/BookMeta.java b/src/main/java/org/bukkit/inventory/meta/BookMeta.java -index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401958fb227 100644 +index fc94719f702f23da8de5340d7f9e9b9d0c9d7c66..86c9e4229a1936c5893016e5b8087aa9fd06ddab 100644 --- a/src/main/java/org/bukkit/inventory/meta/BookMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/BookMeta.java @@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable; @@ -4510,7 +4510,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401 /** @@ -157,7 +266,9 @@ public interface BookMeta extends ItemMeta { - * pages. Maximum 100 pages with 256 characters per page. + * pages. Maximum 100 pages with 1024 characters per page. * * @param pages A list of pages to set the book to use + * @deprecated in favour of {@link #pages(List)} @@ -4520,7 +4520,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401 /** @@ -165,7 +276,9 @@ public interface BookMeta extends ItemMeta { - * pages. Maximum 50 pages with 256 characters per page. + * pages. Maximum 100 pages with 1024 characters per page. * * @param pages A list of strings, each being a page + * @deprecated in favour of {@link #pages(net.kyori.adventure.text.Component...)} @@ -4530,7 +4530,7 @@ index 94852d50e88d0594b84b581cd627174043629995..be7c2cfc757e4dd15927be850739d401 /** @@ -173,7 +286,9 @@ public interface BookMeta extends ItemMeta { - * 256 characters per page. + * 1024 characters per page. * * @param pages A list of strings, each being a page + * @deprecated in favour of {@link #addPages(net.kyori.adventure.text.Component...)} @@ -4695,6 +4695,58 @@ index 9f159ac909ad5287b719cee331db5c44654ec547..f1fcc844d563a0108230676dec84ef25 void setLore(@Nullable List lore); /** +diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java +index eb80f24da65918a21a2fa6691eeb64b621febaf4..941fac4eee338870d8c30cb1f64cab572cf54548 100644 +--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java ++++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java +@@ -51,4 +51,21 @@ public interface TrimMaterial extends Keyed, Translatable { + * {@link Material#AMETHYST_SHARD}. + */ + public static final TrimMaterial AMETHYST = Registry.TRIM_MATERIAL.get(NamespacedKey.minecraft("amethyst")); ++ ++ // Paper start - adventure ++ /** ++ * Get the description of this {@link TrimMaterial}. ++ * ++ * @return the description ++ */ ++ net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component description(); ++ ++ /** ++ * @deprecated this method assumes that {@link #description()} will ++ * always be a translatable component which is not guaranteed. ++ */ ++ @Override ++ @Deprecated(forRemoval = true) ++ @org.jetbrains.annotations.NotNull String getTranslationKey(); ++ // Paper end - adventure + } +diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java +index ccf02c79e2784de75273f5ad7f83ce5c33a688fe..3fa087d09c7c2d864eea25659951a537359c9589 100644 +--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java ++++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java +@@ -75,4 +75,21 @@ public interface TrimPattern extends Keyed, Translatable { + * {@link Material#HOST_ARMOR_TRIM_SMITHING_TEMPLATE}. + */ + public static final TrimPattern HOST = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("host")); ++ ++ // Paper start - adventure ++ /** ++ * Get the description of this {@link TrimPattern}. ++ * ++ * @return the description ++ */ ++ net.kyori.adventure.text.@org.jetbrains.annotations.NotNull Component description(); ++ ++ /** ++ * @deprecated this method assumes that {@link #description()} will ++ * always be a translatable component which is not guaranteed. ++ */ ++ @Override ++ @Deprecated(forRemoval = true) ++ @org.jetbrains.annotations.NotNull String getTranslationKey(); ++ // Paper end - adventure + } diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java index b90fd819a781d3a2117ffa25f0864b1576901f9f..7d4f4970dae6fe4eeea6b6b6810dcecfe20d6e51 100644 --- a/src/main/java/org/bukkit/map/MapCursor.java diff --git a/patches/api/0008-Use-ASM-for-event-executors.patch b/patches/api/0008-Use-ASM-for-event-executors.patch index 541827e36a..65ce1716a1 100644 --- a/patches/api/0008-Use-ASM-for-event-executors.patch +++ b/patches/api/0008-Use-ASM-for-event-executors.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors. Uses method handles for private or static methods. diff --git a/build.gradle.kts b/build.gradle.kts -index b577114c2b89fe2053123d1a542d37dff7fa8d5a..af6c528ccc4356f5bba3ce0b9bf6de237d77376e 100644 +index e3748b4b39529fde27e5bb00597a56becdf0843c..2aca0a8feffc844ee19480d70a1a9971790d1621 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,6 +47,9 @@ dependencies { @@ -14,8 +14,8 @@ index b577114c2b89fe2053123d1a542d37dff7fa8d5a..af6c528ccc4356f5bba3ce0b9bf6de23 apiAndDocs("net.kyori:adventure-text-serializer-plain") apiAndDocs("net.kyori:adventure-text-logger-slf4j") + -+ implementation("org.ow2.asm:asm:9.5") -+ implementation("org.ow2.asm:asm-commons:9.5") ++ implementation("org.ow2.asm:asm:9.7") ++ implementation("org.ow2.asm:asm-commons:9.7") // Paper end compileOnly("org.apache.maven:maven-resolver-provider:3.9.6") diff --git a/patches/api/0009-Paper-Plugins.patch b/patches/api/0009-Paper-Plugins.patch index 8a8150ca50..f938e2be49 100644 --- a/patches/api/0009-Paper-Plugins.patch +++ b/patches/api/0009-Paper-Plugins.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Paper Plugins diff --git a/build.gradle.kts b/build.gradle.kts -index af6c528ccc4356f5bba3ce0b9bf6de237d77376e..f9ff7e3692d448e2a1e38d0aa26c2d934442e247 100644 +index 2aca0a8feffc844ee19480d70a1a9971790d1621..f9a9066e3e6a355acd5ddb3b0308b5b3b36b82f2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,7 +52,7 @@ dependencies { - implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm-commons:9.7") // Paper end - compileOnly("org.apache.maven:maven-resolver-provider:3.9.6") @@ -1347,10 +1347,10 @@ index 0000000000000000000000000000000000000000..6bf3d212a6156ad9ab0e82d1ca0a04f8 + +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 0f902aec66ec550f80709f7f314ca90d374ebb53..20efbec3eabb21806a532422130f7904d2c0967e 100644 +index 913cf8308840ca1f365eb1f456f64b96046ed060..6e46302c272b468375f2de3f7f992f55f13805b8 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -127,4 +127,13 @@ public interface UnsafeValues { +@@ -129,4 +129,13 @@ public interface UnsafeValues { @ApiStatus.Internal @NotNull DamageSource.Builder createDamageSourceBuilder(@NotNull DamageType damageType); diff --git a/patches/api/0011-Timings-v2.patch b/patches/api/0011-Timings-v2.patch index 143dd1027a..d2e13bb2d4 100644 --- a/patches/api/0011-Timings-v2.patch +++ b/patches/api/0011-Timings-v2.patch @@ -2897,7 +2897,7 @@ index 6aed59819cc3d70f1b5975c3c7df40cc0b0afd8a..baa02b5223769755670c611ca4d6acc7 * Sends the component to the player * diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 20efbec3eabb21806a532422130f7904d2c0967e..853ef6f7f0cd2e5679688c40ce715b30473c3ce3 100644 +index 6e46302c272b468375f2de3f7f992f55f13805b8..01e796e487cc16710f51b457466a37ba70e1e665 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -40,6 +40,7 @@ public interface UnsafeValues { @@ -2908,7 +2908,7 @@ index 20efbec3eabb21806a532422130f7904d2c0967e..853ef6f7f0cd2e5679688c40ce715b30 Material toLegacy(Material material); Material fromLegacy(Material material); -@@ -136,4 +137,12 @@ public interface UnsafeValues { +@@ -138,4 +139,12 @@ public interface UnsafeValues { return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion()); } // Paper end diff --git a/patches/api/0015-Version-Command-2.0.patch b/patches/api/0015-Version-Command-2.0.patch index e2ef50e555..32edafcf60 100644 --- a/patches/api/0015-Version-Command-2.0.patch +++ b/patches/api/0015-Version-Command-2.0.patch @@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7 + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 853ef6f7f0cd2e5679688c40ce715b30473c3ce3..688fccdbc5cf831008ef2f27db9d15b0921a7561 100644 +index 01e796e487cc16710f51b457466a37ba70e1e665..d69e5fa40702c283c370a2f712b51dc2ea3a1fa0 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -144,5 +144,12 @@ public interface UnsafeValues { +@@ -146,5 +146,12 @@ public interface UnsafeValues { * @return name */ String getTimingsServerName(); diff --git a/patches/api/0018-Add-view-distance-API.patch b/patches/api/0018-Add-view-distance-API.patch index 5500519c96..7de7e75f55 100644 --- a/patches/api/0018-Add-view-distance-API.patch +++ b/patches/api/0018-Add-view-distance-API.patch @@ -8,10 +8,10 @@ Add per player no-tick, tick, and send view distances. Also add send/no-tick view distance to World. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index d76db156a7eeefaac3c96d2d547fddecefbd863e..41a181b890e029f99e52ae9aad28a86f28005f9e 100644 +index b53f24c0368ff4e4f5287f1699643a0c00579031..7176e37b37c0d22605240f3c5fd34ff7846256c9 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2916,6 +2916,66 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2925,6 +2925,66 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public Set getFeatureFlags(); diff --git a/patches/api/0027-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/api/0027-Add-methods-for-working-with-arrows-stuck-in-living-.patch index a6600ee445..d8850b339e 100644 --- a/patches/api/0027-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/patches/api/0027-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -7,10 +7,10 @@ Upstream added methods for this so the original methods are now deprecated diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..eb8dcf3dc9acb171fec5b25342a9a38d7f9bcb36 100644 +index 67632eae9249f2c65a9dfe04c72a3002a9e8b25b..10eeb304bc0785e0ea182ac99d32ed2554b4755f 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -217,12 +217,44 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -243,12 +243,44 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ public int getArrowsInBody(); @@ -56,7 +56,7 @@ index 7879082361d0f5ef8a0f15547ed7ce990b41acc0..eb8dcf3dc9acb171fec5b25342a9a38d /** * Returns the living entity's current maximum no damage ticks. -@@ -749,4 +781,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -775,4 +807,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource * @return Whether the entity is invisible */ public boolean isInvisible(); diff --git a/patches/api/0039-Arrow-pickup-rule-API.patch b/patches/api/0039-Arrow-pickup-rule-API.patch index fb3753f0e1..2ab09a9b11 100644 --- a/patches/api/0039-Arrow-pickup-rule-API.patch +++ b/patches/api/0039-Arrow-pickup-rule-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Arrow pickup rule API diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java -index 5b50a4e10e8ace8cc53ad3c8d7c3185f88d5c8db..e8e56e89e32d84af0639fe2e9b0eeabd747b6007 100644 +index 9a0a1fa4b7a7e1e1174a75a388081b332d4bedbd..839e5b7df49f42b5fec7729997bef3370ba36d80 100644 --- a/src/main/java/org/bukkit/entity/AbstractArrow.java +++ b/src/main/java/org/bukkit/entity/AbstractArrow.java -@@ -141,4 +141,38 @@ public interface AbstractArrow extends Projectile { +@@ -160,4 +160,38 @@ public interface AbstractArrow extends Projectile { */ CREATIVE_ONLY } diff --git a/patches/api/0056-Fix-upstream-javadocs.patch b/patches/api/0056-Fix-upstream-javadocs.patch index e5282b07ab..f221402975 100644 --- a/patches/api/0056-Fix-upstream-javadocs.patch +++ b/patches/api/0056-Fix-upstream-javadocs.patch @@ -142,10 +142,10 @@ index e3136651ce083e67a1a7cb976d27df5666843401..50e8c25cc378b02b09ef57643cc753fa * @return an array containing all previous players */ diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index fa6f6c8eccd680a4e83443e472f37650e7cd05c5..6decacdf85827305dbee9d34dadef4bc7c69e20a 100644 +index 2b38b328187b853f5b36d796d3b6b359497647d8..a55e92dc09202437abac9cb5b7aacf3c275f5b9c 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2714,7 +2714,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2723,7 +2723,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Find the closest nearby structure of a given {@link StructureType}. * Finding unexplored structures can, and will, block if the world is @@ -154,7 +154,7 @@ index fa6f6c8eccd680a4e83443e472f37650e7cd05c5..6decacdf85827305dbee9d34dadef4bc * temporarily freezing while locating an unexplored structure. *

* The {@code radius} is not a rigid square radius. Each structure may alter -@@ -2748,7 +2748,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2757,7 +2757,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Find the closest nearby structure of a given {@link StructureType}. * Finding unexplored structures can, and will, block if the world is @@ -163,7 +163,7 @@ index fa6f6c8eccd680a4e83443e472f37650e7cd05c5..6decacdf85827305dbee9d34dadef4bc * temporarily freezing while locating an unexplored structure. *

* The {@code radius} is not a rigid square radius. Each structure may alter -@@ -2781,7 +2781,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2790,7 +2790,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient /** * Find the closest nearby structure of a given {@link Structure}. Finding * unexplored structures can, and will, block if the world is looking in @@ -369,7 +369,7 @@ index 1e56aef9188487d3e9c737e85025f601ab359a72..92cd35c87bad578c2b714761c93a5b72 */ LAND_ON_PORTAL, diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 09936f3a2376a46721bbc8365c989581c2a789ef..3845a726adbd0e75d7bf2aeeb6da8cb571d51a8f 100644 +index fffc478312566bc5c36dbacbdd86341d84d50054..8d97cf229ce1d14232d0342121b5db2230795a1d 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -22,6 +22,11 @@ import org.jetbrains.annotations.Nullable; @@ -976,7 +976,7 @@ index 0cc6e29a5af28e95f87f415d6b2424d4622a6f34..c0b749a5bbf4980d01fed74768bb6190 * @param z the z location in the chunk from 0-15 inclusive * @return Biome value diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java -index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf22b50ab7e 100644 +index 9adc827bc52eaa767a39c82e9cb0ff5a48e02b14..2dde946443fee1f6e79b882cbcb448549dc0c99c 100644 --- a/src/main/java/org/bukkit/inventory/EntityEquipment.java +++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java @@ -37,9 +37,23 @@ public interface EntityEquipment { @@ -1160,13 +1160,10 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 ItemStack getBoots(); /** -@@ -202,12 +296,25 @@ public interface EntityEquipment { - void setBoots(@Nullable ItemStack boots, boolean silent); - +@@ -204,12 +298,25 @@ public interface EntityEquipment { /** -- * Gets a copy of all worn armor -+ * Gets all worn armor -+ * + * Gets all ItemStacks from the armor slots. + * + *

+ * This returns a copy if this equipment instance is from a non-player, + * or it's an empty stack (has AIR as its type). @@ -1180,8 +1177,10 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 + * equipment.getArmorContents(); // will return an array of copies + * } + * } - * - * @return The array of worn armor. Individual items may be null. ++ * + * @return all the ItemStacks from the armor slots. Individual items can be + * null and are returned in a fixed order starting from the boots and going + * up to the helmet */ - @NotNull - ItemStack[] getArmorContents(); @@ -1189,7 +1188,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 /** * Sets the entities armor to the provided array of ItemStacks -@@ -247,7 +354,8 @@ public interface EntityEquipment { +@@ -249,7 +356,8 @@ public interface EntityEquipment { * *

    *
  • A drop chance of 0.0F will never drop @@ -1199,7 +1198,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @return chance of the currently held item being dropped (1 for non-{@link Mob}) -@@ -260,7 +368,8 @@ public interface EntityEquipment { +@@ -262,7 +370,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1209,7 +1208,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @param chance the chance of the main hand item being dropped -@@ -274,7 +383,8 @@ public interface EntityEquipment { +@@ -276,7 +385,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1219,7 +1218,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @return chance of the off hand item being dropped (1 for non-{@link Mob}) -@@ -287,7 +397,8 @@ public interface EntityEquipment { +@@ -289,7 +399,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1229,7 +1228,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @param chance the chance of off hand item being dropped -@@ -300,7 +411,8 @@ public interface EntityEquipment { +@@ -302,7 +413,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1239,7 +1238,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @return the chance of the helmet being dropped (1 for non-{@link Mob}) -@@ -312,7 +424,8 @@ public interface EntityEquipment { +@@ -314,7 +426,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1249,7 +1248,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @param chance of the helmet being dropped -@@ -326,7 +439,8 @@ public interface EntityEquipment { +@@ -328,7 +441,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1259,7 +1258,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @return the chance of the chest plate being dropped (1 for non-{@link Mob}) -@@ -339,7 +453,8 @@ public interface EntityEquipment { +@@ -341,7 +455,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1269,7 +1268,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @param chance of the chest plate being dropped -@@ -353,7 +468,8 @@ public interface EntityEquipment { +@@ -355,7 +470,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1279,7 +1278,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @return the chance of the leggings being dropped (1 for non-{@link Mob}) -@@ -366,7 +482,8 @@ public interface EntityEquipment { +@@ -368,7 +484,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1289,7 +1288,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @param chance chance of the leggings being dropped -@@ -379,7 +496,8 @@ public interface EntityEquipment { +@@ -381,7 +498,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1299,7 +1298,7 @@ index d5b50a4a954fed35d37f03f1a277cc173ca106df..16bca8e40ff029cca94bbfd435db1cf2 *
* * @return the chance of the boots being dropped (1 for non-{@link Mob}) -@@ -391,7 +509,8 @@ public interface EntityEquipment { +@@ -393,7 +511,8 @@ public interface EntityEquipment { * *
    *
  • A drop chance of 0.0F will never drop @@ -1323,10 +1322,10 @@ index 42fcc31147934fd4ed6484b0729e938e7ae2f8e2..4e637420b9a39b822be19367a16da93f HIDE_ARMOR_TRIM; } diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java -index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5fe1e3825 100644 +index f1918027c3a8735b31566856218611656b56db20..476fe14faa39f02444cab8ad95d4401033dc6938 100644 --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java -@@ -158,7 +158,7 @@ public interface PlayerInventory extends Inventory { +@@ -160,7 +160,7 @@ public interface PlayerInventory extends Inventory { public void setBoots(@Nullable ItemStack boots); /** @@ -1335,7 +1334,7 @@ index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5 * in their main hand. * * @return the currently held item -@@ -174,7 +174,7 @@ public interface PlayerInventory extends Inventory { +@@ -176,7 +176,7 @@ public interface PlayerInventory extends Inventory { void setItemInMainHand(@Nullable ItemStack item); /** @@ -1344,7 +1343,7 @@ index 62fbd7f6d8195bebcab7f704a0a485a1bbeca26c..5461f7fa75f5a065bb333b4a113640b5 * in their off hand. * * @return the currently held item -@@ -190,7 +190,7 @@ public interface PlayerInventory extends Inventory { +@@ -192,7 +192,7 @@ public interface PlayerInventory extends Inventory { void setItemInOffHand(@Nullable ItemStack item); /** diff --git a/patches/api/0062-Shoulder-Entities-Release-API.patch b/patches/api/0062-Shoulder-Entities-Release-API.patch index 5dbabdff87..d02f2a3521 100644 --- a/patches/api/0062-Shoulder-Entities-Release-API.patch +++ b/patches/api/0062-Shoulder-Entities-Release-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 3845a726adbd0e75d7bf2aeeb6da8cb571d51a8f..abdca9fe5acc90f167219eb769ece66c35682bb1 100644 +index 8d97cf229ce1d14232d0342121b5db2230795a1d..c426bdea5ef71a095cf2af9a8a83a162db3c05b7 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -339,6 +339,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -329,6 +329,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ public int getExpToLevel(); diff --git a/patches/api/0068-LivingEntity-setKiller.patch b/patches/api/0068-LivingEntity-setKiller.patch index 4770ab4701..bab1378afb 100644 --- a/patches/api/0068-LivingEntity-setKiller.patch +++ b/patches/api/0068-LivingEntity-setKiller.patch @@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#setKiller diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index b67e6eca393b66c92fc62b35123bb3eb2f372b7c..c8c88c08d2f03cff267e76749156c584bf7adf42 100644 +index 10eeb304bc0785e0ea182ac99d32ed2554b4755f..40634f46fa238a68f70f19b664bad7400ef07709 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -339,6 +339,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -365,6 +365,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @Nullable public Player getKiller(); diff --git a/patches/api/0070-Allow-plugins-to-use-SLF4J-for-logging.patch b/patches/api/0070-Allow-plugins-to-use-SLF4J-for-logging.patch index 1cddb59cda..45f53dfcfd 100644 --- a/patches/api/0070-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/patches/api/0070-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/build.gradle.kts b/build.gradle.kts -index ddc89dfd6911d85aab7c37fe3ca54eb1b80f99d6..66bcd8f9a8fce8f920a0f1dd7ae0a2937da68e80 100644 +index f9a9066e3e6a355acd5ddb3b0308b5b3b36b82f2..04853c43b99951bf0d4c96ef73724625bdaf018f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,6 +12,8 @@ java { @@ -33,8 +33,8 @@ index ddc89dfd6911d85aab7c37fe3ca54eb1b80f99d6..66bcd8f9a8fce8f920a0f1dd7ae0a293 + api("org.apache.logging.log4j:log4j-api:$log4jVersion") + api("org.slf4j:slf4j-api:$slf4jVersion") - implementation("org.ow2.asm:asm:9.5") - implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm:9.7") + implementation("org.ow2.asm:asm-commons:9.7") @@ -137,6 +141,8 @@ tasks.withType { "https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/", "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", diff --git a/patches/api/0095-Add-openSign-method-to-HumanEntity.patch b/patches/api/0095-Add-openSign-method-to-HumanEntity.patch index 513d2c7b96..ea763e9a13 100644 --- a/patches/api/0095-Add-openSign-method-to-HumanEntity.patch +++ b/patches/api/0095-Add-openSign-method-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index abdca9fe5acc90f167219eb769ece66c35682bb1..b3aa3dc6aa5afbc36cc86741b4cba56f463c2234 100644 +index c426bdea5ef71a095cf2af9a8a83a162db3c05b7..2308fa3ca898bcb6c0ac2d4853f82a3398bf51f3 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -500,6 +500,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder +@@ -490,6 +490,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder */ @Deprecated public void setShoulderEntityRight(@Nullable Entity entity); diff --git a/patches/api/0099-Additional-world.getNearbyEntities-API-s.patch b/patches/api/0099-Additional-world.getNearbyEntities-API-s.patch index 631c04c408..ef4b091e49 100644 --- a/patches/api/0099-Additional-world.getNearbyEntities-API-s.patch +++ b/patches/api/0099-Additional-world.getNearbyEntities-API-s.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's Provides more methods to get nearby entities, and filter by types and predicates diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 6decacdf85827305dbee9d34dadef4bc7c69e20a..fa4081c62f86245fef5a273f01837f9ac6998faa 100644 +index a55e92dc09202437abac9cb5b7aacf3c275f5b9c..e2cd4750ec51da5e6a93f31a9b644516f64f7972 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,9 @@ @@ -19,7 +19,7 @@ index 6decacdf85827305dbee9d34dadef4bc7c69e20a..fa4081c62f86245fef5a273f01837f9a import java.util.Collection; import java.util.HashMap; import java.util.List; -@@ -627,6 +630,238 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -636,6 +639,238 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public Collection getEntitiesByClasses(@NotNull Class... classes); diff --git a/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch index a491dad5b0..cc410e841b 100644 --- a/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -523,10 +523,10 @@ index ca6d0eaa9d9a37c07f3e1630b83a79bf98211edb..26d02aa5da444112f8fa84c07e3080bb * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index fa4081c62f86245fef5a273f01837f9ac6998faa..fa31ba9d30cd0d1b23e15667c4c9bd9c13b5b9d3 100644 +index e2cd4750ec51da5e6a93f31a9b644516f64f7972..6f084f081bd20b006c9a8e1090b6ad0e838810cb 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2896,7 +2896,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2905,7 +2905,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @param data the data to use for the particle or null, * the type of this depends on {@link Particle#getDataType()} */ diff --git a/patches/api/0110-Make-shield-blocking-delay-configurable.patch b/patches/api/0110-Make-shield-blocking-delay-configurable.patch index ce8b181683..39f25d89b5 100644 --- a/patches/api/0110-Make-shield-blocking-delay-configurable.patch +++ b/patches/api/0110-Make-shield-blocking-delay-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index c8c88c08d2f03cff267e76749156c584bf7adf42..dd5c5e0ec342cea1bf9efbd0aa28ae0e0ed2f6b9 100644 +index 40634f46fa238a68f70f19b664bad7400ef07709..4a4a749449bc561a73e6747386c8ad51e623fc1e 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -809,5 +809,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -835,5 +835,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ @Deprecated void setArrowsStuck(int arrows); diff --git a/patches/api/0115-Expand-Explosions-API.patch b/patches/api/0115-Expand-Explosions-API.patch index c74930f1a2..c4c0e69ee6 100644 --- a/patches/api/0115-Expand-Explosions-API.patch +++ b/patches/api/0115-Expand-Explosions-API.patch @@ -108,10 +108,10 @@ index 3161eae2fa5f03b7d3a5e9945ab659c15cf568c6..af737017ee397f80c44ee02c6cc60cef /** * Returns a list of entities within a bounding box centered around a Location. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index fa31ba9d30cd0d1b23e15667c4c9bd9c13b5b9d3..ab0f76c74205f2fe1faf9aecc57ac3fb57431b06 100644 +index 6f084f081bd20b006c9a8e1090b6ad0e838810cb..5ec220aa224c210c55517ef47aa5809ee26209e7 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1382,6 +1382,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -1391,6 +1391,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient */ public boolean createExplosion(@NotNull Location loc, float power, boolean setFire); diff --git a/patches/api/0117-LivingEntity-Active-Item-API.patch b/patches/api/0117-LivingEntity-Active-Item-API.patch new file mode 100644 index 0000000000..ce3d823f36 --- /dev/null +++ b/patches/api/0117-LivingEntity-Active-Item-API.patch @@ -0,0 +1,160 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Fri, 29 Jun 2018 00:19:19 -0400 +Subject: [PATCH] LivingEntity Active Item API + +API relating to items being actively used by a LivingEntity +such as a bow or eating food. + +Co-authored-by: Jake Potrebic + +diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java +index 2308fa3ca898bcb6c0ac2d4853f82a3398bf51f3..15115b1049bc5053796b84539acbf576bcba1a5f 100644 +--- a/src/main/java/org/bukkit/entity/HumanEntity.java ++++ b/src/main/java/org/bukkit/entity/HumanEntity.java +@@ -319,7 +319,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder + * blocking). + * + * @return Whether their hand is raised ++ * @see LivingEntity#hasActiveItem() + */ ++ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4") // Paper - active item API + public boolean isHandRaised(); + + /** +diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java +index 4a4a749449bc561a73e6747386c8ad51e623fc1e..c75315b921a1854fbbdbe8ecdfba7dacdaa155c1 100644 +--- a/src/main/java/org/bukkit/entity/LivingEntity.java ++++ b/src/main/java/org/bukkit/entity/LivingEntity.java +@@ -202,15 +202,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource + * + * @return the item being used by the player, or null if they are not using + * an item ++ * @deprecated Use {@link #getActiveItem()} + */ + @Nullable ++ @Deprecated(forRemoval = true, since = "1.20.4") // Paper + public ItemStack getItemInUse(); + + /** + * Gets the number of ticks remaining for the current item's usage. + * + * @return The number of ticks remaining ++ * @deprecated use {@link #getActiveItemRemainingTime()} + */ ++ @Deprecated(forRemoval = true, since = "1.20.4") // Paper + public int getItemInUseTicks(); + + /** +@@ -219,7 +223,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource + * or throwing a trident. + * + * @param ticks The number of ticks remaining ++ * @deprecated use {@link #setActiveItemRemainingTime(int)} + */ ++ @Deprecated(forRemoval = true, since = "1.20.4") // Paper + public void setItemInUseTicks(int ticks); + + /** +@@ -850,4 +856,101 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource + */ + void setShieldBlockingDelay(int delay); + // Paper end ++ ++ // Paper start - active item API ++ /** ++ * Gets the item being actively "used" or consumed. ++ * ++ * @return the item ++ */ ++ org.bukkit.inventory.@NotNull ItemStack getActiveItem(); ++ ++ /** ++ * Gets the remaining number of ticks for {@link #getActiveItem()}'s usage. ++ * ++ * @return remaining ticks to use {@link #getActiveItem()} ++ */ ++ int getActiveItemRemainingTime(); ++ ++ /** ++ * Sets the number of ticks that remain for {@link #getActiveItem()}'s ++ * usage. ++ *

    ++ * Valid values are between 0 and the max item use duration for ++ * the specific item type. ++ * ++ * @param ticks time in ticks remaining ++ */ ++ void setActiveItemRemainingTime(@org.jetbrains.annotations.Range(from = 0, to = Integer.MAX_VALUE) int ticks); ++ ++ /** ++ * Gets if the entity is using an item (eating, drinking, etc). ++ * ++ * @return true if using an item ++ */ ++ boolean hasActiveItem(); ++ ++ /** ++ * Get how long the {@link #getActiveItem()} has been in use for. ++ * ++ * @return time used in ticks ++ */ ++ int getActiveItemUsedTime(); ++ ++ /** ++ * Get the hand using the active item. Will be either ++ * {@link org.bukkit.inventory.EquipmentSlot#HAND} or ++ * {@link org.bukkit.inventory.EquipmentSlot#OFF_HAND}. ++ * ++ * @return the hand being used ++ */ ++ org.bukkit.inventory.@NotNull EquipmentSlot getActiveItemHand(); ++ ++ /** ++ * Gets remaining time a player needs to keep hands raised with an item to finish using it. ++ * ++ * @return remaining ticks to use the item ++ * @see #getActiveItemRemainingTime() ++ */ ++ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4") ++ default int getItemUseRemainingTime() { ++ return this.getActiveItemRemainingTime(); ++ } ++ ++ /** ++ * Get how long the entity's hands have been raised (Charging Bow attack, using a potion, etc) ++ * ++ * @return Get how long the players hands have been raised (Charging Bow attack, using a potion, etc) ++ * @see #getActiveItemUsedTime() ++ */ ++ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4") ++ default int getHandRaisedTime() { ++ return this.getActiveItemUsedTime(); ++ } ++ ++ /** ++ * Whether this entity is using or charging an attack (Bow pulled back, drinking potion, eating food) ++ * ++ * @return whether this entity is using or charging an attack (Bow pulled back, drinking potion, eating food) ++ * @see #hasActiveItem() ++ */ ++ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4") ++ default boolean isHandRaised() { ++ return this.hasActiveItem(); ++ } ++ ++ /** ++ * Gets the hand raised by this living entity. Will be either ++ * {@link org.bukkit.inventory.EquipmentSlot#HAND} or ++ * {@link org.bukkit.inventory.EquipmentSlot#OFF_HAND}. ++ * ++ * @return the hand raised ++ * @see #getActiveItemHand() ++ */ ++ @NotNull ++ @org.jetbrains.annotations.ApiStatus.Obsolete(since = "1.20.4") ++ default org.bukkit.inventory.EquipmentSlot getHandRaised() { ++ return this.getActiveItemHand(); ++ } ++ // Paper end - active item API + } diff --git a/patches/api/0117-LivingEntity-Hand-Raised-Item-Use-API.patch b/patches/api/0117-LivingEntity-Hand-Raised-Item-Use-API.patch deleted file mode 100644 index 01ca874a1f..0000000000 --- a/patches/api/0117-LivingEntity-Hand-Raised-Item-Use-API.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 29 Jun 2018 00:19:19 -0400 -Subject: [PATCH] LivingEntity Hand Raised/Item Use API - -How long an entity has raised hands to charge an attack or use an item - -diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index b3aa3dc6aa5afbc36cc86741b4cba56f463c2234..9e012c3c0671e5d0e55c243fdb4e14057038c153 100644 ---- a/src/main/java/org/bukkit/entity/HumanEntity.java -+++ b/src/main/java/org/bukkit/entity/HumanEntity.java -@@ -328,7 +328,9 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder - * - * @return the item being used by the player, or null if they are not using - * an item -+ * @deprecated Deprecated in favor of {@link LivingEntity#getActiveItem()} - */ -+ @Deprecated // Paper - @Nullable - public ItemStack getItemInUse(); - -diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index dd5c5e0ec342cea1bf9efbd0aa28ae0e0ed2f6b9..fd98b9de7714e2082e521f29dc162003e3d39ee2 100644 ---- a/src/main/java/org/bukkit/entity/LivingEntity.java -+++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -823,5 +823,42 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - * @param delay Delay in ticks - */ - void setShieldBlockingDelay(int delay); -+ -+ /** -+ * Get's the item being actively "used" or consumed. -+ * @return The item -+ */ -+ @NotNull -+ org.bukkit.inventory.ItemStack getActiveItem(); -+ -+ /** -+ * Get's remaining time a player needs to keep hands raised with an item to finish using it. -+ * @return Remaining ticks to use the item -+ */ -+ int getItemUseRemainingTime(); -+ -+ /** -+ * Get how long the players hands have been raised (Charging Bow attack, using a potion, etc) -+ * -+ * @return Get how long the players hands have been raised (Charging Bow attack, using a potion, etc) -+ */ -+ int getHandRaisedTime(); -+ -+ /** -+ * Whether or not this entity is using or charging an attack (Bow pulled back, drinking potion, eating food) -+ * -+ * @return Whether or not this entity is using or charging an attack (Bow pulled back, drinking potion, eating food) -+ */ -+ boolean isHandRaised(); -+ -+ /** -+ * Gets the hand raised by this living entity. Will be either -+ * {@link org.bukkit.inventory.EquipmentSlot#HAND} or -+ * {@link org.bukkit.inventory.EquipmentSlot#OFF_HAND}. -+ * -+ * @return the hand raised -+ */ -+ @NotNull -+ org.bukkit.inventory.EquipmentSlot getHandRaised(); - // Paper end - } diff --git a/patches/api/0119-Add-World.getEntity-UUID-API.patch b/patches/api/0119-Add-World.getEntity-UUID-API.patch index f1e054d2ac..2b7e2e2815 100644 --- a/patches/api/0119-Add-World.getEntity-UUID-API.patch +++ b/patches/api/0119-Add-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index ab0f76c74205f2fe1faf9aecc57ac3fb57431b06..ad7e2b624d5929beee5268151bda3abe9dfbb786 100644 +index 5ec220aa224c210c55517ef47aa5809ee26209e7..2aafd966778ee0f6adcbb3ea3772cb2104f8e687 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -896,6 +896,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -905,6 +905,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public Collection getNearbyEntities(@NotNull Location location, double x, double y, double z); diff --git a/patches/api/0120-InventoryCloseEvent-Reason-API.patch b/patches/api/0120-InventoryCloseEvent-Reason-API.patch index e8d8154e21..6c7189a322 100644 --- a/patches/api/0120-InventoryCloseEvent-Reason-API.patch +++ b/patches/api/0120-InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 9e012c3c0671e5d0e55c243fdb4e14057038c153..d44c5a3fda0b159dc541246cb2fca8427cb38243 100644 +index 15115b1049bc5053796b84539acbf576bcba1a5f..c66130be13bf01b5834a6391864b865c0123fa5c 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -179,6 +179,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder diff --git a/patches/api/0143-Async-Chunks-API.patch b/patches/api/0143-Async-Chunks-API.patch index 2473d4c47f..5511aebb55 100644 --- a/patches/api/0143-Async-Chunks-API.patch +++ b/patches/api/0143-Async-Chunks-API.patch @@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously. Also adds utility methods to Entity to teleport asynchronously. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 25ff747e23e7373bb96ca9109df7e46cdefdcd2e..116bad653e92efbfd576f3b146c0a9e40afbbe10 100644 +index 8bef6168caf0932a5a64cf69eb7988fa3191b13a..ab183821b93dcfed1e881b481f0a3166f465ecfb 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -941,6 +941,472 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -950,6 +950,472 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient } // Paper end - additional getNearbyEntities API @@ -485,7 +485,7 @@ index 25ff747e23e7373bb96ca9109df7e46cdefdcd2e..116bad653e92efbfd576f3b146c0a9e4 * Get a list of all players in this World * diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 77a706dde5995a8a6306b1d0a144dd37d580dea3..14e42959033919ff6409e48ddf01c0f15c28eb10 100644 +index 57a1d07d0430019fd38c72b9f58c7145927ecd02..a0ed358156f9cbeb9e3cbb910ac17785edd30152 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -168,6 +168,33 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent diff --git a/patches/api/0157-Add-sun-related-API.patch b/patches/api/0157-Add-sun-related-API.patch index df9c9b7818..59c4495962 100644 --- a/patches/api/0157-Add-sun-related-API.patch +++ b/patches/api/0157-Add-sun-related-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 116bad653e92efbfd576f3b146c0a9e40afbbe10..bc0f09b2d555682d0bf7937e9aa6c97258e66635 100644 +index ab183821b93dcfed1e881b481f0a3166f465ecfb..675dea2e1e9742043c18098774b9fde2e6f4602f 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1762,6 +1762,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -1771,6 +1771,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient */ public void setFullTime(long time); diff --git a/patches/api/0173-Fix-Spigot-annotation-mistakes.patch b/patches/api/0173-Fix-Spigot-annotation-mistakes.patch index 314bf2aa32..77f24e2f0d 100644 --- a/patches/api/0173-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0173-Fix-Spigot-annotation-mistakes.patch @@ -598,7 +598,7 @@ index e455eb21abf121dc6ff10ff8a13dd06f67096a8f..bbc01e7c192ae6689c301670047ff114 return origin; } diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3d006ae18 100644 +index 675dea2e1e9742043c18098774b9fde2e6f4602f..0023b9737353c3c7dcfb38a143761bd8c03acf0d 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -418,9 +418,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @@ -612,7 +612,7 @@ index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3 public boolean refreshChunk(int x, int z); /** -@@ -3745,6 +3744,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -3754,6 +3753,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored); // Spigot start @@ -620,7 +620,7 @@ index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3 public class Spigot { /** -@@ -3778,7 +3778,11 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -3787,7 +3787,11 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient } } @@ -632,7 +632,7 @@ index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3 Spigot spigot(); // Spigot end -@@ -3996,9 +4000,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4005,9 +4009,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * Gets the dimension ID of this environment * * @return dimension ID @@ -644,7 +644,7 @@ index bc0f09b2d555682d0bf7937e9aa6c97258e66635..bc5dd4182c5dd0a0d576410a68c445e3 public int getId() { return id; } -@@ -4008,9 +4012,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -4017,9 +4021,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * * @param id The ID of the environment * @return The environment @@ -818,10 +818,10 @@ index f124b35ec76e6cb6a1a0dc464005087043c3efd0..f50aaddf8582be55fd4860ad374d8f22 +@Deprecated(forRemoval = true) // Paper public interface LingeringPotion extends ThrownPotion { } diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index b2f66f80c90b9d716f43f94166ca015bdfd3173e..030d3b1b1fee0906d6a0fb2a47031b8a94caaf89 100644 +index 71a4dc422b9ff25dd9bac58e5996d9996c4bc479..582d6d8eed0b0145fa58c977013c4914e99c40a4 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -684,7 +684,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -716,7 +716,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource * This may have unexpected results if the entity is not in water. * * @param swimming True if the entity is swimming. @@ -1276,10 +1276,10 @@ index df81bac9ecff697f98941e5c8490e10391e90090..a32977ba3ba60a1c9aee6e469d5d6cd1 /** * Get the current recipe formed on the crafting inventory, if any. diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java -index 16bca8e40ff029cca94bbfd435db1cf22b50ab7e..2b11217153d6d6d8246d332e7fbbf32810d7e7b8 100644 +index 2dde946443fee1f6e79b882cbcb448549dc0c99c..127302aa7c22f59438de66fffa0b03ae84a2a8ad 100644 --- a/src/main/java/org/bukkit/inventory/EntityEquipment.java +++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java -@@ -523,6 +523,6 @@ public interface EntityEquipment { +@@ -525,6 +525,6 @@ public interface EntityEquipment { * * @return the entity this EntityEquipment belongs to */ @@ -1438,12 +1438,12 @@ index dbd0d0610f33105ee83ab589c84e73004f684fb5..fd3d4dd231d756d51db0155a4c3ad970 return this.meta == null ? Bukkit.getItemFactory().getItemMeta(this.type) : this.meta.clone(); } diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java -index 5461f7fa75f5a065bb333b4a113640b5fe1e3825..c4d657727e508cb941320730a9d3aa5486712ef3 100644 +index 476fe14faa39f02444cab8ad95d4401033dc6938..2c54660dc1fbc7c1232096797a23cae1262888e9 100644 --- a/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java -@@ -14,8 +14,7 @@ public interface PlayerInventory extends Inventory { - * - * @return All the ItemStacks from the armor slots. Individual items can be null. +@@ -16,8 +16,7 @@ public interface PlayerInventory extends Inventory { + * null and are returned in a fixed order starting from the boots and going + * up to the helmet */ - @NotNull - public ItemStack[] getArmorContents(); @@ -1451,7 +1451,7 @@ index 5461f7fa75f5a065bb333b4a113640b5fe1e3825..c4d657727e508cb941320730a9d3aa54 /** * Get all additional ItemStacks stored in this inventory. -@@ -26,8 +25,7 @@ public interface PlayerInventory extends Inventory { +@@ -28,8 +27,7 @@ public interface PlayerInventory extends Inventory { * * @return All additional ItemStacks. Individual items can be null. */ @@ -1461,7 +1461,7 @@ index 5461f7fa75f5a065bb333b4a113640b5fe1e3825..c4d657727e508cb941320730a9d3aa54 /** * Return the ItemStack from the helmet slot -@@ -104,9 +102,9 @@ public interface PlayerInventory extends Inventory { +@@ -106,9 +104,9 @@ public interface PlayerInventory extends Inventory { * * @param slot the slot to get the ItemStack * @@ -1862,10 +1862,10 @@ index 0ea9c6b2420a0f990bd1fdf50fc015e37a7060d8..e99644eae1c662b117aa19060d2484ac /** diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java -index b7c394fb70cc3449e5c9c5756956d9b048b5c019..3070f039a583647e7c9a8f15d63291cd265db9fc 100644 +index 28dd05c706211f78eb27329a4284e2f21c5f5eb5..f97dff2fd90cc8c35cbde04d1ace81320a8e4658 100644 --- a/src/main/java/org/bukkit/potion/PotionEffectType.java +++ b/src/main/java/org/bukkit/potion/PotionEffectType.java -@@ -239,9 +239,9 @@ public abstract class PotionEffectType implements Keyed { +@@ -240,9 +240,9 @@ public abstract class PotionEffectType implements Keyed, Translatable { * Returns the unique ID of this type. * * @return Unique ID @@ -1877,7 +1877,7 @@ index b7c394fb70cc3449e5c9c5756956d9b048b5c019..3070f039a583647e7c9a8f15d63291cd public abstract int getId(); /** -@@ -277,9 +277,9 @@ public abstract class PotionEffectType implements Keyed { +@@ -278,9 +278,9 @@ public abstract class PotionEffectType implements Keyed, Translatable { * * @param id Unique ID to fetch * @return Resulting type, or null if not found. diff --git a/patches/api/0185-Entity-Jump-API.patch b/patches/api/0185-Entity-Jump-API.patch index 09a7dfefae..ea563c013a 100644 --- a/patches/api/0185-Entity-Jump-API.patch +++ b/patches/api/0185-Entity-Jump-API.patch @@ -61,14 +61,15 @@ index 0000000000000000000000000000000000000000..a6306c957fcacdcbcc8037b4ee33a167 + } +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index c58f7b4a7c05e35056a478a818a9a6cdfe99203f..3f062e0fe9cb632dece9ce3fdc985ab1bf5a425f 100644 +index 3e5b7dc8f72bd211a18ec6a930c4f02beea4205a..0a0e3fe33158f0424398c0abf50ea55825c452c5 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -1025,5 +1025,25 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - */ - @NotNull - org.bukkit.inventory.EquipmentSlot getHandRaised(); +@@ -1118,4 +1118,26 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource + return this.getActiveItemHand(); + } + // Paper end - active item API + ++ // Paper start - entity jump API + /** + * Get entity jump state. + *

    @@ -88,5 +89,5 @@ index c58f7b4a7c05e35056a478a818a9a6cdfe99203f..3f062e0fe9cb632dece9ce3fdc985ab1 + * @param jumping entity jump state + */ + void setJumping(boolean jumping); - // Paper end ++ // Paper end - entity jump API } diff --git a/patches/api/0189-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/api/0189-Add-Raw-Byte-ItemStack-Serialization.patch index ac702b7e90..9428ae3385 100644 --- a/patches/api/0189-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/patches/api/0189-Add-Raw-Byte-ItemStack-Serialization.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization Serializes using NBT which is safer for server data migrations than bukkits format. diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 688fccdbc5cf831008ef2f27db9d15b0921a7561..e4861a8be534bfeae0385f0197261fa6ec1e7bc0 100644 +index d69e5fa40702c283c370a2f712b51dc2ea3a1fa0..30d869a7c4bba79b4c05de7860b31c14f47b341a 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -151,5 +151,9 @@ public interface UnsafeValues { +@@ -153,5 +153,9 @@ public interface UnsafeValues { default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher(); } diff --git a/patches/api/0199-Potential-bed-API.patch b/patches/api/0199-Potential-bed-API.patch index cdbbcebbbc..a842554f35 100644 --- a/patches/api/0199-Potential-bed-API.patch +++ b/patches/api/0199-Potential-bed-API.patch @@ -8,7 +8,7 @@ Adds a new method to fetch the location of a player's bed without generating any getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index d44c5a3fda0b159dc541246cb2fca8427cb38243..7e9e1e0b21314e6542f5f40503cd6926c75cc369 100644 +index c66130be13bf01b5834a6391864b865c0123fa5c..2557ddcc0528d4f9d811883b3ddc61148ebc3998 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -269,6 +269,19 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder diff --git a/patches/api/0209-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/api/0209-Add-playPickupItemAnimation-to-LivingEntity.patch index cc0b04bb45..809eb90a68 100644 --- a/patches/api/0209-Add-playPickupItemAnimation-to-LivingEntity.patch +++ b/patches/api/0209-Add-playPickupItemAnimation-to-LivingEntity.patch @@ -5,14 +5,15 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 10d76fcd509702042c528fab96b963e9c6d210a5..3969f3c188211838cb576465bd64c0f63ae85080 100644 +index 0a0e3fe33158f0424398c0abf50ea55825c452c5..d9dee0486c5f7c9a948a2c1a3497e2745d747965 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -1045,5 +1045,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - * @param jumping entity jump state +@@ -1140,4 +1140,29 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ void setJumping(boolean jumping); + // Paper end - entity jump API + ++ // Paper start - pickup animation API + /** + * Plays pickup item animation towards this entity. + *

    @@ -35,5 +36,5 @@ index 10d76fcd509702042c528fab96b963e9c6d210a5..3969f3c188211838cb576465bd64c0f6 + * @param quantity quantity of item + */ + void playPickupItemAnimation(@NotNull Item item, int quantity); - // Paper end ++ // Paper end - pickup animation API } diff --git a/patches/api/0211-Add-methods-to-get-translation-keys.patch b/patches/api/0211-Add-methods-to-get-translation-keys.patch index 5af19e4030..4208d897a6 100644 --- a/patches/api/0211-Add-methods-to-get-translation-keys.patch +++ b/patches/api/0211-Add-methods-to-get-translation-keys.patch @@ -233,26 +233,28 @@ index e3faa2c675c85a9cbdbbb1debec0ff81c58a1bbd..fd1629c2d2028a88fb3d56b0aeb833d1 String getTranslationKey(); } diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java -index 36501052de5ad0b80aa1dcbe97d44dd3204f749b..37f93b7e9f722e76631c3e7d3e770526ee0c3926 100644 +index 7d5e6961e7e836f57cb7114ae7cef9dbd95ad0a1..66027c2ea32d44a5d2df18d6414668d847f6fd9c 100644 --- a/src/main/java/org/bukkit/attribute/Attribute.java +++ b/src/main/java/org/bukkit/attribute/Attribute.java -@@ -7,7 +7,7 @@ import org.jetbrains.annotations.NotNull; +@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull; /** * Types of attributes which may be present on an {@link Attributable}. */ --public enum Attribute implements Keyed { -+public enum Attribute implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations +-public enum Attribute implements Keyed, Translatable { ++public enum Attribute implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations /** * Maximum health of an Entity. -@@ -77,4 +77,10 @@ public enum Attribute implements Keyed { - public NamespacedKey getKey() { - return key; +@@ -85,4 +85,12 @@ public enum Attribute implements Keyed, Translatable { + public String getTranslationKey() { + return Bukkit.getUnsafe().getTranslationKey(this); } ++ + // Paper start ++ @SuppressWarnings("deprecation") + @Override + public @NotNull String translationKey() { -+ return "attribute.name." + this.key.getKey(); ++ return Bukkit.getUnsafe().getTranslationKey(this); + } + // Paper end } @@ -308,15 +310,15 @@ index bf29d9b733afc7c62725d259f4920c4f211cc6d0..1d3812db989a55b6f31bb30dffe70323 // Paper end } diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java -index 6a915b5b41daa5ea64913a2d5c611a6167168395..4a88198be6634b47fc51e55acc5f6415e4aff1ab 100644 +index 350d52f4dd97a7e6a6a9a967e1c6a8781feda22e..13f25ff4a4dd5a98f5f690c54e5cba6ef145c2d0 100644 --- a/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java -@@ -13,7 +13,7 @@ import org.jetbrains.annotations.Nullable; +@@ -14,7 +14,7 @@ import org.jetbrains.annotations.Nullable; /** * The various type of enchantments that may be added to armour or weapons */ --public abstract class Enchantment implements Keyed { -+public abstract class Enchantment implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations +-public abstract class Enchantment implements Keyed, Translatable { ++public abstract class Enchantment implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations /** * Provides protection against environmental damage */ diff --git a/patches/api/0213-Add-additional-open-container-api-to-HumanEntity.patch b/patches/api/0213-Add-additional-open-container-api-to-HumanEntity.patch index 9512168843..43e6937d05 100644 --- a/patches/api/0213-Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/api/0213-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/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 7e9e1e0b21314e6542f5f40503cd6926c75cc369..94f2c3167f4ce7f5f2b4ecc067739c64af0a2508 100644 +index 2557ddcc0528d4f9d811883b3ddc61148ebc3998..5ecfb98540c00da05b13bc5370debb89c52cc76f 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -174,6 +174,92 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder diff --git a/patches/api/0214-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/api/0214-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 8d1a16ed42..75dff33979 100644 --- a/patches/api/0214-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/api/0214-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index e4861a8be534bfeae0385f0197261fa6ec1e7bc0..86bb2a6f46c7c39e7ac1923c3454785a3dc76648 100644 +index 30d869a7c4bba79b4c05de7860b31c14f47b341a..241cb853476ea35dad73d0234b2d030e9af23476 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -155,5 +155,12 @@ public interface UnsafeValues { +@@ -157,5 +157,12 @@ public interface UnsafeValues { byte[] serializeItem(ItemStack item); ItemStack deserializeItem(byte[] data); diff --git a/patches/api/0224-Add-LivingEntity-clearActiveItem.patch b/patches/api/0224-Add-LivingEntity-clearActiveItem.patch index aa60fb7335..e3e004cb9d 100644 --- a/patches/api/0224-Add-LivingEntity-clearActiveItem.patch +++ b/patches/api/0224-Add-LivingEntity-clearActiveItem.patch @@ -5,20 +5,18 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 3969f3c188211838cb576465bd64c0f63ae85080..9d58da4686a22893455b9cc75fb8e73a87d2d06d 100644 +index 898cbd4f690777ce855244331f95e624c6a1fbd4..66dfeb4490505a3eaed547dd86e6c68b85ba5568 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -996,6 +996,13 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - @NotNull - org.bukkit.inventory.ItemStack getActiveItem(); +@@ -1030,6 +1030,11 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource + */ + org.bukkit.inventory.@NotNull ItemStack getActiveItem(); -+ // Paper start + /** + * Interrupts any ongoing active "usage" or consumption or an item. + */ + void clearActiveItem(); -+ // Paper end + /** - * Get's remaining time a player needs to keep hands raised with an item to finish using it. - * @return Remaining ticks to use the item + * Gets the remaining number of ticks for {@link #getActiveItem()}'s usage. + * diff --git a/patches/api/0229-Expose-LivingEntity-hurt-direction.patch b/patches/api/0229-Expose-LivingEntity-hurt-direction.patch index e99a7ce6bb..a7a62153d3 100644 --- a/patches/api/0229-Expose-LivingEntity-hurt-direction.patch +++ b/patches/api/0229-Expose-LivingEntity-hurt-direction.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 94f2c3167f4ce7f5f2b4ecc067739c64af0a2508..4054d2c836342f0e4bcbd33adb13f50daea5086a 100644 +index 5ecfb98540c00da05b13bc5370debb89c52cc76f..083d5798ccc7f37c6df5e234c7ef233202102b8f 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -348,6 +348,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder @@ -26,14 +26,15 @@ index 94f2c3167f4ce7f5f2b4ecc067739c64af0a2508..4054d2c836342f0e4bcbd33adb13f50d * Get the sleep ticks of the player. This value may be capped. * diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 9d58da4686a22893455b9cc75fb8e73a87d2d06d..e9919fce380ec1d0d48b3ac706e7fd31af0be26b 100644 +index 546ecf762d588b8a8239c832fbbe96b8714a07cb..8d2a74e17e4b7089ff91d263b669e8623d7e688a 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -1075,5 +1075,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - * @param quantity quantity of item +@@ -1170,4 +1170,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ void playPickupItemAnimation(@NotNull Item item, int quantity); + // Paper end - pickup animation API + ++ // Paper start - hurt direction API + /** + * Gets player hurt direction + * @@ -49,5 +50,5 @@ index 9d58da4686a22893455b9cc75fb8e73a87d2d06d..e9919fce380ec1d0d48b3ac706e7fd31 + */ + @Deprecated + void setHurtDirection(float hurtDirection); - // Paper end ++ // Paper end - hurt direction API } diff --git a/patches/api/0263-Expand-world-key-API.patch b/patches/api/0263-Expand-world-key-API.patch index ee70bbcfd2..32ba99be6d 100644 --- a/patches/api/0263-Expand-world-key-API.patch +++ b/patches/api/0263-Expand-world-key-API.patch @@ -78,10 +78,10 @@ index 3c64eb18b7cb6ac371b094a581da8a033e90d00f..c3e0b40a845a30790f31a0cf591bfa7f * Create a new virtual {@link WorldBorder}. *

    diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 86bb2a6f46c7c39e7ac1923c3454785a3dc76648..72a29fff4c497a2a66e2746ad42553bcb712e20d 100644 +index 241cb853476ea35dad73d0234b2d030e9af23476..5de86f8cd3cc7f7e8ebc4a22d3921273378704f2 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -162,5 +162,10 @@ public interface UnsafeValues { +@@ -164,5 +164,10 @@ public interface UnsafeValues { * Use this when sending custom packets, so that there are no collisions on the client or server. */ public int nextEntityId(); diff --git a/patches/api/0264-Item-Rarity-API.patch b/patches/api/0264-Item-Rarity-API.patch index 5e00725324..b074dce96b 100644 --- a/patches/api/0264-Item-Rarity-API.patch +++ b/patches/api/0264-Item-Rarity-API.patch @@ -61,10 +61,10 @@ index 85604d2c364c41fed24257a9b02ceeb58712f6a2..8fd928cfe61ab6f06c52eb5e4561fd68 /** diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 72a29fff4c497a2a66e2746ad42553bcb712e20d..22db1d8645a450308fe91d0cd100c926dd8c6f08 100644 +index 5de86f8cd3cc7f7e8ebc4a22d3921273378704f2..c423204eaf3252c9fc1a3af1214ec70ed712fb80 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -167,5 +167,22 @@ public interface UnsafeValues { +@@ -169,5 +169,22 @@ public interface UnsafeValues { * Just don't use it. */ @org.jetbrains.annotations.NotNull String getMainLevelName(); diff --git a/patches/api/0265-Expose-protocol-version.patch b/patches/api/0265-Expose-protocol-version.patch index 0d34eacc4c..3fbc03ad3e 100644 --- a/patches/api/0265-Expose-protocol-version.patch +++ b/patches/api/0265-Expose-protocol-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 22db1d8645a450308fe91d0cd100c926dd8c6f08..a3810c693d3748fba818e4a835ceb77762f433b9 100644 +index c423204eaf3252c9fc1a3af1214ec70ed712fb80..42e4983051062f2fd3b595487cf8093440b41bba 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -184,5 +184,12 @@ public interface UnsafeValues { +@@ -186,5 +186,12 @@ public interface UnsafeValues { * @return the itemstack rarity */ public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack); diff --git a/patches/api/0266-add-isDeeplySleeping-to-HumanEntity.patch b/patches/api/0266-add-isDeeplySleeping-to-HumanEntity.patch index fc6f6dcab3..45207a6064 100644 --- a/patches/api/0266-add-isDeeplySleeping-to-HumanEntity.patch +++ b/patches/api/0266-add-isDeeplySleeping-to-HumanEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] add isDeeplySleeping to HumanEntity diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index 4054d2c836342f0e4bcbd33adb13f50daea5086a..ff1ebe184ba5a1bdc8e2784025b07d3bb90a5078 100644 +index 083d5798ccc7f37c6df5e234c7ef233202102b8f..a47ea595c2a23b361a56f13877b67892ecfed826 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -358,6 +358,15 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder diff --git a/patches/api/0268-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/api/0268-add-get-set-drop-chance-to-EntityEquipment.patch index 836af12518..d75f180c94 100644 --- a/patches/api/0268-add-get-set-drop-chance-to-EntityEquipment.patch +++ b/patches/api/0268-add-get-set-drop-chance-to-EntityEquipment.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add get-set drop chance to EntityEquipment diff --git a/src/main/java/org/bukkit/inventory/EntityEquipment.java b/src/main/java/org/bukkit/inventory/EntityEquipment.java -index 2b11217153d6d6d8246d332e7fbbf32810d7e7b8..bbc1aa3a317fd0a0a0060b30aae42567cda471ca 100644 +index 127302aa7c22f59438de66fffa0b03ae84a2a8ad..1b34286fb6cbedb3841c84c499eb626f61885126 100644 --- a/src/main/java/org/bukkit/inventory/EntityEquipment.java +++ b/src/main/java/org/bukkit/inventory/EntityEquipment.java -@@ -525,4 +525,34 @@ public interface EntityEquipment { +@@ -527,4 +527,34 @@ public interface EntityEquipment { */ @NotNull // Paper Entity getHolder(); diff --git a/patches/api/0270-More-World-API.patch b/patches/api/0270-More-World-API.patch index a3d88eb648..139bb504c0 100644 --- a/patches/api/0270-More-World-API.patch +++ b/patches/api/0270-More-World-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More World API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 24ce9966140730c581c0709b14280e62a58331fa..d09c6b7c7b80f1f59e052ddb4aa8ad05b63fca2b 100644 +index 0a7c97aa289687cfbf6ae1a222f5eb2850f8f43e..4f724c337da08da6bbc8b1452dbd64eefd54a879 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -3824,6 +3824,122 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -3833,6 +3833,122 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored); diff --git a/patches/api/0282-ItemStack-repair-check-API.patch b/patches/api/0282-ItemStack-repair-check-API.patch index 46650ec4b7..0a9c5b65db 100644 --- a/patches/api/0282-ItemStack-repair-check-API.patch +++ b/patches/api/0282-ItemStack-repair-check-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index a3810c693d3748fba818e4a835ceb77762f433b9..d9e3e4ad108a94ac6f0f5378d22d47845091efb4 100644 +index 42e4983051062f2fd3b595487cf8093440b41bba..057f4db9cb6b686ab941ec5d3e6ca23dcfbd845f 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -185,6 +185,16 @@ public interface UnsafeValues { +@@ -187,6 +187,16 @@ public interface UnsafeValues { */ public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack); diff --git a/patches/api/0283-More-Enchantment-API.patch b/patches/api/0283-More-Enchantment-API.patch index 98c3ef060b..e6ccd01964 100644 --- a/patches/api/0283-More-Enchantment-API.patch +++ b/patches/api/0283-More-Enchantment-API.patch @@ -36,10 +36,10 @@ index 0000000000000000000000000000000000000000..e6a40c1fcea761bd66743b50e3da3d14 + } +} diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java -index 4a88198be6634b47fc51e55acc5f6415e4aff1ab..d50d4c3121a966adcc47173ddb4575f7ad504148 100644 +index 13f25ff4a4dd5a98f5f690c54e5cba6ef145c2d0..4264c6eb7e5794019859cfca592b57e574fcd833 100644 --- a/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/src/main/java/org/bukkit/enchantments/Enchantment.java -@@ -269,11 +269,7 @@ public abstract class Enchantment implements Keyed, net.kyori.adventure.translat +@@ -270,11 +270,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve * Cursed enchantments are found the same way treasure enchantments are * * @return true if the enchantment is cursed @@ -51,7 +51,7 @@ index 4a88198be6634b47fc51e55acc5f6415e4aff1ab..d50d4c3121a966adcc47173ddb4575f7 public abstract boolean isCursed(); /** -@@ -307,6 +303,70 @@ public abstract class Enchantment implements Keyed, net.kyori.adventure.translat +@@ -308,6 +304,70 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve * @return the name of the enchantment with {@code level} applied */ public abstract net.kyori.adventure.text.@NotNull Component displayName(int level); diff --git a/patches/api/0287-Attributes-API-for-item-defaults.patch b/patches/api/0287-Attributes-API-for-item-defaults.patch index 66172a6027..ce95405628 100644 --- a/patches/api/0287-Attributes-API-for-item-defaults.patch +++ b/patches/api/0287-Attributes-API-for-item-defaults.patch @@ -31,10 +31,10 @@ index 8fd928cfe61ab6f06c52eb5e4561fd6860e1f8d9..64ca3c676703eed55b4ac8a2d4561d48 /** diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index d9e3e4ad108a94ac6f0f5378d22d47845091efb4..bdee63fb97cbc0c9fbe7df74de5cb5f4ed7de3ca 100644 +index 057f4db9cb6b686ab941ec5d3e6ca23dcfbd845f..db8ffa9b303b9128be175f383fdf838a4e0719e5 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -195,6 +195,18 @@ public interface UnsafeValues { +@@ -197,6 +197,18 @@ public interface UnsafeValues { */ public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial); diff --git a/patches/api/0294-Add-more-line-of-sight-methods.patch b/patches/api/0294-Add-more-line-of-sight-methods.patch index 6540c2d0f4..fbd43414de 100644 --- a/patches/api/0294-Add-more-line-of-sight-methods.patch +++ b/patches/api/0294-Add-more-line-of-sight-methods.patch @@ -23,10 +23,10 @@ index d8b1fa79dc24138dc71e32c14bda71c1d570ed88..b68367f123f029c3ff47eab6bfabd7a8 // Paper end } diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index e9919fce380ec1d0d48b3ac706e7fd31af0be26b..b1fb059fc2249814c9e509c219da2aed84d34fe0 100644 +index 0ed9ad6ed755c5b46ec16e33c3d56e7f80345066..99f314f25d1d6118e0884822d428c47060373bec 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -590,6 +590,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -622,6 +622,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ public boolean hasLineOfSight(@NotNull Entity other); diff --git a/patches/api/0297-Missing-Entity-API.patch b/patches/api/0297-Missing-Entity-API.patch index f9455519bb..2b32abe3c3 100644 --- a/patches/api/0297-Missing-Entity-API.patch +++ b/patches/api/0297-Missing-Entity-API.patch @@ -585,10 +585,10 @@ index 6b3c9bef9a8a34ddc6ff42cf358541a2665bf5e3..9c618a27d590f186f29c5d9094fc565e + // Paper end } diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc5285ca17 100644 +index 99f314f25d1d6118e0884822d428c47060373bec..13eb80455dd589e87c39a7a5570ef093c7660205 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -960,6 +960,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -992,6 +992,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource * * @param invisible If the entity is invisible */ @@ -596,7 +596,7 @@ index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc public void setInvisible(boolean invisible); /** -@@ -967,6 +968,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -999,6 +1000,7 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource * * @return Whether the entity is invisible */ @@ -604,11 +604,11 @@ index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc public boolean isInvisible(); // Paper start -@@ -1016,6 +1018,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - void clearActiveItem(); +@@ -1035,6 +1037,57 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource + void setShieldBlockingDelay(int delay); // Paper end -+ // Paper start ++ // Paper start - missing entity API + /** + * Retrieves the sideways movement direction of the entity. + *

    @@ -657,11 +657,11 @@ index b1fb059fc2249814c9e509c219da2aed84d34fe0..ff89fc699b7aaba982c59ace4effaffc + * @return Forwards movement direction, ranging from -1 (backward) to 1 (forward). + */ + float getForwardsMovement(); -+ // Paper end ++ // Paper end - missing entity API + + // Paper start - active item API /** - * Get's remaining time a player needs to keep hands raised with an item to finish using it. - * @return Remaining ticks to use the item + * Gets the item being actively "used" or consumed. diff --git a/src/main/java/org/bukkit/entity/Llama.java b/src/main/java/org/bukkit/entity/Llama.java index d23226ccb0f6c25028f000ce31346cd0a8898e6a..bc84b892cae5fe7019a3ad481e9da79956efa1fe 100644 --- a/src/main/java/org/bukkit/entity/Llama.java diff --git a/patches/api/0301-Stinger-API.patch b/patches/api/0301-Stinger-API.patch index 4966f6d228..2feda687e5 100644 --- a/patches/api/0301-Stinger-API.patch +++ b/patches/api/0301-Stinger-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index ff89fc699b7aaba982c59ace4effaffc5285ca17..41ca8fea2aede178bdbe87c05588bce4f2faf8e6 100644 +index 13eb80455dd589e87c39a7a5570ef093c7660205..2727eef973a40b5d96f59671e0415e9544a0550c 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -419,6 +419,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -451,6 +451,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource int getNextArrowRemoval(); // Paper end - Add methods for working with arrows stuck in living entities diff --git a/patches/api/0313-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/api/0313-Add-methods-to-find-targets-for-lightning-strikes.patch index c84e83d2de..9c34b1a23f 100644 --- a/patches/api/0313-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/api/0313-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index d09c6b7c7b80f1f59e052ddb4aa8ad05b63fca2b..6897600a6879d88cea287cde350c1e9cd11ae96d 100644 +index 4f724c337da08da6bbc8b1452dbd64eefd54a879..5c61b9964e9abe76b5604c73bdd211a9c1c9b619 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -737,6 +737,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -746,6 +746,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @NotNull public LightningStrike strikeLightningEffect(@NotNull Location loc); diff --git a/patches/api/0314-Get-entity-default-attributes.patch b/patches/api/0314-Get-entity-default-attributes.patch index 60dc6739f1..281ddf96f2 100644 --- a/patches/api/0314-Get-entity-default-attributes.patch +++ b/patches/api/0314-Get-entity-default-attributes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Get entity default attributes diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index bdee63fb97cbc0c9fbe7df74de5cb5f4ed7de3ca..5d4721595a24c8c970f2500fc805c3efc4508157 100644 +index db8ffa9b303b9128be175f383fdf838a4e0719e5..b205937d1cd627c1dd660277f69891b5412b1c16 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -213,5 +213,22 @@ public interface UnsafeValues { +@@ -215,5 +215,22 @@ public interface UnsafeValues { * @return the server's protocol version */ int getProtocolVersion(); diff --git a/patches/api/0319-Add-isCollidable-methods-to-various-places.patch b/patches/api/0319-Add-isCollidable-methods-to-various-places.patch index a3abc4242a..65ecfe9e6c 100644 --- a/patches/api/0319-Add-isCollidable-methods-to-various-places.patch +++ b/patches/api/0319-Add-isCollidable-methods-to-various-places.patch @@ -26,10 +26,10 @@ index 64ca3c676703eed55b4ac8a2d4561d483c6935b1..9f86ad25a57b3f6e6bda1ce657833837 /** diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 5d4721595a24c8c970f2500fc805c3efc4508157..434fde52986ba07d7209ff47483f74fe31e8ebe7 100644 +index b205937d1cd627c1dd660277f69891b5412b1c16..ca0b126bff245ed3fe69bc49c28499f7a7aa9556 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -230,5 +230,14 @@ public interface UnsafeValues { +@@ -232,5 +232,14 @@ public interface UnsafeValues { * @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first) */ @org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey); diff --git a/patches/api/0322-Add-Raw-Byte-Entity-Serialization.patch b/patches/api/0322-Add-Raw-Byte-Entity-Serialization.patch index 0f3a5bae4e..bfc735d882 100644 --- a/patches/api/0322-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/api/0322-Add-Raw-Byte-Entity-Serialization.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 434fde52986ba07d7209ff47483f74fe31e8ebe7..0c7204e390f44b649fc26cd46152abeb2ad2d670 100644 +index ca0b126bff245ed3fe69bc49c28499f7a7aa9556..6426d8585bba71b3e998b1eb078ac0fc67076d65 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -156,6 +156,14 @@ public interface UnsafeValues { +@@ -158,6 +158,14 @@ public interface UnsafeValues { ItemStack deserializeItem(byte[] data); @@ -24,7 +24,7 @@ index 434fde52986ba07d7209ff47483f74fe31e8ebe7..0c7204e390f44b649fc26cd46152abeb * Creates and returns the next EntityId available. *

    diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 9272c15619f623dc39d9c9046fd6463674c37264..9cb84eababf159b04618a605ff03cdaee72c9502 100644 +index 578c22b0aef9c89a3c33b75c33bcdc60bdab6b49..621ee3fd49ee96143df2f24889e9aef74448a544 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -925,5 +925,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent diff --git a/patches/api/0340-More-PotionEffectType-API.patch b/patches/api/0340-More-PotionEffectType-API.patch index 7e3682f8b4..68309b095d 100644 --- a/patches/api/0340-More-PotionEffectType-API.patch +++ b/patches/api/0340-More-PotionEffectType-API.patch @@ -41,19 +41,19 @@ index 4bc53793aade0887fa650a4bbf51d2e57678bd90..18c672f3855a329bf8f87a9de81b677e /** diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java -index 3070f039a583647e7c9a8f15d63291cd265db9fc..0d81e2d36e01128b9c697ec6f5c98083ee492d84 100644 +index f97dff2fd90cc8c35cbde04d1ace81320a8e4658..7d2f2fb6d4a786d15d61fde2ef03783b85d0c47b 100644 --- a/src/main/java/org/bukkit/potion/PotionEffectType.java +++ b/src/main/java/org/bukkit/potion/PotionEffectType.java -@@ -15,7 +15,7 @@ import org.jetbrains.annotations.Nullable; +@@ -16,7 +16,7 @@ import org.jetbrains.annotations.Nullable; /** * Represents a type of potion and its effect on an entity. */ --public abstract class PotionEffectType implements Keyed { -+public abstract class PotionEffectType implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - implement Translatable +-public abstract class PotionEffectType implements Keyed, Translatable { ++public abstract class PotionEffectType implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - implement Translatable private static final BiMap ID_MAP = HashBiMap.create(); /** -@@ -351,4 +351,56 @@ public abstract class PotionEffectType implements Keyed { +@@ -352,4 +352,56 @@ public abstract class PotionEffectType implements Keyed, Translatable { return from; } diff --git a/patches/api/0349-More-Projectile-API.patch b/patches/api/0349-More-Projectile-API.patch index dcad065186..ba63dbcd3b 100644 --- a/patches/api/0349-More-Projectile-API.patch +++ b/patches/api/0349-More-Projectile-API.patch @@ -6,14 +6,37 @@ Subject: [PATCH] More Projectile API Co-authored-by: Nassim Jahnke diff --git a/src/main/java/org/bukkit/entity/AbstractArrow.java b/src/main/java/org/bukkit/entity/AbstractArrow.java -index e8e56e89e32d84af0639fe2e9b0eeabd747b6007..2d7521b71ec16e1b229bbe4c05d51673720df475 100644 +index 839e5b7df49f42b5fec7729997bef3370ba36d80..b36298679d6d52d09fe4bb8e52e19e18f6df742a 100644 --- a/src/main/java/org/bukkit/entity/AbstractArrow.java +++ b/src/main/java/org/bukkit/entity/AbstractArrow.java -@@ -174,5 +174,43 @@ public interface AbstractArrow extends Projectile { - ALLOWED, +@@ -130,17 +130,21 @@ public interface AbstractArrow extends Projectile { + * Gets the ItemStack which will be picked up from this arrow. + * + * @return The picked up ItemStack ++ * @deprecated use {@link #getItemStack()} + */ + @NotNull + @ApiStatus.Experimental ++ @Deprecated(forRemoval = true, since = "1.20.4") // Paper + public ItemStack getItem(); + + /** + * Sets the ItemStack which will be picked up from this arrow. + * + * @param item ItemStack set to be picked up ++ * @deprecated until 1.20.5 when the behavior is more defined + */ + @ApiStatus.Experimental ++ @Deprecated // Paper - remove in 1.20.5 + public void setItem(@NotNull ItemStack item); + + /** +@@ -194,4 +198,44 @@ public interface AbstractArrow extends Projectile { CREATIVE_ONLY; } + // Paper end + ++ // Paper start - more projectile API + /** + * Gets the ItemStack for this arrow. + * @@ -51,7 +74,7 @@ index e8e56e89e32d84af0639fe2e9b0eeabd747b6007..2d7521b71ec16e1b229bbe4c05d51673 + * @param sound sound that is played + */ + void setHitSound(@NotNull org.bukkit.Sound sound); - // Paper end ++ // Paper end - more projectile API } diff --git a/src/main/java/org/bukkit/entity/Firework.java b/src/main/java/org/bukkit/entity/Firework.java index 0d31aa0b22cf1e849572294e2cfe38b48c9210af..217d348ad0bbef720b25d3b507a55ca8105b7731 100644 diff --git a/patches/api/0359-Expand-FallingBlock-API.patch b/patches/api/0359-Expand-FallingBlock-API.patch index bbff3129a4..0f65eb8961 100644 --- a/patches/api/0359-Expand-FallingBlock-API.patch +++ b/patches/api/0359-Expand-FallingBlock-API.patch @@ -10,10 +10,10 @@ Subject: [PATCH] Expand FallingBlock API Co-authored-by: Lukas Planz diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 0eb90bfff2e12cb3ed977a581912221ac4dee6f6..5785dda1127106b529f0784df524e120aaf87f4f 100644 +index 7ff0ac9c78c3793791afbfa344a9ced3821d9638..fa81e440ad20ab8740cb073f515d1671dc6ea9a0 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -2261,8 +2261,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2270,8 +2270,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @return The spawned {@link FallingBlock} instance * @throws IllegalArgumentException if {@link Location} or {@link * MaterialData} are null or {@link Material} of the {@link MaterialData} is not a block @@ -24,7 +24,7 @@ index 0eb90bfff2e12cb3ed977a581912221ac4dee6f6..5785dda1127106b529f0784df524e120 public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull MaterialData data) throws IllegalArgumentException; /** -@@ -2275,8 +2277,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2284,8 +2286,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @return The spawned {@link FallingBlock} instance * @throws IllegalArgumentException if {@link Location} or {@link * BlockData} are null @@ -35,7 +35,7 @@ index 0eb90bfff2e12cb3ed977a581912221ac4dee6f6..5785dda1127106b529f0784df524e120 public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull BlockData data) throws IllegalArgumentException; /** -@@ -2293,7 +2297,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -2302,7 +2306,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient * @return The spawned {@link FallingBlock} instance * @throws IllegalArgumentException if {@link Location} or {@link * Material} are null or {@link Material} is not a block diff --git a/patches/api/0363-Add-Player-getFishHook.patch b/patches/api/0363-Add-Player-getFishHook.patch index 291eac5db5..feae3b2e47 100644 --- a/patches/api/0363-Add-Player-getFishHook.patch +++ b/patches/api/0363-Add-Player-getFishHook.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Player#getFishHook diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java -index ff1ebe184ba5a1bdc8e2784025b07d3bb90a5078..8b0d04d5b39ee817555a36adddc39b18fc6f0d02 100644 +index a47ea595c2a23b361a56f13877b67892ecfed826..ee866f3497ed56708d4062685f5585ca06a03955 100644 --- a/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -386,6 +386,13 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder diff --git a/patches/api/0369-Add-NamespacedKey-biome-methods.patch b/patches/api/0369-Add-NamespacedKey-biome-methods.patch index f11f727f1a..97a47e3b8e 100644 --- a/patches/api/0369-Add-NamespacedKey-biome-methods.patch +++ b/patches/api/0369-Add-NamespacedKey-biome-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 0c7204e390f44b649fc26cd46152abeb2ad2d670..741ead65c89d4f9521d35dcbc9661d6772058499 100644 +index 6426d8585bba71b3e998b1eb078ac0fc67076d65..d97e42de951527afb03eafc481704418dedffde9 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -247,5 +247,32 @@ public interface UnsafeValues { +@@ -249,5 +249,32 @@ public interface UnsafeValues { * @throws IllegalArgumentException if {@link Material#isBlock()} is false */ boolean isCollidable(@org.jetbrains.annotations.NotNull Material material); diff --git a/patches/api/0379-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch b/patches/api/0379-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch index 38a3a4452c..e870d6f074 100644 --- a/patches/api/0379-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch +++ b/patches/api/0379-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch @@ -5,14 +5,15 @@ Subject: [PATCH] Add LivingEntity#swingHand(EquipmentSlot) convenience method diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 41ca8fea2aede178bdbe87c05588bce4f2faf8e6..aa20ec645476b2cbb0330c206f163094aebf238e 100644 +index 7ed163813bb13ea6e1b60a94f4ef98b3b55f163c..ec3e597a9e683e5966ef4fff3300c30bde1dd49d 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -1203,5 +1203,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - */ +@@ -1300,4 +1300,24 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @Deprecated void setHurtDirection(float hurtDirection); + // Paper end - hurt direction API + ++ // Paper start - swing hand API + /** + * Makes this entity swing their hand. + * @@ -30,5 +31,5 @@ index 41ca8fea2aede178bdbe87c05588bce4f2faf8e6..aa20ec645476b2cbb0330c206f163094 + this.swingOffHand(); + } + } - // Paper end ++ // Paper end - swing hand API } diff --git a/patches/api/0380-Add-entity-knockback-API.patch b/patches/api/0380-Add-entity-knockback-API.patch index cf91cd8304..4dbce197ca 100644 --- a/patches/api/0380-Add-entity-knockback-API.patch +++ b/patches/api/0380-Add-entity-knockback-API.patch @@ -5,14 +5,15 @@ Subject: [PATCH] Add entity knockback API diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index aa20ec645476b2cbb0330c206f163094aebf238e..70953573a7bcfa682dbaeaa8e3db0c847b254fdd 100644 +index ec3e597a9e683e5966ef4fff3300c30bde1dd49d..b5d882622d9b350b81b6c61348515cbc5aa65777 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -1221,5 +1221,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - this.swingOffHand(); +@@ -1320,4 +1320,18 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource } } + // Paper end - swing hand API + ++ // Paper start - knockback API + /** + * Knocks back this entity from a specific direction with a specified strength. Mechanics such + * as knockback resistance will be factored in. @@ -24,5 +25,5 @@ index aa20ec645476b2cbb0330c206f163094aebf238e..70953573a7bcfa682dbaeaa8e3db0c84 + * @param directionZ The relative z position of the knockback source direction + */ + void knockback(double strength, double directionX, double directionZ); - // Paper end ++ // Paper end - knockback API } diff --git a/patches/api/0387-ItemStack-damage-API.patch b/patches/api/0387-ItemStack-damage-API.patch index f2c4cc4355..a07dfddbc3 100644 --- a/patches/api/0387-ItemStack-damage-API.patch +++ b/patches/api/0387-ItemStack-damage-API.patch @@ -8,14 +8,15 @@ to simulate damage done to an itemstack and all the logic associated with damaging them diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 70953573a7bcfa682dbaeaa8e3db0c847b254fdd..041ff387a0f9e8037e2834118ef241ddb8970907 100644 +index b5d882622d9b350b81b6c61348515cbc5aa65777..6807354bf157060cbddb395dd6220040b84e7c8d 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -1233,5 +1233,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - * @param directionZ The relative z position of the knockback source direction +@@ -1334,4 +1334,53 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ void knockback(double strength, double directionX, double directionZ); + // Paper end - knockback API + ++ // Paper start - ItemStack damage API + /** + * Notifies all clients tracking this entity that the item in + * the slot of this entity broke. @@ -62,7 +63,7 @@ index 70953573a7bcfa682dbaeaa8e3db0c847b254fdd..041ff387a0f9e8037e2834118ef241dd + * @param amount the amount of damage to do + */ + void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount); - // Paper end ++ // Paper end - ItemStack damage API } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java index f236f9bfa4d43dcbad5919abef3620fcd0696880..845037909658884167136955a02b99af0040fa9c 100644 diff --git a/patches/api/0400-Add-Entity-Body-Yaw-API.patch b/patches/api/0400-Add-Entity-Body-Yaw-API.patch index 55b49feb0c..3697d7ccc9 100644 --- a/patches/api/0400-Add-Entity-Body-Yaw-API.patch +++ b/patches/api/0400-Add-Entity-Body-Yaw-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Entity Body Yaw API diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index 909926485a66e09988f7787b1d5ee2cf9c012558..17d5a5458ee51d8db243326745875ef31ba95fb3 100644 +index d6e4c7cdd34b03295825b3c5ad76626f8f48ec0e..11df702c6f8282aa96ae1ed6b9b29c81fbfadbad 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -1020,6 +1020,43 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent @@ -53,14 +53,15 @@ index 909926485a66e09988f7787b1d5ee2cf9c012558..17d5a5458ee51d8db243326745875ef3 // Paper start - Collision API diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 3a26b3c40f877a454c3c76b68b86776f05950002..b7b87b2962eabcf2e8864335e4da22c0b9da8e5c 100644 +index 92c33fc9680159ab4e901cfba08092d868845c63..e3ff310a83b320c26de63e9239db63de271321c2 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -1280,5 +1280,21 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource - * @param amount the amount of damage to do +@@ -1383,4 +1383,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource */ void damageItemStack(org.bukkit.inventory.@NotNull EquipmentSlot slot, int amount); + // Paper end - ItemStack damage API + ++ // Paper start - body yaw API + /** + * Gets entity body yaw + * @@ -76,5 +77,5 @@ index 3a26b3c40f877a454c3c76b68b86776f05950002..b7b87b2962eabcf2e8864335e4da22c0 + * @see Location#setYaw(float) + */ + void setBodyYaw(float bodyYaw); - // Paper end ++ // Paper end - body yaw API } diff --git a/patches/api/0410-Add-method-to-remove-all-active-potion-effects.patch b/patches/api/0410-Add-method-to-remove-all-active-potion-effects.patch index 33a8a647a9..10afeab970 100644 --- a/patches/api/0410-Add-method-to-remove-all-active-potion-effects.patch +++ b/patches/api/0410-Add-method-to-remove-all-active-potion-effects.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index b7b87b2962eabcf2e8864335e4da22c0b9da8e5c..65dab533a33433bdd79601df4f109d9de6998fb8 100644 +index 949539d4614242a8d742cd75242ce753b474edf6..de0e160632e0f0f9dee61007f139f37382f58e26 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -625,6 +625,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -657,6 +657,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource @NotNull public Collection getActivePotionEffects(); diff --git a/patches/api/0418-Fix-custom-statistic-criteria-creation.patch b/patches/api/0418-Fix-custom-statistic-criteria-creation.patch index 4ce5967963..1e6de23d5e 100644 --- a/patches/api/0418-Fix-custom-statistic-criteria-creation.patch +++ b/patches/api/0418-Fix-custom-statistic-criteria-creation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix custom statistic criteria creation diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 741ead65c89d4f9521d35dcbc9661d6772058499..0cfbb77c4da58b0692cb1df5686657b5ce04ad87 100644 +index d97e42de951527afb03eafc481704418dedffde9..c73eed20d18d1109e3b78b9daa92d7438fc52e8d 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -274,5 +274,7 @@ public interface UnsafeValues { +@@ -276,5 +276,7 @@ public interface UnsafeValues { * @throws IllegalStateException if no biome by the given key is registered. */ void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey); diff --git a/patches/api/0438-Add-predicate-for-blocks-when-raytracing.patch b/patches/api/0438-Add-predicate-for-blocks-when-raytracing.patch index 67d10e420e..e03c5e17fa 100644 --- a/patches/api/0438-Add-predicate-for-blocks-when-raytracing.patch +++ b/patches/api/0438-Add-predicate-for-blocks-when-raytracing.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add predicate for blocks when raytracing diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 5785dda1127106b529f0784df524e120aaf87f4f..c0ad21a3dd1f3cd9a4c66000e937e89ffc183638 100644 +index fa81e440ad20ab8740cb073f515d1671dc6ea9a0..377d57b0e603898d309a9384aa8bb9fca97673e3 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java -@@ -1694,6 +1694,27 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -1703,6 +1703,27 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public RayTraceResult rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate filter); @@ -36,7 +36,7 @@ index 5785dda1127106b529f0784df524e120aaf87f4f..c0ad21a3dd1f3cd9a4c66000e937e89f /** * Performs a ray trace that checks for block collisions using the blocks' * precise collision shapes. -@@ -1757,6 +1778,34 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -1766,6 +1787,34 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public RayTraceResult rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks); @@ -71,7 +71,7 @@ index 5785dda1127106b529f0784df524e120aaf87f4f..c0ad21a3dd1f3cd9a4c66000e937e89f /** * Performs a ray trace that checks for both block and entity collisions. *

    -@@ -1790,6 +1839,42 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient +@@ -1799,6 +1848,42 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient @Nullable public RayTraceResult rayTrace(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate filter); diff --git a/patches/api/0446-Improve-Registry.patch b/patches/api/0446-Improve-Registry.patch index da9c8aeaeb..0e4b32604c 100644 --- a/patches/api/0446-Improve-Registry.patch +++ b/patches/api/0446-Improve-Registry.patch @@ -77,14 +77,15 @@ index 18c672f3855a329bf8f87a9de81b677e8e360b41..e1fb4d8cca6a9c59047b1396f5c40bea } } diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java -index 4327cbc15b9b88d3a568edbebc69c94638ea0465..178d83cb3ccff2d12477d3c13ca4f108fa17e619 100644 +index 941fac4eee338870d8c30cb1f64cab572cf54548..74816d6da4d7c8d2fa8a7b93fdc4bf29c8d12803 100644 --- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java +++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java -@@ -50,4 +50,13 @@ public interface TrimMaterial extends Keyed { - * {@link Material#AMETHYST_SHARD}. - */ - public static final TrimMaterial AMETHYST = Registry.TRIM_MATERIAL.get(NamespacedKey.minecraft("amethyst")); -+ // Paper start +@@ -68,4 +68,14 @@ public interface TrimMaterial extends Keyed, Translatable { + @Deprecated(forRemoval = true) + @org.jetbrains.annotations.NotNull String getTranslationKey(); + // Paper end - adventure ++ ++ // Paper start - Registry#getKey + /** + * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_MATERIAL}. TrimMaterials + * can exist without a key. @@ -92,17 +93,18 @@ index 4327cbc15b9b88d3a568edbebc69c94638ea0465..178d83cb3ccff2d12477d3c13ca4f108 + @Deprecated(forRemoval = true, since = "1.20.4") + @Override + org.bukkit.@org.jetbrains.annotations.NotNull NamespacedKey getKey(); -+ // Paper end ++ // Paper end - Registry#getKey } diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java -index 2365220dc0eb1e130b65e81727ff8768dea3f881..e29fc42ae2b9c555db63d10d20552748e28ba60e 100644 +index 3fa087d09c7c2d864eea25659951a537359c9589..31554cfa01360b0f92336617a75f313e0175af7a 100644 --- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java +++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java -@@ -74,4 +74,13 @@ public interface TrimPattern extends Keyed { - * {@link Material#HOST_ARMOR_TRIM_SMITHING_TEMPLATE}. - */ - public static final TrimPattern HOST = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("host")); -+ // Paper start +@@ -92,4 +92,14 @@ public interface TrimPattern extends Keyed, Translatable { + @Deprecated(forRemoval = true) + @org.jetbrains.annotations.NotNull String getTranslationKey(); + // Paper end - adventure ++ ++ // Paper start - Registry#getKey + /** + * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#TRIM_PATTERN}. TrimPatterns + * can exist without a key. @@ -110,5 +112,5 @@ index 2365220dc0eb1e130b65e81727ff8768dea3f881..e29fc42ae2b9c555db63d10d20552748 + @Deprecated(forRemoval = true, since = "1.20.4") + @Override + org.bukkit.@org.jetbrains.annotations.NotNull NamespacedKey getKey(); -+ // Paper end ++ // Paper end - Registry#getKey } diff --git a/patches/api/0450-Add-HiddenPotionEffect-API.patch b/patches/api/0450-Add-HiddenPotionEffect-API.patch index 2c44d32af5..49d193598e 100644 --- a/patches/api/0450-Add-HiddenPotionEffect-API.patch +++ b/patches/api/0450-Add-HiddenPotionEffect-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add HiddenPotionEffect API diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java -index 65dab533a33433bdd79601df4f109d9de6998fb8..5cb82901a5d0c8ee673501fc53389d526d4a5b6f 100644 +index de0e160632e0f0f9dee61007f139f37382f58e26..f5fe2abd28a3f5fa4f2adf1d63ea68a7b890d191 100644 --- a/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/src/main/java/org/bukkit/entity/LivingEntity.java -@@ -559,6 +559,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -591,6 +591,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource /** * Adds the given {@link PotionEffect} to the living entity. @@ -18,7 +18,7 @@ index 65dab533a33433bdd79601df4f109d9de6998fb8..5cb82901a5d0c8ee673501fc53389d52 * * @param effect PotionEffect to be added * @return whether the effect could be added -@@ -583,6 +586,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource +@@ -615,6 +618,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource /** * Attempts to add all of the given {@link PotionEffect} to the living * entity. diff --git a/patches/api/0456-Add-api-for-spawn-egg-texture-colors.patch b/patches/api/0456-Add-api-for-spawn-egg-texture-colors.patch index 22ba7c25bf..35366bea02 100644 --- a/patches/api/0456-Add-api-for-spawn-egg-texture-colors.patch +++ b/patches/api/0456-Add-api-for-spawn-egg-texture-colors.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add api for spawn egg texture colors diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 0cfbb77c4da58b0692cb1df5686657b5ce04ad87..43f779ff7eca7450f52ac3688744743b5c3647bf 100644 +index c73eed20d18d1109e3b78b9daa92d7438fc52e8d..1ac54ae7b4bcc7932492477e88a81954f71f342f 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -277,4 +277,17 @@ public interface UnsafeValues { +@@ -279,4 +279,17 @@ public interface UnsafeValues { String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic); // Paper end diff --git a/patches/api/0457-Add-Lifecycle-Event-system.patch b/patches/api/0457-Add-Lifecycle-Event-system.patch index 635d4a7325..f915f892cf 100644 --- a/patches/api/0457-Add-Lifecycle-Event-system.patch +++ b/patches/api/0457-Add-Lifecycle-Event-system.patch @@ -528,10 +528,10 @@ index 0000000000000000000000000000000000000000..304f978e40e1759bb19704cc5cec3995 + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 43f779ff7eca7450f52ac3688744743b5c3647bf..f2163b5238e1667a44bf623cd52bab90d9f2d88d 100644 +index 1ac54ae7b4bcc7932492477e88a81954f71f342f..14a49bfd1822c25b95000f3fbb60ba1d55ae0d38 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -290,4 +290,12 @@ public interface UnsafeValues { +@@ -292,4 +292,12 @@ public interface UnsafeValues { */ @Nullable org.bukkit.Color getSpawnEggLayerColor(org.bukkit.entity.EntityType entityType, int layer); // Paper end - spawn egg color visibility diff --git a/patches/api/0459-ItemStack-Tooltip-API.patch b/patches/api/0459-ItemStack-Tooltip-API.patch index 9aa55ce1a9..4274a11ce7 100644 --- a/patches/api/0459-ItemStack-Tooltip-API.patch +++ b/patches/api/0459-ItemStack-Tooltip-API.patch @@ -108,10 +108,10 @@ index 0000000000000000000000000000000000000000..1d9bed6691f581529c53b577b26f1d0f + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index f2163b5238e1667a44bf623cd52bab90d9f2d88d..9a65c4f614a6c358d74491794d7b25172a00bc11 100644 +index 14a49bfd1822c25b95000f3fbb60ba1d55ae0d38..b9a07b2db8a3dcdb72c33c8ceda129921b2c02f1 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -298,4 +298,6 @@ public interface UnsafeValues { +@@ -300,4 +300,6 @@ public interface UnsafeValues { @org.jetbrains.annotations.ApiStatus.Internal io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager createPluginLifecycleEventManager(final org.bukkit.plugin.java.JavaPlugin plugin, final java.util.function.BooleanSupplier registrationCheck); // Paper end - lifecycle event API diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch index 8d4ad0ab1c..62a6510820 100644 --- a/patches/server/0001-Setup-Gradle-project.patch +++ b/patches/server/0001-Setup-Gradle-project.patch @@ -28,7 +28,7 @@ index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f +/.factorypath diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 -index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875d6ff8a48 +index 0000000000000000000000000000000000000000..4e0b810bd0a9991d10e13920f47f0b6d0a56f6aa --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,141 @@ @@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875 + implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") { + exclude(group = "org.apache.logging.log4j", module = "log4j-api") + } -+ implementation("org.ow2.asm:asm-commons:9.5") ++ implementation("org.ow2.asm:asm-commons:9.7") + implementation("commons-lang:commons-lang:2.6") + runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1") + runtimeOnly("com.mysql:mysql-connector-j:8.2.0") @@ -57,8 +57,8 @@ index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875 + + testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") + testImplementation("org.hamcrest:hamcrest:2.2") -+ testImplementation("org.mockito:mockito-core:5.5.0") -+ testImplementation("org.ow2.asm:asm-tree:9.5") ++ testImplementation("org.mockito:mockito-core:5.11.0") ++ testImplementation("org.ow2.asm:asm-tree:9.7") +} + +val craftbukkitPackageVersion = "1_20_R3" // Paper @@ -175,7 +175,7 @@ index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875 +} diff --git a/pom.xml b/pom.xml deleted file mode 100644 -index 323892c4a4bbbb9e36a6295bb390ad82798e213c..0000000000000000000000000000000000000000 +index 226b56846562846d1b89c54b67b4ccc235eaf3e9..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,608 +0,0 @@ @@ -242,7 +242,7 @@ index 323892c4a4bbbb9e36a6295bb390ad82798e213c..00000000000000000000000000000000 - - org.ow2.asm - asm-commons -- 9.5 +- 9.7 - compile - - @@ -466,13 +466,13 @@ index 323892c4a4bbbb9e36a6295bb390ad82798e213c..00000000000000000000000000000000 - - org.mockito - mockito-core -- 5.5.0 +- 5.11.0 - test - - - org.ow2.asm - asm-tree -- 9.5 +- 9.7 - test - - diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch index d5d9b33f1c..d9c9c0db74 100644 --- a/patches/server/0003-Build-system-changes.patch +++ b/patches/server/0003-Build-system-changes.patch @@ -20,7 +20,7 @@ index 74849d7b20e3c3831a6a6c3715a6e875d6ff8a48..ff9e7b4c4354d4475559213cdaa01728 - exclude(group = "org.apache.logging.log4j", module = "log4j-api") - } + implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion - implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm-commons:9.7") implementation("commons-lang:commons-lang:2.6") runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1") @@ -36,6 +34,7 @@ tasks.jar { @@ -111,7 +111,7 @@ index a2a8bce29ec5540de89095574dfdc0ca9b17bbd3..d92cd89373f8373c367ce422328b9836 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index dc1021186ad4c4db26fb498e58ddec06f8bc1cf6..96210dd54e8ff6dc0375a8d03bf14fec1b26aaeb 100644 +index 2930f37c663a1824a2d38df8e4b679aa6adbd870..67d347741db1c5a9a6568ee084388a59e35b16ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -209,7 +209,7 @@ public class Main { diff --git a/patches/server/0004-Test-changes.patch b/patches/server/0004-Test-changes.patch index 29d1714a03..b13f9277b7 100644 --- a/patches/server/0004-Test-changes.patch +++ b/patches/server/0004-Test-changes.patch @@ -10,8 +10,8 @@ index ff9e7b4c4354d4475559213cdaa01728601859fa..5304f5de52a76eee876ac8f0b2834a93 +++ b/build.gradle.kts @@ -23,6 +23,7 @@ dependencies { testImplementation("org.hamcrest:hamcrest:2.2") - testImplementation("org.mockito:mockito-core:5.5.0") - testImplementation("org.ow2.asm:asm-tree:9.5") + testImplementation("org.mockito:mockito-core:5.11.0") + testImplementation("org.ow2.asm:asm-tree:9.7") + testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest } diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index 8222616c5e..21f0044039 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -21,7 +21,7 @@ index beb50d67ea2c1933a115766627b2adabd2032929..b8970d0064b9b64e1c50ab373818c386 @@ -11,6 +11,7 @@ dependencies { implementation("jline:jline:2.12.1") implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion - implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm-commons:9.7") + implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files implementation("commons-lang:commons-lang:2.6") runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1") @@ -4847,7 +4847,7 @@ index 602964d92ddf9e4ec47ed3cb45787fdd061a881e..66550ce5cc83534af8dcac338db5cd4c String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName); LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath()); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index dafeae664880f6da2f1aa0d9b4fbd743ed9b5572..15bdddae68db770690ddfcb19c7ecdbedbfa8cb7 100644 +index 42da710d18063aed6fd450fe31277d7daf0542c1..62e096c9cc05c387ca2413a490f44c6c66a5c41e 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -295,6 +295,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a038920172102f5ad4ceb77abef4f7b61fca5862..ea73e8a04ee767625d06483dce83d68262887a27 100644 +index cb0d7779a2eeadca49a99ab31217b27f5fd49e4c..864da662a81b653cd94e2270be262e912e351e21 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -7249,7 +7249,7 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671 public BlockState getBlockState(BlockPos pos) { return Blocks.AIR.defaultBlockState(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 00ddf94c5bade8c0c486337ce920f59d63cb64e2..d89431b476b032f3ff86097bb91b86016d4e3371 100644 +index bd9ea2bd012cdcf07ac322b3e0360c6c336ab1f9..bede1a64e4f04aa8e87ddb44f2cc4a1ab46a3b81 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -93,6 +93,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -7340,7 +7340,7 @@ index 00ddf94c5bade8c0c486337ce920f59d63cb64e2..d89431b476b032f3ff86097bb91b8601 return this.setBlock(pos, state, flags, 512); } -@@ -555,7 +597,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -556,7 +598,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (this.isOutsideBuildHeight(pos)) { return Blocks.VOID_AIR.defaultBlockState(); } else { @@ -7773,10 +7773,10 @@ index 2cc1871c81056acd0582184bb684e672d14d3b6f..5cf26c39b00ea1f7b1c5719f434af79f + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index fcf06c157fa8ecdb742c301a95da8489e951ea20..1ce9787b04e28b3a50fdc7779a430c3be60a7646 100644 +index 0630680d1ff7ffd2e9c323a800213b1137817642..f012ba9c55241afb159136e8b55e774047efa2c8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -251,8 +251,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -252,8 +252,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Chunk[] getLoadedChunks() { @@ -7787,7 +7787,7 @@ index fcf06c157fa8ecdb742c301a95da8489e951ea20..1ce9787b04e28b3a50fdc7779a430c3b } @Override -@@ -327,7 +327,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -328,7 +328,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean refreshChunk(int x, int z) { @@ -7796,7 +7796,7 @@ index fcf06c157fa8ecdb742c301a95da8489e951ea20..1ce9787b04e28b3a50fdc7779a430c3b if (playerChunk == null) return false; playerChunk.getTickingChunkFuture().thenAccept(either -> { -@@ -2055,4 +2055,55 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2075,4 +2075,55 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.spigot; } // Spigot end @@ -8177,7 +8177,7 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index a2eb1e6dc8218157c1a5bbd769dd3b1d881fddb6..56c3aa7647eb2890cf7f546d35002b0c43724500 100644 +index 09b3bfa3ad0cf060b126cffd1de1032bc329cb44..30f0c671464e2d4557845f150d8d18bfcd645e14 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -107,8 +107,17 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index f778dc3ba4..f1810399dd 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2667,7 +2667,7 @@ index a5578cbce2d1d39ba3315e53425d5323e6823a65..7a036c08fa67504d06c8f72a32c22814 @Override diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0c77b4b201f6586b4d143ce2c3e710bf9d276a20..3691fd58c7baf98b15c50fa4dacf3a35f4f9b4b8 100644 +index 4035faedd9f5f72f262822a9f050178d99be06e4..4c18491a627e66297627abbded1af48b2026e610 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -191,6 +191,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot @@ -2727,7 +2727,7 @@ index 0c77b4b201f6586b4d143ce2c3e710bf9d276a20..3691fd58c7baf98b15c50fa4dacf3a35 this.motd = motd; } -@@ -2439,23 +2450,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop spawnCategoryLimit = new Object2IntOpenHashMap<>(); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); @@ -3588,7 +3588,7 @@ index 1ce9787b04e28b3a50fdc7779a430c3be60a7646..8ff8d8174cd32d25b33c2e773d30c474 private static final Random rand = new Random(); -@@ -1659,6 +1660,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1679,6 +1680,42 @@ public class CraftWorld extends CraftRegionAccessor implements World { entityTracker.broadcastAndSend(packet); } } @@ -3631,7 +3631,7 @@ index 1ce9787b04e28b3a50fdc7779a430c3be60a7646..8ff8d8174cd32d25b33c2e773d30c474 private static Map> gamerules; public static synchronized Map> getGameRulesNMS() { -@@ -2105,5 +2142,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2125,5 +2162,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { public void setSendViewDistance(final int viewDistance) { throw new UnsupportedOperationException("Not implemented yet"); } @@ -3651,7 +3651,7 @@ index 1ce9787b04e28b3a50fdc7779a430c3be60a7646..8ff8d8174cd32d25b33c2e773d30c474 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 02060584892d630d91f58e864ed34656ee738572..5158d536de16c93358d1b335b0fcfbe0d6ce848e 100644 +index 6f9196120177104c6e689ff1d39a06f91d04b0c8..c513d932e0c455401bbe53d13779df0e4bda16ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -20,6 +20,12 @@ public class Main { @@ -4039,7 +4039,7 @@ index 1e82312c24cb752d63b165926861fc178cd7849b..7f22950ae61436e91a59cd29a345809c + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index 24052b8102061c6fbf01b3e9b2346ed9783787e6..f0f7fb977edb7e7009716429f007e44fa36bfcda 100644 +index 9c1063d92a49c71f4458bf1634bcf9d79302ecca..f24b4732db849893fd870b4b6a49f1c4b3eacdec 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -147,6 +147,12 @@ public class CraftEnchantment extends Enchantment implements Handleable windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory()); @@ -4704,10 +4704,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364 @Override public int getLineWidth() { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 2496f4462b35a7297dd9320c35f109d3c2a9867f..6571adf5285ab3f84513c2f5b32ff0523c2cccd6 100644 +index 8290925413aab682504e98bde5fd6845929b3541..5ee9726324591055bb5d00cf9646203fbe7cc833 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -905,7 +905,7 @@ public class CraftEventFactory { +@@ -906,7 +906,7 @@ public class CraftEventFactory { return event; } @@ -4716,7 +4716,7 @@ index 2496f4462b35a7297dd9320c35f109d3c2a9867f..6571adf5285ab3f84513c2f5b32ff052 CraftPlayer entity = victim.getBukkitEntity(); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); -@@ -932,7 +932,7 @@ public class CraftEventFactory { +@@ -933,7 +933,7 @@ public class CraftEventFactory { * Server methods */ public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) { @@ -5167,6 +5167,44 @@ index 39eb09106c1e3d00eb32b56babae751f487d6bcb..893da5266fc09e583a660bc23ac84008 @Override public boolean hasRepairCost() { return this.repairCost > 0; +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java +index 49752459ad67db3182c6d6d30ab91f2a420847a8..147950b8a1c853e1b52fdb29b26e839c2dd7bd01 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java +@@ -41,6 +41,14 @@ public class CraftTrimMaterial implements TrimMaterial, Handleable { - if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590 + if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players if (listener.shouldHandleMessage(packet)) { - try { + co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings @@ -714,7 +714,7 @@ index daedf825e68655492f5ab776bc206a5eb87c0170..7de24c39b460e43d27839b3821e67213 } catch (Exception exception) { label25: diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3691fd58c7baf98b15c50fa4dacf3a35f4f9b4b8..a6a8b5079ceaad90a79a09cab5c38a6fde6d33ee 100644 +index 4c18491a627e66297627abbded1af48b2026e610..3365d2ec8426888c16873a311226fa69840fa2f0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -186,7 +186,7 @@ import org.bukkit.craftbukkit.Main; @@ -1315,7 +1315,7 @@ index 5e00df1cd2b8a6691b2f9490b1f4c3ed4d6a988a..72488b0d499e4e0d0ccba38622cc5a3f public UserWhiteList getWhiteList() { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 01c2ccb29dd74655ef65cc29ff2cafe6b467e5a5..cdb4acbaf019608c57d7a40c6928ddc9c00fd1d5 100644 +index 17e489c4650ba421a993c863426f1a2084d44fb0..360e322ee298048bd280160a49f000384d930c3a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -135,7 +135,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent; @@ -1393,7 +1393,7 @@ index c4bc491eed487c0a7e30538b0fb46fde91cd7b31..382b55167dede435b034866bd394455f } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index ea73e8a04ee767625d06483dce83d68262887a27..5ae9f9a4cb903909cb26a612a847d12515c52d91 100644 +index 864da662a81b653cd94e2270be262e912e351e21..da755e478d2ab1444c92afd0d916589b2e6f4df4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -142,7 +142,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -1474,7 +1474,7 @@ index ea73e8a04ee767625d06483dce83d68262887a27..5ae9f9a4cb903909cb26a612a847d125 if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) { this.hurt(this.damageSources().drown(), 1.0F); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index d89431b476b032f3ff86097bb91b86016d4e3371..aa22d4024cdd0ecb1c0442ecdeae00822597362e 100644 +index bede1a64e4f04aa8e87ddb44f2cc4a1ab46a3b81..d02cc220c8bd59a1289f34fd9fb70a00b0fbc07a 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -91,7 +91,6 @@ import org.bukkit.Bukkit; @@ -1503,7 +1503,7 @@ index d89431b476b032f3ff86097bb91b86016d4e3371..aa22d4024cdd0ecb1c0442ecdeae0082 this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime); } -@@ -725,15 +724,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -726,15 +725,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.timings.tileEntityTick.stopTiming(); // Spigot this.tickingBlockEntities = false; @@ -2019,7 +2019,7 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222 + } // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 8db0df55c5e23657b3a99a56fefb8e7419618c16..5e541636b216d4f46be18b1031522bd92e667b67 100644 +index ea994c34e1ca725eae4d05223fc09fc1308b0730..d72e6ebc8b7b002279ba61c30b5a42f8cd5b3b7b 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -214,6 +214,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -2035,7 +2035,7 @@ index 8db0df55c5e23657b3a99a56fefb8e7419618c16..5e541636b216d4f46be18b1031522bd9 public static byte toLegacyData(BlockState data) { return CraftLegacy.toLegacyData(data); -@@ -457,6 +463,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -462,6 +468,12 @@ public final class CraftMagicNumbers implements UnsafeValues { public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) { return new CraftDamageSourceBuilder(damageType); } diff --git a/patches/server/0027-Implement-Paper-VersionChecker.patch b/patches/server/0027-Implement-Paper-VersionChecker.patch index 11cae67520..5f32648869 100644 --- a/patches/server/0027-Implement-Paper-VersionChecker.patch +++ b/patches/server/0027-Implement-Paper-VersionChecker.patch @@ -140,10 +140,10 @@ index 0000000000000000000000000000000000000000..22a55be34fde453fedd987173d95b8b3 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 5e541636b216d4f46be18b1031522bd92e667b67..d11773ed44936f8836f2f8e582d5e9573af5b439 100644 +index d72e6ebc8b7b002279ba61c30b5a42f8cd5b3b7b..82d862432d061f8f1809647d9eecfff38a6311d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -468,6 +468,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -473,6 +473,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public String getTimingsServerName() { return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName; } diff --git a/patches/server/0033-Prevent-block-entity-and-entity-crashes.patch b/patches/server/0033-Prevent-block-entity-and-entity-crashes.patch index c08c35d2fe..e2f119f399 100644 --- a/patches/server/0033-Prevent-block-entity-and-entity-crashes.patch +++ b/patches/server/0033-Prevent-block-entity-and-entity-crashes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent block entity and entity crashes diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 9cfc60863caeaa1fd0df153889cadd88fef9e111..3442bfe428f6d0655082468f281cbda97f88f6ea 100644 +index 953ff52b6e6397a8f81b0935fc2fb8cfadf5cf40..eb6bf467c92cb04c9f1ffcde0b5df64e9a160d59 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -734,11 +734,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -735,11 +735,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { try { tickConsumer.accept(entity); } catch (Throwable throwable) { diff --git a/patches/server/0048-Disable-spigot-tick-limiters.patch b/patches/server/0048-Disable-spigot-tick-limiters.patch index 4326d4ee93..57aa7d7317 100644 --- a/patches/server/0048-Disable-spigot-tick-limiters.patch +++ b/patches/server/0048-Disable-spigot-tick-limiters.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 7ead83d46e7bb3ee3586acf695b08f197f61f04a..6fbadd278138743f87fcf6b3c3d3c57af41d437c 100644 +index 673141ab586057b2d05b3921cc4d42b4f5e049ab..3f910b1712c41e91de99ad00a90e0f3081f94deb 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -707,9 +707,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -708,9 +708,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { boolean flag = this.tickRateManager().runsNormally(); int tilesThisCycle = 0; diff --git a/patches/server/0059-Add-exception-reporting-event.patch b/patches/server/0059-Add-exception-reporting-event.patch index 5ca616d57f..76f15e2d28 100644 --- a/patches/server/0059-Add-exception-reporting-event.patch +++ b/patches/server/0059-Add-exception-reporting-event.patch @@ -81,10 +81,10 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..2b5b2869589991be37a4f128faabbff5 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c74102a53daab92f0d7d4d7619af0e3264322847..3452010631eede3907b29b9f76ba12c9c6808b6f 100644 +index 3f910b1712c41e91de99ad00a90e0f3081f94deb..b91df88036d3ec2579883a9c65a7b80d4c0be81b 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -736,6 +736,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -737,6 +737,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper start - Prevent block entity and entity crashes final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ()); MinecraftServer.LOGGER.error(msg, throwable); diff --git a/patches/server/0061-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/server/0061-Add-methods-for-working-with-arrows-stuck-in-living-.patch index 59051e3b97..5fb20edd00 100644 --- a/patches/server/0061-Add-methods-for-working-with-arrows-stuck-in-living-.patch +++ b/patches/server/0061-Add-methods-for-working-with-arrows-stuck-in-living-.patch @@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now deprecated diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a73a5a8291ddd954f2c7b73a4895933e715c5d68..4636e1ebf11025a551d398a6594b1506748a8390 100644 +index 844a97b0eb396835ec72b4d14c9362a2ea2a8709..75dccbdde0d116ef194aa2ced328ad3c3992204e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -267,10 +267,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -283,10 +283,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } @Override @@ -41,7 +41,7 @@ index a73a5a8291ddd954f2c7b73a4895933e715c5d68..4636e1ebf11025a551d398a6594b1506 @Override public void damage(double amount) { -@@ -799,4 +818,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -815,4 +834,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { this.getHandle().persistentInvisibility = invisible; this.getHandle().setSharedFlag(5, invisible); } diff --git a/patches/server/0074-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch b/patches/server/0074-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch index 1f83f8eee2..d01a3c66bf 100644 --- a/patches/server/0074-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch +++ b/patches/server/0074-Only-process-BlockPhysicsEvent-if-a-plugin-has-a-lis.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener Saves on some object allocation and processing when no plugin listens to this diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cc2775d94f3b6ebd7f97e14e324bf292d5874de4..a4df17bf15ac8e427039428f947df4f08c746de6 100644 +index 001592ec2ec34a744713d4d6c95a00955889facd..72ddebd40c2b29e0c6e069d62ed206c29ad5fa6b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1457,6 +1457,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { return worldserver + " " + worldserver.dimension().location(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a127acc6c44bfd078e06c74b408d62df6e85d1fe..5975cc2fa72609ea5f3e6f99155d6e5bc321a321 100644 +index ea4eacf66651798185e1c445979a465e173571d0..1c3b12692094c1eaa086ebb2f060b22aaf9d9b39 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -30,10 +30,10 @@ index a127acc6c44bfd078e06c74b408d62df6e85d1fe..5975cc2fa72609ea5f3e6f99155d6e5b public LevelChunk getChunkIfLoaded(int x, int z) { return this.chunkSource.getChunk(x, z, false); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c3138a2ff6446fb72d9eb1bd31f851d7df6b94f2..61056b2873a58bf8d0f70e39022ded4b1fcbc5a5 100644 +index 2ad3c16bf36972ff55269612f02cdb4f558f35b7..424377f062c6443460a9814feb8b90e7bef71c6a 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -496,7 +496,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -497,7 +497,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam CraftWorld world = ((ServerLevel) this).getWorld(); diff --git a/patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch index ec19e93768..6b9696541f 100644 --- a/patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch @@ -59,10 +59,10 @@ index 37cba1e693490e42908f45dc68e60ac3afebbb49..801e1727bd291f647c91e2c325810ead @Override diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 6571adf5285ab3f84513c2f5b32ff0523c2cccd6..c8f20543cb7f69af010e3fd53f31b7253426f2d0 100644 +index 5ee9726324591055bb5d00cf9646203fbe7cc833..8de2f4ca83017d37c63d33c6283078a71143f077 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1850,4 +1850,13 @@ public class CraftEventFactory { +@@ -1856,4 +1856,13 @@ public class CraftEventFactory { Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause)); } diff --git a/patches/server/0090-remove-null-possibility-for-getServer-singleton.patch b/patches/server/0090-remove-null-possibility-for-getServer-singleton.patch index 928828b9e7..935454baa7 100644 --- a/patches/server/0090-remove-null-possibility-for-getServer-singleton.patch +++ b/patches/server/0090-remove-null-possibility-for-getServer-singleton.patch @@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton to stop IDE complaining about potential NPE diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 866ff31a6057eda7612cfa48c0028fb988deed64..2c500fed04982c502b3e6fb1687b38bfaaa37f69 100644 +index 677ce578af9da4b512bad47fe54625305e99c7e4..20ee0fd8f5a808436fae60b64fc3e8966146ba71 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -25,7 +25,7 @@ index 866ff31a6057eda7612cfa48c0028fb988deed64..2c500fed04982c502b3e6fb1687b38bf this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; this.profiler = this.metricsRecorder.getProfiler(); this.onMetricsRecordingStopped = (methodprofilerresults) -> { -@@ -2430,9 +2432,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pendingBlockEntityTickers = Lists.newArrayList(); private boolean tickingBlockEntities; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8ff8d8174cd32d25b33c2e773d30c474b4e903d3..07aac886235e18a29420c494380e6b26bfa8f36e 100644 +index 95b3bcd4cfcedc358096831bc59a7effd186a063..aac9eee069b16ab70b7553c6c324149011c94f8e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -163,6 +163,56 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -164,6 +164,56 @@ public class CraftWorld extends CraftRegionAccessor implements World { private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers diff --git a/patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch index 257a90e0ce..8e2b8a4474 100644 --- a/patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -58,7 +58,7 @@ index 1219b12750edb855df0962d14d7f3c1859d78b2e..511dfff4870c197b6f69169cc0504ef0 + alsoShade(log4jPlugins.output) + // Paper end implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion - implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm-commons:9.7") implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files @@ -75,7 +96,7 @@ relocation { } @@ -250,7 +250,7 @@ index 8323f135d6bf2e1f12525e05094ffa3f2420e7e1..a143ea1e58464a3122fbd8ccafe417bd } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 1d8e17f4b862e71cc5ef8c5eabfb80dc427aec51..6587cd9ea257d0f6f1308ea8ca4d0245178b2870 100644 +index 48513e585ce02c301983adbe1224e95ff7f9a345..22b9d4bebee30877225b08b46cec6084b12a9c5a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -155,7 +155,7 @@ import org.slf4j.Logger; diff --git a/patches/server/0136-Shoulder-Entities-Release-API.patch b/patches/server/0136-Shoulder-Entities-Release-API.patch index eb728998dd..878ba52040 100644 --- a/patches/server/0136-Shoulder-Entities-Release-API.patch +++ b/patches/server/0136-Shoulder-Entities-Release-API.patch @@ -59,10 +59,10 @@ index 7429df8c6f29f7216e33cde3226424936de97cf9..4bbf8bb418e3585be2efce5d9a8785fa @Override public abstract boolean isSpectator(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 52222f15399f2e1828f93b0f69e34157e3abff23..e6b16e3db7a197c7af0c4fdb782749c3c3f37538 100644 +index 4d92ca5b580e66e78b592bc0de1078dc10a85f39..2cb3c0b96b769c395f7fecbeebba0ff2a33b692d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -516,6 +516,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -513,6 +513,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { this.getHandle().getCooldowns().addCooldown(CraftItemType.bukkitToMinecraft(material), ticks); } diff --git a/patches/server/0145-LivingEntity-setKiller.patch b/patches/server/0145-LivingEntity-setKiller.patch index ece70c37de..24334c96fd 100644 --- a/patches/server/0145-LivingEntity-setKiller.patch +++ b/patches/server/0145-LivingEntity-setKiller.patch @@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 4636e1ebf11025a551d398a6594b1506748a8390..82773a05783b731e2f7bd00c8ec68090d15a7b66 100644 +index 75dccbdde0d116ef194aa2ced328ad3c3992204e..19f8cfe1146374169208f26632763a882291431c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -390,6 +390,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -406,6 +406,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity(); } diff --git a/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch b/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch index caff68b415..e5c5e50cd1 100644 --- a/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch +++ b/patches/server/0158-Fix-MC-117075-Block-entity-unload-lag-spike.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: Block entity unload lag spike diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 0045016cd22c34168c4ae5f2fe951d536394be9a..c8914696785d0d6c451d598616a83c316f611aad 100644 +index 7800276dea6176ed489809d589b850252fc9333b..79588b6535eb6e0d21bedc1fc5e939903b450e2f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -729,6 +729,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -730,6 +730,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { boolean flag = this.tickRateManager().runsNormally(); int tilesThisCycle = 0; @@ -17,7 +17,7 @@ index 0045016cd22c34168c4ae5f2fe951d536394be9a..c8914696785d0d6c451d598616a83c31 for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0; TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition); -@@ -737,12 +739,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -738,12 +740,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (tickingblockentity.isRemoved()) { // Spigot start tilesThisCycle--; diff --git a/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch b/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch index 680b5186c3..30982f3423 100644 --- a/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch +++ b/patches/server/0159-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c8914696785d0d6c451d598616a83c316f611aad..8a7276f83744252ac5a418f9acb219e02c508b2f 100644 +index 79588b6535eb6e0d21bedc1fc5e939903b450e2f..232281b12fb1970fae82ce8fd3ffe1586d02bfb3 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -152,7 +152,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -39,7 +39,7 @@ index c8914696785d0d6c451d598616a83c316f611aad..8a7276f83744252ac5a418f9acb219e0 if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); this.capturedBlockStates.put(pos.immutable(), blockstate); -@@ -410,7 +410,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -411,7 +411,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start - capture blockstates boolean captured = false; if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) { @@ -49,7 +49,7 @@ index c8914696785d0d6c451d598616a83c316f611aad..8a7276f83744252ac5a418f9acb219e0 this.capturedBlockStates.put(pos.immutable(), blockstate); captured = true; } -@@ -611,7 +612,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -612,7 +613,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public BlockState getBlockState(BlockPos pos) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { diff --git a/patches/server/0182-Add-openSign-method-to-HumanEntity.patch b/patches/server/0182-Add-openSign-method-to-HumanEntity.patch index 73acd70a6b..1efbc4888d 100644 --- a/patches/server/0182-Add-openSign-method-to-HumanEntity.patch +++ b/patches/server/0182-Add-openSign-method-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add openSign method 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 e6b16e3db7a197c7af0c4fdb782749c3c3f37538..092d2bfab7e8fd9840e853f09adc85311ab29046 100644 +index 2cb3c0b96b769c395f7fecbeebba0ff2a33b692d..5d69945e6428c04a4b89c7469de905ed05d9dfc0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -626,6 +626,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -623,6 +623,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } } diff --git a/patches/server/0187-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0187-Expand-World.spawnParticle-API-and-add-Builder.patch index 336526462f..946d5a374a 100644 --- a/patches/server/0187-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/0187-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6cadfd678f1b2323a763ffd9220de7394620328b..180a9ade7bbc84d8c64b6c92583ba870464c23a5 100644 +index d2266bc75f2c1b0b02405eea0711a7b53d1a9e7a..256b9c6cbf52c252f8174d0aa74e1270fb092ae9 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1503,12 +1503,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -34,10 +34,10 @@ index 6cadfd678f1b2323a763ffd9220de7394620328b..180a9ade7bbc84d8c64b6c92583ba870 if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 07aac886235e18a29420c494380e6b26bfa8f36e..012c0bf4f824543d475e97e0edb6c4fe88d046e5 100644 +index aac9eee069b16ab70b7553c6c324149011c94f8e..1480fbf52f9eb11892886b99a76a971cabb72c92 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1932,13 +1932,20 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1952,13 +1952,20 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/patches/server/0192-WitchReadyPotionEvent.patch b/patches/server/0192-WitchReadyPotionEvent.patch index b01cacf58e..bbc7fb8788 100644 --- a/patches/server/0192-WitchReadyPotionEvent.patch +++ b/patches/server/0192-WitchReadyPotionEvent.patch @@ -22,10 +22,10 @@ index 96a87db9f8976d3f1ff09beb9598db31fff72d5b..25a1edf64602a13c07779e58b167a847 this.setUsingItem(true); if (!this.isSilent()) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index c1f3086d37e2959bbcc23bc1b779215bc35c99c4..096e80bb71d10c897a20bb3c0b4b761328c9f56e 100644 +index 2bcac771a37b3e5d3b7173e24dad7823fb29757c..203b6539c55b74484cff476b6472f44ed56112c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1896,4 +1896,14 @@ public class CraftEventFactory { +@@ -1902,4 +1902,14 @@ public class CraftEventFactory { ).callEvent(); } // Paper end - PlayerUseUnknownEntityEvent diff --git a/patches/server/0199-Make-shield-blocking-delay-configurable.patch b/patches/server/0199-Make-shield-blocking-delay-configurable.patch index 1c6990bb95..ae7ebd4f8e 100644 --- a/patches/server/0199-Make-shield-blocking-delay-configurable.patch +++ b/patches/server/0199-Make-shield-blocking-delay-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index bbf3286cb69f931be528726e45784eec9f8e0af3..21bef887193c777ec1e311b3bf5c0213180ea4ca 100644 +index 4af3e59b9ad84aaf1a5dd8f1373b781233ba07d6..7810739098ee52efafbbd5355d4d16dadcb5ac35 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3828,12 +3828,24 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -35,10 +35,10 @@ index bbf3286cb69f931be528726e45784eec9f8e0af3..21bef887193c777ec1e311b3bf5c0213 return this.isShiftKeyDown(); } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a2b2c3da97979b1684ec48934f82a784f1e63b6b..ccd2880da35263d1d16597eba2ec35b8b343cb5d 100644 +index 19f8cfe1146374169208f26632763a882291431c..1c6abeff5b541cdea914ac956f2ab1d2e1c5769f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -839,5 +839,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -855,5 +855,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setArrowsStuck(final int arrows) { this.getHandle().setArrowCount(arrows); } diff --git a/patches/server/0203-Expand-Explosions-API.patch b/patches/server/0203-Expand-Explosions-API.patch index c181cd3402..6fea443e03 100644 --- a/patches/server/0203-Expand-Explosions-API.patch +++ b/patches/server/0203-Expand-Explosions-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 012c0bf4f824543d475e97e0edb6c4fe88d046e5..b5bf92b668be5bdbd6af722929aee28eb1bf5ffa 100644 +index 1480fbf52f9eb11892886b99a76a971cabb72c92..afdba543388f5f2e194add0e988f8515db24f76e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -735,6 +735,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -755,6 +755,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { return !this.world.explode(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? net.minecraft.world.level.Level.ExplosionInteraction.MOB : net.minecraft.world.level.Level.ExplosionInteraction.NONE).wasCanceled; } diff --git a/patches/server/0204-LivingEntity-Active-Item-API.patch b/patches/server/0204-LivingEntity-Active-Item-API.patch new file mode 100644 index 0000000000..e50ff8549c --- /dev/null +++ b/patches/server/0204-LivingEntity-Active-Item-API.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Fri, 29 Jun 2018 00:21:28 -0400 +Subject: [PATCH] LivingEntity Active Item API + +API relating to items being actively used by a LivingEntity +such as a bow or eating food. + +Co-authored-by: Jake Potrebic + +diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +index 1c6abeff5b541cdea914ac956f2ab1d2e1c5769f..de52fdc1c94f69de7c5c5099fc586fdeba60b6fa 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +@@ -866,4 +866,38 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + getHandle().setShieldBlockingDelay(delay); + } + // Paper end ++ ++ // Paper start - active item API ++ @Override ++ public ItemStack getActiveItem() { ++ return this.getHandle().getUseItem().asBukkitMirror(); ++ } ++ ++ @Override ++ public int getActiveItemRemainingTime() { ++ return this.getHandle().getUseItemRemainingTicks(); ++ } ++ ++ @Override ++ public void setActiveItemRemainingTime(final int ticks) { ++ Preconditions.checkArgument(ticks >= 0, "ticks must be >= 0"); ++ Preconditions.checkArgument(ticks <= this.getHandle().getUseItem().getUseDuration(), "ticks must be <= item use duration"); ++ this.getHandle().useItemRemaining = ticks; ++ } ++ ++ @Override ++ public int getActiveItemUsedTime() { ++ return this.getHandle().getTicksUsingItem(); ++ } ++ ++ @Override ++ public boolean hasActiveItem() { ++ return this.getHandle().isUsingItem(); ++ } ++ ++ @Override ++ public org.bukkit.inventory.EquipmentSlot getActiveItemHand() { ++ return org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(this.getHandle().getUsedItemHand()); ++ } ++ // Paper end - active item API + } diff --git a/patches/server/0204-LivingEntity-Hand-Raised-Item-Use-API.patch b/patches/server/0204-LivingEntity-Hand-Raised-Item-Use-API.patch deleted file mode 100644 index 586af96db3..0000000000 --- a/patches/server/0204-LivingEntity-Hand-Raised-Item-Use-API.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 29 Jun 2018 00:21:28 -0400 -Subject: [PATCH] LivingEntity Hand Raised/Item Use API - -How long an entity has raised hands to charge an attack or use an item - -diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index ca92ece290c6dd164b3ba2ba46289350ae6829e8..8ac3beab73904db7362caa3054994b214c997cf7 100644 ---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -849,5 +849,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - public void setShieldBlockingDelay(int delay) { - getHandle().setShieldBlockingDelay(delay); - } -+ -+ @Override -+ public ItemStack getActiveItem() { -+ return getHandle().getUseItem().asBukkitMirror(); -+ } -+ -+ @Override -+ public int getItemUseRemainingTime() { -+ return getHandle().getUseItemRemainingTicks(); -+ } -+ -+ @Override -+ public int getHandRaisedTime() { -+ return getHandle().getTicksUsingItem(); -+ } -+ -+ @Override -+ public boolean isHandRaised() { -+ return getHandle().isUsingItem(); -+ } -+ -+ @Override -+ public org.bukkit.inventory.EquipmentSlot getHandRaised() { -+ return getHandle().getUsedItemHand() == net.minecraft.world.InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND; -+ } - // Paper end - } diff --git a/patches/server/0207-Implement-World.getEntity-UUID-API.patch b/patches/server/0207-Implement-World.getEntity-UUID-API.patch index 9f5b8131e3..20b2476bf6 100644 --- a/patches/server/0207-Implement-World.getEntity-UUID-API.patch +++ b/patches/server/0207-Implement-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b5bf92b668be5bdbd6af722929aee28eb1bf5ffa..3fe84fa65961dff58a416f7262c8b8ce218a3b49 100644 +index afdba543388f5f2e194add0e988f8515db24f76e..3d189fd1a1ac17f1dee4af631f8ed59387c977d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1071,6 +1071,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1091,6 +1091,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { return list; } diff --git a/patches/server/0208-InventoryCloseEvent-Reason-API.patch b/patches/server/0208-InventoryCloseEvent-Reason-API.patch index 0963978228..91a388c934 100644 --- a/patches/server/0208-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0208-InventoryCloseEvent-Reason-API.patch @@ -136,10 +136,10 @@ index c934c7614281f77376858909c86d9a1a73c8e174..83c7ba56900ce40f71d98062bf15110a this.containerMenu = this.inventoryMenu; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 092d2bfab7e8fd9840e853f09adc85311ab29046..af6f8d11f0384c353332f5c5bb0967e518deccbe 100644 +index 5d69945e6428c04a4b89c7469de905ed05d9dfc0..0886cb3367022c4ab7e4dbebafb70fc651bcb9aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -376,7 +376,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -379,7 +379,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { if (((ServerPlayer) this.getHandle()).connection == null) return; if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) { // fire INVENTORY_CLOSE if one already open @@ -148,7 +148,7 @@ index 092d2bfab7e8fd9840e853f09adc85311ab29046..af6f8d11f0384c353332f5c5bb0967e5 } ServerPlayer player = (ServerPlayer) this.getHandle(); AbstractContainerMenu container; -@@ -446,8 +446,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -449,8 +449,14 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @Override public void closeInventory() { @@ -178,10 +178,10 @@ index dbf67a52ae2e18589952b2d019b5258324ff3edc..b4212f5a5b3b1e5476f7598be165ffb1 // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 096e80bb71d10c897a20bb3c0b4b761328c9f56e..139d9b4a290d9089ba9a6c92ddcf04e1404c1074 100644 +index 203b6539c55b74484cff476b6472f44ed56112c9..2456857cfcb3dd258781067cd7ddbe18d5f68309 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1263,7 +1263,7 @@ public class CraftEventFactory { +@@ -1264,7 +1264,7 @@ public class CraftEventFactory { public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) { if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open @@ -190,7 +190,7 @@ index 096e80bb71d10c897a20bb3c0b4b761328c9f56e..139d9b4a290d9089ba9a6c92ddcf04e1 } CraftServer server = player.level().getCraftServer(); -@@ -1450,8 +1450,18 @@ public class CraftEventFactory { +@@ -1451,8 +1451,18 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 5cc5596785..6824f8274c 100644 --- a/patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -17,10 +17,10 @@ index 1353bb583ec576345b7bfea5134c4b0d59811a07..1a3727bbd9d67c32846e7ad4bd4bc900 Iterator iterator = list.iterator(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 2bd7ad1065273c2a9150b3762aff13437bf4bec0..09d62573b013590e66bbd988be1442944775090e 100644 +index 232281b12fb1970fae82ce8fd3ffe1586d02bfb3..6308aeb2129b4d3c5f51759977548279d6073ab4 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -767,6 +767,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -768,6 +768,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end - Prevent block entity and entity crashes } } diff --git a/patches/server/0218-Vanished-players-don-t-have-rights.patch b/patches/server/0218-Vanished-players-don-t-have-rights.patch index 3a1097f1e7..52526bd0e1 100644 --- a/patches/server/0218-Vanished-players-don-t-have-rights.patch +++ b/patches/server/0218-Vanished-players-don-t-have-rights.patch @@ -39,7 +39,7 @@ index a6638e626600e4304a973497a39e3fac52203b16..c19069f65a9ecbc9000ea4333417a2df BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 09d62573b013590e66bbd988be1442944775090e..776aea2518aaa5e15bdd63f49b6948818cb9ad10 100644 +index 6308aeb2129b4d3c5f51759977548279d6073ab4..2eb80978ffc26c6250f3a96b73ee20bfea4ecd45 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -271,6 +271,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -89,10 +89,10 @@ index 09d62573b013590e66bbd988be1442944775090e..776aea2518aaa5e15bdd63f49b694881 public boolean isClientSide() { return this.isClientSide; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 139d9b4a290d9089ba9a6c92ddcf04e1404c1074..4498bb89b219de0d1c62950b7aa5f17fe6eab7d0 100644 +index 2456857cfcb3dd258781067cd7ddbe18d5f68309..5b2365fc9a9364f2df7e5078c9d88572c074e4e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1300,6 +1300,14 @@ public class CraftEventFactory { +@@ -1301,6 +1301,14 @@ public class CraftEventFactory { Projectile projectile = (Projectile) entity.getBukkitEntity(); org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity(); com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); diff --git a/patches/server/0242-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/0242-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 5588062e09..635394d1c0 100644 --- a/patches/server/0242-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/patches/server/0242-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3fe84fa65961dff58a416f7262c8b8ce218a3b49..358fe6e35ab7555bbd6ae075bcec5249e09dede1 100644 +index 3d189fd1a1ac17f1dee4af631f8ed59387c977d4..fd04c5c7e08b54de65ffaf58385dcc05ef22bba0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -406,7 +406,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -407,7 +407,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/server/0245-Improve-death-events.patch b/patches/server/0245-Improve-death-events.patch index 74e5a00048..50e37c3a69 100644 --- a/patches/server/0245-Improve-death-events.patch +++ b/patches/server/0245-Improve-death-events.patch @@ -80,7 +80,7 @@ index 38a3b264ba72631c27203a178ac0bbdd36e10a10..80cedd5221d3c0dc475c631113e87825 } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index e8c4d42b1637752e69ea128fa7d0148bb5ffae06..39ff6dd7ee8e821f5693f6a6e01b713b25d30393 100644 +index de01edaa23fb8493faf46c02abcb47989ac9a582..7dbfc8f0e3eb54e86fef6d9bc68e082ae8cd4422 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -260,6 +260,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -455,10 +455,10 @@ index 65c56d29e04fd0853a8bfe9f943d27fe71849cc2..317fb90ad77aaaddc6a84d719de94d52 public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 4498bb89b219de0d1c62950b7aa5f17fe6eab7d0..542b9ff7d845dcebcf6569a6d4bd9e97ac3a436d 100644 +index 5b2365fc9a9364f2df7e5078c9d88572c074e4e3..449dab3d6e16b2b0fcc78c9e1b7173c822be9c53 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -891,9 +891,16 @@ public class CraftEventFactory { +@@ -892,9 +892,16 @@ public class CraftEventFactory { public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops) { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); @@ -475,7 +475,7 @@ index 4498bb89b219de0d1c62950b7aa5f17fe6eab7d0..542b9ff7d845dcebcf6569a6d4bd9e97 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -910,8 +917,15 @@ public class CraftEventFactory { +@@ -911,8 +918,15 @@ public class CraftEventFactory { PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel @@ -491,7 +491,7 @@ index 4498bb89b219de0d1c62950b7aa5f17fe6eab7d0..542b9ff7d845dcebcf6569a6d4bd9e97 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -928,6 +942,31 @@ public class CraftEventFactory { +@@ -929,6 +943,31 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0258-Add-sun-related-API.patch b/patches/server/0258-Add-sun-related-API.patch index 9725c39278..c0c24f104f 100644 --- a/patches/server/0258-Add-sun-related-API.patch +++ b/patches/server/0258-Add-sun-related-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API public net.minecraft.world.entity.Mob isSunBurnTick()Z diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 358fe6e35ab7555bbd6ae075bcec5249e09dede1..0cded703702e7271eec909e470fbfded17eb791f 100644 +index fd04c5c7e08b54de65ffaf58385dcc05ef22bba0..18db1aa374495a214807c5eb3ccc0213fc7c6a47 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -711,6 +711,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -731,6 +731,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/server/0281-BlockDestroyEvent.patch b/patches/server/0281-BlockDestroyEvent.patch index 0842612a62..9d61b5189f 100644 --- a/patches/server/0281-BlockDestroyEvent.patch +++ b/patches/server/0281-BlockDestroyEvent.patch @@ -11,7 +11,7 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 181201ecd6c617cc37ba097a667bd96ae3b1823e..28ed20fc6e53490392c59b927889d78eb268b777 100644 +index 2eb80978ffc26c6250f3a96b73ee20bfea4ecd45..12809bc84aa07e724bebbc631199f352b7d7bbcb 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -26,6 +26,7 @@ import net.minecraft.nbt.CompoundTag; @@ -22,7 +22,7 @@ index 181201ecd6c617cc37ba097a667bd96ae3b1823e..28ed20fc6e53490392c59b927889d78e import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.FullChunkStatus; import net.minecraft.server.level.ServerLevel; -@@ -581,9 +582,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -582,9 +583,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return false; } else { FluidState fluid = this.getFluidState(pos); diff --git a/patches/server/0293-Optimize-Captured-BlockEntity-Lookup.patch b/patches/server/0293-Optimize-Captured-BlockEntity-Lookup.patch index f736f333bf..3070c2b195 100644 --- a/patches/server/0293-Optimize-Captured-BlockEntity-Lookup.patch +++ b/patches/server/0293-Optimize-Captured-BlockEntity-Lookup.patch @@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to just do a get call since the value can never be null. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 28ed20fc6e53490392c59b927889d78eb268b777..caf2c9799aa5ddbd5caf160e2c8f2e8f0cdaa1f8 100644 +index 12809bc84aa07e724bebbc631199f352b7d7bbcb..6d5a0aa8f8cee0897a920c2abf18efc03cad2abb 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -910,9 +910,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -911,9 +911,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @Nullable public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) { diff --git a/patches/server/0294-Add-Heightmap-API.patch b/patches/server/0294-Add-Heightmap-API.patch index 80731d3922..fe436cb894 100644 --- a/patches/server/0294-Add-Heightmap-API.patch +++ b/patches/server/0294-Add-Heightmap-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Heightmap API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0cded703702e7271eec909e470fbfded17eb791f..83530c6823710e387f453898fc0d81392cd2fcd8 100644 +index 18db1aa374495a214807c5eb3ccc0213fc7c6a47..4001a8c13ceed6037174bb81fd06d9758fa0336c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -228,6 +228,29 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -229,6 +229,29 @@ public class CraftWorld extends CraftRegionAccessor implements World { return CraftBlock.at(this.world, new BlockPos(x, y, z)); } diff --git a/patches/server/0299-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/0299-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 1bd19d7c9f..38dda4ebd6 100644 --- a/patches/server/0299-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/patches/server/0299-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index ddbe9061b518711ed4bb2e30a90817293fd7fb7d..7263a7f8b01c6afdaf67cfd6cc67f6a45c0aee08 100644 +index 21baf9139a652f21af81e775c4a0cfd3f2a81923..46386befc7c76788bdd136f7d7b4eb8e1e5d19b9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -768,30 +768,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 623c7304a6849e994e22cd559177d9de0dd2f4c4..ee9bb75f2850bf421cc8ff02aca5b230538d6503 100644 +index d8a7287849407c4756d4ebe4b55c358970320ce3..f21bff10aa56b418b1c3c3f1a40b88c4e992c26d 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -201,23 +201,27 @@ public class Main { @@ -20,8 +20,8 @@ index 623c7304a6849e994e22cd559177d9de0dd2f4c4..ee9bb75f2850bf421cc8ff02aca5b230 - System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'."); - return; - } -- if (javaVersion > 65.0) { -- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 21 is supported."); +- if (javaVersion > 66.0) { +- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported."); + boolean isOldVersion = javaVersion < 61.0; + if (!skip && isOldVersion) { + System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'. For more info see https://docs.papermc.io/misc/java-install"); diff --git a/patches/server/0328-Entity-Jump-API.patch b/patches/server/0328-Entity-Jump-API.patch index 676ae3c4cc..4a9bec8fff 100644 --- a/patches/server/0328-Entity-Jump-API.patch +++ b/patches/server/0328-Entity-Jump-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Entity Jump API public net.minecraft.world.entity.LivingEntity jumping diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 40ad459823268af0e57a348d241ac19bb576683a..f441d7a1188cecd91206d78b58457c330e4e8663 100644 +index 169a9aa06350dccf2624534754be3a22b2f42b33..c7b8c823ea1a1cafb98b4305febd52aa3652bc37 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3304,8 +3304,10 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -50,14 +50,15 @@ index aba20a4352d8983b01ab5d329187588f68d3e405..aac60e85cd6dba7d87f4a1663c2c6295 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index c9a487c1b85d46c1ce25147bd8a610a5631cdb5d..4cd34eb1930b9324be08e83aab21fc960eb7fca6 100644 +index 88ea46392182b02131a2a5c953fe90e1ecbd4ae5..1bca024bfbb4b68eacd2b3bb382aa74456db2145 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -935,5 +935,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - public org.bukkit.inventory.EquipmentSlot getHandRaised() { - return getHandle().getUsedItemHand() == net.minecraft.world.InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND; +@@ -961,4 +961,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + return org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(this.getHandle().getUsedItemHand()); } + // Paper end - active item API + ++ // Paper start - entity jump API + @Override + public boolean isJumping() { + return getHandle().jumping; @@ -71,5 +72,5 @@ index c9a487c1b85d46c1ce25147bd8a610a5631cdb5d..4cd34eb1930b9324be08e83aab21fc96 + ((Mob) getHandle()).getJumpControl().jump(); + } + } - // Paper end ++ // Paper end - entity jump API } diff --git a/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch index 955f81df44..fe9e4dc449 100644 --- a/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch +++ b/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 542b9ff7d845dcebcf6569a6d4bd9e97ac3a436d..3dee6c973d4b4ac6f64fdcb5ac7fa681cefbdb1c 100644 +index 449dab3d6e16b2b0fcc78c9e1b7173c822be9c53..15c9150b7e48781268babe5915dc0e906645b341 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -401,13 +401,18 @@ public class CraftEventFactory { +@@ -402,13 +402,18 @@ public class CraftEventFactory { } org.bukkit.inventory.ItemStack item; diff --git a/patches/server/0337-Add-tick-times-API-and-mspt-command.patch b/patches/server/0337-Add-tick-times-API-and-mspt-command.patch index a38e26cb73..3e698fc207 100644 --- a/patches/server/0337-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0337-Add-tick-times-API-and-mspt-command.patch @@ -125,7 +125,7 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7 public static void registerCommands(final MinecraftServer server) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7263a7f8b01c6afdaf67cfd6cc67f6a45c0aee08..e5ecca5ae9e37e4d4d6d2adfd5f487a869ab775d 100644 +index 46386befc7c76788bdd136f7d7b4eb8e1e5d19b9..1a7dffb3947dab0e334cd5873c69542f383aed61 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop drops) { @@ -150,7 +150,7 @@ index 3dee6c973d4b4ac6f64fdcb5ac7fa681cefbdb1c..8da01bdaa2a1c621947b6a50b178eec1 CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); populateFields(victim, event); // Paper - make cancellable -@@ -907,11 +912,13 @@ public class CraftEventFactory { +@@ -908,11 +913,13 @@ public class CraftEventFactory { playDeathSound(victim, event); // Paper end victim.expToDrop = event.getDroppedExp(); diff --git a/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index a9d85cd957..cc8b376c6f 100644 --- a/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -10,7 +10,7 @@ index 1eedfc00ab7da96f07ae542b8c5775f41708dd37..dc552a35977b2e62ec1534ffbb9c7441 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,6 +35,7 @@ dependencies { - implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm-commons:9.7") implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files implementation("commons-lang:commons-lang:2.6") + implementation("net.fabricmc:mapping-io:0.5.0") // Paper - needed to read mappings for stacktrace deobfuscation diff --git a/patches/server/0367-Implement-Mob-Goal-API.patch b/patches/server/0367-Implement-Mob-Goal-API.patch index 267fb77955..13572c9b4d 100644 --- a/patches/server/0367-Implement-Mob-Goal-API.patch +++ b/patches/server/0367-Implement-Mob-Goal-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/build.gradle.kts b/build.gradle.kts -index 450f7c03bdcc109938ba9b66328bdbb2c96c03c9..c6241f858209ed662d8720217d143340916024e9 100644 +index e9cda97679ed18156baf009926d6f210093112bd..7cbfd129efcc2e971b75aaa272dee79a3b4d2d5c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,6 +44,7 @@ dependencies { @@ -15,7 +15,7 @@ index 450f7c03bdcc109938ba9b66328bdbb2c96c03c9..c6241f858209ed662d8720217d143340 + testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test testImplementation("org.junit.jupiter:junit-jupiter:5.10.0") testImplementation("org.hamcrest:hamcrest:2.2") - testImplementation("org.mockito:mockito-core:5.5.0") + testImplementation("org.mockito:mockito-core:5.11.0") diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..8117578ced94aa6bf01871f6526a388385c4adf2 diff --git a/patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch index 415b0289b4..76f5165302 100644 --- a/patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch +++ b/patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Option for maximum exp value when merging orbs diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 8da01bdaa2a1c621947b6a50b178eec10deb1250..89469dd94c8baecaef5253ee3693c841302d5e57 100644 +index 8866f1d4f19c935edb7eb3c9265a2b65383e5595..608829fa99a197a58505b1e7ca9898e8d6d19aa4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -703,16 +703,30 @@ public class CraftEventFactory { +@@ -704,16 +704,30 @@ public class CraftEventFactory { if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) { double radius = world.spigotConfig.expMerge; if (radius > 0) { diff --git a/patches/server/0370-ExperienceOrbMergeEvent.patch b/patches/server/0370-ExperienceOrbMergeEvent.patch index 8795420449..fbe377c669 100644 --- a/patches/server/0370-ExperienceOrbMergeEvent.patch +++ b/patches/server/0370-ExperienceOrbMergeEvent.patch @@ -9,10 +9,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor metadata such as spawn reason, or conditionally move data from source to target. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 89469dd94c8baecaef5253ee3693c841302d5e57..0a169b4cf47ff3d05555af6c0e0b0cdb30ba9e45 100644 +index 608829fa99a197a58505b1e7ca9898e8d6d19aa4..b38212ceb8c375c9604eac36bee6d143ffbf3837 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -712,7 +712,7 @@ public class CraftEventFactory { +@@ -713,7 +713,7 @@ public class CraftEventFactory { for (Entity e : entities) { if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) { // Paper start diff --git a/patches/server/0371-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0371-Fix-PotionEffect-ignores-icon-flag.patch index 7f8b5c39dd..208862b074 100644 --- a/patches/server/0371-Fix-PotionEffect-ignores-icon-flag.patch +++ b/patches/server/0371-Fix-PotionEffect-ignores-icon-flag.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index fd18531ff94daa6dc2994a69e1e647078a5a664c..9a9d119e76fca75a9e531f4bbd204ab8eb9a1263 100644 +index e5cd09c9c27f23860fc31cb22377a54e5e60bd38..7dfc5966e6262ded29c60d7423f8a1e4a42ca948 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -468,7 +468,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -484,7 +484,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override public boolean addPotionEffect(PotionEffect effect, boolean force) { @@ -18,7 +18,7 @@ index fd18531ff94daa6dc2994a69e1e647078a5a664c..9a9d119e76fca75a9e531f4bbd204ab8 return true; } -@@ -489,7 +489,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -505,7 +505,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override public PotionEffect getPotionEffect(PotionEffectType type) { MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraft(type)); @@ -27,7 +27,7 @@ index fd18531ff94daa6dc2994a69e1e647078a5a664c..9a9d119e76fca75a9e531f4bbd204ab8 } @Override -@@ -501,7 +501,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -517,7 +517,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public Collection getActivePotionEffects() { List effects = new ArrayList(); for (MobEffectInstance handle : this.getHandle().activeEffects.values()) { diff --git a/patches/server/0372-Potential-bed-API.patch b/patches/server/0372-Potential-bed-API.patch index 80f1d44702..c00100d03d 100644 --- a/patches/server/0372-Potential-bed-API.patch +++ b/patches/server/0372-Potential-bed-API.patch @@ -8,7 +8,7 @@ Adds a new method to fetch the location of a player's bed without generating any getPotentialBedLocation - Gets the last known location of a player's bed. This does not preform any check if the bed is still valid and does not load any chunks. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 7afbecd29f0a729e32c5cd50cb03d5404ba03d75..fe050a077782fb023c49710eb2127250d5165484 100644 +index 35f03bea2b1206b420ac46dfd77811fb485c5319..3898d583a65e82711fd4415aed32ecf08f42100f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -12,6 +12,7 @@ import net.minecraft.nbt.CompoundTag; @@ -19,7 +19,7 @@ index 7afbecd29f0a729e32c5cd50cb03d5404ba03d75..fe050a077782fb023c49710eb2127250 import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.Entity; -@@ -130,6 +131,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -131,6 +132,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return this.getHandle().sleepCounter; } diff --git a/patches/server/0389-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0389-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index d7c2053bcb..a0f8975647 100644 --- a/patches/server/0389-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0389-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -8,7 +8,7 @@ makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index f786bf10a42fa4e9f610416959c60c52729c277b..21176d6e57ae9e975b1e7de14b3364365cc1012d 100644 +index af68110105a9a3ec0ebd31ea9733af8dfed1037b..0c0356339abbf255a411993b9bd3e09d31cf2636 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -825,7 +825,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> { net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk)c; diff --git a/patches/server/0400-Add-PrepareResultEvent.patch b/patches/server/0400-Add-PrepareResultEvent.patch index 8426a573bd..bcd9713cd7 100644 --- a/patches/server/0400-Add-PrepareResultEvent.patch +++ b/patches/server/0400-Add-PrepareResultEvent.patch @@ -94,10 +94,10 @@ index 9c2fe69ced7a46bbd8b0fbe10fa67d0a39b0f375..e40d9dbdbe5359c38af6d764d01c9be4 private void setupRecipeList(Container input, ItemStack stack) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 0a169b4cf47ff3d05555af6c0e0b0cdb30ba9e45..67bfd38bd08c30eae597a4875ea4a8b26c2f5c5a 100644 +index b38212ceb8c375c9604eac36bee6d143ffbf3837..b72fba605ea2c2ea88fee90058fb2ccc30197c95 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1647,6 +1647,12 @@ public class CraftEventFactory { +@@ -1653,6 +1653,12 @@ public class CraftEventFactory { } public static PrepareAnvilEvent callPrepareAnvilEvent(InventoryView view, ItemStack item) { @@ -110,7 +110,7 @@ index 0a169b4cf47ff3d05555af6c0e0b0cdb30ba9e45..67bfd38bd08c30eae597a4875ea4a8b2 PrepareAnvilEvent event = new PrepareAnvilEvent(view, CraftItemStack.asCraftMirror(item).clone()); event.getView().getPlayer().getServer().getPluginManager().callEvent(event); event.getInventory().setItem(2, event.getResult()); -@@ -1654,6 +1660,12 @@ public class CraftEventFactory { +@@ -1660,6 +1666,12 @@ public class CraftEventFactory { } public static PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) { @@ -123,7 +123,7 @@ index 0a169b4cf47ff3d05555af6c0e0b0cdb30ba9e45..67bfd38bd08c30eae597a4875ea4a8b2 PrepareGrindstoneEvent event = new PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone()); event.getView().getPlayer().getServer().getPluginManager().callEvent(event); event.getInventory().setItem(2, event.getResult()); -@@ -1661,12 +1673,39 @@ public class CraftEventFactory { +@@ -1667,12 +1679,39 @@ public class CraftEventFactory { } public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) { diff --git a/patches/server/0412-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/0412-Add-playPickupItemAnimation-to-LivingEntity.patch index c7055de757..84a2b07d42 100644 --- a/patches/server/0412-Add-playPickupItemAnimation-to-LivingEntity.patch +++ b/patches/server/0412-Add-playPickupItemAnimation-to-LivingEntity.patch @@ -5,17 +5,18 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index c4db692fb5d952e4d185067388fd46ed0e1f1537..e07553c3ee28a2510c46a8188c8ce507f2567c80 100644 +index 8cfa39acde6d32625ae87e9d031d8dc767783e61..e54b164ea2f28cdbb89166fb9b0b9cd9d12c0ca9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -949,5 +949,10 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - ((Mob) getHandle()).getJumpControl().jump(); +@@ -977,4 +977,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } } + // Paper end - entity jump API + ++ // Paper start - pickup animation API + @Override -+ public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) { -+ getHandle().take(((CraftItem) item).getHandle(), quantity); ++ public void playPickupItemAnimation(final org.bukkit.entity.Item item, final int quantity) { ++ this.getHandle().take(((CraftItem) item).getHandle(), quantity); + } - // Paper end ++ // Paper end - pickup animation API } diff --git a/patches/server/0414-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0414-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 9c8dcfe23c..92a3e10cad 100644 --- a/patches/server/0414-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0414-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -21,10 +21,10 @@ index 9af1877321356348ad96b92ae8c5f4811bef50ac..2e42e09d3fa19e5a16374ee6ac1677dd // if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index af782882479910f13b54081df2443387135874e0..dbe1e59572ca0f98783db456bdab6ee4e79f7689 100644 +index b437f582c36ab9a5b06129ef1b36dd14432c0c31..afb65de5fbff44b4ca455c778030c3387c2dafc8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -268,12 +268,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -269,12 +269,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean setSpawnLocation(int x, int y, int z, float angle) { try { diff --git a/patches/server/0418-Add-BellRingEvent.patch b/patches/server/0418-Add-BellRingEvent.patch index 58012313ff..e1dd0b076e 100644 --- a/patches/server/0418-Add-BellRingEvent.patch +++ b/patches/server/0418-Add-BellRingEvent.patch @@ -7,10 +7,10 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a village bell. Passes along the bell block and the player who rang it. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 67bfd38bd08c30eae597a4875ea4a8b26c2f5c5a..c045e9503c76b869d58d93077fef130759615ff5 100644 +index b72fba605ea2c2ea88fee90058fb2ccc30197c95..657df7b4aa8c4a19bf8e085d8235aa0d1a1b08da 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -367,10 +367,11 @@ public class CraftEventFactory { +@@ -368,10 +368,11 @@ public class CraftEventFactory { return tradeSelectEvent; } diff --git a/patches/server/0428-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0428-Add-additional-open-container-api-to-HumanEntity.patch index 857657780a..a65b493089 100644 --- a/patches/server/0428-Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/server/0428-Add-additional-open-container-api-to-HumanEntity.patch @@ -5,10 +5,10 @@ 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 fe050a077782fb023c49710eb2127250d5165484..93644aefd2e6c97eca2735812b2b7b4bd039cfb5 100644 +index 3898d583a65e82711fd4415aed32ecf08f42100f..d5a8f019e88de30400733cdc3178eb982ccca341 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -461,6 +461,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -464,6 +464,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return this.getHandle().containerMenu.getBukkitView(); } diff --git a/patches/server/0431-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0431-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index b01c302702..59a478433f 100644 --- a/patches/server/0431-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0431-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -21,10 +21,10 @@ index f45b148884b305628411d57f7662ea454fde3906..44610d4e3fb69e6cf5629d9e895e93d8 + // Paper end - Expose entity id counter } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index ef4b15e0ae11a54ec49e40f1d694dae58ae95e03..2bc3d9c02256269845d140764b7b1b201e38b569 100644 +index 7579e076793ba90e405b3ac0db600374ee8fdcb3..f4a7da134584a065a34b4f6a8eaebfcb81b6d735 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -520,6 +520,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -525,6 +525,11 @@ public final class CraftMagicNumbers implements UnsafeValues { Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!"); return compound; } diff --git a/patches/server/0456-Add-LivingEntity-clearActiveItem.patch b/patches/server/0456-Add-LivingEntity-clearActiveItem.patch index 54d5de0aa1..df8f1cd672 100644 --- a/patches/server/0456-Add-LivingEntity-clearActiveItem.patch +++ b/patches/server/0456-Add-LivingEntity-clearActiveItem.patch @@ -5,11 +5,11 @@ 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 e07553c3ee28a2510c46a8188c8ce507f2567c80..aac0fb198fb912dc59dc56f449e586839600fa13 100644 +index d90a56de3ec0236c82668d0f7ce01a8515de6450..baeb521f44389e6bf5d7b4237ebd5c805ae6f43c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -916,6 +916,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - return getHandle().getUseItem().asBukkitMirror(); +@@ -934,6 +934,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + return this.getHandle().getUseItem().asBukkitMirror(); } + // Paper start @@ -20,5 +20,5 @@ index e07553c3ee28a2510c46a8188c8ce507f2567c80..aac0fb198fb912dc59dc56f449e58683 + // Paper end + @Override - public int getItemUseRemainingTime() { - return getHandle().getUseItemRemainingTicks(); + public int getActiveItemRemainingTime() { + return this.getHandle().getUseItemRemainingTicks(); diff --git a/patches/server/0467-Expose-LivingEntity-hurt-direction.patch b/patches/server/0467-Expose-LivingEntity-hurt-direction.patch index 73f36c0bb3..11fa41f95b 100644 --- a/patches/server/0467-Expose-LivingEntity-hurt-direction.patch +++ b/patches/server/0467-Expose-LivingEntity-hurt-direction.patch @@ -18,10 +18,10 @@ index 603e003fbd39870a0e249151885b3b8f3e120afe..6fe21c29aa9d119490fbf1d69eb03c14 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 93644aefd2e6c97eca2735812b2b7b4bd039cfb5..40f848d117c1a4f4fc2f11861c5f142071d56977 100644 +index d5a8f019e88de30400733cdc3178eb982ccca341..e7726862f99cb16b7335b06675af73db773b54e8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -126,6 +126,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -127,6 +127,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } } @@ -36,22 +36,23 @@ index 93644aefd2e6c97eca2735812b2b7b4bd039cfb5..40f848d117c1a4f4fc2f11861c5f1420 public int getSleepTicks() { return this.getHandle().sleepCounter; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index aac0fb198fb912dc59dc56f449e586839600fa13..3b2d54d7a365e268107c4abc5a15c996954e5e9c 100644 +index 1333f5116e824e1024519808e824a979b9745c9f..24e8f6a89dc186c3f8f4356cb9a60115fc0096c0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -961,5 +961,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - public void playPickupItemAnimation(org.bukkit.entity.Item item, int quantity) { - getHandle().take(((CraftItem) item).getHandle(), quantity); +@@ -991,4 +991,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + this.getHandle().take(((CraftItem) item).getHandle(), quantity); } + // Paper end - pickup animation API + ++ // Paper start - hurt direction API + @Override + public float getHurtDirection() { + return this.getHandle().getHurtDir(); + } + + @Override -+ public void setHurtDirection(float hurtDirection) { ++ public void setHurtDirection(final float hurtDirection) { + throw new UnsupportedOperationException("Cannot set the hurt direction on a non player"); + } - // Paper end ++ // Paper end - hurt direction API } diff --git a/patches/server/0468-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0468-Add-OBSTRUCTED-reason-to-BedEnterResult.patch index 27ff4645d2..1c152184b5 100644 --- a/patches/server/0468-Add-OBSTRUCTED-reason-to-BedEnterResult.patch +++ b/patches/server/0468-Add-OBSTRUCTED-reason-to-BedEnterResult.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index c045e9503c76b869d58d93077fef130759615ff5..430d54feb4224fb73d31aa205b883af66f29b226 100644 +index 657df7b4aa8c4a19bf8e085d8235aa0d1a1b08da..368c4bddbe6fe88ca408147df1fa58183dd513a4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -302,6 +302,10 @@ public class CraftEventFactory { +@@ -303,6 +303,10 @@ public class CraftEventFactory { return BedEnterResult.TOO_FAR_AWAY; case NOT_SAFE: return BedEnterResult.NOT_SAFE; diff --git a/patches/server/0483-Add-WorldGameRuleChangeEvent.patch b/patches/server/0483-Add-WorldGameRuleChangeEvent.patch index 634bd091ff..f26393a0b9 100644 --- a/patches/server/0483-Add-WorldGameRuleChangeEvent.patch +++ b/patches/server/0483-Add-WorldGameRuleChangeEvent.patch @@ -64,10 +64,10 @@ index ba825ff3df79903aefe1a4cb14efab9a302397d7..ac7a5410b01a6741e3b548d153f37ea1 public int get() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index dbe1e59572ca0f98783db456bdab6ee4e79f7689..9d44a2ce6da1b6338e5a1aaa9238483b64c9a34f 100644 +index afb65de5fbff44b4ca455c778030c3387c2dafc8..3893b70926140f3658f6bab68c5c4f7c41dc603a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1864,8 +1864,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1884,8 +1884,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!this.isGameRule(rule)) return false; @@ -82,7 +82,7 @@ index dbe1e59572ca0f98783db456bdab6ee4e79f7689..9d44a2ce6da1b6338e5a1aaa9238483b handle.onChanged(this.getHandle()); return true; } -@@ -1901,8 +1906,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1921,8 +1926,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!this.isGameRule(rule.getName())) return false; diff --git a/patches/server/0486-Add-BlockFailedDispenseEvent.patch b/patches/server/0486-Add-BlockFailedDispenseEvent.patch index 6c46c1fc7e..25dc48423b 100644 --- a/patches/server/0486-Add-BlockFailedDispenseEvent.patch +++ b/patches/server/0486-Add-BlockFailedDispenseEvent.patch @@ -32,10 +32,10 @@ index 913ed110d8402d377152753325901eb7f3ac82d6..1d13f8a1009d6eda351c697052d499d5 } else { ItemStack itemstack = tileentitydispenser.getItem(i); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 430d54feb4224fb73d31aa205b883af66f29b226..0a44f7f2ab9c824f1a32d9dc5feb6a96eb00d8de 100644 +index 368c4bddbe6fe88ca408147df1fa58183dd513a4..ea26b27279b6e09015908f164a061891f4ab9002 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2033,4 +2033,12 @@ public class CraftEventFactory { +@@ -2039,4 +2039,12 @@ public class CraftEventFactory { return org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion()); } // Paper end - WitchReadyPotionEvent diff --git a/patches/server/0501-Add-BlockPreDispenseEvent.patch b/patches/server/0501-Add-BlockPreDispenseEvent.patch index 7772764b33..4d04e2d466 100644 --- a/patches/server/0501-Add-BlockPreDispenseEvent.patch +++ b/patches/server/0501-Add-BlockPreDispenseEvent.patch @@ -29,10 +29,10 @@ index 1d13f8a1009d6eda351c697052d499d594a6aaa8..9a8a0fb958e8ec782111507bae957f85 } else { // CraftBukkit start - Fire event when pushing items into other inventories diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 0a44f7f2ab9c824f1a32d9dc5feb6a96eb00d8de..4b3e246475821b71fe023fea602d68c0e2f84964 100644 +index ea26b27279b6e09015908f164a061891f4ab9002..ec6bbab9787e5568e2be7d0a0004d8103ec38ff3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2040,5 +2040,11 @@ public class CraftEventFactory { +@@ -2046,5 +2046,11 @@ public class CraftEventFactory { io.papermc.paper.event.block.BlockFailedDispenseEvent event = new io.papermc.paper.event.block.BlockFailedDispenseEvent(block); return event.callEvent(); } diff --git a/patches/server/0505-Expand-EntityUnleashEvent.patch b/patches/server/0505-Expand-EntityUnleashEvent.patch index 5586344bbe..cd50019e1f 100644 --- a/patches/server/0505-Expand-EntityUnleashEvent.patch +++ b/patches/server/0505-Expand-EntityUnleashEvent.patch @@ -122,10 +122,10 @@ index 6a6526b7b1b578e08a41f85c0443c5f04177efb0..0b88bd258c4f2bce100bf96bcbe61c20 flag1 = true; } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 4b3e246475821b71fe023fea602d68c0e2f84964..43548c4c96dae63fe32640a6dff5410cc32ed501 100644 +index ec6bbab9787e5568e2be7d0a0004d8103ec38ff3..ca0cb9ad99992ef2602781adf16da94ca56975f8 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1569,8 +1569,10 @@ public class CraftEventFactory { +@@ -1570,8 +1570,10 @@ public class CraftEventFactory { Bukkit.getPluginManager().callEvent(new PlayerRecipeBookSettingsChangeEvent(player.getBukkitEntity(), bukkitType, open, filter)); } diff --git a/patches/server/0511-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0511-Allow-adding-items-to-BlockDropItemEvent.patch index 65b594a18e..b5abbd7988 100644 --- a/patches/server/0511-Allow-adding-items-to-BlockDropItemEvent.patch +++ b/patches/server/0511-Allow-adding-items-to-BlockDropItemEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow adding items to BlockDropItemEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 43548c4c96dae63fe32640a6dff5410cc32ed501..11b42f349edefb6961b61d709bfbe3ad4b55c7f8 100644 +index ca0cb9ad99992ef2602781adf16da94ca56975f8..5d4fe10d4e3a5d7a9430dbd5b3c850db482f5862 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -451,13 +451,30 @@ public class CraftEventFactory { +@@ -452,13 +452,30 @@ public class CraftEventFactory { } public static void handleBlockDropItemEvent(Block block, BlockState state, ServerPlayer player, List items) { diff --git a/patches/server/0513-living-entity-allow-attribute-registration.patch b/patches/server/0513-living-entity-allow-attribute-registration.patch index 6982e40447..b04ce69eb9 100644 --- a/patches/server/0513-living-entity-allow-attribute-registration.patch +++ b/patches/server/0513-living-entity-allow-attribute-registration.patch @@ -38,10 +38,10 @@ index ea48f1119a940056c37d1d203437bfbfdf13663b..8a678df56fcf30535957e111d81ad07b + // Paper end - living entity allow attribute registration } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 3b2d54d7a365e268107c4abc5a15c996954e5e9c..c95c0580e0c3afe9730a1c3f2095b7970e7cc001 100644 +index 6ee15dee09d3e727df01564282ba5eb6450db51b..7b65a7d1efaf90d1a2b7a601f94be4d9ebe76a2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -739,6 +739,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -755,6 +755,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return this.getHandle().craftAttributes.getAttribute(attribute); } diff --git a/patches/server/0525-Expand-world-key-API.patch b/patches/server/0525-Expand-world-key-API.patch index b4d1977540..c0e1a1055a 100644 --- a/patches/server/0525-Expand-world-key-API.patch +++ b/patches/server/0525-Expand-world-key-API.patch @@ -67,10 +67,10 @@ index c353f7a3a9ad0099ef7330dde988d1a174a0e327..b453673f7bab09a1b10898a7d1f85d13 // Check if a World already exists with the UID. if (this.getWorld(world.getUID()) != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 14d094d9af9b76277859901db908b8a36b24986b..4d695428cf838d2f5661fdeaaa58b82de693d64e 100644 +index f10457466cbaaba2d3aa49a64092847f635ce752..0768a70cdd48cf03a6dfb3a6a3c7ed4844ea132e 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -531,6 +531,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -536,6 +536,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public int nextEntityId() { return net.minecraft.world.entity.Entity.nextEntityId(); } diff --git a/patches/server/0527-Item-Rarity-API.patch b/patches/server/0527-Item-Rarity-API.patch index d0d483075a..e06ec08950 100644 --- a/patches/server/0527-Item-Rarity-API.patch +++ b/patches/server/0527-Item-Rarity-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Item Rarity API public net.minecraft.world.item.Item rarity diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 4d695428cf838d2f5661fdeaaa58b82de693d64e..b928b3550bc74fd91c6762bc025a0bf6c766541b 100644 +index 0768a70cdd48cf03a6dfb3a6a3c7ed4844ea132e..a1400e8a7c59ffbfa4cd4ee3f3201b96c1584261 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -536,6 +536,20 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -541,6 +541,20 @@ public final class CraftMagicNumbers implements UnsafeValues { public String getMainLevelName() { return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName; } diff --git a/patches/server/0531-Expose-protocol-version.patch b/patches/server/0531-Expose-protocol-version.patch index e81a519f77..42ca8eaa45 100644 --- a/patches/server/0531-Expose-protocol-version.patch +++ b/patches/server/0531-Expose-protocol-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index b928b3550bc74fd91c6762bc025a0bf6c766541b..44b0acb82f10a35bc0c42fdb6fd685aadc76d789 100644 +index a1400e8a7c59ffbfa4cd4ee3f3201b96c1584261..81c2f1dbadb678907cac3cc18e7d0bb307304f00 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -550,6 +550,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -555,6 +555,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) { return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()]; } diff --git a/patches/server/0536-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0536-add-isDeeplySleeping-to-HumanEntity.patch index 61a0d0fb11..b3cc3b4e68 100644 --- a/patches/server/0536-add-isDeeplySleeping-to-HumanEntity.patch +++ b/patches/server/0536-add-isDeeplySleeping-to-HumanEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add isDeeplySleeping 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 40f848d117c1a4f4fc2f11861c5f142071d56977..6e85e580d48622b4c90478b9afbc45b4445e86b0 100644 +index e7726862f99cb16b7335b06675af73db773b54e8..b895b3972dc48ec91dba9d44546508badef73865 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -133,6 +133,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -134,6 +134,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } // Paper end diff --git a/patches/server/0542-More-World-API.patch b/patches/server/0542-More-World-API.patch index 7f887ba98d..3090623a76 100644 --- a/patches/server/0542-More-World-API.patch +++ b/patches/server/0542-More-World-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More World API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 9d44a2ce6da1b6338e5a1aaa9238483b64c9a34f..c90cbf4681e1c57fcec553b01d99a26316f896e5 100644 +index 3893b70926140f3658f6bab68c5c4f7c41dc603a..fc117c5c3ab09c24600fdbdbff56356e7ad64473 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2110,6 +2110,53 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2130,6 +2130,53 @@ public class CraftWorld extends CraftRegionAccessor implements World { return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value()), CraftLocation.toBukkit(found.getFirst(), this)); } diff --git a/patches/server/0558-ItemStack-repair-check-API.patch b/patches/server/0558-ItemStack-repair-check-API.patch index daefbc2d1d..63cbb56089 100644 --- a/patches/server/0558-ItemStack-repair-check-API.patch +++ b/patches/server/0558-ItemStack-repair-check-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 44b0acb82f10a35bc0c42fdb6fd685aadc76d789..6eca86a2ab7145f4c60abb90cd46b4098ad8fb56 100644 +index 81c2f1dbadb678907cac3cc18e7d0bb307304f00..79977c677b4348bbfc8dcd4cb5e4c01c6fceb354 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -551,6 +551,14 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -556,6 +556,14 @@ public final class CraftMagicNumbers implements UnsafeValues { return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()]; } diff --git a/patches/server/0559-More-Enchantment-API.patch b/patches/server/0559-More-Enchantment-API.patch index 826f3c58ee..e5f8796fac 100644 --- a/patches/server/0559-More-Enchantment-API.patch +++ b/patches/server/0559-More-Enchantment-API.patch @@ -9,7 +9,7 @@ public net.minecraft.world.item.enchantment.Enchantment slots Co-authored-by: Luis diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index 7aa4035a4df1ddcc71065034eafd569ca59be810..5b7579395e61684592758f408d61cffe57f8b21d 100644 +index 3feaaca5aaee12e48fa2e5f5d05329c9980b161e..a151b5d7c6e41b08e57c806bc43e067af48263ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -81,7 +81,7 @@ public class CraftEnchantment extends Enchantment implements Handleable) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey))); return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier); } diff --git a/patches/server/0626-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0626-Add-Raw-Byte-Entity-Serialization.patch index ad5e5a0031..4e9c2e327f 100644 --- a/patches/server/0626-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/server/0626-Add-Raw-Byte-Entity-Serialization.patch @@ -48,10 +48,10 @@ index ebbefcdea6356384f27e964bd551bad2f9e696e8..06febdb103f98dd16cca32d7345b0ca6 // Paper start - missing entity api diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 609b103cb9af3b0554bf1116306874fe98c8534c..3f582c5653e13875cce4ef8ecd279d8a3d2b2dc2 100644 +index 2734f4187a4b92ef461e1f2fdae9139c6f54d8fc..be82e1d52d7026facb20bf07f4b3a394e77ab708 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -499,6 +499,32 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -504,6 +504,32 @@ public final class CraftMagicNumbers implements UnsafeValues { return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.of(compound)); } diff --git a/patches/server/0630-Improve-and-expand-AsyncCatcher.patch b/patches/server/0630-Improve-and-expand-AsyncCatcher.patch index 3da2f1c96b..e296e8ff56 100644 --- a/patches/server/0630-Improve-and-expand-AsyncCatcher.patch +++ b/patches/server/0630-Improve-and-expand-AsyncCatcher.patch @@ -29,7 +29,7 @@ index 2941445ea453e2fb88ea8de38c24bf755b93936a..666c6cb6f600973e1d84839aed715606 if (player.isRemoved()) { LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName()); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a2edccc840f2ba76e236ea7441f3e4909b1a1898..18804ea960f8423d172d9119c0739226a18d4d56 100644 +index 144090912223494cf163a445d7bce868be12d6af..4d8f9c8f375282968e70278da655b6e36ab96a87 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1126,7 +1126,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -166,10 +166,10 @@ index 8f23b45dce35617bb56b21fb4f7a09baf36d40c5..cbdb2a710a7217b750de3e782cad5b5a PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason}); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ca68faef4232859e833adfd86a0ce13f7c2ad00e..df57157317fc6c84f69751fd8a120761837429af 100644 +index 6d74a3a43aee0f7ba4c109bd2443c5fcd950fa54..0b1d918452deee4c75bc61cb6a620f69cefa80b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1737,6 +1737,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1757,6 +1757,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -177,7 +177,7 @@ index ca68faef4232859e833adfd86a0ce13f7c2ad00e..df57157317fc6c84f69751fd8a120761 if (loc == null || sound == null || category == null) return; double x = loc.getX(); -@@ -1748,6 +1749,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1768,6 +1769,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -185,7 +185,7 @@ index ca68faef4232859e833adfd86a0ce13f7c2ad00e..df57157317fc6c84f69751fd8a120761 if (loc == null || sound == null || category == null) return; double x = loc.getX(); -@@ -1780,6 +1782,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1800,6 +1802,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Entity entity, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -193,7 +193,7 @@ index ca68faef4232859e833adfd86a0ce13f7c2ad00e..df57157317fc6c84f69751fd8a120761 if (!(entity instanceof CraftEntity craftEntity) || entity.getWorld() != this || sound == null || category == null) return; ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed); -@@ -1791,6 +1794,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1811,6 +1814,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -202,10 +202,10 @@ index ca68faef4232859e833adfd86a0ce13f7c2ad00e..df57157317fc6c84f69751fd8a120761 ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(Holder.direct(SoundEvent.createVariableRangeEvent(new ResourceLocation(sound))), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 9fed7d8500481493de32efd16de6b271b9ed446d..a67570fedb8f09a118351b1b5c3d47bc568f5c0c 100644 +index bc7e2d24dac52091a62ce488c7fc34133dfa2aa8..6af7796c9505b43b2c4dfe869214b0f56dc71244 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -501,6 +501,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -517,6 +517,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override public boolean addPotionEffect(PotionEffect effect, boolean force) { diff --git a/patches/server/0631-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0631-Add-paper-mobcaps-and-paper-playermobcaps.patch index 5de3695498..82e949eac0 100644 --- a/patches/server/0631-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0631-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -294,10 +294,10 @@ index 51337b1b2e74a67ad54c5d594004b649cb6af4ed..dc37989ab5e0971a144a8248152169b4 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index df57157317fc6c84f69751fd8a120761837429af..df74b47477553bdee0b5faaf40835b94c41316dd 100644 +index 0b1d918452deee4c75bc61cb6a620f69cefa80b3..139281eab642a3676987fa9b3597b5b6e1a99e9c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1695,9 +1695,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1715,9 +1715,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null"); Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory); diff --git a/patches/server/0686-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0686-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 2d40d8b668..d2d9b68707 100644 --- a/patches/server/0686-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0686-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7ee46b9f98794d1fec0a8feea71fd495f9199dd0..d19f2ca702ffa32c616ec821219079e2b784a460 100644 +index fdda28bd6aa3a2d3079a383157b82ff825cc992d..82ee16f8efb5d32bf648d416010de557e2b90865 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -597,7 +597,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c787fbcef295f2108a6f843524c00cdea4660f27..7bb43181e4de4cf3a3944aea88c45e54e476433c 100644 +index 5d5e5e811d065411e5def069533e8f9ab974ed55..558d95381bca2f950824748b05e59e4ced7347c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -150,6 +150,7 @@ import org.jetbrains.annotations.Nullable; +@@ -151,6 +151,7 @@ import org.jetbrains.annotations.Nullable; public class CraftWorld extends CraftRegionAccessor implements World { public static final int CUSTOM_DIMENSION_OFFSET = 10; private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); @@ -17,7 +17,7 @@ index c787fbcef295f2108a6f843524c00cdea4660f27..7bb43181e4de4cf3a3944aea88c45e54 private final ServerLevel world; private WorldBorder worldBorder; -@@ -420,27 +421,68 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -421,27 +422,68 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean regenerateChunk(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot diff --git a/patches/server/0713-Fix-falling-block-spawn-methods.patch b/patches/server/0713-Fix-falling-block-spawn-methods.patch index 5181c49b28..c9e1a31533 100644 --- a/patches/server/0713-Fix-falling-block-spawn-methods.patch +++ b/patches/server/0713-Fix-falling-block-spawn-methods.patch @@ -11,10 +11,10 @@ Restores the API behavior from previous versions of the server public net.minecraft.world.entity.item.FallingBlockEntity (Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7bb43181e4de4cf3a3944aea88c45e54e476433c..97ebf2e2e08469cacc66c4f38bd2edfc2107fe6a 100644 +index 558d95381bca2f950824748b05e59e4ced7347c3..f2e4494a31dd7ca7e099c6960a9e6378ecac8727 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1394,7 +1394,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1414,7 +1414,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(material != null, "Material cannot be null"); Preconditions.checkArgument(material.isBlock(), "Material.%s must be a block", material); @@ -28,7 +28,7 @@ index 7bb43181e4de4cf3a3944aea88c45e54e476433c..97ebf2e2e08469cacc66c4f38bd2edfc return (FallingBlock) entity.getBukkitEntity(); } -@@ -1403,7 +1408,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1423,7 +1428,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(location != null, "Location cannot be null"); Preconditions.checkArgument(data != null, "BlockData cannot be null"); diff --git a/patches/server/0716-More-Projectile-API.patch b/patches/server/0716-More-Projectile-API.patch index 30d520d8be..797924f9aa 100644 --- a/patches/server/0716-More-Projectile-API.patch +++ b/patches/server/0716-More-Projectile-API.patch @@ -133,10 +133,10 @@ index 91c2d0b40d3fca86938cd454e1415a4eea3df7c7..c1c52f4fc5f900fac4098e5e37c52dfc + // Paper end - More projectile API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java -index 35d8fbd9c5751568a1a3b8928017e23cd41bb163..3a749f78be3968e499e096196eaaa0b433a53c06 100644 +index a24a6fe5bf634bb02654b0ec4f771aa07458ce84..0fd2677181d741e553b9825c8c319a209194ec46 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java -@@ -58,20 +58,7 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow { +@@ -60,20 +60,7 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow { this.getHandle().setCritArrow(critical); } @@ -158,7 +158,7 @@ index 35d8fbd9c5751568a1a3b8928017e23cd41bb163..3a749f78be3968e499e096196eaaa0b4 @Override public boolean isInBlock() { -@@ -99,6 +86,35 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow { +@@ -101,6 +88,35 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow { this.getHandle().pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.byOrdinal(status.ordinal()); } @@ -517,10 +517,10 @@ index 20f9735c7cb76024e15dbdca7684f5c560876175..8a6af0db8e0aa0cffbf19584be747076 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index ef45cf53ee3e5bf9da11f631c6eeeb8df00e9920..d329f9fab83c30ded648763c6c0505d793daa506 100644 +index 7d72ccdd82daa6afe85859f5bc6ec7b187622384..fb0426a1d864f3c60637e394e5bedb3963677df1 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -832,19 +832,19 @@ public class CraftEventFactory { +@@ -833,19 +833,19 @@ public class CraftEventFactory { /** * PotionSplashEvent */ @@ -543,7 +543,7 @@ index ef45cf53ee3e5bf9da11f631c6eeeb8df00e9920..d329f9fab83c30ded648763c6c0505d7 hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity(); } -@@ -853,20 +853,20 @@ public class CraftEventFactory { +@@ -854,20 +854,20 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0725-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0725-Fix-new-block-data-for-EntityChangeBlockEvent.patch index 6d27ca622a..91ca1e4916 100644 --- a/patches/server/0725-Fix-new-block-data-for-EntityChangeBlockEvent.patch +++ b/patches/server/0725-Fix-new-block-data-for-EntityChangeBlockEvent.patch @@ -196,10 +196,10 @@ index 61abbcfe97e3d3e3da5ee658672549d14594ad17..05e14322e519d1399e87beb532e1cc4a } // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d329f9fab83c30ded648763c6c0505d793daa506..55a0a154f2b37c75e40d3b33c9baf245d5dcd9d7 100644 +index fb0426a1d864f3c60637e394e5bedb3963677df1..13366b67b20b812a037a199b8a1e6609a4a54444 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1360,11 +1360,11 @@ public class CraftEventFactory { +@@ -1361,11 +1361,11 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0743-Add-support-for-Proxy-Protocol.patch b/patches/server/0743-Add-support-for-Proxy-Protocol.patch index 278aa4c803..ef41da5d60 100644 --- a/patches/server/0743-Add-support-for-Proxy-Protocol.patch +++ b/patches/server/0743-Add-support-for-Proxy-Protocol.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add support for Proxy Protocol diff --git a/build.gradle.kts b/build.gradle.kts -index e7ea6d57488cbde806b7d5febd48c42dfe3c5195..b5f31e210f2ca4bdfe9957d44780d89240da6269 100644 +index 7cbfd129efcc2e971b75aaa272dee79a3b4d2d5c..5d35409137aff0eab242a0d4eb235e10cb7fe236 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,6 +30,7 @@ dependencies { @@ -15,7 +15,7 @@ index e7ea6d57488cbde806b7d5febd48c42dfe3c5195..b5f31e210f2ca4bdfe9957d44780d892 + implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol // Paper end implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion - implementation("org.ow2.asm:asm-commons:9.5") + implementation("org.ow2.asm:asm-commons:9.7") diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java index 87abd6274f9da9367094bad0c28acfa47e01c50e..4f330a44c77a7ec3237a86fda04921a8c4a1c00f 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java diff --git a/patches/server/0759-Add-Player-getFishHook.patch b/patches/server/0759-Add-Player-getFishHook.patch index d539d68f07..d5f8b5dc18 100644 --- a/patches/server/0759-Add-Player-getFishHook.patch +++ b/patches/server/0759-Add-Player-getFishHook.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Player#getFishHook diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 6e85e580d48622b4c90478b9afbc45b4445e86b0..2abbcbd393660de69fec567c3e31dbc774d93920 100644 +index b895b3972dc48ec91dba9d44546508badef73865..98ee3a7eff6cd1dd3fdbd7cc6a94deebcefbc565 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -161,6 +161,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -162,6 +162,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { return new Location(worldServer.getWorld(), bed.getX(), bed.getY(), bed.getZ()); } // Paper end diff --git a/patches/server/0768-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0768-Warn-on-plugins-accessing-faraway-chunks.patch index cf8698ba32..2b9d9f5b89 100644 --- a/patches/server/0768-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0768-Warn-on-plugins-accessing-faraway-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 275c02d480cdf25ba0e735f4a43015ec0af238b3..2cbb3fcae6a8e26ee4bc2a9c88e64984da15ce86 100644 +index 1ed82afbc3aaa826f8067c65fdfc3ffce36a2ce5..59dba562e17e9463c1e00dee4979b61a0f68643e 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -345,7 +345,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -18,10 +18,10 @@ index 275c02d480cdf25ba0e735f4a43015ec0af238b3..2cbb3fcae6a8e26ee4bc2a9c88e64984 private static boolean isOutsideSpawnableHeight(int y) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 97ebf2e2e08469cacc66c4f38bd2edfc2107fe6a..54cdb4b6a97250c1e15e2fce355e3699c9189948 100644 +index f2e4494a31dd7ca7e099c6960a9e6378ecac8727..51e709beb32499f2f56189a0426bba93c43e1c0d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -318,9 +318,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -319,9 +319,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean setSpawnLocation(int x, int y, int z) { return this.setSpawnLocation(x, y, z, 0.0F); } @@ -46,7 +46,7 @@ index 97ebf2e2e08469cacc66c4f38bd2edfc2107fe6a..54cdb4b6a97250c1e15e2fce355e3699 // Paper start - add ticket to hold chunk for a little while longer if plugin accesses it net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); if (chunk == null) { -@@ -421,6 +436,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -422,6 +437,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean regenerateChunk(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot @@ -54,7 +54,7 @@ index 97ebf2e2e08469cacc66c4f38bd2edfc2107fe6a..54cdb4b6a97250c1e15e2fce355e3699 // Paper start - implement regenerateChunk method final ServerLevel serverLevel = this.world; final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource(); -@@ -515,6 +531,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -516,6 +532,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot @@ -62,7 +62,7 @@ index 97ebf2e2e08469cacc66c4f38bd2edfc2107fe6a..54cdb4b6a97250c1e15e2fce355e3699 ChunkAccess chunk = this.world.getChunkSource().getChunk(x, z, generate || isChunkGenerated(x, z) ? ChunkStatus.FULL : ChunkStatus.EMPTY, true); // Paper // If generate = false, but the chunk already exists, we will get this back. -@@ -547,6 +564,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -548,6 +565,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { @@ -70,7 +70,7 @@ index 97ebf2e2e08469cacc66c4f38bd2edfc2107fe6a..54cdb4b6a97250c1e15e2fce355e3699 Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); -@@ -628,6 +646,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -648,6 +666,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setChunkForceLoaded(int x, int z, boolean forced) { @@ -78,7 +78,7 @@ index 97ebf2e2e08469cacc66c4f38bd2edfc2107fe6a..54cdb4b6a97250c1e15e2fce355e3699 this.getHandle().setChunkForced(x, z, forced); } -@@ -947,6 +966,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -967,6 +986,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { @@ -86,7 +86,7 @@ index 97ebf2e2e08469cacc66c4f38bd2edfc2107fe6a..54cdb4b6a97250c1e15e2fce355e3699 // Transient load for this tick return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); } -@@ -2380,6 +2400,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2400,6 +2420,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Spigot end // Paper start public java.util.concurrent.CompletableFuture getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { diff --git a/patches/server/0775-Add-NamespacedKey-biome-methods.patch b/patches/server/0775-Add-NamespacedKey-biome-methods.patch index bf854146f4..60b5cb2a50 100644 --- a/patches/server/0775-Add-NamespacedKey-biome-methods.patch +++ b/patches/server/0775-Add-NamespacedKey-biome-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 3f582c5653e13875cce4ef8ecd279d8a3d2b2dc2..5f93c5a6e1c381898c50332099cc98063a108b4e 100644 +index be82e1d52d7026facb20bf07f4b3a394e77ab708..0d49d7b92305977fe66f13c1e66739c1430dc7fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -620,6 +620,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -625,6 +625,19 @@ public final class CraftMagicNumbers implements UnsafeValues { Preconditions.checkArgument(material.isBlock(), material + " is not a block"); return getBlock(material).hasCollision; } diff --git a/patches/server/0778-Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/0778-Fire-EntityChangeBlockEvent-in-more-places.patch index 5d703466dc..ce2102d524 100644 --- a/patches/server/0778-Fire-EntityChangeBlockEvent-in-more-places.patch +++ b/patches/server/0778-Fire-EntityChangeBlockEvent-in-more-places.patch @@ -79,23 +79,6 @@ index a298f511c8a7eb208a0dd63b24ec050848a31476..41a3ca4edf4fa662f2af13efd7b78b56 world.setBlockAndUpdate(blockposition1Final, iblockdata1); // CraftBukkit - decompile error }); world.levelEvent(3002, blockposition1, -1); -diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java -index 2c443b421e342ebfbdf941a431ba20560521920b..91b68ee3605afdb845405e455c869e48a7fc9aab 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java -+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java -@@ -27,6 +27,12 @@ public class TryLaySpawnOnWaterNearLand { - BlockPos blockPos3 = blockPos2.above(); - if (world.getBlockState(blockPos3).isAir()) { - BlockState blockState = frogSpawn.defaultBlockState(); -+ // Paper start -+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockPos3, blockState)) { -+ isPregnant.erase(); // forgot pregnant memory -+ return true; -+ } -+ // Paper end - world.setBlock(blockPos3, blockState, 3); - world.gameEvent(GameEvent.BLOCK_PLACE, blockPos3, GameEvent.Context.of(entity, blockState)); - world.playSound((Player)null, entity, SoundEvents.FROG_LAY_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F); diff --git a/src/main/java/net/minecraft/world/item/AxeItem.java b/src/main/java/net/minecraft/world/item/AxeItem.java index db507638a97b5a33df712c54daff35b21922c0dd..2e75fd06e9e379eb95ebfe55086ffc327706ab2f 100644 --- a/src/main/java/net/minecraft/world/item/AxeItem.java diff --git a/patches/server/0782-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/server/0782-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch index e097dea832..00601e4c1f 100644 --- a/patches/server/0782-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch +++ b/patches/server/0782-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a67570fedb8f09a118351b1b5c3d47bc568f5c0c..354c32f67d06228477c723f7e4dbe27116e59a9b 100644 +index 6af7796c9505b43b2c4dfe869214b0f56dc71244..2ef22ba88fa65ecddb88f7fceef598f2e7e55e03 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -546,8 +546,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -562,8 +562,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } @Override @@ -25,7 +25,7 @@ index a67570fedb8f09a118351b1b5c3d47bc568f5c0c..354c32f67d06228477c723f7e4dbe271 Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation"); net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle(); -@@ -634,6 +641,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -650,6 +657,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { if (velocity != null) { ((T) launch.getBukkitEntity()).setVelocity(velocity); } diff --git a/patches/server/0793-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0793-Correctly-handle-interactions-with-items-on-cooldown.patch index acbf650a19..f1a45a8700 100644 --- a/patches/server/0793-Correctly-handle-interactions-with-items-on-cooldown.patch +++ b/patches/server/0793-Correctly-handle-interactions-with-items-on-cooldown.patch @@ -30,10 +30,10 @@ index 5d1b8bae981dc538ee1fe4fb993e44f227168233..3621770701c6fb1da75c69a412976844 this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactPosition = blockposition.immutable(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 55a0a154f2b37c75e40d3b33c9baf245d5dcd9d7..1b8a98ebd3be8df907717b02ad82398807867ac8 100644 +index 13366b67b20b812a037a199b8a1e6609a4a54444..6b226ab2b6365788362683e629c8cece12118233 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -545,6 +545,12 @@ public class CraftEventFactory { +@@ -546,6 +546,12 @@ public class CraftEventFactory { } public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) { @@ -46,7 +46,7 @@ index 55a0a154f2b37c75e40d3b33c9baf245d5dcd9d7..1b8a98ebd3be8df907717b02ad823988 Player player = (who == null) ? null : (Player) who.getBukkitEntity(); CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack); -@@ -579,6 +585,11 @@ public class CraftEventFactory { +@@ -580,6 +586,11 @@ public class CraftEventFactory { if (cancelledBlock) { event.setUseInteractedBlock(Event.Result.DENY); } diff --git a/patches/server/0797-Add-entity-knockback-API.patch b/patches/server/0797-Add-entity-knockback-API.patch index afe4ca229a..6a577fa67c 100644 --- a/patches/server/0797-Add-entity-knockback-API.patch +++ b/patches/server/0797-Add-entity-knockback-API.patch @@ -5,18 +5,19 @@ Subject: [PATCH] Add entity knockback API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 354c32f67d06228477c723f7e4dbe27116e59a9b..4363f55707101362c1df60b73ab23d3d4c9c0675 100644 +index 163c3a07abf187d6d2f3fb3bc30eb8f0c26b247f..be915e4ab474d8f06c63b5aaee5b9277aef0f706 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1072,5 +1072,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - } +@@ -1106,4 +1106,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category"); } + // Paper end - more enchant API + ++ // Paper start - knockback API + @Override -+ public void knockback(double strength, double directionX, double directionZ) { ++ public void knockback(final double strength, final double directionX, final double directionZ) { + Preconditions.checkArgument(strength > 0, "Knockback strength must be > 0"); -+ getHandle().knockback(strength, directionX, directionZ); ++ this.getHandle().knockback(strength, directionX, directionZ); + }; - // Paper end ++ // Paper end - knockback API } diff --git a/patches/server/0815-ItemStack-damage-API.patch b/patches/server/0815-ItemStack-damage-API.patch index 9525df8c4c..f7b51b4edd 100644 --- a/patches/server/0815-ItemStack-damage-API.patch +++ b/patches/server/0815-ItemStack-damage-API.patch @@ -11,20 +11,21 @@ the logic associated with damaging them public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 4363f55707101362c1df60b73ab23d3d4c9c0675..ed436eed7617665e77627dd05d17b8e5a7366f25 100644 +index be915e4ab474d8f06c63b5aaee5b9277aef0f706..6359bb77c6d05db733a7f92d30230a2889a5b0ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1073,6 +1073,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category"); - } - -+ @Override -+ public void broadcastSlotBreak(org.bukkit.inventory.EquipmentSlot slot) { +@@ -1114,4 +1114,52 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + this.getHandle().knockback(strength, directionX, directionZ); + }; + // Paper end - knockback API ++ ++ // Paper start - ItemStack damage API ++ public void broadcastSlotBreak(final org.bukkit.inventory.EquipmentSlot slot) { + this.getHandle().broadcastBreakEvent(org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot)); + } + + @Override -+ public void broadcastSlotBreak(org.bukkit.inventory.EquipmentSlot slot, Collection players) { ++ public void broadcastSlotBreak(final org.bukkit.inventory.EquipmentSlot slot, final Collection players) { + if (players.isEmpty()) { + return; + } @@ -36,9 +37,9 @@ index 4363f55707101362c1df60b73ab23d3d4c9c0675..ed436eed7617665e77627dd05d17b8e5 + } + + @Override -+ public ItemStack damageItemStack(ItemStack stack, int amount) { ++ public ItemStack damageItemStack(ItemStack stack, final int amount) { + final net.minecraft.world.item.ItemStack nmsStack; -+ if (stack instanceof CraftItemStack craftItemStack) { ++ if (stack instanceof final CraftItemStack craftItemStack) { + if (craftItemStack.handle == null || craftItemStack.handle.isEmpty()) { + return stack; + } @@ -52,19 +53,17 @@ index 4363f55707101362c1df60b73ab23d3d4c9c0675..ed436eed7617665e77627dd05d17b8e5 + } + + @Override -+ public void damageItemStack(org.bukkit.inventory.EquipmentSlot slot, int amount) { ++ public void damageItemStack(final org.bukkit.inventory.EquipmentSlot slot, final int amount) { + final net.minecraft.world.entity.EquipmentSlot nmsSlot = org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot); + this.damageItemStack0(this.getHandle().getItemBySlot(nmsSlot), amount, nmsSlot); + } + -+ private void damageItemStack0(net.minecraft.world.item.ItemStack nmsStack, int amount, net.minecraft.world.entity.EquipmentSlot slot) { ++ private void damageItemStack0(final net.minecraft.world.item.ItemStack nmsStack, final int amount, final net.minecraft.world.entity.EquipmentSlot slot) { + nmsStack.hurtAndBreak(amount, this.getHandle(), livingEntity -> { + if (slot != null) { + livingEntity.broadcastBreakEvent(slot); + } + }); + } -+ - @Override - public void knockback(double strength, double directionX, double directionZ) { - Preconditions.checkArgument(strength > 0, "Knockback strength must be > 0"); ++ // Paper end - ItemStack damage API + } diff --git a/patches/server/0816-Friction-API.patch b/patches/server/0816-Friction-API.patch index c7825d86c1..6cecc44554 100644 --- a/patches/server/0816-Friction-API.patch +++ b/patches/server/0816-Friction-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Friction API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 4959d8fd8f84f99f289b898fd604d8a9808d62a4..8e6cb47ce314d4c493047fa1804b2da8c9797fac 100644 +index 0708502b46ec55d533c7d890b892a57779678854..834607dde3841105b3524b43f59380296924862a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -133,13 +133,15 @@ index 1a291dd8a287db30e71dcb315599fc4b038764c4..30d62ee4d5cd2ddacb8783b5bbbf475d public int getHealth() { return this.getHandle().health; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index ed436eed7617665e77627dd05d17b8e5a7366f25..e8ef40fed546608d995fd31dc8a9721c00537749 100644 +index 6359bb77c6d05db733a7f92d30230a2889a5b0ea..9c5ad1ffdd82ce5d12eabca07f45a37e6a939f2e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1120,6 +1120,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -1162,4 +1162,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { }); } - + // Paper end - ItemStack damage API ++ ++ // Paper start - friction API + @org.jetbrains.annotations.NotNull + @Override + public net.kyori.adventure.util.TriState getFrictionState() { @@ -151,7 +153,5 @@ index ed436eed7617665e77627dd05d17b8e5a7366f25..e8ef40fed546608d995fd31dc8a9721c + java.util.Objects.requireNonNull(state, "state may not be null"); + this.getHandle().frictionState = state; + } -+ - @Override - public void knockback(double strength, double directionX, double directionZ) { - Preconditions.checkArgument(strength > 0, "Knockback strength must be > 0"); ++ // Paper end - friction API + } diff --git a/patches/server/0818-Fix-player-kick-on-shutdown.patch b/patches/server/0818-Fix-player-kick-on-shutdown.patch index 0c36dc9398..6b694a6abe 100644 --- a/patches/server/0818-Fix-player-kick-on-shutdown.patch +++ b/patches/server/0818-Fix-player-kick-on-shutdown.patch @@ -9,7 +9,7 @@ also check if all packets are ignored during the shutdown process. See net.minecraft.network.Connection#channelRead0(ChannelHandlerContext, Packet) and net.minecraft.util.thread.BlockableEventLoop#executeIfPossible(Runnable) diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java -index 7de24c39b460e43d27839b3821e67213508ece81..454d0187ff8370a0d99cca051ee0a8c50b39cfb7 100644 +index b7ffab0284b0bccd79775b8d03c8b2e088f91d1d..4202c48ad8f8e85ef46d1bd446ab28f3f4b083d1 100644 --- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java +++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java @@ -26,7 +26,7 @@ public class PacketUtils { @@ -18,6 +18,6 @@ index 7de24c39b460e43d27839b3821e67213508ece81..454d0187ff8370a0d99cca051ee0a8c5 if (!engine.isSameThread()) { - engine.executeIfPossible(() -> { + engine.execute(() -> { // Paper - Fix preemptive player kick on a server shutdown - if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590 + if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players if (listener.shouldHandleMessage(packet)) { co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings diff --git a/patches/server/0834-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/server/0834-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch index 87f093c66c..09acddcf7f 100644 --- a/patches/server/0834-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch +++ b/patches/server/0834-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch @@ -138,10 +138,10 @@ index f81c0d07a5efc92942d8ab5c50a8260db033307d..8afc396c162d928902a9d9beb9f039b0 // See BlockStateFactory#createBlockState(World, BlockPosition, IBlockData, TileEntity) private static CraftBlockState getBlockState(World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, BlockEntity tileEntity) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 1b8a98ebd3be8df907717b02ad82398807867ac8..b04cf7cb05adcef205f84decf3564f85de0c8e2d 100644 +index 6b226ab2b6365788362683e629c8cece12118233..82c0a13558948a5f5e5cee0e2b67fcde5a906301 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1070,7 +1070,7 @@ public class CraftEventFactory { +@@ -1071,7 +1071,7 @@ public class CraftEventFactory { Entity damager = source.getCausingEntity(); if (source.is(DamageTypeTags.IS_EXPLOSION)) { if (damager == null) { @@ -150,7 +150,7 @@ index 1b8a98ebd3be8df907717b02ad82398807867ac8..b04cf7cb05adcef205f84decf3564f85 } DamageCause damageCause = (damager.getBukkitEntity() instanceof org.bukkit.entity.TNTPrimed) ? DamageCause.BLOCK_EXPLOSION : DamageCause.ENTITY_EXPLOSION; return CraftEventFactory.callEntityDamageEvent(damager, entity, damageCause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API -@@ -1121,7 +1121,7 @@ public class CraftEventFactory { +@@ -1122,7 +1122,7 @@ public class CraftEventFactory { } else { throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, source.getDirectBlock(), source.getMsgId())); } @@ -159,7 +159,7 @@ index 1b8a98ebd3be8df907717b02ad82398807867ac8..b04cf7cb05adcef205f84decf3564f85 } DamageCause cause; -@@ -1174,8 +1174,13 @@ public class CraftEventFactory { +@@ -1175,8 +1175,13 @@ public class CraftEventFactory { return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled); } diff --git a/patches/server/0841-Fix-force-opening-enchantment-tables.patch b/patches/server/0841-Fix-force-opening-enchantment-tables.patch index 70439d1f0f..57955b6cc3 100644 --- a/patches/server/0841-Fix-force-opening-enchantment-tables.patch +++ b/patches/server/0841-Fix-force-opening-enchantment-tables.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix force-opening enchantment tables diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 2abbcbd393660de69fec567c3e31dbc774d93920..10fad0ba0624fdb601de9cfb9dc82590bd8149ce 100644 +index 98ee3a7eff6cd1dd3fdbd7cc6a94deebcefbc565..103d5e14972516968030df255cde49c82b93c38f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -402,7 +402,18 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -405,7 +405,18 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // If there isn't an enchant table we can force create one, won't be very useful though. BlockPos pos = CraftLocation.toBlockPosition(location); diff --git a/patches/server/0842-Add-Entity-Body-Yaw-API.patch b/patches/server/0842-Add-Entity-Body-Yaw-API.patch index 87974f97d5..826e32eacd 100644 --- a/patches/server/0842-Add-Entity-Body-Yaw-API.patch +++ b/patches/server/0842-Add-Entity-Body-Yaw-API.patch @@ -41,23 +41,23 @@ index b4ed7612a019a3d4d473dfbfed2067ea437fee06..509550bbfb7c6bcff5dffa535f40af12 // Paper start - missing entity api diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index e8ef40fed546608d995fd31dc8a9721c00537749..fbe1d5051f8767db240e4d0c256f4a1088c4339c 100644 +index 9c5ad1ffdd82ce5d12eabca07f45a37e6a939f2e..ec62e68686b7c46df299d946850ec60631ecc6be 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -1112,6 +1112,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - this.damageItemStack0(this.getHandle().getItemBySlot(nmsSlot), amount, nmsSlot); +@@ -1176,4 +1176,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { + this.getHandle().frictionState = state; } - + // Paper end - friction API ++ ++ // Paper start - body yaw API + @Override + public float getBodyYaw() { + return this.getHandle().getVisualRotationYInDegrees(); + } + + @Override -+ public void setBodyYaw(float bodyYaw) { ++ public void setBodyYaw(final float bodyYaw) { + this.getHandle().setYBodyRot(bodyYaw); + } -+ - private void damageItemStack0(net.minecraft.world.item.ItemStack nmsStack, int amount, net.minecraft.world.entity.EquipmentSlot slot) { - nmsStack.hurtAndBreak(amount, this.getHandle(), livingEntity -> { - if (slot != null) { ++ // Paper end - body yaw API + } diff --git a/patches/server/0845-Add-EntityFertilizeEggEvent.patch b/patches/server/0844-Add-EntityFertilizeEggEvent.patch similarity index 97% rename from patches/server/0845-Add-EntityFertilizeEggEvent.patch rename to patches/server/0844-Add-EntityFertilizeEggEvent.patch index f1e109f30c..1cd60bd301 100644 --- a/patches/server/0845-Add-EntityFertilizeEggEvent.patch +++ b/patches/server/0844-Add-EntityFertilizeEggEvent.patch @@ -69,10 +69,10 @@ index 0e85e3ab58d848b119212fa7d2eb4f92d3efe29b..0a5b953bd8c0c7f181da4090b950e9e6 this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F); } // Paper - Call EntityDropItemEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index b04cf7cb05adcef205f84decf3564f85de0c8e2d..6c5908eecaaf2f2b41bc0074e183a2259fe4a9b2 100644 +index 82c0a13558948a5f5e5cee0e2b67fcde5a906301..3291d8e14b53185a774b0219251d8a080192992b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2108,4 +2108,28 @@ public class CraftEventFactory { +@@ -2114,4 +2114,28 @@ public class CraftEventFactory { return event.callEvent(); } // Paper end diff --git a/patches/server/0844-Update-the-flag-when-a-captured-block-state-is-outda.patch b/patches/server/0844-Update-the-flag-when-a-captured-block-state-is-outda.patch deleted file mode 100644 index acec71e5bc..0000000000 --- a/patches/server/0844-Update-the-flag-when-a-captured-block-state-is-outda.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> -Date: Sat, 18 Feb 2023 16:23:18 +0100 -Subject: [PATCH] Update the flag when a captured block state is outdated - - -diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 2cbb3fcae6a8e26ee4bc2a9c88e64984da15ce86..5fcdb88dd2aa8c8c57d57935d15ea92c1015670e 100644 ---- a/src/main/java/net/minecraft/world/level/Level.java -+++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -451,6 +451,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { - blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); - this.capturedBlockStates.put(pos.immutable(), blockstate); - } -+ blockstate.setFlag(flags); // Paper - update the flag also - blockstate.setData(state); - return true; - } diff --git a/patches/server/0846-Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/0845-Fix-HumanEntity-drop-not-updating-the-client-inv.patch similarity index 90% rename from patches/server/0846-Fix-HumanEntity-drop-not-updating-the-client-inv.patch rename to patches/server/0845-Fix-HumanEntity-drop-not-updating-the-client-inv.patch index 39cf518fa6..d7bf05c02c 100644 --- a/patches/server/0846-Fix-HumanEntity-drop-not-updating-the-client-inv.patch +++ b/patches/server/0845-Fix-HumanEntity-drop-not-updating-the-client-inv.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Fix HumanEntity#drop not updating the client inv public net.minecraft.server.level.ServerPlayer containerSynchronizer diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 10fad0ba0624fdb601de9cfb9dc82590bd8149ce..94c2ea713e0614de570458f6b9c418a3d67d14b5 100644 +index 103d5e14972516968030df255cde49c82b93c38f..6a52789d6e68438c1eaa2fb9af591fa9e1d381e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -755,8 +755,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -752,8 +752,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // Paper end @Override public boolean dropItem(boolean dropAll) { diff --git a/patches/server/0847-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0846-Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/server/0847-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/server/0846-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/server/0848-Correctly-handle-ArmorStand-invisibility.patch b/patches/server/0847-Correctly-handle-ArmorStand-invisibility.patch similarity index 100% rename from patches/server/0848-Correctly-handle-ArmorStand-invisibility.patch rename to patches/server/0847-Correctly-handle-ArmorStand-invisibility.patch diff --git a/patches/server/0849-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0848-Fix-advancement-triggers-for-entity-damage.patch similarity index 97% rename from patches/server/0849-Fix-advancement-triggers-for-entity-damage.patch rename to patches/server/0848-Fix-advancement-triggers-for-entity-damage.patch index 60dd2d1db4..be0a156199 100644 --- a/patches/server/0849-Fix-advancement-triggers-for-entity-damage.patch +++ b/patches/server/0848-Fix-advancement-triggers-for-entity-damage.patch @@ -23,7 +23,7 @@ index f054d67a637b204de604fadc0d321f5c9816d808..fc5f1e1b445f0a55a35a31d58a90920a return !this.getResponse(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d9f9a184e22bc02fbfd1ab029abf48af654c9935..cc82b269d422f6cd720021ba009606cab1b90590 100644 +index bd8d1e90ea6d2f6d3b625f6d264c12cb3ea009e8..e2564a07e0aa4bf2fcd9a749e9fc188dd0633675 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2322,7 +2322,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0850-Fix-text-display-error-on-spawn.patch b/patches/server/0849-Fix-text-display-error-on-spawn.patch similarity index 100% rename from patches/server/0850-Fix-text-display-error-on-spawn.patch rename to patches/server/0849-Fix-text-display-error-on-spawn.patch diff --git a/patches/server/0851-Fix-inventories-returning-null-Locations.patch b/patches/server/0850-Fix-inventories-returning-null-Locations.patch similarity index 100% rename from patches/server/0851-Fix-inventories-returning-null-Locations.patch rename to patches/server/0850-Fix-inventories-returning-null-Locations.patch diff --git a/patches/server/0852-Add-Shearable-API.patch b/patches/server/0851-Add-Shearable-API.patch similarity index 100% rename from patches/server/0852-Add-Shearable-API.patch rename to patches/server/0851-Add-Shearable-API.patch diff --git a/patches/server/0853-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0852-Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/server/0853-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/server/0852-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/server/0854-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/0853-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch similarity index 100% rename from patches/server/0854-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch rename to patches/server/0853-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch diff --git a/patches/server/0855-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0854-Treat-sequence-violations-like-they-should-be.patch similarity index 100% rename from patches/server/0855-Treat-sequence-violations-like-they-should-be.patch rename to patches/server/0854-Treat-sequence-violations-like-they-should-be.patch diff --git a/patches/server/0856-remove-duplicate-animate-packet-for-records.patch b/patches/server/0855-remove-duplicate-animate-packet-for-records.patch similarity index 100% rename from patches/server/0856-remove-duplicate-animate-packet-for-records.patch rename to patches/server/0855-remove-duplicate-animate-packet-for-records.patch diff --git a/patches/server/0857-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0856-Prevent-causing-expired-keys-from-impacting-new-join.patch similarity index 100% rename from patches/server/0857-Prevent-causing-expired-keys-from-impacting-new-join.patch rename to patches/server/0856-Prevent-causing-expired-keys-from-impacting-new-join.patch diff --git a/patches/server/0858-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0857-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch similarity index 100% rename from patches/server/0858-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch rename to patches/server/0857-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch diff --git a/patches/server/0859-Use-array-for-gamerule-storage.patch b/patches/server/0858-Use-array-for-gamerule-storage.patch similarity index 100% rename from patches/server/0859-Use-array-for-gamerule-storage.patch rename to patches/server/0858-Use-array-for-gamerule-storage.patch diff --git a/patches/server/0860-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0859-Fix-a-couple-of-upstream-bed-issues.patch similarity index 100% rename from patches/server/0860-Fix-a-couple-of-upstream-bed-issues.patch rename to patches/server/0859-Fix-a-couple-of-upstream-bed-issues.patch diff --git a/patches/server/0861-Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/0860-Fix-demo-flag-not-enabling-demo-mode.patch similarity index 100% rename from patches/server/0861-Fix-demo-flag-not-enabling-demo-mode.patch rename to patches/server/0860-Fix-demo-flag-not-enabling-demo-mode.patch diff --git a/patches/server/0862-Add-Mob-Experience-reward-API.patch b/patches/server/0861-Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/server/0862-Add-Mob-Experience-reward-API.patch rename to patches/server/0861-Add-Mob-Experience-reward-API.patch diff --git a/patches/server/0863-Break-redstone-on-top-of-trap-doors-early.patch b/patches/server/0862-Break-redstone-on-top-of-trap-doors-early.patch similarity index 100% rename from patches/server/0863-Break-redstone-on-top-of-trap-doors-early.patch rename to patches/server/0862-Break-redstone-on-top-of-trap-doors-early.patch diff --git a/patches/server/0864-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0863-Avoid-Lazy-Initialization-for-Enum-Fields.patch similarity index 100% rename from patches/server/0864-Avoid-Lazy-Initialization-for-Enum-Fields.patch rename to patches/server/0863-Avoid-Lazy-Initialization-for-Enum-Fields.patch diff --git a/patches/server/0865-More-accurate-isInOpenWater-impl.patch b/patches/server/0864-More-accurate-isInOpenWater-impl.patch similarity index 100% rename from patches/server/0865-More-accurate-isInOpenWater-impl.patch rename to patches/server/0864-More-accurate-isInOpenWater-impl.patch diff --git a/patches/server/0866-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch b/patches/server/0865-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch similarity index 100% rename from patches/server/0866-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch rename to patches/server/0865-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch diff --git a/patches/server/0867-Expand-PlayerItemMendEvent.patch b/patches/server/0866-Expand-PlayerItemMendEvent.patch similarity index 97% rename from patches/server/0867-Expand-PlayerItemMendEvent.patch rename to patches/server/0866-Expand-PlayerItemMendEvent.patch index 013c1be8fd..932b1017b7 100644 --- a/patches/server/0867-Expand-PlayerItemMendEvent.patch +++ b/patches/server/0866-Expand-PlayerItemMendEvent.patch @@ -51,10 +51,10 @@ index 4996776287c58039507ad2eda9d59e3fd13c08a8..e111017c3de7b374c702fed20a5e9855 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 6c5908eecaaf2f2b41bc0074e183a2259fe4a9b2..52c1d39f494ba441bc93382d895679bcd15fcbde 100644 +index 3291d8e14b53185a774b0219251d8a080192992b..e457cd3b6a5a627f18fa8ce7fca90e75e0adb8ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1271,10 +1271,10 @@ public class CraftEventFactory { +@@ -1272,10 +1272,10 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0868-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0867-Refresh-ProjectileSource-for-projectiles.patch similarity index 100% rename from patches/server/0868-Refresh-ProjectileSource-for-projectiles.patch rename to patches/server/0867-Refresh-ProjectileSource-for-projectiles.patch diff --git a/patches/server/0869-Add-transient-modifier-API.patch b/patches/server/0868-Add-transient-modifier-API.patch similarity index 100% rename from patches/server/0869-Add-transient-modifier-API.patch rename to patches/server/0868-Add-transient-modifier-API.patch diff --git a/patches/server/0870-Fix-block-place-logic.patch b/patches/server/0869-Fix-block-place-logic.patch similarity index 97% rename from patches/server/0870-Fix-block-place-logic.patch rename to patches/server/0869-Fix-block-place-logic.patch index 10b444c4dc..16fd6d2e89 100644 --- a/patches/server/0870-Fix-block-place-logic.patch +++ b/patches/server/0869-Fix-block-place-logic.patch @@ -41,7 +41,7 @@ index 59c4550b4cb8b0317f5256efc9376265f4583b60..964d6af9eb9752b9e08f712c80b67bd9 } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 5fcdb88dd2aa8c8c57d57935d15ea92c1015670e..4fe0f8ba4a2b089f44808063e72dd994d6c73e0a 100644 +index 59dba562e17e9463c1e00dee4979b61a0f68643e..336ae7f1fc4bd045183c967f8e3bfb5a967a40a1 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -560,17 +560,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0871-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0870-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch similarity index 100% rename from patches/server/0871-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch rename to patches/server/0870-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch diff --git a/patches/server/0872-Call-BlockGrowEvent-for-missing-blocks.patch b/patches/server/0871-Call-BlockGrowEvent-for-missing-blocks.patch similarity index 100% rename from patches/server/0872-Call-BlockGrowEvent-for-missing-blocks.patch rename to patches/server/0871-Call-BlockGrowEvent-for-missing-blocks.patch diff --git a/patches/server/0873-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0872-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch similarity index 100% rename from patches/server/0873-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch rename to patches/server/0872-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch diff --git a/patches/server/0874-fix-MapLike-spam-for-missing-key-selector.patch b/patches/server/0873-fix-MapLike-spam-for-missing-key-selector.patch similarity index 100% rename from patches/server/0874-fix-MapLike-spam-for-missing-key-selector.patch rename to patches/server/0873-fix-MapLike-spam-for-missing-key-selector.patch diff --git a/patches/server/0875-Fix-sniffer-removeExploredLocation.patch b/patches/server/0874-Fix-sniffer-removeExploredLocation.patch similarity index 100% rename from patches/server/0875-Fix-sniffer-removeExploredLocation.patch rename to patches/server/0874-Fix-sniffer-removeExploredLocation.patch diff --git a/patches/server/0876-Add-method-to-remove-all-active-potion-effects.patch b/patches/server/0875-Add-method-to-remove-all-active-potion-effects.patch similarity index 86% rename from patches/server/0876-Add-method-to-remove-all-active-potion-effects.patch rename to patches/server/0875-Add-method-to-remove-all-active-potion-effects.patch index d2aa5b28fd..8f0290e924 100644 --- a/patches/server/0876-Add-method-to-remove-all-active-potion-effects.patch +++ b/patches/server/0875-Add-method-to-remove-all-active-potion-effects.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index fbe1d5051f8767db240e4d0c256f4a1088c4339c..993844ee3d76591be38e8d27eba37ff8723443b1 100644 +index 909e4b139d5e372946b08bbb12665a49f3a09054..4031bf7fa35cfb480fbe6f0558a455f0c6985e39 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -540,6 +540,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -556,6 +556,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { return effects; } diff --git a/patches/server/0877-Fix-incorrect-crafting-result-amount-for-fireworks.patch b/patches/server/0876-Fix-incorrect-crafting-result-amount-for-fireworks.patch similarity index 100% rename from patches/server/0877-Fix-incorrect-crafting-result-amount-for-fireworks.patch rename to patches/server/0876-Fix-incorrect-crafting-result-amount-for-fireworks.patch diff --git a/patches/server/0878-Add-event-for-player-editing-sign.patch b/patches/server/0877-Add-event-for-player-editing-sign.patch similarity index 100% rename from patches/server/0878-Add-event-for-player-editing-sign.patch rename to patches/server/0877-Add-event-for-player-editing-sign.patch diff --git a/patches/server/0879-Only-tick-item-frames-if-players-can-see-it.patch b/patches/server/0878-Only-tick-item-frames-if-players-can-see-it.patch similarity index 92% rename from patches/server/0879-Only-tick-item-frames-if-players-can-see-it.patch rename to patches/server/0878-Only-tick-item-frames-if-players-can-see-it.patch index decd7a346e..2ae56c0857 100644 --- a/patches/server/0879-Only-tick-item-frames-if-players-can-see-it.patch +++ b/patches/server/0878-Only-tick-item-frames-if-players-can-see-it.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Only tick item frames if players can see it In the event that an item frame cannot be seen by any players, ticking the item frame every tick is unnecessary. This can be a very hot section of the entity tracker when lots of item frames are present on a server, so this reduces the logic which speeds it up. diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 3608257fabec6ad7edb056def8a6f36c50b4871e..1f0931bdd4d82c05d7b5f8b8e5c2cc6d23905c73 100644 +index 40949825392281c2f7c756007781c672ec24665d..888cbfaf49aa6d1d1b8cc87cf411a1dd53fbe89d 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -111,7 +111,7 @@ public class ServerEntity { diff --git a/patches/server/0880-Fix-cmd-permission-levels-for-command-blocks.patch b/patches/server/0879-Fix-cmd-permission-levels-for-command-blocks.patch similarity index 100% rename from patches/server/0880-Fix-cmd-permission-levels-for-command-blocks.patch rename to patches/server/0879-Fix-cmd-permission-levels-for-command-blocks.patch diff --git a/patches/server/0881-Add-option-to-disable-block-updates.patch b/patches/server/0880-Add-option-to-disable-block-updates.patch similarity index 100% rename from patches/server/0881-Add-option-to-disable-block-updates.patch rename to patches/server/0880-Add-option-to-disable-block-updates.patch diff --git a/patches/server/0882-Call-missing-BlockDispenseEvent.patch b/patches/server/0881-Call-missing-BlockDispenseEvent.patch similarity index 97% rename from patches/server/0882-Call-missing-BlockDispenseEvent.patch rename to patches/server/0881-Call-missing-BlockDispenseEvent.patch index dc2929f750..bd92362781 100644 --- a/patches/server/0882-Call-missing-BlockDispenseEvent.patch +++ b/patches/server/0881-Call-missing-BlockDispenseEvent.patch @@ -50,10 +50,10 @@ index b83af374a33a66a6ceeca119b961eea883bba41c..175b965c92b8b8be9c671e1ee478afa9 for (int k = 0; k < 5; ++k) { worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 52c1d39f494ba441bc93382d895679bcd15fcbde..cd6ee371910328d4ab6f4a018fa0e4a48dbc7982 100644 +index e457cd3b6a5a627f18fa8ce7fca90e75e0adb8ea..600b340bd7fc6db3914ad67684a15428b619a9a3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2109,6 +2109,32 @@ public class CraftEventFactory { +@@ -2115,6 +2115,32 @@ public class CraftEventFactory { } // Paper end diff --git a/patches/server/0883-Don-t-load-chunks-for-supporting-block-checks.patch b/patches/server/0882-Don-t-load-chunks-for-supporting-block-checks.patch similarity index 100% rename from patches/server/0883-Don-t-load-chunks-for-supporting-block-checks.patch rename to patches/server/0882-Don-t-load-chunks-for-supporting-block-checks.patch diff --git a/patches/server/0884-Optimize-player-lookups-for-beacons.patch b/patches/server/0883-Optimize-player-lookups-for-beacons.patch similarity index 100% rename from patches/server/0884-Optimize-player-lookups-for-beacons.patch rename to patches/server/0883-Optimize-player-lookups-for-beacons.patch diff --git a/patches/server/0885-Add-Sign-getInteractableSideFor.patch b/patches/server/0884-Add-Sign-getInteractableSideFor.patch similarity index 100% rename from patches/server/0885-Add-Sign-getInteractableSideFor.patch rename to patches/server/0884-Add-Sign-getInteractableSideFor.patch diff --git a/patches/server/0886-Array-backed-synched-entity-data.patch b/patches/server/0885-Array-backed-synched-entity-data.patch similarity index 100% rename from patches/server/0886-Array-backed-synched-entity-data.patch rename to patches/server/0885-Array-backed-synched-entity-data.patch diff --git a/patches/server/0887-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0886-fix-item-meta-for-tadpole-buckets.patch similarity index 100% rename from patches/server/0887-fix-item-meta-for-tadpole-buckets.patch rename to patches/server/0886-fix-item-meta-for-tadpole-buckets.patch diff --git a/patches/server/0888-Fix-BanList-API.patch b/patches/server/0887-Fix-BanList-API.patch similarity index 100% rename from patches/server/0888-Fix-BanList-API.patch rename to patches/server/0887-Fix-BanList-API.patch diff --git a/patches/server/0889-Determine-lava-and-water-fluid-explosion-resistance-.patch b/patches/server/0888-Determine-lava-and-water-fluid-explosion-resistance-.patch similarity index 100% rename from patches/server/0889-Determine-lava-and-water-fluid-explosion-resistance-.patch rename to patches/server/0888-Determine-lava-and-water-fluid-explosion-resistance-.patch diff --git a/patches/server/0890-Fix-possible-NPE-on-painting-creation.patch b/patches/server/0889-Fix-possible-NPE-on-painting-creation.patch similarity index 100% rename from patches/server/0890-Fix-possible-NPE-on-painting-creation.patch rename to patches/server/0889-Fix-possible-NPE-on-painting-creation.patch diff --git a/patches/server/0891-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0890-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch similarity index 100% rename from patches/server/0891-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch rename to patches/server/0890-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch diff --git a/patches/server/0892-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0891-ExperienceOrb-should-call-EntitySpawnEvent.patch similarity index 89% rename from patches/server/0892-ExperienceOrb-should-call-EntitySpawnEvent.patch rename to patches/server/0891-ExperienceOrb-should-call-EntitySpawnEvent.patch index cc8338c2f5..d365559159 100644 --- a/patches/server/0892-ExperienceOrb-should-call-EntitySpawnEvent.patch +++ b/patches/server/0891-ExperienceOrb-should-call-EntitySpawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ExperienceOrb should call EntitySpawnEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index cd6ee371910328d4ab6f4a018fa0e4a48dbc7982..ebb39bd51dceab1d55eea81d33273af21acfc69b 100644 +index 600b340bd7fc6db3914ad67684a15428b619a9a3..592670a6ebaed9b42d76afe66264265fc0664934 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -735,7 +735,8 @@ public class CraftEventFactory { +@@ -736,7 +736,8 @@ public class CraftEventFactory { // Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above) if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) { double radius = world.spigotConfig.expMerge; diff --git a/patches/server/0893-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch b/patches/server/0892-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch similarity index 100% rename from patches/server/0893-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch rename to patches/server/0892-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch diff --git a/patches/server/0894-Add-whitelist-events.patch b/patches/server/0893-Add-whitelist-events.patch similarity index 100% rename from patches/server/0894-Add-whitelist-events.patch rename to patches/server/0893-Add-whitelist-events.patch diff --git a/patches/server/0895-Implement-PlayerFailMoveEvent.patch b/patches/server/0894-Implement-PlayerFailMoveEvent.patch similarity index 100% rename from patches/server/0895-Implement-PlayerFailMoveEvent.patch rename to patches/server/0894-Implement-PlayerFailMoveEvent.patch diff --git a/patches/server/0896-Folia-scheduler-and-owned-region-API.patch b/patches/server/0895-Folia-scheduler-and-owned-region-API.patch similarity index 99% rename from patches/server/0896-Folia-scheduler-and-owned-region-API.patch rename to patches/server/0895-Folia-scheduler-and-owned-region-API.patch index 92d708382e..e9b9ddb406 100644 --- a/patches/server/0896-Folia-scheduler-and-owned-region-API.patch +++ b/patches/server/0895-Folia-scheduler-and-owned-region-API.patch @@ -1148,7 +1148,7 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 97dbe5a44d2791c6dee830654c3935f4ac54aad4..48da5bdabcf38afbbd1509eca56d5c761622409f 100644 +index bfee202e1dc8ea875b9d2b4e8c3b0be3f6d94b26..28645a835a169029b734262a9f42751caa52c4c9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1497,6 +1497,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop biomeBase = cra.getHandle().registryAccess().registryOrThrow(net.minecraft.core.registries.Registries.BIOME).getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey))); cra.setBiome(x, y, z, biomeBase); } diff --git a/patches/server/0907-Bandaid-fix-for-Effect.patch b/patches/server/0906-Bandaid-fix-for-Effect.patch similarity index 98% rename from patches/server/0907-Bandaid-fix-for-Effect.patch rename to patches/server/0906-Bandaid-fix-for-Effect.patch index 92c731798f..64597f03d1 100644 --- a/patches/server/0907-Bandaid-fix-for-Effect.patch +++ b/patches/server/0906-Bandaid-fix-for-Effect.patch @@ -60,10 +60,10 @@ index a4519762175c68256b1f303daca8b9408ac182bb..457e9093adb99d31ffc7f061d8c858f9 case COMPOSTER_FILL_ATTEMPT: datavalue = ((Boolean) data) ? 1 : 0; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 54cdb4b6a97250c1e15e2fce355e3699c9189948..457d5cdb510a11a069ac7f54a8ed95a74527bff3 100644 +index 51e709beb32499f2f56189a0426bba93c43e1c0d..9dadce62fc3e248fa2a8607fe87960491353c317 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1371,7 +1371,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1391,7 +1391,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { public void playEffect(Location loc, Effect effect, T data, int radius) { if (data != null) { Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect); diff --git a/patches/server/0908-SculkCatalyst-bloom-API.patch b/patches/server/0907-SculkCatalyst-bloom-API.patch similarity index 100% rename from patches/server/0908-SculkCatalyst-bloom-API.patch rename to patches/server/0907-SculkCatalyst-bloom-API.patch diff --git a/patches/server/0909-API-for-an-entity-s-scoreboard-name.patch b/patches/server/0908-API-for-an-entity-s-scoreboard-name.patch similarity index 100% rename from patches/server/0909-API-for-an-entity-s-scoreboard-name.patch rename to patches/server/0908-API-for-an-entity-s-scoreboard-name.patch diff --git a/patches/server/0910-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/0909-Deprecate-and-replace-methods-with-old-StructureType.patch similarity index 100% rename from patches/server/0910-Deprecate-and-replace-methods-with-old-StructureType.patch rename to patches/server/0909-Deprecate-and-replace-methods-with-old-StructureType.patch diff --git a/patches/server/0911-Don-t-tab-complete-namespaced-commands-if-send-names.patch b/patches/server/0910-Don-t-tab-complete-namespaced-commands-if-send-names.patch similarity index 100% rename from patches/server/0911-Don-t-tab-complete-namespaced-commands-if-send-names.patch rename to patches/server/0910-Don-t-tab-complete-namespaced-commands-if-send-names.patch diff --git a/patches/server/0912-Properly-handle-BlockBreakEvent-isDropItems.patch b/patches/server/0911-Properly-handle-BlockBreakEvent-isDropItems.patch similarity index 100% rename from patches/server/0912-Properly-handle-BlockBreakEvent-isDropItems.patch rename to patches/server/0911-Properly-handle-BlockBreakEvent-isDropItems.patch diff --git a/patches/server/0913-Fire-entity-death-event-for-ender-dragon.patch b/patches/server/0912-Fire-entity-death-event-for-ender-dragon.patch similarity index 100% rename from patches/server/0913-Fire-entity-death-event-for-ender-dragon.patch rename to patches/server/0912-Fire-entity-death-event-for-ender-dragon.patch diff --git a/patches/server/0914-Configurable-entity-tracking-range-by-Y-coordinate.patch b/patches/server/0913-Configurable-entity-tracking-range-by-Y-coordinate.patch similarity index 100% rename from patches/server/0914-Configurable-entity-tracking-range-by-Y-coordinate.patch rename to patches/server/0913-Configurable-entity-tracking-range-by-Y-coordinate.patch diff --git a/patches/server/0915-Add-Listing-API-for-Player.patch b/patches/server/0914-Add-Listing-API-for-Player.patch similarity index 100% rename from patches/server/0915-Add-Listing-API-for-Player.patch rename to patches/server/0914-Add-Listing-API-for-Player.patch diff --git a/patches/server/0916-Configurable-Region-Compression-Format.patch b/patches/server/0915-Configurable-Region-Compression-Format.patch similarity index 100% rename from patches/server/0916-Configurable-Region-Compression-Format.patch rename to patches/server/0915-Configurable-Region-Compression-Format.patch diff --git a/patches/server/0917-Add-BlockFace-to-BlockDamageEvent.patch b/patches/server/0916-Add-BlockFace-to-BlockDamageEvent.patch similarity index 94% rename from patches/server/0917-Add-BlockFace-to-BlockDamageEvent.patch rename to patches/server/0916-Add-BlockFace-to-BlockDamageEvent.patch index 66bd2d2f29..d17954042f 100644 --- a/patches/server/0917-Add-BlockFace-to-BlockDamageEvent.patch +++ b/patches/server/0916-Add-BlockFace-to-BlockDamageEvent.patch @@ -18,10 +18,10 @@ index 4747b05619f37009a5a236678aceec6cfc1c0b79..d0ca98c3f9ea5c8cb1053da6b17e9a90 if (blockEvent.isCancelled()) { // Let the client know the block still exists diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index ebb39bd51dceab1d55eea81d33273af21acfc69b..49aa24d64d69fdccfdbca930b149a4b9c80e2b78 100644 +index 592670a6ebaed9b42d76afe66264265fc0664934..cd237b81a09b89926b15460eccb503af5267eb34 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -650,13 +650,13 @@ public class CraftEventFactory { +@@ -651,13 +651,13 @@ public class CraftEventFactory { /** * BlockDamageEvent */ diff --git a/patches/server/0918-Fix-NPE-on-Boat-getStatus.patch b/patches/server/0917-Fix-NPE-on-Boat-getStatus.patch similarity index 100% rename from patches/server/0918-Fix-NPE-on-Boat-getStatus.patch rename to patches/server/0917-Fix-NPE-on-Boat-getStatus.patch diff --git a/patches/server/0919-Expand-Pose-API.patch b/patches/server/0918-Expand-Pose-API.patch similarity index 100% rename from patches/server/0919-Expand-Pose-API.patch rename to patches/server/0918-Expand-Pose-API.patch diff --git a/patches/server/0920-More-DragonBattle-API.patch b/patches/server/0919-More-DragonBattle-API.patch similarity index 100% rename from patches/server/0920-More-DragonBattle-API.patch rename to patches/server/0919-More-DragonBattle-API.patch diff --git a/patches/server/0921-Deep-clone-unhandled-nbt-tags.patch b/patches/server/0920-Deep-clone-unhandled-nbt-tags.patch similarity index 100% rename from patches/server/0921-Deep-clone-unhandled-nbt-tags.patch rename to patches/server/0920-Deep-clone-unhandled-nbt-tags.patch diff --git a/patches/server/0922-Add-PlayerPickItemEvent.patch b/patches/server/0921-Add-PlayerPickItemEvent.patch similarity index 100% rename from patches/server/0922-Add-PlayerPickItemEvent.patch rename to patches/server/0921-Add-PlayerPickItemEvent.patch diff --git a/patches/server/0923-Allow-trident-custom-damage.patch b/patches/server/0922-Allow-trident-custom-damage.patch similarity index 100% rename from patches/server/0923-Allow-trident-custom-damage.patch rename to patches/server/0922-Allow-trident-custom-damage.patch diff --git a/patches/server/0924-Expose-hand-in-BlockCanBuildEvent.patch b/patches/server/0923-Expose-hand-in-BlockCanBuildEvent.patch similarity index 100% rename from patches/server/0924-Expose-hand-in-BlockCanBuildEvent.patch rename to patches/server/0923-Expose-hand-in-BlockCanBuildEvent.patch diff --git a/patches/server/0925-Optimize-nearest-structure-border-iteration.patch b/patches/server/0924-Optimize-nearest-structure-border-iteration.patch similarity index 100% rename from patches/server/0925-Optimize-nearest-structure-border-iteration.patch rename to patches/server/0924-Optimize-nearest-structure-border-iteration.patch diff --git a/patches/server/0926-Implement-OfflinePlayer-isConnected.patch b/patches/server/0925-Implement-OfflinePlayer-isConnected.patch similarity index 100% rename from patches/server/0926-Implement-OfflinePlayer-isConnected.patch rename to patches/server/0925-Implement-OfflinePlayer-isConnected.patch diff --git a/patches/server/0927-Fix-inventory-desync.patch b/patches/server/0926-Fix-inventory-desync.patch similarity index 100% rename from patches/server/0927-Fix-inventory-desync.patch rename to patches/server/0926-Fix-inventory-desync.patch diff --git a/patches/server/0928-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0927-Add-titleOverride-to-InventoryOpenEvent.patch similarity index 94% rename from patches/server/0928-Add-titleOverride-to-InventoryOpenEvent.patch rename to patches/server/0927-Add-titleOverride-to-InventoryOpenEvent.patch index 06ad83c295..98a9e5449f 100644 --- a/patches/server/0928-Add-titleOverride-to-InventoryOpenEvent.patch +++ b/patches/server/0927-Add-titleOverride-to-InventoryOpenEvent.patch @@ -37,10 +37,10 @@ index d4930c40f03c5f331847bf52736c563a688d7daf..7272dc058c575efee5ac2643ce41b7d1 this.initMenu(container); return OptionalInt.of(this.containerCounter); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 94c2ea713e0614de570458f6b9c418a3d67d14b5..acbb64010cd59668aa1bcb52ff1220789cadb1d3 100644 +index 6a52789d6e68438c1eaa2fb9af591fa9e1d381e2..7984365c8290ac9e526a413b56e1c8c0841e330c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -@@ -357,12 +357,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -360,12 +360,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { Preconditions.checkArgument(windowType != null, "Unknown windowType"); AbstractContainerMenu container = new CraftContainer(inventory, player, player.nextContainerCounter()); @@ -58,7 +58,7 @@ index 94c2ea713e0614de570458f6b9c418a3d67d14b5..acbb64010cd59668aa1bcb52ff122078 //player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0])); // Paper - comment if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen -@@ -438,7 +442,10 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -441,7 +445,10 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } // Trigger an INVENTORY_OPEN event @@ -70,7 +70,7 @@ index 94c2ea713e0614de570458f6b9c418a3d67d14b5..acbb64010cd59668aa1bcb52ff122078 if (container == null) { return; } -@@ -449,6 +456,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { +@@ -452,6 +459,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { //String title = inventory.getTitle(); // Paper - comment net.kyori.adventure.text.Component adventure$title = inventory.title(); // Paper if (adventure$title == null) adventure$title = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(inventory.getTitle()); // Paper @@ -79,10 +79,10 @@ index 94c2ea713e0614de570458f6b9c418a3d67d14b5..acbb64010cd59668aa1bcb52ff122078 if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen player.containerMenu = container; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 49aa24d64d69fdccfdbca930b149a4b9c80e2b78..7f7ec71e352e403169603dcd95b4dd50d68d37f7 100644 +index cd237b81a09b89926b15460eccb503af5267eb34..53c3b2123d6fa78367aef53d6949e58170cb9fce 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1388,10 +1388,21 @@ public class CraftEventFactory { +@@ -1389,10 +1389,21 @@ public class CraftEventFactory { } public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) { @@ -105,7 +105,7 @@ index 49aa24d64d69fdccfdbca930b149a4b9c80e2b78..7f7ec71e352e403169603dcd95b4dd50 if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason } -@@ -1406,10 +1417,10 @@ public class CraftEventFactory { +@@ -1407,10 +1418,10 @@ public class CraftEventFactory { if (event.isCancelled()) { container.transferTo(player.containerMenu, craftPlayer); diff --git a/patches/server/0929-Configure-sniffer-egg-hatch-time.patch b/patches/server/0928-Configure-sniffer-egg-hatch-time.patch similarity index 100% rename from patches/server/0929-Configure-sniffer-egg-hatch-time.patch rename to patches/server/0928-Configure-sniffer-egg-hatch-time.patch diff --git a/patches/server/0930-Do-crystal-portal-proximity-check-before-entity-look.patch b/patches/server/0929-Do-crystal-portal-proximity-check-before-entity-look.patch similarity index 100% rename from patches/server/0930-Do-crystal-portal-proximity-check-before-entity-look.patch rename to patches/server/0929-Do-crystal-portal-proximity-check-before-entity-look.patch diff --git a/patches/server/0931-Skip-POI-finding-if-stuck-in-vehicle.patch b/patches/server/0930-Skip-POI-finding-if-stuck-in-vehicle.patch similarity index 100% rename from patches/server/0931-Skip-POI-finding-if-stuck-in-vehicle.patch rename to patches/server/0930-Skip-POI-finding-if-stuck-in-vehicle.patch diff --git a/patches/server/0932-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/0931-Add-slot-sanity-checks-in-container-clicks.patch similarity index 100% rename from patches/server/0932-Add-slot-sanity-checks-in-container-clicks.patch rename to patches/server/0931-Add-slot-sanity-checks-in-container-clicks.patch diff --git a/patches/server/0933-Call-BlockRedstoneEvents-for-lecterns.patch b/patches/server/0932-Call-BlockRedstoneEvents-for-lecterns.patch similarity index 100% rename from patches/server/0933-Call-BlockRedstoneEvents-for-lecterns.patch rename to patches/server/0932-Call-BlockRedstoneEvents-for-lecterns.patch diff --git a/patches/server/0934-Allow-proper-checking-of-empty-item-stacks.patch b/patches/server/0933-Allow-proper-checking-of-empty-item-stacks.patch similarity index 100% rename from patches/server/0934-Allow-proper-checking-of-empty-item-stacks.patch rename to patches/server/0933-Allow-proper-checking-of-empty-item-stacks.patch diff --git a/patches/server/0935-Fix-silent-equipment-change-for-mobs.patch b/patches/server/0934-Fix-silent-equipment-change-for-mobs.patch similarity index 100% rename from patches/server/0935-Fix-silent-equipment-change-for-mobs.patch rename to patches/server/0934-Fix-silent-equipment-change-for-mobs.patch diff --git a/patches/server/0936-Fix-spigot-s-Forced-Stats.patch b/patches/server/0935-Fix-spigot-s-Forced-Stats.patch similarity index 100% rename from patches/server/0936-Fix-spigot-s-Forced-Stats.patch rename to patches/server/0935-Fix-spigot-s-Forced-Stats.patch diff --git a/patches/server/0937-Add-missing-InventoryHolders-to-inventories.patch b/patches/server/0936-Add-missing-InventoryHolders-to-inventories.patch similarity index 100% rename from patches/server/0937-Add-missing-InventoryHolders-to-inventories.patch rename to patches/server/0936-Add-missing-InventoryHolders-to-inventories.patch diff --git a/patches/server/0938-Do-not-read-tile-entities-in-chunks-that-are-positio.patch b/patches/server/0937-Do-not-read-tile-entities-in-chunks-that-are-positio.patch similarity index 100% rename from patches/server/0938-Do-not-read-tile-entities-in-chunks-that-are-positio.patch rename to patches/server/0937-Do-not-read-tile-entities-in-chunks-that-are-positio.patch diff --git a/patches/server/0939-Add-missing-logs-for-log-ips-config-option.patch b/patches/server/0938-Add-missing-logs-for-log-ips-config-option.patch similarity index 100% rename from patches/server/0939-Add-missing-logs-for-log-ips-config-option.patch rename to patches/server/0938-Add-missing-logs-for-log-ips-config-option.patch diff --git a/patches/server/0941-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch b/patches/server/0939-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch similarity index 100% rename from patches/server/0941-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch rename to patches/server/0939-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch diff --git a/patches/server/0942-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch b/patches/server/0940-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch similarity index 100% rename from patches/server/0942-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch rename to patches/server/0940-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch diff --git a/patches/server/0940-Remove-Spigot-Bug-Fix-for-MC-109346.patch b/patches/server/0940-Remove-Spigot-Bug-Fix-for-MC-109346.patch deleted file mode 100644 index 8cd300599d..0000000000 --- a/patches/server/0940-Remove-Spigot-Bug-Fix-for-MC-109346.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> -Date: Sat, 23 Sep 2023 01:51:22 -0400 -Subject: [PATCH] Remove Spigot Bug Fix for MC-109346 - - -diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index da45984c9b2d3a55256efddde94580505f692655..c2a4fde17673a2bc3133aa0c68608c3da75d5cc5 100644 ---- a/src/main/java/net/minecraft/server/level/ServerEntity.java -+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -348,12 +348,6 @@ public class ServerEntity { - ((LivingEntity) this.entity).detectEquipmentUpdatesPublic(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending - } - -- // CraftBukkit start - MC-109346: Fix for nonsensical head yaw -- if (this.entity instanceof ServerPlayer) { -- sender.accept(new ClientboundRotateHeadPacket(this.entity, (byte) Mth.floor(this.entity.getYHeadRot() * 256.0F / 360.0F))); -- } -- // CraftBukkit end -- - if (!this.entity.getPassengers().isEmpty()) { - sender.accept(new ClientboundSetPassengersPacket(this.entity)); - } diff --git a/patches/server/0943-Fix-team-sidebar-objectives-not-being-cleared.patch b/patches/server/0941-Fix-team-sidebar-objectives-not-being-cleared.patch similarity index 100% rename from patches/server/0943-Fix-team-sidebar-objectives-not-being-cleared.patch rename to patches/server/0941-Fix-team-sidebar-objectives-not-being-cleared.patch diff --git a/patches/server/0944-Fix-missing-map-initialize-event-call.patch b/patches/server/0942-Fix-missing-map-initialize-event-call.patch similarity index 100% rename from patches/server/0944-Fix-missing-map-initialize-event-call.patch rename to patches/server/0942-Fix-missing-map-initialize-event-call.patch diff --git a/patches/server/0945-Update-entity-data-when-attaching-firework-to-entity.patch b/patches/server/0943-Update-entity-data-when-attaching-firework-to-entity.patch similarity index 100% rename from patches/server/0945-Update-entity-data-when-attaching-firework-to-entity.patch rename to patches/server/0943-Update-entity-data-when-attaching-firework-to-entity.patch diff --git a/patches/server/0946-Use-correct-variable-for-initializing-CraftLootTable.patch b/patches/server/0944-Use-correct-variable-for-initializing-CraftLootTable.patch similarity index 100% rename from patches/server/0946-Use-correct-variable-for-initializing-CraftLootTable.patch rename to patches/server/0944-Use-correct-variable-for-initializing-CraftLootTable.patch diff --git a/patches/server/0947-Fix-UnsafeValues-loadAdvancement.patch b/patches/server/0945-Fix-UnsafeValues-loadAdvancement.patch similarity index 96% rename from patches/server/0947-Fix-UnsafeValues-loadAdvancement.patch rename to patches/server/0945-Fix-UnsafeValues-loadAdvancement.patch index 0de7a22d6d..60d7a4d75a 100644 --- a/patches/server/0947-Fix-UnsafeValues-loadAdvancement.patch +++ b/patches/server/0945-Fix-UnsafeValues-loadAdvancement.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix UnsafeValues#loadAdvancement diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index fab7dc81f774889300ed0affaef71cbda36517df..6372f3a4fdf6e37ef785749ec40c3bd67b003b28 100644 +index 6cba1d9f5c6e77309399c245d209662eb4548d56..8627d9d89e0288e35c17834c23ce94673ac08236 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -321,7 +321,27 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0948-Add-player-idle-duration-API.patch b/patches/server/0946-Add-player-idle-duration-API.patch similarity index 100% rename from patches/server/0948-Add-player-idle-duration-API.patch rename to patches/server/0946-Add-player-idle-duration-API.patch diff --git a/patches/server/0949-Don-t-check-if-we-can-see-non-visible-entities.patch b/patches/server/0947-Don-t-check-if-we-can-see-non-visible-entities.patch similarity index 100% rename from patches/server/0949-Don-t-check-if-we-can-see-non-visible-entities.patch rename to patches/server/0947-Don-t-check-if-we-can-see-non-visible-entities.patch diff --git a/patches/server/0950-Fix-NPE-in-SculkBloomEvent-world-access.patch b/patches/server/0948-Fix-NPE-in-SculkBloomEvent-world-access.patch similarity index 100% rename from patches/server/0950-Fix-NPE-in-SculkBloomEvent-world-access.patch rename to patches/server/0948-Fix-NPE-in-SculkBloomEvent-world-access.patch diff --git a/patches/server/0951-Allow-null-itemstack-for-Player-sendEquipmentChange.patch b/patches/server/0949-Allow-null-itemstack-for-Player-sendEquipmentChange.patch similarity index 100% rename from patches/server/0951-Allow-null-itemstack-for-Player-sendEquipmentChange.patch rename to patches/server/0949-Allow-null-itemstack-for-Player-sendEquipmentChange.patch diff --git a/patches/server/0952-Optimize-VarInts.patch b/patches/server/0950-Optimize-VarInts.patch similarity index 100% rename from patches/server/0952-Optimize-VarInts.patch rename to patches/server/0950-Optimize-VarInts.patch diff --git a/patches/server/0953-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/server/0951-Add-API-to-get-the-collision-shape-of-a-block-before.patch similarity index 100% rename from patches/server/0953-Add-API-to-get-the-collision-shape-of-a-block-before.patch rename to patches/server/0951-Add-API-to-get-the-collision-shape-of-a-block-before.patch diff --git a/patches/server/0954-Add-predicate-for-blocks-when-raytracing.patch b/patches/server/0952-Add-predicate-for-blocks-when-raytracing.patch similarity index 96% rename from patches/server/0954-Add-predicate-for-blocks-when-raytracing.patch rename to patches/server/0952-Add-predicate-for-blocks-when-raytracing.patch index 2a30c191f6..efe5b6e6bc 100644 --- a/patches/server/0954-Add-predicate-for-blocks-when-raytracing.patch +++ b/patches/server/0952-Add-predicate-for-blocks-when-raytracing.patch @@ -47,10 +47,10 @@ index c978f3b2d42f512e982f289e76c2422e41b7eec6..bb8e962e63c7a2d931f9bd7f7c002aa3 Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 457d5cdb510a11a069ac7f54a8ed95a74527bff3..be4fc09f9e30cb4bb5aaad49c23a19fd84f029bc 100644 +index 9dadce62fc3e248fa2a8607fe87960491353c317..6b6e5d483adc47a8db177359fbfcd626825c460f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1105,9 +1105,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1125,9 +1125,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public RayTraceResult rayTraceEntities(Location start, Vector direction, double maxDistance, double raySize, Predicate filter) { @@ -68,7 +68,7 @@ index 457d5cdb510a11a069ac7f54a8ed95a74527bff3..be4fc09f9e30cb4bb5aaad49c23a19fd Preconditions.checkArgument(direction != null, "Vector direction cannot be null"); direction.checkFinite(); -@@ -1157,9 +1163,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1177,9 +1183,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public RayTraceResult rayTraceBlocks(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks) { @@ -87,7 +87,7 @@ index 457d5cdb510a11a069ac7f54a8ed95a74527bff3..be4fc09f9e30cb4bb5aaad49c23a19fd Preconditions.checkArgument(direction != null, "Vector direction cannot be null"); direction.checkFinite(); -@@ -1172,16 +1185,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1192,16 +1205,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { } Vector dir = direction.clone().normalize().multiply(maxDistance); diff --git a/patches/server/0955-Broadcast-take-item-packets-with-collector-as-source.patch b/patches/server/0953-Broadcast-take-item-packets-with-collector-as-source.patch similarity index 92% rename from patches/server/0955-Broadcast-take-item-packets-with-collector-as-source.patch rename to patches/server/0953-Broadcast-take-item-packets-with-collector-as-source.patch index ad908f281c..393709e2e0 100644 --- a/patches/server/0955-Broadcast-take-item-packets-with-collector-as-source.patch +++ b/patches/server/0953-Broadcast-take-item-packets-with-collector-as-source.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Broadcast take item packets with collector as source This fixes players (which can't view the collector) seeing item pickups with themselves as the target. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index cc82b269d422f6cd720021ba009606cab1b90590..d4fb052996d05668f1749d19b91e27044166f819 100644 +index e2564a07e0aa4bf2fcd9a749e9fc188dd0633675..8567cdfc42ea2388dd44ed1de83bebca433abe12 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3724,7 +3724,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0956-Expand-LingeringPotion-API.patch b/patches/server/0954-Expand-LingeringPotion-API.patch similarity index 100% rename from patches/server/0956-Expand-LingeringPotion-API.patch rename to patches/server/0954-Expand-LingeringPotion-API.patch diff --git a/patches/server/0957-Add-MaterialTagsTest.patch b/patches/server/0955-Add-MaterialTagsTest.patch similarity index 100% rename from patches/server/0957-Add-MaterialTagsTest.patch rename to patches/server/0955-Add-MaterialTagsTest.patch diff --git a/patches/server/0958-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/0956-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch similarity index 96% rename from patches/server/0958-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch rename to patches/server/0956-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch index 69084fab3f..a6ef0b68f1 100644 --- a/patches/server/0958-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch +++ b/patches/server/0956-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch @@ -45,10 +45,10 @@ index 41a3ca4edf4fa662f2af13efd7b78b56e24aa4a7..0a8a53710c693a220e9475f6f3112b91 BlockState iblockdata = BaseFireBlock.getState(this.level(), blockposition); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index be4fc09f9e30cb4bb5aaad49c23a19fd84f029bc..263d60cb498f601b1381124127c084efe424409e 100644 +index 6b6e5d483adc47a8db177359fbfcd626825c460f..cdcab87bfe2e207ee1f4f8a111682efefbd96511 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -746,7 +746,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -766,7 +766,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { LightningBolt lightning = EntityType.LIGHTNING_BOLT.create(this.world); lightning.moveTo(loc.getX(), loc.getY(), loc.getZ()); diff --git a/patches/server/0959-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/server/0957-Add-hand-to-fish-event-for-all-player-interactions.patch similarity index 100% rename from patches/server/0959-Add-hand-to-fish-event-for-all-player-interactions.patch rename to patches/server/0957-Add-hand-to-fish-event-for-all-player-interactions.patch diff --git a/patches/server/0960-Fix-several-issues-with-EntityBreedEvent.patch b/patches/server/0958-Fix-several-issues-with-EntityBreedEvent.patch similarity index 100% rename from patches/server/0960-Fix-several-issues-with-EntityBreedEvent.patch rename to patches/server/0958-Fix-several-issues-with-EntityBreedEvent.patch diff --git a/patches/server/0961-Add-UUID-attribute-modifier-API.patch b/patches/server/0959-Add-UUID-attribute-modifier-API.patch similarity index 100% rename from patches/server/0961-Add-UUID-attribute-modifier-API.patch rename to patches/server/0959-Add-UUID-attribute-modifier-API.patch diff --git a/patches/server/0962-Fix-missing-event-call-for-entity-teleport-API.patch b/patches/server/0960-Fix-missing-event-call-for-entity-teleport-API.patch similarity index 100% rename from patches/server/0962-Fix-missing-event-call-for-entity-teleport-API.patch rename to patches/server/0960-Fix-missing-event-call-for-entity-teleport-API.patch diff --git a/patches/server/0963-Lazily-create-LootContext-for-criterions.patch b/patches/server/0961-Lazily-create-LootContext-for-criterions.patch similarity index 100% rename from patches/server/0963-Lazily-create-LootContext-for-criterions.patch rename to patches/server/0961-Lazily-create-LootContext-for-criterions.patch diff --git a/patches/server/0964-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0962-Don-t-fire-sync-events-during-worldgen.patch similarity index 99% rename from patches/server/0964-Don-t-fire-sync-events-during-worldgen.patch rename to patches/server/0962-Don-t-fire-sync-events-during-worldgen.patch index 58ccbc1f04..1b53c1ac5c 100644 --- a/patches/server/0964-Don-t-fire-sync-events-during-worldgen.patch +++ b/patches/server/0962-Don-t-fire-sync-events-during-worldgen.patch @@ -68,7 +68,7 @@ index 656c68b37bc25d6b77f295f9efe0a81dd20b69c1..8ba573bb4099ee5b27b61f333e72d794 }, () -> { EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id")); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d4fb052996d05668f1749d19b91e27044166f819..bdae6ea5528164995d9a256be6a2f9d0cb15d8ff 100644 +index 8567cdfc42ea2388dd44ed1de83bebca433abe12..d36e1d6f7bba220f7e6b0d8d23aff26275d9f33e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1142,6 +1142,11 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0965-Add-Structure-check-API.patch b/patches/server/0963-Add-Structure-check-API.patch similarity index 86% rename from patches/server/0965-Add-Structure-check-API.patch rename to patches/server/0963-Add-Structure-check-API.patch index b291fdf604..551c80ce78 100644 --- a/patches/server/0965-Add-Structure-check-API.patch +++ b/patches/server/0963-Add-Structure-check-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Structure check API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 263d60cb498f601b1381124127c084efe424409e..18dbaf5d73898756086b94d06d08f8384224709a 100644 +index cdcab87bfe2e207ee1f4f8a111682efefbd96511..35cc9bc399386344c1acc6446262d278d57febd0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -236,6 +236,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -237,6 +237,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { }; } // Paper end diff --git a/patches/server/0966-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0964-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch similarity index 100% rename from patches/server/0966-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch rename to patches/server/0964-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch diff --git a/patches/server/0967-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0965-Restore-vanilla-entity-drops-behavior.patch similarity index 97% rename from patches/server/0967-Restore-vanilla-entity-drops-behavior.patch rename to patches/server/0965-Restore-vanilla-entity-drops-behavior.patch index a82abb4271..625d431fff 100644 --- a/patches/server/0967-Restore-vanilla-entity-drops-behavior.patch +++ b/patches/server/0965-Restore-vanilla-entity-drops-behavior.patch @@ -104,7 +104,7 @@ index 4125802dda07d79dd0e1f7e7dc3c0ee85fa0383c..7c99742e01e894bcc7d89a8588b2f128 return this.spawnAtLocation(entityitem); } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index bdae6ea5528164995d9a256be6a2f9d0cb15d8ff..211e9bb82e65bdd5811c3b4df7ac93741fc7cdc3 100644 +index d36e1d6f7bba220f7e6b0d8d23aff26275d9f33e..c43927781c579f7237cd795e71e18e5a11074c7b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -255,7 +255,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -165,10 +165,10 @@ index f62b5976e307a69ca40d51ae76126005c801df0c..bbe299afd361a107e3936c8ea1a62067 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 7f7ec71e352e403169603dcd95b4dd50d68d37f7..f2f58ae16101293a7df53c32be015111baba1504 100644 +index 53c3b2123d6fa78367aef53d6949e58170cb9fce..99292a908b36e3c75d51c6877c7a0c01d9671aa6 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -964,17 +964,23 @@ public class CraftEventFactory { +@@ -965,17 +965,23 @@ public class CraftEventFactory { } public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim) { @@ -196,7 +196,7 @@ index 7f7ec71e352e403169603dcd95b4dd50d68d37f7..f2f58ae16101293a7df53c32be015111 populateFields(victim, event); // Paper - make cancellable CraftWorld world = (CraftWorld) entity.getWorld(); Bukkit.getServer().getPluginManager().callEvent(event); -@@ -988,19 +994,23 @@ public class CraftEventFactory { +@@ -989,19 +995,23 @@ public class CraftEventFactory { victim.expToDrop = event.getDroppedExp(); lootCheck.run(); // Paper - advancement triggers before destroying items @@ -224,7 +224,7 @@ index 7f7ec71e352e403169603dcd95b4dd50d68d37f7..f2f58ae16101293a7df53c32be015111 event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel populateFields(victim, event); // Paper - make cancellable -@@ -1019,10 +1029,14 @@ public class CraftEventFactory { +@@ -1020,10 +1030,14 @@ public class CraftEventFactory { victim.expToDrop = event.getDroppedExp(); victim.newExp = event.getNewExp(); diff --git a/patches/server/0968-Dont-resend-blocks-on-interactions.patch b/patches/server/0966-Dont-resend-blocks-on-interactions.patch similarity index 100% rename from patches/server/0968-Dont-resend-blocks-on-interactions.patch rename to patches/server/0966-Dont-resend-blocks-on-interactions.patch diff --git a/patches/server/0969-add-more-scoreboard-API.patch b/patches/server/0967-add-more-scoreboard-API.patch similarity index 100% rename from patches/server/0969-add-more-scoreboard-API.patch rename to patches/server/0967-add-more-scoreboard-API.patch diff --git a/patches/server/0970-Improve-Registry.patch b/patches/server/0968-Improve-Registry.patch similarity index 93% rename from patches/server/0970-Improve-Registry.patch rename to patches/server/0968-Improve-Registry.patch index b3e7a17ff6..740baefc42 100644 --- a/patches/server/0970-Improve-Registry.patch +++ b/patches/server/0968-Improve-Registry.patch @@ -37,29 +37,29 @@ index b12b99253543445475b73a1d3d7c6364856b49e8..4fc02698a9312496e7f9bce1c64f3173 + // Paper end - improve Registry } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java -index 2e6b04a150eae4fbac7b4c6413d81b755ac87be2..6cce693a24e0b1b485832935d398fb26c91e0be0 100644 +index 49752459ad67db3182c6d6d30ab91f2a420847a8..b1e87b52753242c7210cb250e4e272d016317c26 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java -@@ -34,6 +34,7 @@ public class CraftTrimMaterial implements TrimMaterial, Handleable this + " doesn't have a key"); // Paper return this.key; } - } + diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java -index 5a570bae1262f768d86a6078bfded427294ed135..bf13fe2f858ee35c84c5a1f3fb2f7df61a62315b 100644 +index cd5f68a6fb8290c238ba466a34d955eb90667459..b1a3d3f2f9948e41ed41a5d374f78f95899199ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java -@@ -34,6 +34,7 @@ public class CraftTrimPattern implements TrimPattern, Handleable this + " doesn't have a key"); // Paper return this.key; } - } + diff --git a/src/test/java/org/bukkit/registry/PerRegistryTest.java b/src/test/java/org/bukkit/registry/PerRegistryTest.java index 1c4966520b6401e6571aa44d5934dfa280bc80e3..010de6fbb75eb5d51639695d260f916072fdb22d 100644 --- a/src/test/java/org/bukkit/registry/PerRegistryTest.java diff --git a/patches/server/0971-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/0969-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch similarity index 97% rename from patches/server/0971-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch rename to patches/server/0969-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch index 5ef39afe5c..1977393bff 100644 --- a/patches/server/0971-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch +++ b/patches/server/0969-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch @@ -26,7 +26,7 @@ index 3fec07b250a8f145e30c8c41888e47d2a3c902e1..2ddd033e1c3a2e5c8950b93c83849192 x = to.getX(); y = to.getY(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 211e9bb82e65bdd5811c3b4df7ac93741fc7cdc3..e2e5ec647725f1f16067003ec773530d72fc5fcf 100644 +index c43927781c579f7237cd795e71e18e5a11074c7b..693ea3891f18f071cdd79f9162f1521472b3ed24 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -4201,7 +4201,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0972-Add-experience-points-API.patch b/patches/server/0970-Add-experience-points-API.patch similarity index 100% rename from patches/server/0972-Add-experience-points-API.patch rename to patches/server/0970-Add-experience-points-API.patch diff --git a/patches/server/0973-Add-drops-to-shear-events.patch b/patches/server/0971-Add-drops-to-shear-events.patch similarity index 98% rename from patches/server/0973-Add-drops-to-shear-events.patch rename to patches/server/0971-Add-drops-to-shear-events.patch index 57405a32c2..3d83041ef9 100644 --- a/patches/server/0973-Add-drops-to-shear-events.patch +++ b/patches/server/0971-Add-drops-to-shear-events.patch @@ -233,16 +233,16 @@ index 54c01fdaf507a30196fb8f38888a570f9e393559..9eab1170cb123d3b60a0231470251670 } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index f2f58ae16101293a7df53c32be015111baba1504..4c2e8129481384a143384d327e14320023735b1a 100644 +index 99292a908b36e3c75d51c6877c7a0c01d9671aa6..0a041d0e56dfe1319e5174cb0e6085dc35fa5c48 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1668,20 +1668,20 @@ public class CraftEventFactory { - return event; +@@ -1674,20 +1674,20 @@ public class CraftEventFactory { + player.level().getCraftServer().getPluginManager().callEvent(event); } - public static BlockShearEntityEvent callBlockShearEntityEvent(Entity animal, org.bukkit.block.Block dispenser, CraftItemStack is) { - BlockShearEntityEvent bse = new BlockShearEntityEvent(dispenser, animal.getBukkitEntity(), is); -+ public static BlockShearEntityEvent callBlockShearEntityEvent(Entity animal, Block dispenser, CraftItemStack is, List drops) { // Paper - custom shear drops ++ public static BlockShearEntityEvent callBlockShearEntityEvent(Entity animal, org.bukkit.block.Block dispenser, CraftItemStack is, List drops) { // Paper - custom shear drops + BlockShearEntityEvent bse = new BlockShearEntityEvent(dispenser, animal.getBukkitEntity(), is, Lists.transform(drops, CraftItemStack::asCraftMirror)); // Paper - custom shear drops Bukkit.getPluginManager().callEvent(bse); return bse; diff --git a/patches/server/0974-Add-PlayerShieldDisableEvent.patch b/patches/server/0972-Add-PlayerShieldDisableEvent.patch similarity index 100% rename from patches/server/0974-Add-PlayerShieldDisableEvent.patch rename to patches/server/0972-Add-PlayerShieldDisableEvent.patch diff --git a/patches/server/0975-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0973-Validate-ResourceLocation-in-NBT-reading.patch similarity index 99% rename from patches/server/0975-Validate-ResourceLocation-in-NBT-reading.patch rename to patches/server/0973-Validate-ResourceLocation-in-NBT-reading.patch index 74748ab8d8..e5ce3cf93b 100644 --- a/patches/server/0975-Validate-ResourceLocation-in-NBT-reading.patch +++ b/patches/server/0973-Validate-ResourceLocation-in-NBT-reading.patch @@ -53,7 +53,7 @@ index 8ba573bb4099ee5b27b61f333e72d794c48d5f29..69bdf3f2ee731e59e8d454816a9ca72c @Nullable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index e2e5ec647725f1f16067003ec773530d72fc5fcf..761c7136147a5c65f700daadfc370cbd13b0b455 100644 +index 693ea3891f18f071cdd79f9162f1521472b3ed24..7f5457522835b073246054e66699fe73f7005b25 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -879,12 +879,13 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0976-Properly-handle-experience-dropping-on-block-break.patch b/patches/server/0974-Properly-handle-experience-dropping-on-block-break.patch similarity index 98% rename from patches/server/0976-Properly-handle-experience-dropping-on-block-break.patch rename to patches/server/0974-Properly-handle-experience-dropping-on-block-break.patch index f7d4494ec0..3cc682a856 100644 --- a/patches/server/0976-Properly-handle-experience-dropping-on-block-break.patch +++ b/patches/server/0974-Properly-handle-experience-dropping-on-block-break.patch @@ -7,7 +7,7 @@ This causes spawnAfterBreak to spawn xp by default, removing the need to manuall For classes that use custom xp amounts, they can drop the resources with disabling diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 6d98b910b1079f1b4a95c430e5500d55fbc68ec2..c0ae70e3490b56aaa464460e3c41175b27136f6b 100644 +index e881ed9de9d864e0522e1f7f97dc3debf57cf4b6..cedde2235227eb5820beefb98549994e1cca1198 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -625,7 +625,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0977-Fixup-NamespacedKey-handling.patch b/patches/server/0975-Fixup-NamespacedKey-handling.patch similarity index 100% rename from patches/server/0977-Fixup-NamespacedKey-handling.patch rename to patches/server/0975-Fixup-NamespacedKey-handling.patch diff --git a/patches/server/0978-Expose-LootTable-of-DecoratedPot.patch b/patches/server/0976-Expose-LootTable-of-DecoratedPot.patch similarity index 100% rename from patches/server/0978-Expose-LootTable-of-DecoratedPot.patch rename to patches/server/0976-Expose-LootTable-of-DecoratedPot.patch diff --git a/patches/server/0979-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0977-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 100% rename from patches/server/0979-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/0977-Reduce-allocation-of-Vec3D-by-entity-tracker.patch diff --git a/patches/server/0980-Rewrite-dataconverter-system.patch b/patches/server/0978-Rewrite-dataconverter-system.patch similarity index 99% rename from patches/server/0980-Rewrite-dataconverter-system.patch rename to patches/server/0978-Rewrite-dataconverter-system.patch index 0d62473208..2919728f24 100644 --- a/patches/server/0980-Rewrite-dataconverter-system.patch +++ b/patches/server/0978-Rewrite-dataconverter-system.patch @@ -24939,10 +24939,10 @@ index 49d39980054bce470ddaceeb6ab7fab83bf8dc54..63e187c65cb855031f286aad0d25ac46 } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 6372f3a4fdf6e37ef785749ec40c3bd67b003b28..1562e9832df8bf3f81fb37983a303da5bd9ceee6 100644 +index 8627d9d89e0288e35c17834c23ce94673ac08236..68ca4a408e6ee728f50918c2d28088d110a108e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -515,8 +515,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -520,8 +520,7 @@ public final class CraftMagicNumbers implements UnsafeValues { CompoundTag compound = deserializeNbtFromBytes(data); final int dataVersion = compound.getInt("DataVersion"); @@ -24952,7 +24952,7 @@ index 6372f3a4fdf6e37ef785749ec40c3bd67b003b28..1562e9832df8bf3f81fb37983a303da5 } @Override -@@ -536,7 +535,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -541,7 +540,7 @@ public final class CraftMagicNumbers implements UnsafeValues { CompoundTag compound = deserializeNbtFromBytes(data); int dataVersion = compound.getInt("DataVersion"); diff --git a/patches/server/0981-Starlight.patch b/patches/server/0979-Starlight.patch similarity index 99% rename from patches/server/0981-Starlight.patch rename to patches/server/0979-Starlight.patch index b4e6c66968..f7c01379eb 100644 --- a/patches/server/0981-Starlight.patch +++ b/patches/server/0979-Starlight.patch @@ -5403,10 +5403,10 @@ index 85de64c1e75e1323f8425fc53e525c215ff417ce..c6115477cc94bf47a5f459418a232412 return nbt != null ? ChunkStatus.byName(nbt.getString("Status")).getChunkType() : ChunkStatus.ChunkType.PROTOCHUNK; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 18dbaf5d73898756086b94d06d08f8384224709a..6379f26776e2e267b84fe8f8392b53d7d89eb5ad 100644 +index 35cc9bc399386344c1acc6446262d278d57febd0..93c10b5a699f4f8a8aa97a0f666999fc4a495a5b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -496,12 +496,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -497,12 +497,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/server/0982-Rewrite-chunk-system.patch b/patches/server/0980-Rewrite-chunk-system.patch similarity index 99% rename from patches/server/0982-Rewrite-chunk-system.patch rename to patches/server/0980-Rewrite-chunk-system.patch index 5094d789bb..fb45fa41de 100644 --- a/patches/server/0982-Rewrite-chunk-system.patch +++ b/patches/server/0980-Rewrite-chunk-system.patch @@ -15520,7 +15520,7 @@ index 2906cb10461b5334a7555046384c28848eec149f..329471af4f40e0a74612707cce96bb00 DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 48da5bdabcf38afbbd1509eca56d5c761622409f..48e3b0f065b370f780f8a6145fba9f3f7976badb 100644 +index 28645a835a169029b734262a9f42751caa52c4c9..56d579e64b367dd21b2909eb0dbc1d7686d0c3d0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -311,7 +311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop List getEntities(EntityTypeTest filter, AABB box, Predicate predicate); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index c0ae70e3490b56aaa464460e3c41175b27136f6b..0df6572c94854526899890fba7e9da681b729f47 100644 +index cedde2235227eb5820beefb98549994e1cca1198..9c743c980697a14d7348554fb77f242d5eaa152e 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -545,6 +545,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -21420,10 +21425,10 @@ index 92369eb350fd795a4e99731d7ceda4f8b890791e..a76f966d72b749f1706363d33caa351b // Paper start - Adventure diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6379f26776e2e267b84fe8f8392b53d7d89eb5ad..726aa0461bbf380989a5b51dbfdfdda259b8632b 100644 +index 93c10b5a699f4f8a8aa97a0f666999fc4a495a5b..75ddeceb3f6c381b95dca0a93643aaca69d418e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -507,10 +507,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -508,10 +508,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (playerChunk == null) return false; @@ -21441,7 +21446,7 @@ index 6379f26776e2e267b84fe8f8392b53d7d89eb5ad..726aa0461bbf380989a5b51dbfdfdda2 ClientboundLevelChunkWithLightPacket refreshPacket = new ClientboundLevelChunkWithLightPacket(chunk, this.world.getLightEngine(), null, null); for (ServerPlayer player : playersInRange) { -@@ -518,8 +522,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -519,8 +523,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { player.connection.send(refreshPacket); } @@ -21451,7 +21456,7 @@ index 6379f26776e2e267b84fe8f8392b53d7d89eb5ad..726aa0461bbf380989a5b51dbfdfdda2 return true; } -@@ -598,20 +601,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -599,20 +602,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Collection getPluginChunkTickets(int x, int z) { DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager; @@ -21473,7 +21478,7 @@ index 6379f26776e2e267b84fe8f8392b53d7d89eb5ad..726aa0461bbf380989a5b51dbfdfdda2 } @Override -@@ -619,7 +609,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -620,7 +610,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { Map> ret = new HashMap<>(); DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager; @@ -21482,7 +21487,7 @@ index 6379f26776e2e267b84fe8f8392b53d7d89eb5ad..726aa0461bbf380989a5b51dbfdfdda2 long chunkKey = chunkTickets.getLongKey(); SortedArraySet> tickets = chunkTickets.getValue(); -@@ -1288,12 +1278,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1308,12 +1298,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getViewDistance() { @@ -21497,7 +21502,7 @@ index 6379f26776e2e267b84fe8f8392b53d7d89eb5ad..726aa0461bbf380989a5b51dbfdfdda2 } public BlockMetadataStore getBlockMetadata() { -@@ -2459,17 +2449,20 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2479,17 +2469,20 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setSimulationDistance(final int simulationDistance) { diff --git a/patches/server/0983-incremental-chunk-and-player-saving.patch b/patches/server/0981-incremental-chunk-and-player-saving.patch similarity index 98% rename from patches/server/0983-incremental-chunk-and-player-saving.patch rename to patches/server/0981-incremental-chunk-and-player-saving.patch index c140932b29..7f2209d3c1 100644 --- a/patches/server/0983-incremental-chunk-and-player-saving.patch +++ b/patches/server/0981-incremental-chunk-and-player-saving.patch @@ -5,7 +5,7 @@ Subject: [PATCH] incremental chunk and player saving diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 48e3b0f065b370f780f8a6145fba9f3f7976badb..79de3c639795cfc0bd86f842446e2bb3ab71d23a 100644 +index 56d579e64b367dd21b2909eb0dbc1d7686d0c3d0..c8a2686f1e60a8c1fb56ce7b5d3e2ba62ec3a987 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -908,7 +908,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 761c7136147a5c65f700daadfc370cbd13b0b455..6b58292469b5507e0e000455146a7ee1852571c5 100644 +index 7f5457522835b073246054e66699fe73f7005b25..3f3498e0a24ad8b890173ce71cd63c1fffb561df 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3746,7 +3746,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -62,7 +62,7 @@ index bb8e962e63c7a2d931f9bd7f7c002aa35cfa5fd3..0fa131a6c98adb498fc8d534e0e39647 default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) { // Paper start - Add predicate for blocks when raytracing diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 207dd58cbceb5ac5c073526b40196f42fee77168..a798e1692141bd23f8a1d4916c5cbac2a5447d1f 100644 +index 6c4af5e5e26930a7b0d140f8058d798355e4d53b..5c209e323a5559480231c6d99357ba8b89edb027 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -329,10 +329,87 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0987-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from patches/server/0987-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch diff --git a/patches/server/0988-Allow-Saving-of-Oversized-Chunks.patch b/patches/server/0986-Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from patches/server/0988-Allow-Saving-of-Oversized-Chunks.patch rename to patches/server/0986-Allow-Saving-of-Oversized-Chunks.patch diff --git a/patches/server/0989-Fix-World-isChunkGenerated-calls.patch b/patches/server/0987-Fix-World-isChunkGenerated-calls.patch similarity index 98% rename from patches/server/0989-Fix-World-isChunkGenerated-calls.patch rename to patches/server/0987-Fix-World-isChunkGenerated-calls.patch index 0b3eebad3f..f6df1f113b 100644 --- a/patches/server/0989-Fix-World-isChunkGenerated-calls.patch +++ b/patches/server/0987-Fix-World-isChunkGenerated-calls.patch @@ -153,10 +153,10 @@ index f27cf743bbc379520263909541d653dd38d1be58..0db8ee3b640e6d1268e9c1cccda85459 // Paper start - don't write garbage data to disk if writing serialization fails dataoutputstream.close(); // Only write if successful diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 726aa0461bbf380989a5b51dbfdfdda259b8632b..49d8fd363391d085067253504c146c6fcf297d8f 100644 +index 75ddeceb3f6c381b95dca0a93643aaca69d418e3..18a2f8c956137b8b60b07e02df4b3a2350fc6e46 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -382,9 +382,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -383,9 +383,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean isChunkGenerated(int x, int z) { @@ -182,7 +182,7 @@ index 726aa0461bbf380989a5b51dbfdfdda259b8632b..49d8fd363391d085067253504c146c6f throw new RuntimeException(ex); } } -@@ -536,20 +550,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -537,20 +551,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot warnUnsafeChunk("loading a faraway chunk", x, z); // Paper diff --git a/patches/server/0990-Flat-bedrock-generator-settings.patch b/patches/server/0988-Flat-bedrock-generator-settings.patch similarity index 100% rename from patches/server/0990-Flat-bedrock-generator-settings.patch rename to patches/server/0988-Flat-bedrock-generator-settings.patch diff --git a/patches/server/0991-Entity-Activation-Range-2.0.patch b/patches/server/0989-Entity-Activation-Range-2.0.patch similarity index 99% rename from patches/server/0991-Entity-Activation-Range-2.0.patch rename to patches/server/0989-Entity-Activation-Range-2.0.patch index fd890e7432..ecc9538fcb 100644 --- a/patches/server/0991-Entity-Activation-Range-2.0.patch +++ b/patches/server/0989-Entity-Activation-Range-2.0.patch @@ -339,7 +339,7 @@ index b149e8bcac034bb3fc118a9adcb0de45e18ed5e9..fc35cfc9d045f3e5b6a50af1d0ba83b6 + } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index a798e1692141bd23f8a1d4916c5cbac2a5447d1f..1ff8eed2aceb105a41ce7ecbba6a4efd104573bd 100644 +index 5c209e323a5559480231c6d99357ba8b89edb027..4bedd5801cc8ce14387f02dfb361a00ab2960855 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -157,6 +157,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/0992-Optional-per-player-mob-spawns.patch b/patches/server/0990-Optional-per-player-mob-spawns.patch similarity index 100% rename from patches/server/0992-Optional-per-player-mob-spawns.patch rename to patches/server/0990-Optional-per-player-mob-spawns.patch diff --git a/patches/server/0993-Anti-Xray.patch b/patches/server/0991-Anti-Xray.patch similarity index 99% rename from patches/server/0993-Anti-Xray.patch rename to patches/server/0991-Anti-Xray.patch index 65f22d8479..584b0a7774 100644 --- a/patches/server/0993-Anti-Xray.patch +++ b/patches/server/0991-Anti-Xray.patch @@ -1168,7 +1168,7 @@ index 8a5f245fc98514b66216dde234650bfc0adc24b4..461c27292af06a5150de8ec263d0c852 } // Paper end - Send empty chunk diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 1ff8eed2aceb105a41ce7ecbba6a4efd104573bd..29368a97c6348e2d1d6241db3d57e84b9537231a 100644 +index 4bedd5801cc8ce14387f02dfb361a00ab2960855..a2f8d2858c4a43ff642761fd86512a5f0666a0d2 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -1584,10 +1584,10 @@ index a76f966d72b749f1706363d33caa351b54e9fa14..c9137151f0d2978adb432c40da686894 // Paper start - Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 49d8fd363391d085067253504c146c6fcf297d8f..bfb178c69026e9759e9afaebb9da141b62d1f144 100644 +index 18a2f8c956137b8b60b07e02df4b3a2350fc6e46..01797d9791f19dfda4b168218eadeaae97f11eab 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -530,11 +530,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -531,11 +531,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { List playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false); if (playersInRange.isEmpty()) return true; // Paper - rewrite player chunk loader diff --git a/patches/server/0994-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch b/patches/server/0992-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch similarity index 100% rename from patches/server/0994-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch rename to patches/server/0992-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch diff --git a/patches/server/0995-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0993-Optimize-Collision-to-not-load-chunks.patch similarity index 100% rename from patches/server/0995-Optimize-Collision-to-not-load-chunks.patch rename to patches/server/0993-Optimize-Collision-to-not-load-chunks.patch diff --git a/patches/server/0996-Optimize-GoalSelector-Goal.Flag-Set-operations.patch b/patches/server/0994-Optimize-GoalSelector-Goal.Flag-Set-operations.patch similarity index 100% rename from patches/server/0996-Optimize-GoalSelector-Goal.Flag-Set-operations.patch rename to patches/server/0994-Optimize-GoalSelector-Goal.Flag-Set-operations.patch diff --git a/patches/server/0997-Entity-load-save-limit-per-chunk.patch b/patches/server/0995-Entity-load-save-limit-per-chunk.patch similarity index 100% rename from patches/server/0997-Entity-load-save-limit-per-chunk.patch rename to patches/server/0995-Entity-load-save-limit-per-chunk.patch diff --git a/patches/server/0998-Fix-and-optimise-world-force-upgrading.patch b/patches/server/0996-Fix-and-optimise-world-force-upgrading.patch similarity index 99% rename from patches/server/0998-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/0996-Fix-and-optimise-world-force-upgrading.patch index 1e5f26c776..6c12518ffe 100644 --- a/patches/server/0998-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/0996-Fix-and-optimise-world-force-upgrading.patch @@ -267,7 +267,7 @@ index 329471af4f40e0a74612707cce96bb00819e6cf2..bc391d27399d8c22e78735ca39aa8ab4 Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, dimensionOptionsRegistry, eraseCache); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 79de3c639795cfc0bd86f842446e2bb3ab71d23a..1dfafbe508b4e4598339f412e5fb9d92717b5d26 100644 +index c8a2686f1e60a8c1fb56ce7b5d3e2ba62ec3a987..2c381ae8a604b9aee4613614593809f634aaa89d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -584,11 +584,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { // Paper - Fix preemptive player kick on a server shutdown + packetProcessing.push(listener); // Paper - detailed watchdog information + try { // Paper - detailed watchdog information - if (MinecraftServer.getServer().hasStopped() || (listener instanceof ServerCommonPacketListenerImpl && ((ServerCommonPacketListenerImpl) listener).processedDisconnect)) return; // CraftBukkit, MC-142590 + if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players if (listener.shouldHandleMessage(packet)) { co.aikar.timings.Timing timing = co.aikar.timings.MinecraftTimings.getPacketTiming(packet); // Paper - timings @@ -64,6 +84,12 @@ public class PacketUtils { diff --git a/patches/server/1017-Collision-optimisations.patch b/patches/server/1015-Collision-optimisations.patch similarity index 99% rename from patches/server/1017-Collision-optimisations.patch rename to patches/server/1015-Collision-optimisations.patch index de992f75ee..176352b0ab 100644 --- a/patches/server/1017-Collision-optimisations.patch +++ b/patches/server/1015-Collision-optimisations.patch @@ -2613,7 +2613,7 @@ index cc888bbcd6a50124fa553bc4a8ffd1e8885d3856..f42dd9602805e9d538506ee4e3eac7e2 // Paper start - Affects Spawning API diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 7693163f73ea2dc9cf357893e1545b11b2049aec..3afb280e401f8f1b22bf91472b0b70c4716ac95b 100644 +index 47e83adf64df673bc40077335baf786f865411e8..bb57f97dbc2fcc7c28ebfb54ff00796fc7f51efe 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -294,6 +294,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/1018-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/1016-Optimise-collision-checking-in-player-move-packet-ha.patch similarity index 100% rename from patches/server/1018-Optimise-collision-checking-in-player-move-packet-ha.patch rename to patches/server/1016-Optimise-collision-checking-in-player-move-packet-ha.patch diff --git a/patches/server/1019-Fix-tripwire-disarming-not-working-as-intended.patch b/patches/server/1017-Fix-tripwire-disarming-not-working-as-intended.patch similarity index 100% rename from patches/server/1019-Fix-tripwire-disarming-not-working-as-intended.patch rename to patches/server/1017-Fix-tripwire-disarming-not-working-as-intended.patch diff --git a/patches/server/1020-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/1018-Fix-entity-type-tags-suggestions-in-selectors.patch similarity index 100% rename from patches/server/1020-Fix-entity-type-tags-suggestions-in-selectors.patch rename to patches/server/1018-Fix-entity-type-tags-suggestions-in-selectors.patch diff --git a/patches/server/1021-Add-Alternate-Current-redstone-implementation.patch b/patches/server/1019-Add-Alternate-Current-redstone-implementation.patch similarity index 99% rename from patches/server/1021-Add-Alternate-Current-redstone-implementation.patch rename to patches/server/1019-Add-Alternate-Current-redstone-implementation.patch index ed82f9487d..66ad39643d 100644 --- a/patches/server/1021-Add-Alternate-Current-redstone-implementation.patch +++ b/patches/server/1019-Add-Alternate-Current-redstone-implementation.patch @@ -2035,7 +2035,7 @@ index af9f58328c09dddb2875f79128f906b8b276ab88..c9405cbea1202e5603dde42637cf2a78 EntityCallbacks() {} diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 3afb280e401f8f1b22bf91472b0b70c4716ac95b..f476ba6c97944bdffae5aacae2e285d17541f46e 100644 +index bb57f97dbc2fcc7c28ebfb54ff00796fc7f51efe..a09017e74d972a12d0b88b4ade9a3532ce0ecd08 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -1887,4 +1887,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { diff --git a/patches/server/1022-optimize-dirt-and-snow-spreading.patch b/patches/server/1020-optimize-dirt-and-snow-spreading.patch similarity index 100% rename from patches/server/1022-optimize-dirt-and-snow-spreading.patch rename to patches/server/1020-optimize-dirt-and-snow-spreading.patch diff --git a/patches/server/1023-Properly-resend-entities.patch b/patches/server/1021-Properly-resend-entities.patch similarity index 99% rename from patches/server/1023-Properly-resend-entities.patch rename to patches/server/1021-Properly-resend-entities.patch index f0d407671b..5966fb39a6 100644 --- a/patches/server/1023-Properly-resend-entities.patch +++ b/patches/server/1021-Properly-resend-entities.patch @@ -150,7 +150,7 @@ index 97b0119ac71284b3a223c089bec26d87a01d3b25..1e5f709115007ff19901c0a6c3cf884d this.sendLevelInfo(player, worldserver1); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5cedbe57f15024e6b1c278de1b3cf3e1fd84de06..34e06b4f534215f7eead54a3b0467fd5e2d478db 100644 +index e35dd853bbffbf1771543d2a59878879cd09fb9c..22458154f36ebabb22368773f4e7f6d681c24960 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3844,6 +3844,11 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/1024-Optimize-Hoppers.patch b/patches/server/1022-Optimize-Hoppers.patch similarity index 99% rename from patches/server/1024-Optimize-Hoppers.patch rename to patches/server/1022-Optimize-Hoppers.patch index b9cc3698c6..4502d0525f 100644 --- a/patches/server/1024-Optimize-Hoppers.patch +++ b/patches/server/1022-Optimize-Hoppers.patch @@ -50,7 +50,7 @@ index 0000000000000000000000000000000000000000..5c42823726e70ce6c9d0121d07431548 + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d2526c39c91dd62ad676f04afc45332d774528d1..f12bf36a247a47b8d831536a4fefd2a2ce424494 100644 +index 55204f27d3633d0aef01ac2469925d02865ab2fe..0b1ed3a19ce11faf5650c7c2f7a150a2b10bab48 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1692,6 +1692,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop modifiers, Map> modifierFunctions, boolean cancelled) { CraftDamageSource bukkitDamageSource = new CraftDamageSource(source); @@ -185,7 +185,7 @@ index 4c2e8129481384a143384d327e14320023735b1a..cb3e9672f375a1a660757a05362729dd if (source.is(DamageTypeTags.IS_EXPLOSION)) { if (damager == null) { return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.explodedBlockState); // Paper - Include BlockState for damage -@@ -1092,9 +1092,7 @@ public class CraftEventFactory { +@@ -1093,9 +1093,7 @@ public class CraftEventFactory { } else if (damager != null || source.getDirectEntity() != null) { DamageCause cause = (source.isSweep()) ? DamageCause.ENTITY_SWEEP_ATTACK : DamageCause.ENTITY_ATTACK; diff --git a/patches/server/1054-Expanded-Hopper-API.patch b/patches/server/1052-Expanded-Hopper-API.patch similarity index 100% rename from patches/server/1054-Expanded-Hopper-API.patch rename to patches/server/1052-Expanded-Hopper-API.patch diff --git a/work/Bukkit b/work/Bukkit index 7ca2b46c1a..f02baa3869 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 7ca2b46c1a7d7479e45a79aa2db86de5c7fd20d8 +Subproject commit f02baa38696abb62cc2588af8aaed4c9e0e1b30f diff --git a/work/CraftBukkit b/work/CraftBukkit index 176c0ad39f..dfaa89bbe3 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 176c0ad39fffd8a6003e686b910fc02b669f1434 +Subproject commit dfaa89bbe33da3db95b8cc61f9897845076ba757