forked from vfyjxf/NotEnoughEnergistics
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
1 parent
d308756
commit e51ec60
Showing
4 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/com/github/vfyjxf/nee/processor/BotaniaRecipeProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters