mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-17 19:05:01 +00:00
Fix (#26)
* Remove GitHub action and some code in build.gradle, add Botania support. cherry pick facd8b6c4ef3046de9bdfee919b67242098f0c05 * cherry pick 21f3a2d8fc5dfd1bbbb9a45dabfd1981b1790189 * Update BS+SA * add botania as dep * spotlessApply Co-authored-by: vfyjxf <[email protected]> Co-authored-by: vfyjxf <[email protected]> Co-authored-by: GitHub GTNH Actions <> Co-authored-by: glowredman <[email protected]>
This commit is contained in:
4 files changed
+57
-1
No files matched your search
@@ -274,7 +274,7 @@ public class NEEConfig {
|
||||
|
||||
public static void setTransformPriorityList(String[] transformPriorityList) {
|
||||
NEEConfig.transformPriorityList = transformPriorityList;
|
||||
config.get("client", "transformPriorityModList", new String[0], "if oredict has this mod's item, use it first")
|
||||
config.get("client", "transformItemPriorityList", new String[0], "if oredict has this mod's item, use it first")
|
||||
.set(transformPriorityList);
|
||||
config.save();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.github.vfyjxf.nee.processor;
|
||||
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nonnull;
|
||||
import vazkii.botania.client.integration.nei.recipe.RecipeHandlerLexicaBotania;
|
||||
|
||||
public class BotaniaRecipeProcessor implements IRecipeProcessor {
|
||||
@Nonnull
|
||||
@Override
|
||||
public Set<String> getAllOverlayIdentifier() {
|
||||
return Collections.singleton(RecipeProcessor.NULL_IDENTIFIER);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getRecipeProcessorId() {
|
||||
return " Botania";
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<PositionedStack> getRecipeInput(IRecipeHandler recipe, int recipeIndex, String identifier) {
|
||||
List<PositionedStack> recipeInputs = new ArrayList<>();
|
||||
if (recipe instanceof RecipeHandlerLexicaBotania) {
|
||||
// we don't need to get recipe from a book.
|
||||
// but botania doesn't provide an identifier for each recipe handler, so the button will still show.
|
||||
return recipeInputs;
|
||||
}
|
||||
recipeInputs.addAll(recipe.getIngredientStacks(recipeIndex));
|
||||
return recipeInputs;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public List<PositionedStack> getRecipeOutput(IRecipeHandler recipe, int recipeIndex, String identifier) {
|
||||
List<PositionedStack> recipeOutputs = new ArrayList<>();
|
||||
if (recipe instanceof RecipeHandlerLexicaBotania) {
|
||||
// we don't need to get recipe from a book.
|
||||
// but botania doesn't provide an identifier for each recipe handler, so the button will still show.
|
||||
return recipeOutputs;
|
||||
}
|
||||
recipeOutputs.add(recipe.getResultStack(recipeIndex));
|
||||
return recipeOutputs;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,11 @@ public class RecipeProcessor {
|
||||
recipeProcessors.add(new AppengRecipeProcessor());
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("Botania")) {
|
||||
NotEnoughEnergistics.logger.info("Found Botania,install Botania support");
|
||||
recipeProcessors.add(new BotaniaRecipeProcessor());
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("gregtech") && !Loader.isModLoaded("gregapi")) {
|
||||
NotEnoughEnergistics.logger.info("Found GregTech5,install GregTech5 support");
|
||||
recipeProcessors.add(new GregTech5RecipeProcessor());
|
||||
|
||||
Reference in new issue
Block a user