From 1a7e8f13d7253d1b14dab2eeb99d406234e2485f Mon Sep 17 00:00:00 2001 From: MuXiu1997 Date: Fri, 8 Apr 2022 21:41:30 +0800 Subject: Allows sorting of configuration circuits (#1012) * Allows sorting of configuration circuits * Fix things --- src/main/java/gregtech/loaders/preload/GT_PreLoad.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/gregtech/loaders') diff --git a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java index e3d4178d97..4fb7ec54a3 100644 --- a/src/main/java/gregtech/loaders/preload/GT_PreLoad.java +++ b/src/main/java/gregtech/loaders/preload/GT_PreLoad.java @@ -167,7 +167,7 @@ public class GT_PreLoad { } public static void runMineTweakerCompat() { - if (!Loader.isModLoaded("MineTweaker3")) + if (!Loader.isModLoaded("MineTweaker3")) return; GT_FML_LOGGER.info("preReader"); @@ -535,6 +535,10 @@ public class GT_PreLoad { GT_Mod.gregtechproxy.mCoverTabsFlipped = GregTech_API.sClientDataFile.get("interface", "FlipCoverTabs", false); GT_Mod.gregtechproxy.mTooltipVerbosity = GregTech_API.sClientDataFile.get("interface", "TooltipVerbosity", 2); GT_Mod.gregtechproxy.mTooltipShiftVerbosity = GregTech_API.sClientDataFile.get("interface", "TooltipShiftVerbosity", 3); - + final String[] Circuits = GregTech_API.sClientDataFile.get("interface", "CircuitsOrder" ); + GT_Mod.gregtechproxy.mCircuitsOrder.clear(); + for (int i = 0; i < Circuits.length; i++) { + GT_Mod.gregtechproxy.mCircuitsOrder.putIfAbsent(Circuits[i], i); + } } } -- cgit