From aedd5067fdc222751f1a19e857455af795edca30 Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Thu, 21 Apr 2022 20:21:55 -0700 Subject: [PATCH 1/2] Update upstream --- build.gradle.kts | 24 +++++++++++------------- gradle.properties | 6 +++--- patches/server/0001-Build-changes.patch | 20 ++++++++++---------- 3 files changed, 24 insertions(+), 26 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c96fa9f..afde92b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,22 +1,22 @@ -import io.papermc.paperweight.util.constants.* - plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "7.1.2" apply false - id("io.papermc.paperweight.patcher") version "1.3.4" + id("io.papermc.paperweight.patcher") version "1.3.6" } +val paperMavenPublicUrl = "https://papermc.io/repo/repository/maven-public/" + repositories { mavenCentral() - maven("https://papermc.io/repo/repository/maven-public/") { - content { onlyForConfigurations(PAPERCLIP_CONFIG) } + maven(paperMavenPublicUrl) { + content { onlyForConfigurations(configurations.paperclip.name) } } } dependencies { - remapper("net.fabricmc:tiny-remapper:0.8.1:fat") - decompiler("net.minecraftforge:forgeflower:1.5.498.22") + remapper("net.fabricmc:tiny-remapper:0.8.2:fat") + decompiler("net.minecraftforge:forgeflower:1.5.498.29") paperclip("io.papermc:paperclip:3.0.2") } @@ -45,15 +45,15 @@ subprojects { repositories { mavenCentral() - maven("https://papermc.io/repo/repository/maven-public/") + maven(paperMavenPublicUrl) } } paperweight { serverProject.set(project(":forktest-server")) - remapRepo.set("https://maven.fabricmc.net/") - decompileRepo.set("https://files.minecraftforge.net/maven/") + remapRepo.set(paperMavenPublicUrl) + decompileRepo.set(paperMavenPublicUrl) usePaperUpstream(providers.gradleProperty("paperRef")) { withPaperPatcher { @@ -76,9 +76,7 @@ tasks.generateDevelopmentBundle { libraryRepositories.set( listOf( "https://repo.maven.apache.org/maven2/", - "https://libraries.minecraft.net/", - "https://papermc.io/repo/repository/maven-public/", - "https://maven.quiltmc.org/repository/release/", + paperMavenPublicUrl, // "https://my.repo/", // This should be a repo hosting your API (in this example, 'com.example.paperfork:forktest-api') ) ) diff --git a/gradle.properties b/gradle.properties index 6d99bda..94e9bd2 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ group=com.example.paperfork -version=1.18-R0.1-SNAPSHOT +version=1.18.2-R0.1-SNAPSHOT -mcVersion=1.18 -paperRef=956124f86a93515cf67ee850e96cfd7bc58e27e8 +mcVersion=1.18.2 +paperRef=c449f6a1f712b81b50e250a2e258ef3e37fd6b9b org.gradle.caching=true org.gradle.parallel=true diff --git a/patches/server/0001-Build-changes.patch b/patches/server/0001-Build-changes.patch index 7250160..0fa61ad 100644 --- a/patches/server/0001-Build-changes.patch +++ b/patches/server/0001-Build-changes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Build changes diff --git a/build.gradle.kts b/build.gradle.kts -index cd74406039704e5a880f00b9b60bb7b1dedc5398..c4dfc34277e59143d346725c9ef2bfbcee59bc06 100644 +index dd8f449dddbe0838835ae8f8d5033aa422db403d..49f130227abc0c13a2b2e2c250c62e435ed15704 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -18,8 +18,12 @@ repositories { +@@ -9,8 +9,12 @@ plugins { } dependencies { @@ -16,14 +16,14 @@ index cd74406039704e5a880f00b9b60bb7b1dedc5398..c4dfc34277e59143d346725c9ef2bfbc - implementation(project(":paper-mojangapi")) + // ForkTest start + implementation(project(":forktest-api")) -+ implementation("io.papermc.paper:paper-mojangapi:1.18-R0.1-SNAPSHOT") { ++ implementation("io.papermc.paper:paper-mojangapi:1.18.2-R0.1-SNAPSHOT") { + exclude("io.papermc.paper", "paper-api") + } + // ForkTest end // Paper start implementation("org.jline:jline-terminal-jansi:3.21.0") implementation("net.minecrell:terminalconsoleappender:1.3.0") -@@ -67,7 +71,7 @@ tasks.jar { +@@ -59,7 +63,7 @@ tasks.jar { attributes( "Main-Class" to "org.bukkit.craftbukkit.Main", "Implementation-Title" to "CraftBukkit", @@ -32,20 +32,20 @@ index cd74406039704e5a880f00b9b60bb7b1dedc5398..c4dfc34277e59143d346725c9ef2bfbc "Implementation-Vendor" to date, // Paper "Specification-Title" to "Bukkit", "Specification-Version" to project.version, -@@ -158,7 +162,7 @@ fun TaskContainer.registerRunTask( +@@ -147,7 +151,7 @@ fun TaskContainer.registerRunTask( name: String, block: JavaExec.() -> Unit ): TaskProvider = register(name) { - group = "paper" -+ group = "paperweight" ++ group = "paperweight" // ForkTest mainClass.set("org.bukkit.craftbukkit.Main") standardInput = System.`in` workingDir = rootProject.layout.projectDirectory diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 893badbe321fa974cb82f5f11ab590bb3827f8b8..4aba540f4bc8014548cc10818472431dfa6b2ede 100644 +index c8d56947305c981a3268ce4ae3e975db350ceff2..467d8411a6894492d5188e27aa9b852d6cdb61d3 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1708,7 +1708,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop Date: Thu, 21 Apr 2022 20:45:48 -0700 Subject: [PATCH 2/2] Update README --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f97596..9589eef 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,16 @@ applyApiPatches applyPatches applyServerPatches cleanCache - Delete the project setup cache and task outputs. +createMojmapBundlerJar - Build a runnable bundler jar +createMojmapPaperclipJar - Build a runnable paperclip jar +createReobfBundlerJar - Build a runnable bundler jar +createReobfPaperclipJar - Build a runnable paperclip jar generateDevelopmentBundle -paperclipJar - Build a runnable paperclip jar rebuildApiPatches rebuildPatches rebuildServerPatches reobfJar - Re-obfuscate the built jar to obf mappings -runDev - Spin up a non-shaded non-remapped test server +runDev - Spin up a non-relocated Mojang-mapped test server runReobf - Spin up a test server from the reobfJar output jar runShadow - Spin up a test server from the shadowJar archiveFile ```