diff --git a/patches/api/0003-Test-changes.patch b/patches/api/0003-Test-changes.patch index 0355a16c86..490c58d9f6 100644 --- a/patches/api/0003-Test-changes.patch +++ b/patches/api/0003-Test-changes.patch @@ -7,16 +7,52 @@ Subject: [PATCH] Test changes - Ignore package-private methods for nullability annotations - Add excludes for classes which don't pass - Disable stupid BukkitMirrorTest +- configure mockito agent to address changes in newer java versions see https://openjdk.org/jeps/451 Co-authored-by: Riley Park Co-authored-by: Jake Potrebic +Co-authored-by: Yannick Lamprecht diff --git a/build.gradle.kts b/build.gradle.kts -index 0b837b485bec96fa37ed65c18df97e55cecd0e9d..c8a8903d1b0c9822743549ecb8e4fdc7d0fd07c1 100644 +index 0b837b485bec96fa37ed65c18df97e55cecd0e9d..c7f660d52e1b5f085919a8aebf8476918705a391 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -107,6 +107,12 @@ tasks.test { +@@ -11,6 +11,18 @@ java { + val annotationsVersion = "24.1.0" + val bungeeCordChatVersion = "1.20-R0.2" + ++// Paper start - configure mockito agent that is needed in newer java versions ++val mockitoAgent = configurations.register("mockitoAgent") ++abstract class MockitoAgentProvider : CommandLineArgumentProvider { ++ @get:CompileClasspath ++ abstract val fileCollection: ConfigurableFileCollection ++ ++ override fun asArguments(): Iterable { ++ return listOf("-javaagent:" + fileCollection.files.single().absolutePath) ++ } ++} ++// Paper end - configure mockito agent that is needed in newer java versions ++ + dependencies { + // api dependencies are listed transitively to API consumers + api("com.google.guava:guava:32.1.2-jre") +@@ -44,6 +56,7 @@ dependencies { + testImplementation("org.hamcrest:hamcrest:2.2") + testImplementation("org.mockito:mockito-core:5.14.1") + testImplementation("org.ow2.asm:asm-tree:9.7.1") ++ mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions + } + + configure { +@@ -105,8 +118,19 @@ tasks.withType { + + tasks.test { useJUnitPlatform() ++ // Paper start - configure mockito agent that is needed in newer java versions ++ val provider = objects.newInstance() ++ provider.fileCollection.from(mockitoAgent) ++ jvmArgumentProviders.add(provider) ++ // Paper end - configure mockito agent that is needed in newer java versions } +// Paper start - compile tests with -parameters for better junit parameterized test names diff --git a/patches/api/0004-Code-Generation.patch b/patches/api/0004-Code-Generation.patch index 663b52929d..05c70e31c2 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 c8a8903d1b0c9822743549ecb8e4fdc7d0fd07c1..032f8b762b552e8cae20bbdd75c1e0844e64386a 100644 +index c7f660d52e1b5f085919a8aebf8476918705a391..89208fed89181f890bb7a2bb237ed744ec2aea96 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,7 @@ @@ -18,8 +18,8 @@ index c8a8903d1b0c9822743549ecb8e4fdc7d0fd07c1..032f8b762b552e8cae20bbdd75c1e084 } java { -@@ -46,6 +47,22 @@ dependencies { - testImplementation("org.ow2.asm:asm-tree:9.7.1") +@@ -59,6 +60,22 @@ dependencies { + mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions } +// Paper start @@ -41,7 +41,7 @@ index c8a8903d1b0c9822743549ecb8e4fdc7d0fd07c1..032f8b762b552e8cae20bbdd75c1e084 configure { publications.create("maven") { from(components["java"]) -@@ -123,3 +140,14 @@ tasks.check { +@@ -141,3 +158,14 @@ tasks.check { dependsOn(scanJar) } // Paper end diff --git a/patches/api/0005-Add-FastUtil-to-Bukkit.patch b/patches/api/0005-Add-FastUtil-to-Bukkit.patch index e4778e9559..bba992a3cd 100644 --- a/patches/api/0005-Add-FastUtil-to-Bukkit.patch +++ b/patches/api/0005-Add-FastUtil-to-Bukkit.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add FastUtil to Bukkit Doesn't expose to plugins, just allows Paper-API to use it for optimization diff --git a/build.gradle.kts b/build.gradle.kts -index 032f8b762b552e8cae20bbdd75c1e0844e64386a..4b6c5d1ae45d93d88adb7035eb19935361c06178 100644 +index 89208fed89181f890bb7a2bb237ed744ec2aea96..1a80f7c7e7f4ae9857b732897dc2ee7cfc187626 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -23,6 +23,7 @@ dependencies { +@@ -35,6 +35,7 @@ dependencies { api("com.googlecode.json-simple:json-simple:1.1.1") { isTransitive = false // includes junit } diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch index 7024c19113..d3a6aae13f 100644 --- a/patches/api/0006-Adventure.patch +++ b/patches/api/0006-Adventure.patch @@ -8,10 +8,10 @@ Co-authored-by: Jake Potrebic Co-authored-by: Yannick Lamprecht diff --git a/build.gradle.kts b/build.gradle.kts -index 4b6c5d1ae45d93d88adb7035eb19935361c06178..cce9caa52c9a2208acccbd25fa88c0de066f23a4 100644 +index 1a80f7c7e7f4ae9857b732897dc2ee7cfc187626..f57827e724bff2bf586b468cc4e5ba6a1901bd57 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -11,12 +11,28 @@ java { +@@ -11,6 +11,18 @@ java { val annotationsVersion = "24.1.0" val bungeeCordChatVersion = "1.20-R0.2" @@ -28,7 +28,9 @@ index 4b6c5d1ae45d93d88adb7035eb19935361c06178..cce9caa52c9a2208acccbd25fa88c0de + extendsFrom(apiAndDocs) +} - dependencies { + // Paper start - configure mockito agent that is needed in newer java versions + val mockitoAgent = configurations.register("mockitoAgent") +@@ -28,7 +40,11 @@ dependencies { // api dependencies are listed transitively to API consumers api("com.google.guava:guava:32.1.2-jre") api("com.google.code.gson:gson:2.10.1") @@ -41,7 +43,7 @@ index 4b6c5d1ae45d93d88adb7035eb19935361c06178..cce9caa52c9a2208acccbd25fa88c0de api("org.yaml:snakeyaml:2.2") api("org.joml:joml:1.10.5") // Paper start -@@ -24,6 +40,13 @@ dependencies { +@@ -36,6 +52,13 @@ dependencies { isTransitive = false // includes junit } api("it.unimi.dsi:fastutil:8.5.6") @@ -55,7 +57,7 @@ index 4b6c5d1ae45d93d88adb7035eb19935361c06178..cce9caa52c9a2208acccbd25fa88c0de // Paper end compileOnly("org.apache.maven:maven-resolver-provider:3.9.6") -@@ -100,15 +123,32 @@ tasks.withType { +@@ -113,15 +136,32 @@ tasks.withType { "https://guava.dev/releases/32.1.2-jre/api/docs/", "https://javadoc.io/doc/org.yaml/snakeyaml/2.2/", "https://javadoc.io/doc/org.jetbrains/annotations/$annotationsVersion/", // Paper - we don't want Java 5 annotations diff --git a/patches/api/0008-Use-ASM-for-event-executors.patch b/patches/api/0008-Use-ASM-for-event-executors.patch index fdb54d4a85..6e84c5e82a 100644 --- a/patches/api/0008-Use-ASM-for-event-executors.patch +++ b/patches/api/0008-Use-ASM-for-event-executors.patch @@ -6,10 +6,10 @@ 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 cce9caa52c9a2208acccbd25fa88c0de066f23a4..2b1d08d8e16037f6d17c74ea613eaa2ca36c664e 100644 +index f57827e724bff2bf586b468cc4e5ba6a1901bd57..783513d3c7ea143997f2eb1a1b53826e51a51079 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -47,6 +47,9 @@ dependencies { +@@ -59,6 +59,9 @@ dependencies { apiAndDocs("net.kyori:adventure-text-serializer-legacy") apiAndDocs("net.kyori:adventure-text-serializer-plain") apiAndDocs("net.kyori:adventure-text-logger-slf4j") diff --git a/patches/api/0009-Paper-Plugins.patch b/patches/api/0009-Paper-Plugins.patch index 74ff26e12a..79df408863 100644 --- a/patches/api/0009-Paper-Plugins.patch +++ b/patches/api/0009-Paper-Plugins.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Paper Plugins diff --git a/build.gradle.kts b/build.gradle.kts -index 2b1d08d8e16037f6d17c74ea613eaa2ca36c664e..940fb51c1f3054465f305e98b13aac49c77e3a91 100644 +index 783513d3c7ea143997f2eb1a1b53826e51a51079..5ee8db3fcf3d3ac1c8b998b227aff0965960896a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -52,7 +52,7 @@ dependencies { +@@ -64,7 +64,7 @@ dependencies { implementation("org.ow2.asm:asm-commons:9.7.1") // Paper end @@ -17,7 +17,7 @@ index 2b1d08d8e16037f6d17c74ea613eaa2ca36c664e..940fb51c1f3054465f305e98b13aac49 compileOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") compileOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") -@@ -141,6 +141,7 @@ tasks.withType { +@@ -154,6 +154,7 @@ tasks.withType { "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/", // Paper end diff --git a/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch b/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch index d94d18165b..a8be09e798 100644 --- a/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/patches/api/0067-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 940fb51c1f3054465f305e98b13aac49c77e3a91..6c8464d9e862b1b4dbf7a77e25446aa870803dae 100644 +index 5ee8db3fcf3d3ac1c8b998b227aff0965960896a..a65956b1fc2f4f1b1edf355682b5b54541ec9bce 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -12,6 +12,8 @@ java { @@ -26,7 +26,7 @@ index 940fb51c1f3054465f305e98b13aac49c77e3a91..6c8464d9e862b1b4dbf7a77e25446aa8 val apiAndDocs: Configuration by configurations.creating { attributes { attribute(Category.CATEGORY_ATTRIBUTE, objects.named(Category.DOCUMENTATION)) -@@ -47,6 +49,8 @@ dependencies { +@@ -59,6 +61,8 @@ dependencies { apiAndDocs("net.kyori:adventure-text-serializer-legacy") apiAndDocs("net.kyori:adventure-text-serializer-plain") apiAndDocs("net.kyori:adventure-text-logger-slf4j") @@ -35,7 +35,7 @@ index 940fb51c1f3054465f305e98b13aac49c77e3a91..6c8464d9e862b1b4dbf7a77e25446aa8 implementation("org.ow2.asm:asm:9.7.1") implementation("org.ow2.asm:asm-commons:9.7.1") -@@ -140,6 +144,8 @@ tasks.withType { +@@ -153,6 +157,8 @@ tasks.withType { "https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/", "https://jd.advntr.dev/text-serializer-plain/$adventureVersion/", "https://jd.advntr.dev/text-logger-slf4j/$adventureVersion/", diff --git a/patches/api/0464-Brigadier-based-command-API.patch b/patches/api/0464-Brigadier-based-command-API.patch index 2d29373bc2..2c385974e0 100644 --- a/patches/api/0464-Brigadier-based-command-API.patch +++ b/patches/api/0464-Brigadier-based-command-API.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Brigadier based command API Co-authored-by: Jake Potrebic diff --git a/build.gradle.kts b/build.gradle.kts -index 6c8464d9e862b1b4dbf7a77e25446aa870803dae..254fd96d3950b4494c7e43547b00b5175ee53c93 100644 +index a65956b1fc2f4f1b1edf355682b5b54541ec9bce..e29e5024fa693baae469d47fe77b57118f14627c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -27,6 +27,7 @@ configurations.api { - } +@@ -39,6 +39,7 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider { + // Paper end - configure mockito agent that is needed in newer java versions dependencies { + api("com.mojang:brigadier:1.2.9") // Paper - Brigadier command api // api dependencies are listed transitively to API consumers api("com.google.guava:guava:32.1.2-jre") api("com.google.code.gson:gson:2.10.1") -@@ -93,9 +94,33 @@ sourceSets { +@@ -106,9 +107,33 @@ sourceSets { } } // Paper end diff --git a/patches/server/0004-Test-changes.patch b/patches/server/0004-Test-changes.patch index 2c3baac94d..2065edd4c2 100644 --- a/patches/server/0004-Test-changes.patch +++ b/patches/server/0004-Test-changes.patch @@ -3,21 +3,44 @@ From: Jake Potrebic Date: Mon, 13 Feb 2023 14:14:56 -0800 Subject: [PATCH] Test changes +- configure mockito agent to address changes in newer java versions see https://openjdk.org/jeps/451 + Co-authored-by: yannnicklamprecht diff --git a/build.gradle.kts b/build.gradle.kts -index d4a5229b4df544ff60cdaee80c8ae301faf2a235..41b000aaa71dca3fb392ae657be16e05bd37a178 100644 +index d4a5229b4df544ff60cdaee80c8ae301faf2a235..dac5e12f59723cdbd0d42a153c57d71ce185d0e8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -23,6 +23,7 @@ dependencies { +@@ -5,6 +5,18 @@ plugins { + `maven-publish` + } + ++// Paper start - configure mockito agent that is needed in newer java versions ++val mockitoAgent = configurations.register("mockitoAgent") ++abstract class MockitoAgentProvider : CommandLineArgumentProvider { ++ @get:CompileClasspath ++ abstract val fileCollection: ConfigurableFileCollection ++ ++ override fun asArguments(): Iterable { ++ return listOf("-javaagent:" + fileCollection.files.single().absolutePath) ++ } ++} ++// Paper end - configure mockito agent that is needed in newer java versions ++ + dependencies { + implementation(project(":paper-api")) + implementation("jline:jline:2.12.1") +@@ -22,7 +34,9 @@ dependencies { + testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0") testImplementation("org.hamcrest:hamcrest:2.2") testImplementation("org.mockito:mockito-core:5.14.1") ++ mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions testImplementation("org.ow2.asm:asm-tree:9.7.1") + testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest } paperweight { -@@ -56,6 +57,12 @@ tasks.jar { +@@ -56,6 +70,12 @@ tasks.jar { } } @@ -30,6 +53,18 @@ index d4a5229b4df544ff60cdaee80c8ae301faf2a235..41b000aaa71dca3fb392ae657be16e05 publishing { publications.create("maven") { } +@@ -79,6 +99,11 @@ tasks.test { + forkEvery = 1 + excludeTags("Slow") + } ++ // Paper start - configure mockito agent that is needed in newer java versions ++ val provider = objects.newInstance() ++ provider.fileCollection.from(mockitoAgent) ++ jvmArgumentProviders.add(provider) ++ // Paper end - configure mockito agent that is needed in newer java versions + } + + fun TaskContainer.registerRunTask( diff --git a/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java b/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java new file mode 100644 index 0000000000000000000000000000000000000000..d8857a05858585113bc7efde3416748effb53d01 diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index a1e58cd06d..8115fc2d48 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -15,10 +15,10 @@ public net.minecraft.server.dedicated.DedicatedServerProperties reload(Lnet/mine public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES diff --git a/build.gradle.kts b/build.gradle.kts -index 41b000aaa71dca3fb392ae657be16e05bd37a178..da6b4787fa787e098e4031790e955ce616593ee9 100644 +index dac5e12f59723cdbd0d42a153c57d71ce185d0e8..220d2696bf40d1657c87d049f563ccfffed2e8ad 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -10,6 +10,7 @@ dependencies { +@@ -22,6 +22,7 @@ dependencies { implementation("jline:jline:2.12.1") implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion implementation("org.ow2.asm:asm-commons:9.7.1") @@ -5226,7 +5226,7 @@ index 9cf0c141fefe67893828e300cba4f8a8545ba25f..c8e49c1904c80c4ede40ca5c26efad9b this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c48b1d5fc73a98eb4967632d8e6e0744961a688f..3882ae04173cd125fe490692a6bc2b4d8b20ff7b 100644 +index 60805f6a2badca9b9cdfa54a9273ceba6311b16c..6c8a69b7c1b45549b2c388a8df2258184c587309 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -967,6 +967,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch index 2e40e9d138..2fdbc106eb 100644 --- a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -25,10 +25,10 @@ Other changes: Co-Authored-By: Emilia Kond diff --git a/build.gradle.kts b/build.gradle.kts -index da6b4787fa787e098e4031790e955ce616593ee9..02a3dd42d82df410b6a6d22c0350fa3e44ccf70f 100644 +index 220d2696bf40d1657c87d049f563ccfffed2e8ad..c808f36b30d0f8edb8365875039fd20b8c20007d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -5,9 +5,29 @@ plugins { +@@ -5,6 +5,12 @@ plugins { `maven-publish` } @@ -38,6 +38,11 @@ index da6b4787fa787e098e4031790e955ce616593ee9..02a3dd42d82df410b6a6d22c0350fa3e +} +val alsoShade: Configuration by configurations.creating + + // Paper start - configure mockito agent that is needed in newer java versions + val mockitoAgent = configurations.register("mockitoAgent") + abstract class MockitoAgentProvider : CommandLineArgumentProvider { +@@ -19,7 +25,21 @@ abstract class MockitoAgentProvider : CommandLineArgumentProvider { + dependencies { implementation(project(":paper-api")) - implementation("jline:jline:2.12.1") @@ -59,7 +64,7 @@ index da6b4787fa787e098e4031790e955ce616593ee9..02a3dd42d82df410b6a6d22c0350fa3e implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion implementation("org.ow2.asm:asm-commons:9.7.1") implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files -@@ -79,6 +99,19 @@ tasks.check { +@@ -92,6 +112,19 @@ tasks.check { dependsOn(scanJar) } // Paper end @@ -382,7 +387,7 @@ index 3d92c61f7781221cfdc0324d11bd0088954e4a68..84a2c6c397604279ba821286f5c3c855 if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(() -> { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index a70e0ecedc7b70031334bc7fee981bd790ce26a4..56f046bac04205a813441907058c4ce21982d927 100644 +index 1333daa8666fe2ec4033a2f57ba6b716fcdd5343..8daa027a94602d7d556cf4fbfc8fcd97caf6bd98 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -162,8 +162,7 @@ public abstract class PlayerList { @@ -396,7 +401,7 @@ index a70e0ecedc7b70031334bc7fee981bd790ce26a4..56f046bac04205a813441907058c4ce2 this.bans = new UserBanList(PlayerList.USERBANLIST_FILE); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 16a9142bdbbfbbbb69d1486bd119dc610094484b..2affb23b83e4368a94345b36410f23139f5d36c8 100644 +index c3fc8b1abe843a19347509947f4b864c1b417800..e497da2dba83779c4ad1c45cea133bddadf61446 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -43,7 +43,7 @@ import java.util.logging.Level; diff --git a/patches/server/0012-Handle-plugin-prefixes-using-Log4J-configuration.patch b/patches/server/0012-Handle-plugin-prefixes-using-Log4J-configuration.patch index 8fbbff759a..e5a313a4fa 100644 --- a/patches/server/0012-Handle-plugin-prefixes-using-Log4J-configuration.patch +++ b/patches/server/0012-Handle-plugin-prefixes-using-Log4J-configuration.patch @@ -15,10 +15,10 @@ This may cause additional prefixes to be disabled for plugins bypassing the plugin logger. diff --git a/build.gradle.kts b/build.gradle.kts -index 02a3dd42d82df410b6a6d22c0350fa3e44ccf70f..a6fafa32af547efd912468ca3a5c76d8d193651d 100644 +index c808f36b30d0f8edb8365875039fd20b8c20007d..59f52f56dd9dc80a929f1ae754138e4ca2ecf493 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -23,7 +23,7 @@ dependencies { +@@ -35,7 +35,7 @@ dependencies { all its classes to check if they are plugins. Scanning takes about 1-2 seconds so adding this speeds up the server start. */ diff --git a/patches/server/0014-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/0014-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch index 6c4c11016c..0a41ae4dbc 100644 --- a/patches/server/0014-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch +++ b/patches/server/0014-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread diff --git a/build.gradle.kts b/build.gradle.kts -index a6fafa32af547efd912468ca3a5c76d8d193651d..b36f2e9e9980f6d2596c57791e0769c6ce734d11 100644 +index 59f52f56dd9dc80a929f1ae754138e4ca2ecf493..dde8718b8c0dab4b8bcd44de33117c48dc3ead0a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -34,6 +34,7 @@ dependencies { +@@ -46,6 +46,7 @@ dependencies { implementation("commons-lang:commons-lang:2.6") runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3") runtimeOnly("com.mysql:mysql-connector-j:9.1.0") diff --git a/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch index 2c9e91fed7..f787f2060b 100644 --- a/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch +++ b/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and diff --git a/build.gradle.kts b/build.gradle.kts -index b36f2e9e9980f6d2596c57791e0769c6ce734d11..c73ab51caa985089ade4df0616ee8d3333632980 100644 +index dde8718b8c0dab4b8bcd44de33117c48dc3ead0a..429fcd5927cf3259e8cdc83fadf78b41a38eb3bf 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -46,6 +46,7 @@ dependencies { - testImplementation("org.mockito:mockito-core:5.14.1") +@@ -59,6 +59,7 @@ dependencies { + mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions testImplementation("org.ow2.asm:asm-tree:9.7.1") testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest + implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling diff --git a/patches/server/0020-Plugin-remapping.patch b/patches/server/0020-Plugin-remapping.patch index 74c5a9fc9f..b7aa91fe6c 100644 --- a/patches/server/0020-Plugin-remapping.patch +++ b/patches/server/0020-Plugin-remapping.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Plugin remapping Co-authored-by: Nassim Jahnke diff --git a/build.gradle.kts b/build.gradle.kts -index c73ab51caa985089ade4df0616ee8d3333632980..9086a65f5d593eea72a89d1153f6d353dfac1619 100644 +index 429fcd5927cf3259e8cdc83fadf78b41a38eb3bf..fa3476acb77ce5d1247244808ead5b2a994e5fc7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -47,6 +47,7 @@ dependencies { +@@ -60,6 +60,7 @@ dependencies { testImplementation("org.ow2.asm:asm-tree:9.7.1") testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling @@ -17,7 +17,7 @@ index c73ab51caa985089ade4df0616ee8d3333632980..9086a65f5d593eea72a89d1153f6d353 } paperweight { -@@ -169,20 +170,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM +@@ -187,20 +188,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM runtime.filterNot { it.asFile.absolutePath == vanilla } } @@ -1904,7 +1904,7 @@ index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a0985 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e8c1ceed228a1dfb9f3c76b54a91d712c511ffb5..9bf8c4d9154c433e586f59587e8d7db7c310bb9c 100644 +index 600e865688b423d9bb4338f413dc28418ba37748..ad699a4ad555a4d7c85727bd835ebacd24d02c2b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1005,6 +1005,7 @@ public final class CraftServer implements Server { diff --git a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch index 13f71c1f92..72febed91c 100644 --- a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch +++ b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Remap reflection calls in plugins using internals Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/build.gradle.kts b/build.gradle.kts -index 9086a65f5d593eea72a89d1153f6d353dfac1619..e1cfa2188dbe583a0180be2243a7a554dc5412d7 100644 +index fa3476acb77ce5d1247244808ead5b2a994e5fc7..47df5ac22b0fc97381364eb4d16e33768ff9794c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -48,6 +48,12 @@ dependencies { +@@ -61,6 +61,12 @@ dependencies { testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins diff --git a/patches/server/0033-Expose-server-build-information.patch b/patches/server/0033-Expose-server-build-information.patch index a6d2360581..39cf3ce213 100644 --- a/patches/server/0033-Expose-server-build-information.patch +++ b/patches/server/0033-Expose-server-build-information.patch @@ -11,7 +11,7 @@ Co-authored-by: Jake Potrebic Co-authored-by: masmc05 diff --git a/build.gradle.kts b/build.gradle.kts -index e1cfa2188dbe583a0180be2243a7a554dc5412d7..da2f9c5afb2994f403a1128af0f7acbd6b73b862 100644 +index 47df5ac22b0fc97381364eb4d16e33768ff9794c..dfc9ca34656cb48462354e7d35dee5ad54096c39 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,5 @@ @@ -20,7 +20,7 @@ index e1cfa2188dbe583a0180be2243a7a554dc5412d7..da2f9c5afb2994f403a1128af0f7acbd plugins { java -@@ -65,18 +66,24 @@ tasks.jar { +@@ -78,18 +79,24 @@ tasks.jar { manifest { val git = Git(rootProject.layout.projectDirectory.path) diff --git a/patches/server/0350-Implement-Mob-Goal-API.patch b/patches/server/0350-Implement-Mob-Goal-API.patch index 52119186ca..3069423277 100644 --- a/patches/server/0350-Implement-Mob-Goal-API.patch +++ b/patches/server/0350-Implement-Mob-Goal-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/build.gradle.kts b/build.gradle.kts -index da2f9c5afb2994f403a1128af0f7acbd6b73b862..38585b7f0b8e1e287b37820924a1b0d464fe9e99 100644 +index dfc9ca34656cb48462354e7d35dee5ad54096c39..92c1fe881f3bfedc2d773b1812772f16555a09d3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -41,6 +41,7 @@ dependencies { +@@ -53,6 +53,7 @@ dependencies { runtimeOnly("org.apache.maven.resolver:maven-resolver-connector-basic:1.9.18") runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18") diff --git a/patches/server/0696-Add-support-for-Proxy-Protocol.patch b/patches/server/0696-Add-support-for-Proxy-Protocol.patch index 5d35c10858..554cb6491b 100644 --- a/patches/server/0696-Add-support-for-Proxy-Protocol.patch +++ b/patches/server/0696-Add-support-for-Proxy-Protocol.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add support for Proxy Protocol diff --git a/build.gradle.kts b/build.gradle.kts -index 38585b7f0b8e1e287b37820924a1b0d464fe9e99..25001d6cf4f70bd01ab304625b49ec45f5b1f525 100644 +index 92c1fe881f3bfedc2d773b1812772f16555a09d3..c2cd0db92d7f73c6b256440aa8f11e7bcc19e5b7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -28,6 +28,7 @@ dependencies { +@@ -40,6 +40,7 @@ dependencies { log4jPlugins.annotationProcessorConfigurationName("org.apache.logging.log4j:log4j-core:2.19.0") // Paper - Needed to generate meta for our Log4j plugins runtimeOnly(log4jPlugins.output) alsoShade(log4jPlugins.output) diff --git a/patches/server/0980-Use-Velocity-compression-and-cipher-natives.patch b/patches/server/0980-Use-Velocity-compression-and-cipher-natives.patch index 096019fa1f..27356b9ab5 100644 --- a/patches/server/0980-Use-Velocity-compression-and-cipher-natives.patch +++ b/patches/server/0980-Use-Velocity-compression-and-cipher-natives.patch @@ -9,10 +9,10 @@ Feature patch private-f net.minecraft.network.CompressionDecoder inflater diff --git a/build.gradle.kts b/build.gradle.kts -index 25001d6cf4f70bd01ab304625b49ec45f5b1f525..9966576652ed6007d2228237f292c1dc83ede485 100644 +index c2cd0db92d7f73c6b256440aa8f11e7bcc19e5b7..a6ae4494ab5970447625d332ef15a76baac9666e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -37,6 +37,11 @@ dependencies { +@@ -49,6 +49,11 @@ dependencies { runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3") runtimeOnly("com.mysql:mysql-connector-j:9.1.0") runtimeOnly("com.lmax:disruptor:3.4.4") // Paper diff --git a/patches/server/1046-Bundle-spark.patch b/patches/server/1046-Bundle-spark.patch index 29fad3689c..49bec1f832 100644 --- a/patches/server/1046-Bundle-spark.patch +++ b/patches/server/1046-Bundle-spark.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Bundle spark diff --git a/build.gradle.kts b/build.gradle.kts -index 9966576652ed6007d2228237f292c1dc83ede485..9b3a6b336cb1344d4e74e0e4f7c50ffd1e1b8955 100644 +index a6ae4494ab5970447625d332ef15a76baac9666e..c209eb393670fd8d6c97ca65a801c8032b582a35 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -62,6 +62,10 @@ dependencies { +@@ -75,6 +75,10 @@ dependencies { implementation("io.papermc:reflection-rewriter-runtime:$reflectionRewriterVersion") implementation("io.papermc:reflection-rewriter-proxy-generator:$reflectionRewriterVersion") // Paper end - Remap reflection @@ -364,7 +364,7 @@ index c06863578c5d654706d93e73059d89c12ae502a5..17a158ff6ce6520b69a5a0032ba4c054 com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 97ebe3852f34b88e727083b539d94de62dc1ca80..b185a9b474121b8a4067816b3c3c39270c2a202e 100644 +index c814b68933155fe7391b325260052d9affb6841c..e80439a0d17adaab7b782626fd2ee9ce1669058c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -312,6 +312,7 @@ public final class CraftServer implements Server {