Skip to content

Commit

Permalink
Fix (#26)
Browse files Browse the repository at this point in the history
* Remove GitHub action and some code in build.gradle, add Botania support.
cherry pick facd8b6

* cherry pick 21f3a2d

* 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]>
  • Loading branch information
4 people authored Dec 13, 2022
1 parent d308756 commit e51ec60
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 1 deletion.
1 change: 1 addition & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies {
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.41.37:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:GTplusplus:1.7.90:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:ThaumicEnergistics:1.3.19-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:Botania:1.9.11-GTNH:dev") { transitive = false }
compileOnly("com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev") { transitive = false }
compileOnly("curse.maven:thaumcraft-nei-plugin-225095:2241913") { transitive = false }
compileOnly("curse.maven:thermal-expansion-69163:2388759") { transitive = false }
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/vfyjxf/nee/config/NEEConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public static void setTransformBlacklist(String[] transformBlacklist) {

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();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ public static void init() {
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());
Expand Down

0 comments on commit e51ec60

Please sign in to comment.