mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-26 22:55:39 +00:00
Downgrade to 1.17.1 + Rebrand
This commit is contained in:
parent
90efbbe385
commit
49f7f4f21d
4
.gitignore
vendored
4
.gitignore
vendored
@ -46,7 +46,7 @@ out/
|
|||||||
# other stuff
|
# other stuff
|
||||||
run/
|
run/
|
||||||
|
|
||||||
forktest-server
|
Scissors-Server
|
||||||
forktest-api
|
Scissors-API
|
||||||
|
|
||||||
!gradle/wrapper/gradle-wrapper.jar
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
|
38
README.md
38
README.md
@ -1,37 +1 @@
|
|||||||
# ForkTest - A Paper fork, using paperweight
|
# Scissors
|
||||||
|
|
||||||
This is an example project, showcasing how to setup a fork of Paper (or any other fork using paperweight), using paperweight.
|
|
||||||
|
|
||||||
The files of most interest are
|
|
||||||
- build.gradle.kts
|
|
||||||
- settings.gradle.kts
|
|
||||||
- gradle.properties
|
|
||||||
|
|
||||||
## Tasks
|
|
||||||
|
|
||||||
```
|
|
||||||
Paperweight tasks
|
|
||||||
-----------------
|
|
||||||
applyApiPatches
|
|
||||||
applyPatches
|
|
||||||
applyServerPatches
|
|
||||||
cleanCache - Delete the project setup cache and task outputs.
|
|
||||||
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
|
|
||||||
runReobf - Spin up a test server from the reobfJar output jar
|
|
||||||
runShadow - Spin up a test server from the shadowJar archiveFile
|
|
||||||
```
|
|
||||||
|
|
||||||
## Branches
|
|
||||||
|
|
||||||
Each branch of this project represents an example:
|
|
||||||
|
|
||||||
- [`main` is the standard example](https://github.com/PaperMC/paperweight-examples/tree/main)
|
|
||||||
- [`submodules` shows how paperweight can be applied on a fork using the more traditional git submodule system](https://github.com/PaperMC/paperweight-examples/tree/submodules)
|
|
||||||
- [`mojangapi` shows how a fork could patch arbitrary non-git directories (such as `Paper-MojangAPI`)](https://github.com/PaperMC/paperweight-examples/tree/mojangapi)
|
|
||||||
- [`submodules-mojang` shows the same as `mojangapi`, but on the git submodules setup from `submodules`](https://github.com/PaperMC/paperweight-examples/tree/submodules-mojangapi)
|
|
@ -50,7 +50,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
paperweight {
|
paperweight {
|
||||||
serverProject.set(project(":forktest-server"))
|
serverProject.set(project(":Scissors-Server"))
|
||||||
|
|
||||||
remapRepo.set("https://maven.fabricmc.net/")
|
remapRepo.set("https://maven.fabricmc.net/")
|
||||||
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
decompileRepo.set("https://files.minecraftforge.net/maven/")
|
||||||
@ -58,56 +58,10 @@ paperweight {
|
|||||||
usePaperUpstream(providers.gradleProperty("paperRef")) {
|
usePaperUpstream(providers.gradleProperty("paperRef")) {
|
||||||
withPaperPatcher {
|
withPaperPatcher {
|
||||||
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
apiPatchDir.set(layout.projectDirectory.dir("patches/api"))
|
||||||
apiOutputDir.set(layout.projectDirectory.dir("forktest-api"))
|
apiOutputDir.set(layout.projectDirectory.dir("Scissors-API"))
|
||||||
|
|
||||||
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
serverPatchDir.set(layout.projectDirectory.dir("patches/server"))
|
||||||
serverOutputDir.set(layout.projectDirectory.dir("forktest-server"))
|
serverOutputDir.set(layout.projectDirectory.dir("Scissors-Server"))
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// Everything below here is optional if you don't care about publishing API or dev bundles to your repository
|
|
||||||
//
|
|
||||||
|
|
||||||
tasks.generateDevelopmentBundle {
|
|
||||||
apiCoordinates.set("com.example.paperfork:forktest-api")
|
|
||||||
mojangApiCoordinates.set("io.papermc.paper:paper-mojangapi")
|
|
||||||
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/",
|
|
||||||
// "https://my.repo/", // This should be a repo hosting your API (in this example, 'com.example.paperfork:forktest-api')
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
allprojects {
|
|
||||||
// Publishing API:
|
|
||||||
// ./gradlew :ForkTest-API:publish[ToMavenLocal]
|
|
||||||
publishing {
|
|
||||||
repositories {
|
|
||||||
maven {
|
|
||||||
name = "myRepoSnapshots"
|
|
||||||
url = uri("https://my.repo/")
|
|
||||||
// See Gradle docs for how to provide credentials to PasswordCredentials
|
|
||||||
// https://docs.gradle.org/current/samples/sample_publishing_credentials.html
|
|
||||||
credentials(PasswordCredentials::class)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
publishing {
|
|
||||||
// Publishing dev bundle:
|
|
||||||
// ./gradlew publishDevBundlePublicationTo(MavenLocal|MyRepoSnapshotsRepository) -PpublishDevBundle
|
|
||||||
if (project.hasProperty("publishDevBundle")) {
|
|
||||||
publications.create<MavenPublication>("devBundle") {
|
|
||||||
artifact(tasks.generateDevelopmentBundle) {
|
|
||||||
artifactId = "dev-bundle"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
group=com.example.paperfork
|
group=me.totalfreedom.scissors
|
||||||
version=1.18-R0.1-SNAPSHOT
|
version=1.17.1-R0.1-SNAPSHOT
|
||||||
|
|
||||||
mcVersion=1.18
|
mcVersion=1.17.1
|
||||||
paperRef=956124f86a93515cf67ee850e96cfd7bc58e27e8
|
paperRef=c53577e3c0ed48a3e5c728c9e8fac96312b1c6f1
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
@ -1,74 +1,70 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: MiniDigger <admin@minidigger.me>
|
From: Luna <lunahatesgogle@gmail.com>
|
||||||
Date: Sat, 12 Jun 2021 16:40:34 +0200
|
Date: Sat, 12 Mar 2022 22:22:22 -0300
|
||||||
Subject: [PATCH] Build changes
|
Subject: [PATCH] Build changes
|
||||||
|
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index cd74406039704e5a880f00b9b60bb7b1dedc5398..c4dfc34277e59143d346725c9ef2bfbcee59bc06 100644
|
index 612c4ed60406a69832609a9bdb3e45a7f3de6b74..4cf8fed3983e43c68b5a366da01d5f39c8829e16 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -18,8 +18,12 @@ repositories {
|
@@ -22,8 +22,8 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
- implementation(project(":paper-api"))
|
- implementation(project(":Paper-API"))
|
||||||
- implementation(project(":paper-mojangapi"))
|
- implementation(project(":Paper-MojangAPI"))
|
||||||
+ // ForkTest start
|
+ implementation(project(":Scissors-API")) // Scissors
|
||||||
+ implementation(project(":forktest-api"))
|
+ implementation("io.papermc.paper:paper-mojangapi:1.17.1-R0.1-SNAPSHOT") // Scissors
|
||||||
+ implementation("io.papermc.paper:paper-mojangapi:1.18-R0.1-SNAPSHOT") {
|
|
||||||
+ exclude("io.papermc.paper", "paper-api")
|
|
||||||
+ }
|
|
||||||
+ // ForkTest end
|
|
||||||
// Paper start
|
// Paper start
|
||||||
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
||||||
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
||||||
@@ -67,7 +71,7 @@ tasks.jar {
|
@@ -75,7 +75,7 @@ tasks.jar {
|
||||||
attributes(
|
attributes(
|
||||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||||
"Implementation-Title" to "CraftBukkit",
|
"Implementation-Title" to "CraftBukkit",
|
||||||
- "Implementation-Version" to "git-Paper-$implementationVersion",
|
- "Implementation-Version" to "git-Paper-$implementationVersion",
|
||||||
+ "Implementation-Version" to "git-ForkTest-$implementationVersion", // ForkTest
|
+ "Implementation-Version" to "git-Scissors-$implementationVersion", // Scissors
|
||||||
"Implementation-Vendor" to date, // Paper
|
"Implementation-Vendor" to date, // Paper
|
||||||
"Specification-Title" to "Bukkit",
|
"Specification-Title" to "Bukkit",
|
||||||
"Specification-Version" to project.version,
|
"Specification-Version" to project.version,
|
||||||
@@ -158,7 +162,7 @@ fun TaskContainer.registerRunTask(
|
@@ -202,7 +202,7 @@ tasks.test {
|
||||||
name: String,
|
fun TaskContainer.registerRunTask(
|
||||||
block: JavaExec.() -> Unit
|
name: String, block: JavaExec.() -> Unit
|
||||||
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
||||||
- group = "paper"
|
- group = "paper"
|
||||||
+ group = "paperweight"
|
+ group = "paperweight"
|
||||||
mainClass.set("org.bukkit.craftbukkit.Main")
|
|
||||||
standardInput = System.`in`
|
standardInput = System.`in`
|
||||||
workingDir = rootProject.layout.projectDirectory
|
workingDir = rootProject.layout.projectDirectory.dir(
|
||||||
|
providers.gradleProperty("runWorkDir").forUseAtConfigurationTime().orElse("run")
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
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 5a4172faaf960d48939d6a485719041987df9242..541963dc93327d8323704fdc0e422b1a24f4baa0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/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<TickTa
|
@@ -1729,7 +1729,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
- return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
- return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||||
+ return "ForkTest"; // ForkTest - ForkTest > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
+ return "Scissors"; // Scissors - Scissors > // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||||
}
|
}
|
||||||
|
|
||||||
public SystemReport fillSystemReport(SystemReport details) {
|
public SystemReport fillSystemReport(SystemReport details) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index d938dc26886aa8a64c11db5e49fe5639bc27e1fb..d941957dee45911626f62e55f598490a60d6c818 100644
|
index 99a94898316b0601f55b333c15a9926eae24f8a2..cc797b45674163b5913e20031d110796d78b928b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -255,7 +255,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -251,7 +251,7 @@ import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
- private final String serverName = "Paper"; // Paper
|
- private final String serverName = "Paper"; // Paper
|
||||||
+ private final String serverName = "ForkTest"; // ForkTest // Paper
|
+ private final String serverName = "Scissors"; // Scissors // Paper
|
||||||
private final String serverVersion;
|
private final String serverVersion;
|
||||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||||
private final Logger logger = Logger.getLogger("Minecraft");
|
private final Logger logger = Logger.getLogger("Minecraft");
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||||
index 774556a62eb240da42e84db4502e2ed43495be17..21f39bd0c33ef2635249298e6a247afba8b05742 100644
|
index 774556a62eb240da42e84db4502e2ed43495be17..becf61c0adde1c27f3e462a1b8248544ab181797 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||||
@@ -11,7 +11,7 @@ public final class Versioning {
|
@@ -11,7 +11,7 @@ public final class Versioning {
|
||||||
@ -76,7 +72,7 @@ index 774556a62eb240da42e84db4502e2ed43495be17..21f39bd0c33ef2635249298e6a247afb
|
|||||||
String result = "Unknown-Version";
|
String result = "Unknown-Version";
|
||||||
|
|
||||||
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/io.papermc.paper/paper-api/pom.properties");
|
- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/io.papermc.paper/paper-api/pom.properties");
|
||||||
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.example.paperfork/forktest-api/pom.properties"); // ForkTest
|
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/me.totalfreedom.scissors/scissors-api/pom.properties");
|
||||||
Properties properties = new Properties();
|
Properties properties = new Properties();
|
||||||
|
|
||||||
if (stream != null) {
|
if (stream != null) {
|
||||||
|
@ -5,6 +5,6 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "forktest"
|
rootProject.name = "Scissors"
|
||||||
|
|
||||||
include("forktest-api", "forktest-server")
|
include("Scissors-API", "Scissors-Server")
|
||||||
|
Loading…
Reference in New Issue
Block a user