mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-21 04:22:11 +00:00
update dev environment to 1.12.2
This commit is contained in:
1 parent
1b487f6e2a
commit
dc584e9d6c
34 files changed
+605
-1792
No files matched your search
@@ -1,84 +0,0 @@
|
||||
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;
|
||||
import com.github.vfyjxf.nee.processor.IRecipeProcessor;
|
||||
import com.github.vfyjxf.nee.processor.RecipeProcessor;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import thaumicenergistics.client.gui.GuiKnowledgeInscriber;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
||||
public class NEINeeConfig implements IConfigureNEI {
|
||||
|
||||
@Override
|
||||
public void loadConfig() {
|
||||
|
||||
RecipeProcessor.init();
|
||||
|
||||
Set<String> defaultIdentifiers = new HashSet<>(
|
||||
Arrays.asList("crafting", "crafting2x2", "brewing", "smelting", "fuel", null)
|
||||
);
|
||||
Set<String> identifiers = new HashSet<>(defaultIdentifiers);
|
||||
|
||||
for (IRecipeProcessor processor : RecipeProcessor.recipeProcessors) {
|
||||
identifiers.addAll(processor.getAllOverlayIdentifier());
|
||||
}
|
||||
|
||||
for (String ident : identifiers) {
|
||||
API.registerGuiOverlay(GuiPatternTerm.class, ident);
|
||||
API.registerGuiOverlayHandler(GuiPatternTerm.class, new NEECraftingHandler(), ident);
|
||||
}
|
||||
|
||||
installPatternTerminalExSupport(identifiers);
|
||||
|
||||
installThaumicEnergisticsSupport();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return NotEnoughEnergistics.NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVersion() {
|
||||
return NotEnoughEnergistics.VERSION;
|
||||
}
|
||||
|
||||
private void installThaumicEnergisticsSupport() {
|
||||
try {
|
||||
Class.forName("thaumicenergistics.client.gui.GuiKnowledgeInscriber");
|
||||
} catch (ClassNotFoundException e) {
|
||||
return;
|
||||
}
|
||||
if (Loader.isModLoaded("thaumcraftneiplugin")) {
|
||||
NotEnoughEnergistics.logger.info("Install ThaumicEnergistics support");
|
||||
|
||||
API.registerGuiOverlay(GuiKnowledgeInscriber.class, "arcaneshapedrecipes");
|
||||
API.registerGuiOverlay(GuiKnowledgeInscriber.class, "arcaneshapelessrecipes");
|
||||
API.registerGuiOverlayHandler(GuiKnowledgeInscriber.class, new NEECraftingHandler(), "arcaneshapedrecipes");
|
||||
API.registerGuiOverlayHandler(GuiKnowledgeInscriber.class, new NEECraftingHandler(), "arcaneshapelessrecipes");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void installPatternTerminalExSupport(Set<String> identifiers) {
|
||||
try {
|
||||
Class.forName("appeng.client.gui.implementations.GuiPatternTermEx");
|
||||
} catch (ClassNotFoundException e) {
|
||||
return;
|
||||
}
|
||||
identifiers.remove("crafting");
|
||||
identifiers.remove("crafting2x2");
|
||||
//PatternTermEx Support
|
||||
for (String ident : identifiers) {
|
||||
API.registerGuiOverlay(GuiPatternTermEx.class, ident);
|
||||
API.registerGuiOverlayHandler(GuiPatternTermEx.class, new NEECraftingHandler(), ident);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user