It compiles, that's all I guarantee

This commit is contained in:
Telesphoreo 2022-04-19 19:05:57 -05:00
parent 4c0a4b8804
commit 856ff4c719
4 changed files with 75 additions and 4 deletions

2
Jenkinsfile vendored
View File

@ -14,7 +14,7 @@ pipeline {
stage('paperclipJar') {
steps {
withGradle {
sh './gradlew paperclipJar --no-daemon'
sh './gradlew createReobfPaperclipJar --no-daemon'
}
}
}

View File

@ -5,10 +5,10 @@ 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;

View File

@ -0,0 +1,18 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Telesphoreo <me@telesphoreo.me>
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")

View File

@ -0,0 +1,53 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Telesphoreo <me@telesphoreo.me>
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<String, String> 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<String, String> 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("");
});