fix crash with official nei and foresty

This commit is contained in:
GlodBlock committed 2022-05-19 16:30:03 +08:00
1 parent 037dfe573a
commit ef90465d9b
2 files changed
+5 -5

No files matched your search

@@ -50,16 +50,16 @@ public final class FluidRecipe {
}
public static List<OrderStack<?>> getPackageInputsLegacy(IRecipeHandler recipe, int index) {
if (recipe == null || !IdentifierMapLegacy.containsKey(recipe.getHandlerId())) return new ArrayList<>();
IRecipeExtractor extractor = IdentifierMapLegacy.get(recipe.getHandlerId());
if (recipe == null || !IdentifierMapLegacy.containsKey(recipe.getClass().getName())) return new ArrayList<>();
IRecipeExtractor extractor = IdentifierMapLegacy.get(recipe.getClass().getName());
if (extractor == null) return new ArrayList<>();
List<PositionedStack> tmp = new ArrayList<>(recipe.getIngredientStacks(index));
return extractor.getInputIngredients(tmp, recipe, index);
}
public static List<OrderStack<?>> getPackageOutputsLegacy(IRecipeHandler recipe, int index, boolean useOther) {
if (recipe == null || !IdentifierMapLegacy.containsKey(recipe.getHandlerId())) return new ArrayList<>();
IRecipeExtractor extractor = IdentifierMapLegacy.get(recipe.getHandlerId());
if (recipe == null || !IdentifierMapLegacy.containsKey(recipe.getClass().getName())) return new ArrayList<>();
IRecipeExtractor extractor = IdentifierMapLegacy.get(recipe.getClass().getName());
if (extractor == null) return new ArrayList<>();
List<PositionedStack> tmp = new ArrayList<>(Collections.singleton(recipe.getResultStack(index)));
if (useOther) tmp.addAll(recipe.getOtherStacks(index));
@@ -29,7 +29,7 @@ public class ForestryRecipeExtractor implements IRecipeExtractorLegacy {
@Override
public String getClassName() {
return handler.getHandlerId();
return handler.getClass().getName();
}
@Override