mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2025-01-30 03:51:31 +01:00
204b0808df
Upstream has released updates that appears to apply and compile correctly Tuinity Changes: bdbb111 Updated Upstream (Paper) ef0a6c4 Optimise collision checking in player move packets
110 lines
5.0 KiB
Diff
110 lines
5.0 KiB
Diff
From 61f96970034aa6ba01b9fbc70ad9651cf0fe0fdd Mon Sep 17 00:00:00 2001
|
|
From: tr7zw <tr7zw@live.de>
|
|
Date: Wed, 26 Feb 2020 18:37:34 +0100
|
|
Subject: [PATCH] Brandings
|
|
|
|
---
|
|
.../paper/console/PaperConsole.java | 1 +
|
|
.../de/tr7zw/yapfa/YapfaVersionFetcher.java | 20 +++++++++++++++++++
|
|
.../net/minecraft/server/MinecraftServer.java | 2 +-
|
|
.../org/bukkit/craftbukkit/CraftServer.java | 2 +-
|
|
.../craftbukkit/util/CraftMagicNumbers.java | 2 +-
|
|
.../bukkit/craftbukkit/util/Versioning.java | 2 +-
|
|
6 files changed, 25 insertions(+), 4 deletions(-)
|
|
create mode 100644 src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
index 74ed02fa92..1a9eda0d8b 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
|
|
@@ -18,6 +18,7 @@ public final class PaperConsole extends SimpleTerminalConsole {
|
|
protected LineReader buildReader(LineReaderBuilder builder) {
|
|
return super.buildReader(builder
|
|
.appName("Paper")
|
|
+ .appName("YAPFA") // YAPFA
|
|
.variable(LineReader.HISTORY_FILE, java.nio.file.Paths.get(".console_history"))
|
|
.completer(new ConsoleCommandCompleter(this.server))
|
|
);
|
|
diff --git a/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java b/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
|
new file mode 100644
|
|
index 0000000000..b7a73408ea
|
|
--- /dev/null
|
|
+++ b/src/main/java/de/tr7zw/yapfa/YapfaVersionFetcher.java
|
|
@@ -0,0 +1,20 @@
|
|
+package de.tr7zw.yapfa;
|
|
+
|
|
+import javax.annotation.Nonnull;
|
|
+
|
|
+import com.destroystokyo.paper.util.VersionFetcher;
|
|
+
|
|
+public class YapfaVersionFetcher implements VersionFetcher {
|
|
+
|
|
+ @Override
|
|
+ public long getCacheTime() {
|
|
+ return Long.MAX_VALUE;
|
|
+ }
|
|
+
|
|
+ @Nonnull
|
|
+ @Override
|
|
+ public String getVersionMessage(@Nonnull String serverVersion) {
|
|
+ return "\u00AF\\_(\u30C4)_/\u00AF";
|
|
+ }
|
|
+
|
|
+}
|
|
\ No newline at end of file
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index eb71fa6e39..6949761d8b 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1504,7 +1504,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
}
|
|
|
|
public String getServerModName() {
|
|
- return "Tuinity"; // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
|
+ return "YAPFA"; // YAPFA // Tuinity //Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
|
}
|
|
|
|
public CrashReport b(CrashReport crashreport) {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 2d042e0581..d33b57a5c7 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -231,7 +231,7 @@ import javax.annotation.Nullable; // Paper
|
|
import javax.annotation.Nonnull; // Paper
|
|
|
|
public final class CraftServer implements Server {
|
|
- private final String serverName = "Tuinity"; // Paper // Tuinity
|
|
+ private final String serverName = "YAPFA"; // Paper // Tuinity // YAPFA
|
|
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/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
index f1e60981ab..936d97530f 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
@@ -323,7 +323,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
|
|
@Override
|
|
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
|
- return new com.destroystokyo.paper.PaperVersionFetcher();
|
|
+ return new de.tr7zw.yapfa.YapfaVersionFetcher(); //YAPFA
|
|
}
|
|
|
|
@Override
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
|
index 001b1e5197..e3c4ad3d35 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/com.tuinity/tuinity-api/pom.properties"); // Tuinity
|
|
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/de.tr7zw.yapfa/yapfa-api/pom.properties"); // YAPFA
|
|
Properties properties = new Properties();
|
|
|
|
if (stream != null) {
|
|
--
|
|
2.25.1.windows.1
|
|
|