Skip to content

Commit ef90465

Browse files
committed
fix crash with official nei and foresty
1 parent 037dfe5 commit ef90465

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/com/glodblock/github/nei/recipes/FluidRecipe.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,16 @@ public static List<String> getSupportRecipes() {
5050
}
5151

5252
public static List<OrderStack<?>> getPackageInputsLegacy(IRecipeHandler recipe, int index) {
53-
if (recipe == null || !IdentifierMapLegacy.containsKey(recipe.getHandlerId())) return new ArrayList<>();
54-
IRecipeExtractor extractor = IdentifierMapLegacy.get(recipe.getHandlerId());
53+
if (recipe == null || !IdentifierMapLegacy.containsKey(recipe.getClass().getName())) return new ArrayList<>();
54+
IRecipeExtractor extractor = IdentifierMapLegacy.get(recipe.getClass().getName());
5555
if (extractor == null) return new ArrayList<>();
5656
List<PositionedStack> tmp = new ArrayList<>(recipe.getIngredientStacks(index));
5757
return extractor.getInputIngredients(tmp, recipe, index);
5858
}
5959

6060
public static List<OrderStack<?>> getPackageOutputsLegacy(IRecipeHandler recipe, int index, boolean useOther) {
61-
if (recipe == null || !IdentifierMapLegacy.containsKey(recipe.getHandlerId())) return new ArrayList<>();
62-
IRecipeExtractor extractor = IdentifierMapLegacy.get(recipe.getHandlerId());
61+
if (recipe == null || !IdentifierMapLegacy.containsKey(recipe.getClass().getName())) return new ArrayList<>();
62+
IRecipeExtractor extractor = IdentifierMapLegacy.get(recipe.getClass().getName());
6363
if (extractor == null) return new ArrayList<>();
6464
List<PositionedStack> tmp = new ArrayList<>(Collections.singleton(recipe.getResultStack(index)));
6565
if (useOther) tmp.addAll(recipe.getOtherStacks(index));

src/main/java/com/glodblock/github/nei/recipes/extractor/ForestryRecipeExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public ForestryRecipeExtractor(IRecipeHandler recipes) {
2929

3030
@Override
3131
public String getClassName() {
32-
return handler.getHandlerId();
32+
return handler.getClass().getName();
3333
}
3434

3535
@Override

0 commit comments

Comments
 (0)