more runtime errors

This commit is contained in:
Jake Potrebic
2024-12-15 15:16:33 -08:00
parent b40c4e2179
commit e3b23b59f3
2 changed files with 4 additions and 3 deletions

View File

@@ -69,7 +69,8 @@
+
public static <S extends MinecraftServer> S spin(Function<Thread, S> threadFunction) {
AtomicReference<S> atomicReference = new AtomicReference<>();
Thread thread = new Thread(() -> atomicReference.get().runServer(), "Server thread");
- Thread thread = new Thread(() -> atomicReference.get().runServer(), "Server thread");
+ Thread thread = new ca.spottedleaf.moonrise.common.util.TickThread(() -> atomicReference.get().runServer(), "Server thread");
thread.setUncaughtExceptionHandler((thread1, exception) -> LOGGER.error("Uncaught exception in server thread", exception));
+ thread.setPriority(Thread.NORM_PRIORITY+2); // Paper - Perf: Boost priority
if (Runtime.getRuntime().availableProcessors() > 4) {