use of crazypants.enderio.base.integration.jei.energy.EnergyIngredient in project EnderIO by SleepyTrousers.
the class VatRecipeCategory method setRecipe.
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull VatRecipeCategory.VatRecipeWrapper recipeWrapper, @Nonnull IIngredients ingredients) {
recipeWrapper.setCurrentLayout(recipeLayout);
final IGuiItemStackGroup guiItemStacks = recipeLayout.getItemStacks();
final IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
IGuiIngredientGroup<EnergyIngredient> group = recipeLayout.getIngredientsGroup(EnergyIngredient.class);
guiItemStacks.init(0, true, 55 - xOff, 11 - yOff);
guiItemStacks.init(1, true, 104 - xOff, 11 - yOff);
fluidStacks.init(2, true, inTankBounds.x, inTankBounds.y, inTankBounds.width, inTankBounds.height, 8000, false, null);
fluidStacks.init(3, false, outTankBounds.x, outTankBounds.y, outTankBounds.width, outTankBounds.height, 8000, false, null);
group.init(4, true, EnergyIngredientRenderer.INSTANCE, 76, 58, 50, 10, 0, 0);
guiItemStacks.set(ingredients);
fluidStacks.set(ingredients);
group.set(ingredients);
}
use of crazypants.enderio.base.integration.jei.energy.EnergyIngredient in project EnderIO by SleepyTrousers.
the class SagRecipe method getIngredients.
@Override
public void getIngredients(@Nonnull IIngredients ingredients) {
List<List<ItemStack>> inputStacks = recipe.getInputStackAlternatives();
List<EnergyIngredient> energies = new ArrayList<>();
if (recipe.getBonusType().doChances()) {
final List<ItemStack> balls = SagRecipe.getBalls();
inputStacks.add(balls);
for (ItemStack ball : balls) {
if (ball != null && Prep.isValid(ball)) {
energies.add(new EnergyIngredient((int) (recipe.getEnergyRequired() * SagMillRecipeManager.getInstance().getGrindballFromStack(ball).getPowerMultiplier())));
} else {
energies.add(new EnergyIngredient(recipe.getEnergyRequired()));
}
}
} else {
// no balls
inputStacks.add(Collections.emptyList());
energies.add(new EnergyIngredient(recipe.getEnergyRequired()));
}
ingredients.setInputLists(ItemStack.class, inputStacks);
ingredients.setInputLists(EnergyIngredient.class, Collections.singletonList(energies));
List<ItemStack> outputs = new ArrayList<ItemStack>();
for (RecipeOutput out : recipe.getOutputs()) {
if (Prep.isValid(out.getOutput())) {
outputs.add(out.getOutput());
}
}
ingredients.setOutputs(ItemStack.class, outputs);
}
use of crazypants.enderio.base.integration.jei.energy.EnergyIngredient in project EnderIO by SleepyTrousers.
the class CombustionRecipeCategory method setRecipe.
@Override
public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull CombustionRecipeWrapper recipeWrapper, @Nonnull IIngredients ingredients) {
IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
fluidStacks.init(0, true, 114 - xOff, 21 - yOff, 15, 47, 1000, false, null);
fluidStacks.init(1, true, 48 - xOff, 21 - yOff, 15, 47, 1000, false, null);
fluidStacks.set(ingredients);
IGuiIngredientGroup<EnergyIngredient> group = recipeLayout.getIngredientsGroup(EnergyIngredient.class);
group.init(2, false, EnergyIngredientRenderer.INSTANCE, 37 - xOff, 9 - yOff, 40, 10, 0, 0);
group.init(3, false, EnergyIngredientRenderer.INSTANCE, 54 + 47 - xOff, 9 - yOff, 40, 10, 0, 0);
group.set(ingredients);
}
Aggregations