use of mezz.jei.api.gui.ingredient.IGuiIngredientGroup in project Mekanism by mekanism.
the class ChemicalDissolutionRecipeCategory method setRecipe.
@Override
public void setRecipe(IRecipeLayout recipeLayout, ChemicalDissolutionRecipe recipe, IIngredients ingredients) {
initItem(recipeLayout.getItemStacks(), 0, true, inputSlot, recipe.getItemInput().getRepresentations());
List<@NonNull GasStack> gasInputs = recipe.getGasInput().getRepresentations();
List<GasStack> scaledGases = gasInputs.stream().map(gas -> new GasStack(gas, gas.getAmount() * TileEntityChemicalDissolutionChamber.BASE_TICKS_REQUIRED)).collect(Collectors.toList());
IGuiIngredientGroup<GasStack> gasStacks = recipeLayout.getIngredientsGroup(MekanismJEI.TYPE_GAS);
initChemical(gasStacks, 0, true, inputGauge, scaledGases);
BoxedChemicalStack outputDefinition = recipe.getOutputDefinition();
ChemicalType chemicalType = outputDefinition.getChemicalType();
if (chemicalType == ChemicalType.GAS) {
initChemicalOutput(recipeLayout, MekanismJEI.TYPE_GAS, (GasStack) outputDefinition.getChemicalStack());
} else if (chemicalType == ChemicalType.INFUSION) {
initChemicalOutput(recipeLayout, MekanismJEI.TYPE_INFUSION, (InfusionStack) outputDefinition.getChemicalStack());
} else if (chemicalType == ChemicalType.PIGMENT) {
initChemicalOutput(recipeLayout, MekanismJEI.TYPE_PIGMENT, (PigmentStack) outputDefinition.getChemicalStack());
} else if (chemicalType == ChemicalType.SLURRY) {
initChemicalOutput(recipeLayout, MekanismJEI.TYPE_SLURRY, (SlurryStack) outputDefinition.getChemicalStack());
} else {
throw new IllegalStateException("Unknown chemical type");
}
}
Aggregations