From 0a09c4fbb8f2bd0ab74c7ee000a1ef5fd827de3d Mon Sep 17 00:00:00 2001 From: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> Date: Mon, 27 Sep 2021 00:47:27 -0600 Subject: Move assembly line NEI tab before all other GT NEI tabs --- src/main/java/gregtech/nei/NEI_GT_Config.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/main/java/gregtech/nei/NEI_GT_Config.java') diff --git a/src/main/java/gregtech/nei/NEI_GT_Config.java b/src/main/java/gregtech/nei/NEI_GT_Config.java index 5aef5b2901..96c2e97d02 100644 --- a/src/main/java/gregtech/nei/NEI_GT_Config.java +++ b/src/main/java/gregtech/nei/NEI_GT_Config.java @@ -12,15 +12,15 @@ public class NEI_GT_Config implements IConfigureNEI { @Override public void loadConfig() { sIsAdded = false; + if (FMLCommonHandler.instance().getEffectiveSide().isClient()) { + ALH = new GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes); + codechicken.nei.api.API.addItemListEntry(ItemList.VOLUMETRIC_FLASK.get(1)); + } for (GT_Recipe.GT_Recipe_Map tMap : GT_Recipe.GT_Recipe_Map.sMappings) { if (tMap.mNEIAllowed) { new GT_NEI_DefaultHandler(tMap); } } - if (FMLCommonHandler.instance().getEffectiveSide().isClient()) { - ALH = new GT_NEI_AssLineHandler(GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes); - codechicken.nei.api.API.addItemListEntry(ItemList.VOLUMETRIC_FLASK.get(1)); - } sIsAdded = true; } -- cgit From 2426e485340ef9f9934a1df03c5ba67115720a1a Mon Sep 17 00:00:00 2001 From: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> Date: Tue, 28 Sep 2021 03:39:57 -0600 Subject: Support arbitrary ordering of NEI handlers --- src/main/java/gregtech/nei/NEI_GT_Config.java | 52 ++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 5 deletions(-) (limited to 'src/main/java/gregtech/nei/NEI_GT_Config.java') diff --git a/src/main/java/gregtech/nei/NEI_GT_Config.java b/src/main/java/gregtech/nei/NEI_GT_Config.java index 96c2e97d02..0b4476eeef 100644 --- a/src/main/java/gregtech/nei/NEI_GT_Config.java +++ b/src/main/java/gregtech/nei/NEI_GT_Config.java @@ -1,25 +1,67 @@ package gregtech.nei; import codechicken.nei.api.IConfigureNEI; +import codechicken.nei.recipe.GuiCraftingRecipe; +import codechicken.nei.recipe.GuiUsageRecipe; +import codechicken.nei.recipe.TemplateRecipeHandler; +import com.google.common.collect.ImmutableMap; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.event.FMLInterModComms; +import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.util.GT_Recipe; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; + public class NEI_GT_Config implements IConfigureNEI { + /** + * This map determines the order in which NEI handlers will be registered and displayed in tabs. + * + *
Handlers will be displayed in ascending order of integer value. Any recipe map that is not
+ * present in this map will be assigned a value of 0. Negative values are fine.
+ */
+ private static final ImmutableMap