From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: foss-mc <69294560+foss-mc@users.noreply.github.com> Date: Sat, 12 Sep 2020 11:12:23 +0800 Subject: [PATCH] Shutdown Bootstrap thread pool diff --git a/src/main/java/net/minecraft/SystemUtils.java b/src/main/java/net/minecraft/SystemUtils.java index 61b4c42e95994343772a91640b243b8e8224e09b..ce440ae5cc843fc6101dd11fd45d9089795411e4 100644 --- a/src/main/java/net/minecraft/SystemUtils.java +++ b/src/main/java/net/minecraft/SystemUtils.java @@ -55,7 +55,7 @@ import org.apache.logging.log4j.Logger; public class SystemUtils { private static final AtomicInteger c = new AtomicInteger(1); - private static final ExecutorService d = a("Bootstrap", -2); // Paper - add -2 priority + public static final ExecutorService d = a("Bootstrap", -2); // Paper - add -2 priority // Yatopia - private -> public private static final ExecutorService e = a("Main", -1); // Paper - add -1 priority private static final ExecutorService f = n(); public static LongSupplier a = System::nanoTime; diff --git a/src/main/java/net/minecraft/util/datafix/DataConverterRegistry.java b/src/main/java/net/minecraft/util/datafix/DataConverterRegistry.java index 28e36ee76da533f8aa0a09cfc4f1fc0f744af715..625dcfaeffb83a0b8b53778c32287cac8daae540 100644 --- a/src/main/java/net/minecraft/util/datafix/DataConverterRegistry.java +++ b/src/main/java/net/minecraft/util/datafix/DataConverterRegistry.java @@ -199,14 +199,16 @@ public class DataConverterRegistry { private static final BiFunction a = Schema::new; private static final BiFunction b = DataConverterSchemaNamed::new; - private static final DataFixer c = b(); - - private static DataFixer b() { + // Yatopia start + private static final DataFixer c; + static { DataFixerBuilder datafixerbuilder = new DataFixerBuilder(SharedConstants.getGameVersion().getWorldVersion()); a(datafixerbuilder); - return datafixerbuilder.build(SystemUtils.e()); + c = datafixerbuilder.build(SystemUtils.d); + SystemUtils.d.shutdown(); } + // Yatopia end public static DataFixer getDataFixer() { return a(); } // Paper - OBFHELPER public static DataFixer a() {