From 7288c14c511f22b2dad1f759b6daf3c9fe0072b8 Mon Sep 17 00:00:00 2001 From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com> Date: Sat, 18 Jan 2025 00:48:20 +0300 Subject: [PATCH] Updated Upstream (Purpur) Upstream has released updates that appear to apply and compile correctly Purpur Changes: --- .editorconfig | 3 +++ .gitignore | 1 - README.md | 10 ++++------ build.gradle.kts | 7 +------ .../paper-patches/features/0005-Extend-Sound-API.patch | 4 ++-- divinemc-server/build.gradle.kts.patch | 10 +++++----- gradle.properties | 2 +- 7 files changed, 16 insertions(+), 21 deletions(-) diff --git a/.editorconfig b/.editorconfig index 7d71104..f3b86f1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -39,3 +39,6 @@ ij_java_use_fq_class_names = true [divinemc-server/src/minecraft/resources/data/**/*.json] indent_size = 2 + +[paper-api/src/generated/**/*.java] +ij_java_imports_layout = $*,|,* diff --git a/.gitignore b/.gitignore index 5e8389b..76a44b5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,5 @@ run /purpur-server /divinemc-api/build.gradle.kts /paper-api -/paper-api-generator /purpur-api *.jar diff --git a/README.md b/README.md index 2c955fd..acd6dbf 100644 --- a/README.md +++ b/README.md @@ -72,18 +72,16 @@ dependencies { ### Initial setup First, clone this repository (do not download it) and the run the following command in the root directory: ```bash -./gradlew applyPatches +./gradlew applyAllPatches ``` After that, project is ready to use and editing it. ### Creating a patch -Patches are effectively just commits in either `DivineMC-API` or `DivineMC-Server`. To create one, just add a commit to either repo and run `./gradlew rebuildPatches`, and a patch will be placed in the patches folder. Modifying commits will also modify its corresponding patch file. - -Read our [documentation](https://docs.bx-team.space/divinemc/dev/contributing) to learn more about patches +Patches are effectively just commits in either `paper-api`, `paper-server`, `purpur-api`, `purpur-server` or `divinmc-server`. If you want to learn how to work with patch system, you can read our [contributing documentation](https://docs.bx-team.space/documentation/divinemc/development/contributing). ### Compiling -Use the command `./gradlew build` to build the API and server. Compiled JARs will be placed under `DivineMC-API/build/libs` and `DivineMC-Server/build/libs`. **These JARs are not used to start a server**. +Use the command `./gradlew build` to build the API and server. Compiled JARs will be placed under `divinemc-api/build/libs` and `divinemc-server/build/libs`. **These JARs are not used to start a server**. -To compile a server-ready paperclip jar, run `./gradlew createMojmapPaperclipJar`. The compiled paperclip jar will be in `build/libs/` in the main root. +To compile a server-ready paperclip jar, run `./gradlew createMojmapPaperclipJar`. The compiled paperclip jar will be in `divinemc-server/build/libs` in the main root. ###### We don't steal logo from YatopiaMC! [List of all forks](https://gist.github.com/NONPLAYT/48742353af8ae36bcef5d1c36de9730a) diff --git a/build.gradle.kts b/build.gradle.kts index 9b458d7..4947d32 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,7 +3,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent plugins { java - id("io.papermc.paperweight.patcher") version "2.0.0-beta.13" + id("io.papermc.paperweight.patcher") version "2.0.0-beta.14" } val paperMavenPublicUrl = "https://repo.papermc.io/repository/maven-public/" @@ -28,11 +28,6 @@ paperweight { patchesDir = file("divinemc-api/paper-patches") outputDir = file("paper-api") } - patchRepo("paperApiGenerator") { - upstreamPath = "paper-api-generator" - patchesDir = file("divinemc-api-generator/paper-patches") - outputDir = file("paper-api-generator") - } patchDir("purpurApi") { upstreamPath = "purpur-api" excludes = listOf("build.gradle.kts", "build.gradle.kts.patch", "paper-patches") diff --git a/divinemc-api/paper-patches/features/0005-Extend-Sound-API.patch b/divinemc-api/paper-patches/features/0005-Extend-Sound-API.patch index 171715f..3275a03 100644 --- a/divinemc-api/paper-patches/features/0005-Extend-Sound-API.patch +++ b/divinemc-api/paper-patches/features/0005-Extend-Sound-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Extend Sound API diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java -index b7530e7f389fdc6d815bdff0949fca4b14298c07..6e83e5cd66d38b14a79b54d4944eaec4fe30ef7e 100644 +index b703ad820ff873097dadff9e55b53fcc6b1b8698..b35c3852a3b8e62c7d2f67fc3ff651c8e0a4d5f2 100644 --- a/src/main/java/org/bukkit/block/Block.java +++ b/src/main/java/org/bukkit/block/Block.java -@@ -820,4 +820,29 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr +@@ -817,4 +817,29 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr return this.getBlockData().getDestroySpeed(itemStack, considerEnchants); } // Paper end - destroy speed API diff --git a/divinemc-server/build.gradle.kts.patch b/divinemc-server/build.gradle.kts.patch index d33fffd..f332c3a 100644 --- a/divinemc-server/build.gradle.kts.patch +++ b/divinemc-server/build.gradle.kts.patch @@ -31,9 +31,9 @@ + + activeFork = divinemc - paper { - paperServerDir = upstreamsDirectory().map { it.dir("paper/paper-server") } -@@ -119,10 +_,14 @@ + spigot { + buildDataRef = "3edaf46ec1eed4115ce1b18d2846cded42577e42" +@@ -115,10 +_,14 @@ main { java { srcDir("../paper-server/src/main/java") } resources { srcDir("../paper-server/src/main/resources") } @@ -48,7 +48,7 @@ } } -@@ -146,7 +_,7 @@ +@@ -142,7 +_,7 @@ } dependencies { @@ -57,7 +57,7 @@ implementation("ca.spottedleaf:concurrentutil:0.0.3") implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+ implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21 -@@ -207,26 +_,35 @@ +@@ -203,26 +_,35 @@ implementation("me.lucko:spark-paper:1.10.119-SNAPSHOT") } diff --git a/gradle.properties b/gradle.properties index 09ac4e0..54084df 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ group = space.bxteam.divinemc mcVersion = 1.21.4 version = 1.21.4-R0.1-SNAPSHOT -purpurRef = f2b35933952685545de253a0397a289dd66df1ce +purpurRef = b7f79d49fbaec23abd1114ff98f9baefcc673224 org.gradle.configuration-cache=true org.gradle.caching = true