Search in sources :

Example 6 with ResultStack

use of crazypants.enderio.base.recipe.IMachineRecipe.ResultStack in project EnderIO by SleepyTrousers.

the class ContainerEnchanter method updateOutput.

private void updateOutput() {
    EnchanterRecipe currentEnchantmentRecipe = getInv().getCurrentEnchantmentRecipe();
    if (currentEnchantmentRecipe != null) {
        ResultStack[] completedResult = currentEnchantmentRecipe.getCompletedResult(0, 1F, getInv().getInvAsMachineRecipeInput());
        getInv().setOutput(completedResult[0].item);
    } else {
        getInv().setOutput(Prep.getEmpty());
    }
}
Also used : EnchanterRecipe(crazypants.enderio.base.recipe.enchanter.EnchanterRecipe) ResultStack(crazypants.enderio.base.recipe.IMachineRecipe.ResultStack)

Aggregations

ResultStack (crazypants.enderio.base.recipe.IMachineRecipe.ResultStack)6 ItemStack (net.minecraft.item.ItemStack)4 ArrayList (java.util.ArrayList)3 Nonnull (javax.annotation.Nonnull)2 NNList (com.enderio.core.common.util.NNList)1 EnergyIngredient (crazypants.enderio.base.integration.jei.energy.EnergyIngredient)1 IPoweredTask (crazypants.enderio.base.machine.interfaces.IPoweredTask)1 IMachineRecipe (crazypants.enderio.base.recipe.IMachineRecipe)1 EnchanterRecipe (crazypants.enderio.base.recipe.enchanter.EnchanterRecipe)1 AbstractPainterTemplate (crazypants.enderio.base.recipe.painter.AbstractPainterTemplate)1 Random (java.util.Random)1 IGuiItemStackGroup (mezz.jei.api.gui.IGuiItemStackGroup)1 IBlockState (net.minecraft.block.state.IBlockState)1