mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
shit fired
This commit is contained in:
1 parent
18647ceb31
commit
bb4a1e9e58
2 files changed
+15
-9
No files matched your search
+5
-2
@@ -2,6 +2,7 @@ package com.glodblock.github.nei;
|
||||
|
||||
import codechicken.nei.api.IOverlayHandler;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternTerminal;
|
||||
import com.glodblock.github.nei.object.OrderStack;
|
||||
@@ -40,11 +41,13 @@ public class FluidPatternTerminalRecipeTransferHandler implements IOverlayHandle
|
||||
}
|
||||
|
||||
private boolean notUseOther(IRecipeHandler recipeHandler) {
|
||||
return notOtherSet.contains(recipeHandler.getOverlayIdentifier());
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipeHandler;
|
||||
return notOtherSet.contains(tRecipe.getOverlayIdentifier());
|
||||
}
|
||||
|
||||
private boolean shouldCraft(IRecipeHandler recipeHandler) {
|
||||
return craftSet.contains(recipeHandler.getOverlayIdentifier());
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipeHandler;
|
||||
return craftSet.contains(tRecipe.getOverlayIdentifier());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.glodblock.github.nei.recipes;
|
||||
|
||||
import codechicken.nei.PositionedStack;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import com.glodblock.github.nei.object.IRecipeExtractor;
|
||||
import com.glodblock.github.nei.object.OrderStack;
|
||||
|
||||
@@ -19,19 +20,21 @@ public final class FluidRecipe {
|
||||
}
|
||||
|
||||
public static List<OrderStack<?>> getPackageInputs(IRecipeHandler recipe, int index) {
|
||||
if (recipe == null || !IdentifierMap.containsKey(recipe.getOverlayIdentifier())) return new ArrayList<>();
|
||||
IRecipeExtractor extractor = IdentifierMap.get(recipe.getOverlayIdentifier());
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipe;
|
||||
if (tRecipe == null || !IdentifierMap.containsKey(tRecipe.getOverlayIdentifier())) return new ArrayList<>();
|
||||
IRecipeExtractor extractor = IdentifierMap.get(tRecipe.getOverlayIdentifier());
|
||||
if (extractor == null) return new ArrayList<>();
|
||||
List<PositionedStack> tmp = new ArrayList<>(recipe.getIngredientStacks(index));
|
||||
List<PositionedStack> tmp = new ArrayList<>(tRecipe.getIngredientStacks(index));
|
||||
return extractor.getInputIngredients(tmp);
|
||||
}
|
||||
|
||||
public static List<OrderStack<?>> getPackageOutputs(IRecipeHandler recipe, int index, boolean useOther) {
|
||||
if (recipe == null || !IdentifierMap.containsKey(recipe.getOverlayIdentifier())) return new ArrayList<>();
|
||||
IRecipeExtractor extractor = IdentifierMap.get(recipe.getOverlayIdentifier());
|
||||
TemplateRecipeHandler tRecipe = (TemplateRecipeHandler) recipe;
|
||||
if (tRecipe == null || !IdentifierMap.containsKey(tRecipe.getOverlayIdentifier())) return new ArrayList<>();
|
||||
IRecipeExtractor extractor = IdentifierMap.get(tRecipe.getOverlayIdentifier());
|
||||
if (extractor == null) return new ArrayList<>();
|
||||
List<PositionedStack> tmp = new ArrayList<>(Collections.singleton(recipe.getResultStack(index)));
|
||||
if (useOther) tmp.addAll(recipe.getOtherStacks(index));
|
||||
List<PositionedStack> tmp = new ArrayList<>(Collections.singleton(tRecipe.getResultStack(index)));
|
||||
if (useOther) tmp.addAll(tRecipe.getOtherStacks(index));
|
||||
return extractor.getOutputIngredients(tmp);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user