Search in sources :

Example 1 with SimplePotRecipe

use of net.dries007.tfc.common.recipes.SimplePotRecipe in project TerraFirmaCraft by TerraFirmaCraft.

the class SimplePotRecipeCategory method setRecipe.

@Override
public void setRecipe(IRecipeLayoutBuilder builder, PotRecipe potRecipe, IFocusGroup focuses) {
    super.setRecipe(builder, potRecipe, focuses);
    SimplePotRecipe recipe = (SimplePotRecipe) potRecipe;
    FluidStack displayFluid = recipe.getDisplayFluid();
    if (!displayFluid.isEmpty()) {
        IRecipeSlotBuilder fluidOutput = builder.addSlot(RecipeIngredientRole.OUTPUT, 132, 26);
        fluidOutput.addIngredient(VanillaTypes.FLUID, displayFluid);
        fluidOutput.setFluidRenderer(1, false, 16, 16);
        fluidOutput.setSlotName("fluidOutput");
    }
    List<ItemStack> outputStacks = recipe.getOutputStacks();
    if (!outputStacks.isEmpty()) {
        // todo:  temporarily just adding the first output so JEI picks up the output stuff, we need to show up to all 5
        IRecipeSlotBuilder itemOutput = builder.addSlot(RecipeIngredientRole.OUTPUT, 132, 6);
        itemOutput.addItemStack(outputStacks.get(0));
        itemOutput.setSlotName("output1");
    }
}
Also used : SimplePotRecipe(net.dries007.tfc.common.recipes.SimplePotRecipe) FluidStack(net.minecraftforge.fluids.FluidStack) IRecipeSlotBuilder(mezz.jei.api.gui.builder.IRecipeSlotBuilder) ItemStack(net.minecraft.world.item.ItemStack)

Aggregations

IRecipeSlotBuilder (mezz.jei.api.gui.builder.IRecipeSlotBuilder)1 SimplePotRecipe (net.dries007.tfc.common.recipes.SimplePotRecipe)1 ItemStack (net.minecraft.world.item.ItemStack)1 FluidStack (net.minecraftforge.fluids.FluidStack)1