Search in sources :

Example 6 with BlockHPChoppingBase

use of se.gory_moon.horsepower.blocks.BlockHPChoppingBase in project HorsePower by GoryMoon.

the class ChoppingRecipe method getRecipeOutput.

@Nonnull
@Override
public ItemStack getRecipeOutput() {
    if (!outputBlocks.isEmpty() && !output.isEmpty()) {
        ItemStack stack = outputBlocks.get(0);
        BlockHPChoppingBase block = (BlockHPChoppingBase) Block.getBlockFromItem(output.getItem());
        int meta = stack.getMetadata();
        if (meta == OreDictionary.WILDCARD_VALUE)
            meta = 0;
        return createItemStack(block, Block.getBlockFromItem(stack.getItem()), meta);
    }
    return super.getRecipeOutput();
}
Also used : ItemStack(net.minecraft.item.ItemStack) BlockChopper.createItemStack(se.gory_moon.horsepower.blocks.BlockChopper.createItemStack) BlockHPChoppingBase(se.gory_moon.horsepower.blocks.BlockHPChoppingBase) Nonnull(javax.annotation.Nonnull)

Aggregations

ItemStack (net.minecraft.item.ItemStack)6 BlockHPChoppingBase (se.gory_moon.horsepower.blocks.BlockHPChoppingBase)6 ImmutableList (com.google.common.collect.ImmutableList)3 List (java.util.List)3 Nonnull (javax.annotation.Nonnull)3 IGuiItemStackGroup (mezz.jei.api.gui.IGuiItemStackGroup)3 IFocus (mezz.jei.api.recipe.IFocus)3 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)3 NonNullList (net.minecraft.util.NonNullList)2 BlockHPChoppingBase.createItemStack (se.gory_moon.horsepower.blocks.BlockHPChoppingBase.createItemStack)2 BlockChopper.createItemStack (se.gory_moon.horsepower.blocks.BlockChopper.createItemStack)1