174 lines
9.1 KiB
Diff
174 lines
9.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: lexikiq <noellekiq@gmail.com>
|
|
Date: Thu, 24 Jun 2021 02:16:25 -0400
|
|
Subject: [PATCH] Build changes
|
|
|
|
|
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
|
index 170a915098f09ace226648da342a04c5c7583d11..ff010d3680e8c6fea0f0ad7f455a2df757b495ba 100644
|
|
--- a/build.gradle.kts
|
|
+++ b/build.gradle.kts
|
|
@@ -1,4 +1,5 @@
|
|
import io.papermc.paperweight.util.*
|
|
+val edenVersion: String by project // Parchment
|
|
|
|
plugins {
|
|
java
|
|
@@ -27,8 +28,12 @@ repositories {
|
|
|
|
dependencies {
|
|
extraRuntime(platform("net.kyori:adventure-bom:4.15.0-SNAPSHOT"))
|
|
- implementation(project(":paper-api"))
|
|
- implementation(project(":paper-mojangapi"))
|
|
+ // Parchment start
|
|
+ implementation(project(":parchment-api"))
|
|
+ implementation("io.papermc.paper:paper-mojangapi:${project.version}") {
|
|
+ exclude("io.papermc.paper", "paper-api")
|
|
+ }
|
|
+ // Parchment end
|
|
// Paper start
|
|
implementation("org.jline:jline-terminal-jansi:3.21.0")
|
|
implementation("net.minecrell:terminalconsoleappender:1.3.0")
|
|
@@ -84,7 +89,7 @@ tasks.jar {
|
|
attributes(
|
|
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
|
"Implementation-Title" to "CraftBukkit",
|
|
- "Implementation-Version" to "git-Paper-$implementationVersion",
|
|
+ "Implementation-Version" to "git-Parchment-$implementationVersion", // Parchment
|
|
"Implementation-Vendor" to date, // Paper
|
|
"Specification-Title" to "Bukkit",
|
|
"Specification-Version" to project.version,
|
|
@@ -112,7 +117,27 @@ tasks.compileTestJava {
|
|
|
|
publishing {
|
|
publications.create<MavenPublication>("maven") {
|
|
- artifact(tasks.shadowJar)
|
|
+ // Parchment start
|
|
+ artifact(tasks.reobfJar)
|
|
+ groupId = project.group as String?
|
|
+ artifactId = "parchment"
|
|
+ version = project.version as String?
|
|
+
|
|
+ pom {
|
|
+ name.set(project.name)
|
|
+ description.set("Minecraft server software forked from Paper")
|
|
+ }
|
|
+ }
|
|
+
|
|
+ repositories {
|
|
+ maven {
|
|
+ credentials {
|
|
+ username = properties["edenusr"] as String?
|
|
+ password = properties["edenpwd"] as String?
|
|
+ }
|
|
+ url = uri("https://sonatype.projecteden.gg/repository/maven-snapshots/")
|
|
+ }
|
|
+ // Parchment end
|
|
}
|
|
}
|
|
|
|
@@ -168,7 +193,7 @@ fun TaskContainer.registerRunTask(
|
|
name: String,
|
|
block: JavaExec.() -> Unit
|
|
): TaskProvider<JavaExec> = register<JavaExec>(name) {
|
|
- group = "paper"
|
|
+ group = "paperweight" // Parchment
|
|
mainClass.set("org.bukkit.craftbukkit.Main")
|
|
standardInput = System.`in`
|
|
workingDir = rootProject.layout.projectDirectory
|
|
diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
index 4b002e8b75d117b726b0de274a76d3596fce015b..4dca3956a76a9d57b3167f73696cf5d55d84606c 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/Metrics.java
|
|
@@ -73,7 +73,7 @@ public class Metrics {
|
|
Metrics.logger = logger;
|
|
|
|
// Start submitting the data
|
|
- startSubmitting();
|
|
+ // startSubmitting(); // Parchment
|
|
}
|
|
|
|
/**
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..9b248dde91651b40b6b3e3dda8985c73543b4922 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
|
@@ -31,8 +31,10 @@ public class PaperVersionFetcher implements VersionFetcher {
|
|
@Nonnull
|
|
@Override
|
|
public Component getVersionMessage(@Nonnull String serverVersion) {
|
|
- String[] parts = serverVersion.substring("git-Paper-".length()).split("[-\\s]");
|
|
- final Component updateMessage = getUpdateStatusMessage("PaperMC/Paper", GITHUB_BRANCH_NAME, parts[0]);
|
|
+ // Parchment start
|
|
+ String[] parts = serverVersion.substring("git-Parchment-".length()).split("[-\\s]");
|
|
+ final Component updateMessage = getUpdateStatusMessage("ProjectEdenGG/Parchment", GITHUB_BRANCH_NAME, parts[0]);
|
|
+ // Parchment end
|
|
final Component history = getHistory();
|
|
|
|
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 34f19ac897a30c0c4e3ab406013fcca1c8b7db93..cb786826e228b88db7836c2641d32d025bea5a10 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1866,7 +1866,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
|
|
@DontObfuscate
|
|
public String getServerModName() {
|
|
- return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
|
+ return "Parchment"; // Parchment - Parchment > //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
|
}
|
|
|
|
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
|
|
index 782bb8ca67517dde5dba8f0a133eb8699353dd01..f8925b5f581fac113de89b9fca24d35e39a6fa3d 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -270,7 +270,7 @@ import javax.annotation.Nullable; // Paper
|
|
import javax.annotation.Nonnull; // Paper
|
|
|
|
public final class CraftServer implements Server {
|
|
- private final String serverName = "Paper"; // Paper
|
|
+ private final String serverName = "Parchment"; // Paper // Parchment
|
|
private final String serverVersion;
|
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
|
private final Logger logger = Logger.getLogger("Minecraft");
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
index 4b457cbfc56e55e0ae0fee5b69e2e75349702aab..d7f75d1a7107ce95dbba2842db0ced08ed4306e2 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
@@ -301,7 +301,7 @@ public class Main {
|
|
if (buildDate.before(deadline.getTime())) {
|
|
// Paper start - This is some stupid bullshit
|
|
System.err.println("*** Warning, you've not updated in a while! ***");
|
|
- System.err.println("*** Please download a new build as per instructions from https://papermc.io/downloads/paper ***"); // Paper
|
|
+ System.err.println("*** Please download a new build as per instructions from https://github.com/ProjectEdenGG/Parchment ***"); // Paper
|
|
//System.err.println("*** Server will start in 20 seconds ***");
|
|
//Thread.sleep(TimeUnit.SECONDS.toMillis(20));
|
|
// Paper End
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
index 774556a62eb240da42e84db4502e2ed43495be17..6f1b3fa6ebeabc7596034663ed06686fd3892267 100644
|
|
--- a/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 {
|
|
public static String getBukkitVersion() {
|
|
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/gg.projecteden.parchment/parchment-api/pom.properties");
|
|
Properties properties = new Properties();
|
|
|
|
if (stream != null) {
|
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
index 40dcdf6885e99b26283a9ea2bd4d4bf6ec358e71..be856b112dca06eac172a5c2b056b619ef47f6e6 100644
|
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
|
@@ -162,7 +162,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
|
log.log( Level.SEVERE, "\t If this is the case, consider increasing timeout-time in spigot.yml but note that this will replace the crash with LARGE lag spikes" );
|
|
log.log( Level.SEVERE, "If you are unsure or still think this is a Paper bug, please report this to https://github.com/PaperMC/Paper/issues" );
|
|
log.log( Level.SEVERE, "Be sure to include ALL relevant console errors and Minecraft crash reports" );
|
|
- log.log( Level.SEVERE, "Paper version: " + Bukkit.getServer().getVersion() );
|
|
+ log.log( Level.SEVERE, "Parchment version: " + Bukkit.getServer().getVersion() ); // Parchment
|
|
//
|
|
if ( net.minecraft.world.level.Level.lastPhysicsProblem != null )
|
|
{
|