mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-21 04:22:11 +00:00
Add Processing Pattern Terminal Support
This commit is contained in:
1 parent
83b408d90a
commit
b32b9cd024
2 files changed
+72
-8
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package com.github.vfyjxf.nee;
|
||||
|
||||
import appeng.client.gui.implementations.GuiPatternTerm;
|
||||
import appeng.client.gui.implementations.GuiPatternTermEx;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import com.github.vfyjxf.nee.nei.NEECraftingHandler;
|
||||
@@ -13,20 +14,36 @@ import java.util.List;
|
||||
|
||||
|
||||
public class NEINeeConfig implements IConfigureNEI {
|
||||
|
||||
@Override
|
||||
public void loadConfig() {
|
||||
|
||||
RecipeProcessor.init();
|
||||
|
||||
List<String> identifiers = new ArrayList<>(Arrays.asList("crafting", "crafting2x2","brewing","smelting","fuel"));
|
||||
List<String> defaultIdentifiers= Arrays.asList("crafting", "crafting2x2","brewing","smelting","fuel");
|
||||
List<String> identifiers = new ArrayList<>(defaultIdentifiers);
|
||||
|
||||
for(IRecipeProcessor processor : RecipeProcessor.recipeProcessors){
|
||||
identifiers.addAll(processor.getAllOverlayIdentifier());
|
||||
}
|
||||
|
||||
for(String ident : identifiers){
|
||||
API.registerGuiOverlay(GuiPatternTerm.class,ident);
|
||||
API.registerGuiOverlay(GuiPatternTerm.class, ident);
|
||||
API.registerGuiOverlayHandler(GuiPatternTerm.class, new NEECraftingHandler(), ident);
|
||||
}
|
||||
|
||||
try {
|
||||
Class.forName("appeng.client.gui.implementations.GuiPatternTermEx");
|
||||
} catch (ClassNotFoundException e) {
|
||||
return;
|
||||
}
|
||||
|
||||
identifiers.removeAll(defaultIdentifiers);
|
||||
//PatternTermEx Support
|
||||
for(String ident : identifiers){
|
||||
API.registerGuiOverlay(GuiPatternTermEx.class, ident);
|
||||
API.registerGuiOverlayHandler(GuiPatternTermEx.class, new NEECraftingHandler(), ident);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user