Yatopia/patches/server/0021-Redirect-Configs.patch
Simon Gardling cc91a8080f
Upstream (#461)
* Updated Upstream and Sidestream(s) (Paper)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
8a29f5894 [Auto] Updated Upstream (Bukkit/CraftBukkit)
8756d232c Expose server protocol version (#5416)

* Updated Upstream and Sidestream(s) (Tuinity/Purpur)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Tuinity Changes:
32b4d52 Updated Upstream (Paper)
ac5adca Make sure lit is set for pre 1.14 chunks

Purpur Changes:
24d9e61 Piglin portal spawn modifier
5866f36 Fix #263 - NPE on TPSBar when player disconnects
7f7f024 Updated Upstream (Paper, Tuinity, & Airplane)

* bump kotlin-stdlib

* Updated Upstream and Sidestream(s) (Paper/Airplane/Purpur)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
606cdac60 Update the view distance before scheduling chunk loads (#5269)

Airplane Changes:
0789789 Updated Upstream (Tuinity)
c1e4d71 Fluid cache patch

Purpur Changes:
04f73c5 Fix error when using non living entity on monster egg
76c35fc Fix #287 - TPSBarTask NPE (again)

* Updated Upstream and Sidestream(s) (Purpur)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Purpur Changes:
2e62618 Fix #280 - Ridables do not reset idle timer
2021-04-15 14:46:34 -04:00

67 lines
3.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: tr7zw <tr7zw@live.de>
Date: Wed, 5 Aug 2020 08:17:46 -0500
Subject: [PATCH] Redirect Configs
diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java
index 2457b240f3b49dbd5fe0eb603d86418fd65f0205..fa6637caf388c5ed1d3371c6433c8ede6c84d0f3 100644
--- a/src/main/java/de/minebench/origami/OrigamiConfig.java
+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java
@@ -20,6 +20,8 @@ public final class OrigamiConfig {
private static int configVersion;
public static void init(final File file) {
+ // Yatopia start
+ /*
OrigamiConfig.configFile = file;
OrigamiConfig.config = new YamlConfiguration();
config.options().header(CONFIG_HEADER);
@@ -39,13 +41,16 @@ public final class OrigamiConfig {
System.out.println("Failure to load origami config");
throw new RuntimeException(ex);
}
- }
-
- OrigamiConfig.load(OrigamiConfig.class, null);
+ }*/
+ config = org.yatopiamc.yatopia.server.YatopiaConfig.config;
+ configFile = org.yatopiamc.yatopia.server.YatopiaConfig.CONFIG_FILE;
+ configVersion = org.yatopiamc.yatopia.server.YatopiaConfig.version;
+ //OrigamiConfig.load(OrigamiConfig.class, null); // todo: uncomment when config options are ported
+ // Yatopia end
}
public static void load(Class<?> clazz, Object instance) {
- OrigamiConfig.configVersion = OrigamiConfig.getInt("config-version-please-do-not-modify-me", CURRENT_CONFIG_VERSION);
+ //OrigamiConfig.configVersion = OrigamiConfig.getInt("config-version-please-do-not-modify-me", CURRENT_CONFIG_VERSION); // Yatopia - NO
for (final Method method : clazz.getDeclaredMethods()) {
if (method.getReturnType() != void.class || method.getParameterCount() != 0 ||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 8601b91e12be70474b2f1396487b1431e66799cf..25e1513c5b435adef1bdd78f0973e395de3b334d 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -235,7 +235,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
return false;
}
// Yatopia end
-
+ de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings"));
this.setPVP(dedicatedserverproperties.pvp);
this.setAllowFlight(dedicatedserverproperties.allowFlight);
this.setResourcePack(dedicatedserverproperties.resourcePack, this.ba());
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 86912aeec22feb7c519ede370651f292ec5a01da..b7b8c48b47552555553deeaae2d873c80c4255dd 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -304,7 +304,7 @@ public class Main {
}
// Paper end
System.setProperty( "library.jansi.version", "Paper" ); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows
- de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); // Origami - Server Config
+ //de.minebench.origami.OrigamiConfig.init((java.io.File) options.valueOf("origami-settings")); // Origami - Server Config // Yatopia - no load here for u
System.out.println("Loading libraries, please wait...");
net.minecraft.server.Main.main(options);
} catch (Throwable t) {