9
0
mirror of https://github.com/Dreeam-qwq/Gale.git synced 2025-12-24 01:09:27 +00:00

Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@3b45454 Port random ticking optimisation from Moonrise
PaperMC/Paper@77fcb29 Apply incremental player/level saving patch
PaperMC/Paper@9fd7710 Apply automatic regionfile header recalculation patch
PaperMC/Paper@b57b24d Do not try to stop main thread during watchdog shutdown
This commit is contained in:
Dreeam
2024-07-16 04:58:59 +08:00
parent 655a887c4c
commit c38b773dc4
105 changed files with 140 additions and 168 deletions

View File

@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martijn Muijsers <martijnmuijsers@live.nl>
Date: Thu, 22 Dec 2022 15:47:39 +0100
Subject: [PATCH] Server thread priority environment variable
License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
Gale - https://galemc.org
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a5e4e457bf76bd27f6edeff229e75217643b842d..b981f41c96944b3ddcb7455a74c332bd12a99e88 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -191,6 +191,8 @@ import co.aikar.timings.MinecraftTimings; // Paper
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource, AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.server.ChunkSystemMinecraftServer { // Paper - rewrite chunk system
+ public static final int SERVER_THREAD_PRIORITY = Integer.getInteger("gale.thread.priority.server", -1); // Gale - server thread priority environment variable
+
private static MinecraftServer SERVER; // Paper
public static final Logger LOGGER = LogUtils.getLogger();
public static final net.kyori.adventure.text.logger.slf4j.ComponentLogger COMPONENT_LOGGER = net.kyori.adventure.text.logger.slf4j.ComponentLogger.logger(LOGGER.getName()); // Paper
@@ -325,6 +327,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
atomicreference.set(s0);
+ // Gale start - server thread priority environment variable
+ if (SERVER_THREAD_PRIORITY > 0) {
+ thread.setPriority(SERVER_THREAD_PRIORITY);
+ }
+ // Gale end - server thread priority environment variable
thread.start();
return s0;
}