9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-03 14:22:26 +00:00
Files
Leaf/leaf-server/minecraft-patches/features/0003-Leaf-config.patch
Dreeam 2f835efe4a Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@b6168b7c Get console Brig suggestions from main thread fixes #13027 (#13028)
PaperMC/Paper@9d1d0ef3 Add and call RegionizedServerInitEvent from Folia (#13034)
PaperMC/Paper@704107c3 Resend frozen ticks when cancelling EntityInsideBlockEvent for powder snow fixes #13033 (#13035)
PaperMC/Paper@63cd4af4 Fix createProfile not always returning a new profile (#13036)
PaperMC/Paper@49ca2d2d chore: remove experimental status from Damageable#damage (#13021)
PaperMC/Paper@65641d10 Only log name instead of full profile for configuration phase disconnects (#13038)
2025-08-31 04:34:07 -04:00

44 lines
2.2 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
Update config reload:
- Use different state to separate different configs reload
(Or sync reload)
diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java
index fd3553bdc1c3cdbf6aa3dc00e0a4987f8eaa4fb8..b16f3f515a76ddbbd74d73464396cf094cb30599 100644
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -109,10 +109,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 b737c4a6ae23342d71efeec99bee61eee1f1a67d..a795aa7a812a1773ba76d03ab8dba6e9b1ecf298 100644
--- a/net/minecraft/server/MinecraftServer.java
+++ b/net/minecraft/server/MinecraftServer.java
@@ -1186,6 +1186,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();