mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-27 07:05:39 +00:00
Update Paper
This commit is contained in:
parent
8f9ead55be
commit
9342bc1cbc
@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
|
|||||||
version=1.19.4-R0.1-SNAPSHOT
|
version=1.19.4-R0.1-SNAPSHOT
|
||||||
|
|
||||||
mcVersion=1.19.4
|
mcVersion=1.19.4
|
||||||
paperRef=497b91939cf2972bac5337487f9f71770044fbc8
|
paperRef=29b17a892d11697dce9ee35d8eab593bb4748fb1
|
||||||
|
|
||||||
org.gradle.caching=true
|
org.gradle.caching=true
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
@ -1,38 +1,39 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
From: Telesphoreo <me@telesphoreo.me>
|
From: Telesphoreo <me@telesphoreo.me>
|
||||||
Date: Sat, 26 Mar 2022 21:51:07 -0500
|
Date: Fri, 7 Apr 2023 15:35:35 -0500
|
||||||
Subject: [PATCH] Change version fetcher to AMG
|
Subject: [PATCH] Change version fetcher to AMG
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
index bf42969859545a8a520923ef1836ffa4a5cc24a0..31d0624fcaf1998383eebde7fbd3a1033e6c80aa 100644
|
index 9d687da5bdf398bb3f6c84cdf1249a7213d09f2e..0a8fda6939152d393f07e5d2812409ad38855646 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperVersionFetcher.java
|
||||||
@@ -4,6 +4,8 @@ import com.destroystokyo.paper.util.VersionFetcher;
|
@@ -4,11 +4,13 @@ import com.destroystokyo.paper.util.VersionFetcher;
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import com.google.common.io.Resources;
|
import com.google.common.io.Resources;
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
+import io.papermc.paper.util.JarManifests;
|
+import io.papermc.paper.util.JarManifests;
|
||||||
+import java.util.Map;
|
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.event.ClickEvent;
|
import net.kyori.adventure.text.event.ClickEvent;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
@@ -16,11 +18,12 @@ import java.io.*;
|
import net.kyori.adventure.text.format.TextDecoration;
|
||||||
import java.net.HttpURLConnection;
|
import net.kyori.adventure.text.TextComponent;
|
||||||
import java.net.URL;
|
|
||||||
import java.util.stream.StreamSupport;
|
|
||||||
+import org.bukkit.Bukkit;
|
+import org.bukkit.Bukkit;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
@@ -19,8 +21,8 @@ import java.util.stream.StreamSupport;
|
||||||
|
|
||||||
public class PaperVersionFetcher implements VersionFetcher {
|
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
|
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
|
||||||
- private static final String GITHUB_BRANCH_NAME = "master";
|
- private static final String GITHUB_BRANCH_NAME = "master";
|
||||||
- private static final String DOWNLOAD_PAGE = "https://papermc.io/downloads";
|
- private static final String DOWNLOAD_PAGE = "https://papermc.io/downloads/paper";
|
||||||
+ private static final String GITHUB_BRANCH_NAME = getBranch();
|
+ private static final String GITHUB_BRANCH_NAME = getBranch();
|
||||||
+ private static final String DOWNLOAD_PAGE = "https://ci.scissors.gg/job/Scissors/job/" + GITHUB_BRANCH_NAME;
|
+ private static final String DOWNLOAD_PAGE = "https://ci.scissors.gg/job/Scissors/job/" + GITHUB_BRANCH_NAME;
|
||||||
private static @Nullable String mcVer;
|
private static @Nullable String mcVer;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -31,8 +34,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
@@ -31,8 +33,8 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
public Component getVersionMessage(@Nonnull String serverVersion) {
|
public Component getVersionMessage(@Nonnull String serverVersion) {
|
||||||
@ -43,7 +44,7 @@ index bf42969859545a8a520923ef1836ffa4a5cc24a0..31d0624fcaf1998383eebde7fbd3a103
|
|||||||
final Component history = getHistory();
|
final Component history = getHistory();
|
||||||
|
|
||||||
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage;
|
||||||
@@ -54,15 +57,24 @@ public class PaperVersionFetcher implements VersionFetcher {
|
@@ -54,15 +56,24 @@ public class PaperVersionFetcher implements VersionFetcher {
|
||||||
return mcVer;
|
return mcVer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,14 +77,14 @@ index bf42969859545a8a520923ef1836ffa4a5cc24a0..31d0624fcaf1998383eebde7fbd3a103
|
|||||||
switch (distance) {
|
switch (distance) {
|
||||||
case -1:
|
case -1:
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index d51650d3e37eb76a0cf991e95d28a552aa567af9..cd87e192ff09e77538521bbde38416c52daa22b8 100644
|
index 755c223ab2a046285eb9916b6195093714f4c5ba..e9714552bd57b8f65c2b5b209a72bfdd735b0dd3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -285,7 +285,7 @@ public class Main {
|
@@ -285,7 +285,7 @@ public class Main {
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
// Paper start - This is some stupid bullshit
|
// Paper start - This is some stupid bullshit
|
||||||
System.err.println("*** Warning, you've not updated in a while! ***");
|
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
|
- 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 from https://ci.scissors.gg/job/Scissors ***"); // Scissors > // Paper
|
+ System.err.println("*** Please download a new build from https://ci.scissors.gg/job/Scissors ***"); // Scissors > // Paper
|
||||||
//System.err.println("*** Server will start in 20 seconds ***");
|
//System.err.println("*** Server will start in 20 seconds ***");
|
||||||
//Thread.sleep(TimeUnit.SECONDS.toMillis(20));
|
//Thread.sleep(TimeUnit.SECONDS.toMillis(20));
|
||||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Reset large tags
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index d690b8d0c1da1f56b226376df8c76c34375e3c73..3fd92abc2852651b448bfd2f7c171097bfdf9bf5 100644
|
index 3bfef8ed7dd73f603aef06172f362bb0ed0a5c83..3c5b4d57004c04fbeaef3e916113db5e18a9d1b2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -20,6 +20,7 @@ import java.util.function.Predicate;
|
@@ -20,6 +20,7 @@ import java.util.function.Predicate;
|
||||||
@ -29,7 +29,7 @@ index d690b8d0c1da1f56b226376df8c76c34375e3c73..3fd92abc2852651b448bfd2f7c171097
|
|||||||
this.item = (Item) BuiltInRegistries.ITEM.get(new ResourceLocation(nbttagcompound.getString("id")));
|
this.item = (Item) BuiltInRegistries.ITEM.get(new ResourceLocation(nbttagcompound.getString("id")));
|
||||||
this.count = nbttagcompound.getByte("Count");
|
this.count = nbttagcompound.getByte("Count");
|
||||||
if (nbttagcompound.contains("tag", 10)) {
|
if (nbttagcompound.contains("tag", 10)) {
|
||||||
@@ -531,7 +538,11 @@ public final class ItemStack {
|
@@ -525,7 +532,11 @@ public final class ItemStack {
|
||||||
nbt.putString("id", minecraftkey == null ? "minecraft:air" : minecraftkey.toString());
|
nbt.putString("id", minecraftkey == null ? "minecraft:air" : minecraftkey.toString());
|
||||||
nbt.putByte("Count", (byte) this.count);
|
nbt.putByte("Count", (byte) this.count);
|
||||||
if (this.tag != null) {
|
if (this.tag != null) {
|
||||||
@ -42,7 +42,7 @@ index d690b8d0c1da1f56b226376df8c76c34375e3c73..3fd92abc2852651b448bfd2f7c171097
|
|||||||
}
|
}
|
||||||
|
|
||||||
return nbt;
|
return nbt;
|
||||||
@@ -867,6 +878,9 @@ public final class ItemStack {
|
@@ -861,6 +872,9 @@ public final class ItemStack {
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
public void setTag(@Nullable CompoundTag nbt) {
|
public void setTag(@Nullable CompoundTag nbt) {
|
||||||
|
Loading…
Reference in New Issue
Block a user