Remove Moonrise utils to MCUtils, remove duplicated/unused utils

This commit is contained in:
Spottedleaf
2024-07-17 10:24:53 -07:00
parent e2a85cf6d9
commit cc8d4390d4
23 changed files with 3563 additions and 6467 deletions

View File

@@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
Thread thread = new io.papermc.paper.util.TickThread(() -> { // Paper - rewrite chunk system
Thread thread = new ca.spottedleaf.moonrise.common.util.TickThread(() -> { // Paper - rewrite chunk system
@@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start
private boolean hasStopped = false;
@@ -352,14 +352,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -0,0 +0,0 @@ import org.bukkit.Bukkit;
public class WatchdogThread extends io.papermc.paper.util.TickThread // Paper - rewrite chunk system
public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThread // Paper - rewrite chunk system
{
+ public static final boolean DISABLE_WATCHDOG = Boolean.getBoolean("disable.watchdog"); // Paper - Improved watchdog support
private static WatchdogThread instance;
private long timeoutTime;
private boolean restart;
@@ -0,0 +0,0 @@ public class WatchdogThread extends io.papermc.paper.util.TickThread // Paper -
@@ -0,0 +0,0 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
{
if ( WatchdogThread.instance == null )
{
@@ -367,7 +367,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
WatchdogThread.instance = new WatchdogThread( timeoutTime * 1000L, restart );
WatchdogThread.instance.start();
} else
@@ -0,0 +0,0 @@ public class WatchdogThread extends io.papermc.paper.util.TickThread // Paper -
@@ -0,0 +0,0 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
// Paper start
Logger log = Bukkit.getServer().getLogger();
long currentTime = WatchdogThread.monotonicMillis();
@@ -384,7 +384,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
lastEarlyWarning = currentTime;
if (isLongTimeout) {
// Paper end
@@ -0,0 +0,0 @@ public class WatchdogThread extends io.papermc.paper.util.TickThread // Paper -
@@ -0,0 +0,0 @@ public class WatchdogThread extends ca.spottedleaf.moonrise.common.util.TickThre
if ( isLongTimeout )
{