mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 02:49:19 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@cdad49b7 Do not mark plugin tickets as forced; keep correct ticket types PaperMC/Paper@a1c4fc96 Add generic ticket identifier PaperMC/Paper@745881bb Update Moonrise common for 1.21.5 PaperMC/Paper@e9d00eb6 Apply Moonrise patch PaperMC/Paper@ef0f0d10 Copy Moonrise 1.21.5 update over PaperMC/Paper@cc0f25cb Apply more feature patches PaperMC/Paper@e7b684ed fix PaperMC/Paper@71ccae07 Revert "move block data/state impl"
42 lines
2.1 KiB
Diff
42 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Wed, 12 Oct 2022 10:42:15 -0400
|
|
Subject: [PATCH] Leaf config
|
|
|
|
Leaf Config v3
|
|
including load config, backup old or outdated config, and add config to spark profiler automatically.
|
|
|
|
TODO - Dreeam:
|
|
Add per world config
|
|
Add config reload
|
|
|
|
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
|
|
index 9c9b601a3f903bebb0dd1bda0e24745587229727..6c65122fe15e08c352885c7dfd3ddf496f0c00c4 100644
|
|
--- a/net/minecraft/server/Main.java
|
|
+++ b/net/minecraft/server/Main.java
|
|
@@ -108,10 +108,12 @@ public class Main {
|
|
JvmProfiler.INSTANCE.start(Environment.SERVER);
|
|
}
|
|
|
|
+ org.dreeam.leaf.config.LeafConfig.loadConfig(); // Leaf - Leaf config
|
|
io.papermc.paper.plugin.PluginInitializerManager.load(optionSet); // Paper
|
|
Bootstrap.bootStrap();
|
|
Bootstrap.validate();
|
|
Util.startTimerHackThread();
|
|
+ org.dreeam.leaf.config.ConfigModules.loadAfterBootstrap(); // Leaf - Leaf config - post load
|
|
Path path1 = Paths.get("server.properties");
|
|
DedicatedServerSettings dedicatedServerSettings = new DedicatedServerSettings(optionSet); // CraftBukkit - CLI argument support
|
|
dedicatedServerSettings.forceSave();
|
|
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
|
index 96d34149b1009b1522335784bc1858f61bb59cd1..d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6 100644
|
|
--- a/net/minecraft/server/MinecraftServer.java
|
|
+++ b/net/minecraft/server/MinecraftServer.java
|
|
@@ -1182,6 +1182,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
org.spigotmc.WatchdogThread.tick();
|
|
// Paper end
|
|
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
|
+ org.dreeam.leaf.config.LeafConfig.regSparkExtraConfig(); // Leaf - Leaf config
|
|
Arrays.fill(this.recentTps, 20);
|
|
// Paper start - further improve server tick loop
|
|
long tickSection = Util.getNanos();
|