diff --git a/Jenkinsfile b/Jenkinsfile index 935b20a..cd8b0d6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ pipeline { stage('paperclipJar') { steps { withGradle { - sh './gradlew paperclipJar --no-daemon' + sh './gradlew createReobfPaperclipJar --no-daemon' } } } diff --git a/patches/server/0029-Fix-negative-death-times.patch b/patches/server/0018-Fix-negative-death-times.patch similarity index 86% rename from patches/server/0029-Fix-negative-death-times.patch rename to patches/server/0018-Fix-negative-death-times.patch index e11a6aa..b004042 100644 --- a/patches/server/0029-Fix-negative-death-times.patch +++ b/patches/server/0018-Fix-negative-death-times.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Fix negative death times diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 99a5074adbe2a254ae6115b3548f1fcd30ba2489..68ae4dfe3f4a77605b19607b5f04a2a6d07d6fc8 100644 +index 1521f53ee1bd85ca44a68b2c9d969eaf63fa342e..64cfd7281b909e51321167a7f65d66b3ca8f9bc3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -623,7 +623,7 @@ public abstract class LivingEntity extends Entity { - +@@ -620,7 +620,7 @@ public abstract class LivingEntity extends Entity { + protected void tickDeath() { ++this.deathTime; - if (this.deathTime >= 20 && !this.isRemoved() && !this.level.isClientSide()) { // CraftBukkit - (this.deathTicks == 20) -> (this.deathTicks >= 20 && !this.dead) diff --git a/patches/server/0019-Add-API-back.patch b/patches/server/0019-Add-API-back.patch new file mode 100644 index 0000000..8bb4906 --- /dev/null +++ b/patches/server/0019-Add-API-back.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Telesphoreo +Date: Tue, 19 Apr 2022 18:54:26 -0500 +Subject: [PATCH] Add API back + + +diff --git a/build.gradle.kts b/build.gradle.kts +index bcada100f0938cfae54734582a86f4c1787e91b5..20120bd0b031d5106968c8bf7516b3db23e74ab7 100644 +--- a/build.gradle.kts ++++ b/build.gradle.kts +@@ -9,6 +9,7 @@ plugins { + } + + dependencies { ++ implementation(project(":Scissors-API")) + implementation("io.papermc.paper:paper-mojangapi:1.18.2-R0.1-SNAPSHOT") // Scissors + // Paper start + implementation("org.jline:jline-terminal-jansi:3.21.0") diff --git a/patches/server/0020-Fix-compiling-errors.patch b/patches/server/0020-Fix-compiling-errors.patch new file mode 100644 index 0000000..bc0b1c9 --- /dev/null +++ b/patches/server/0020-Fix-compiling-errors.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Telesphoreo +Date: Tue, 19 Apr 2022 19:03:51 -0500 +Subject: [PATCH] Fix compiling errors + + +diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +index f92610edcfb724374c69e66443eab60919ee955a..153c06bc00c4619012e77cb496ac57a7f2fc9409 100644 +--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java ++++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java +@@ -18,6 +18,7 @@ import java.io.*; + import java.net.HttpURLConnection; + import java.net.URL; + import java.util.stream.StreamSupport; ++import org.bukkit.Bukkit; + + public class PaperVersionFetcher implements VersionFetcher { + private static final java.util.regex.Pattern VER_PATTERN = java.util.regex.Pattern.compile("^([0-9\\.]*)\\-.*R"); // R is an anchor, will always give '-R' at end +@@ -57,14 +58,14 @@ public class PaperVersionFetcher implements VersionFetcher { + } + + // Scissors start - Allow getting git information +- public static String getCommit() { +- Map attributes = JarManifests.MANIFEST_MAP; +- return attributes.get("Git-Commit"); ++ private static String getCommit() { ++ final var manifest = JarManifests.manifest(Bukkit.getServer().getClass()); ++ return manifest == null ? null : manifest.getMainAttributes().getValue("Git-Commit"); + } + +- public static String getBranch() { +- Map attributes = JarManifests.MANIFEST_MAP; +- return attributes.get("Git-Branch"); ++ private static String getBranch() { ++ final var manifest = JarManifests.manifest(Bukkit.getServer().getClass()); ++ return manifest == null ? null : manifest.getMainAttributes().getValue("Git-Branch"); + } + // Scissors end + +diff --git a/src/main/java/net/minecraft/network/chat/NbtComponent.java b/src/main/java/net/minecraft/network/chat/NbtComponent.java +index e3dc56de3f91e03b1543257f72448a734d914ed7..8bb0544ef08eb0c221f06ddf96b63be5d02dc5ab 100644 +--- a/src/main/java/net/minecraft/network/chat/NbtComponent.java ++++ b/src/main/java/net/minecraft/network/chat/NbtComponent.java +@@ -95,7 +95,8 @@ public abstract class NbtComponent extends BaseComponent implements ContextAware + return stream.map((string) -> { + return new TextComponent(string); + }).reduce((accumulator, current) -> { +- return accumulator.append(text).append(current); ++ // Scissors - untested, likely needs fixing ++ return (TextComponent)accumulator.append(text).append(current); + }).orElseGet(() -> { + return new TextComponent(""); + });