mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-21 12:42:10 +00:00
Introduce HandlerInfo
* Switch handler info loading from code to CSV * Add option to load from config or JAR * handlers.csv is still a WIP
This commit is contained in:
1 parent
f0e09e2b0d
commit
4dfc4f86bf
11 files changed
+614
-579
No files matched your search
@@ -3,6 +3,7 @@ package codechicken.nei.config;
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.recipe.GuiRecipeTab;
|
||||
import codechicken.nei.recipe.GuiUsageRecipe;
|
||||
import codechicken.nei.recipe.HandlerInfo;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import codechicken.nei.util.NBTJson;
|
||||
@@ -37,14 +38,14 @@ public class HandlerDumper extends DataDumper
|
||||
for (IRecipeHandler handler : GuiUsageRecipe.usagehandlers) {
|
||||
final String handlerName = handler.toString().split("@")[0];
|
||||
final String handlerId = Objects.firstNonNull(handler instanceof TemplateRecipeHandler ? ((TemplateRecipeHandler)handler).getOverlayIdentifier() : null, "null");
|
||||
Pair<String, ItemStack> stackMapEntry = GuiRecipeTab.lookupStackMap(handlerName, handlerId);
|
||||
|
||||
HandlerInfo info = GuiRecipeTab.getHandlerInfo(handlerName, handlerId);
|
||||
|
||||
list.add(new String[] {
|
||||
handler.getRecipeName(),
|
||||
handlerName,
|
||||
handlerId,
|
||||
stackMapEntry != null ? stackMapEntry.getLeft() : "Unknown",
|
||||
stackMapEntry != null ? stackMapEntry.getRight().toString() : "Unknown"
|
||||
info != null ? info.getModName() : "Unknown",
|
||||
info != null ? info.getItemStack().toString() : "Unknown"
|
||||
});
|
||||
}
|
||||
return list;
|
||||
|
||||
Reference in new issue
Block a user