Search in sources :

Example 1 with IngredientBloodOrb

use of WayofTime.bloodmagic.core.recipe.IngredientBloodOrb in project BloodMagic by WayofTime.

the class BloodMagicRecipeRegistrar method addTartaricForge.

public void addTartaricForge(@Nonnull ItemStack output, @Nonnegative double minimumSouls, @Nonnegative double soulDrain, @Nonnull Object... input) {
    Preconditions.checkNotNull(output, "output cannot be null.");
    Preconditions.checkArgument(minimumSouls >= 0, "minimumSouls cannot be negative.");
    Preconditions.checkArgument(soulDrain >= 0, "soulDrain cannot be negative.");
    Preconditions.checkNotNull(input, "input cannot be null.");
    List<Ingredient> ingredients = Lists.newArrayList();
    for (Object object : input) {
        if (object instanceof ItemStack && ((ItemStack) object).getItem() instanceof IBloodOrb) {
            ingredients.add(new IngredientBloodOrb(((IBloodOrb) ((ItemStack) object).getItem()).getOrb((ItemStack) object)));
            continue;
        }
        ingredients.add(CraftingHelper.getIngredient(object));
    }
    addTartaricForge(output, minimumSouls, soulDrain, ingredients.toArray(new Ingredient[0]));
}
Also used : IngredientBloodOrb(WayofTime.bloodmagic.core.recipe.IngredientBloodOrb) Ingredient(net.minecraft.item.crafting.Ingredient) IBloodOrb(WayofTime.bloodmagic.orb.IBloodOrb) ItemStack(net.minecraft.item.ItemStack)

Example 2 with IngredientBloodOrb

use of WayofTime.bloodmagic.core.recipe.IngredientBloodOrb in project BloodMagic by WayofTime.

the class BloodMagicRecipeRegistrar method addAlchemyTable.

public void addAlchemyTable(@Nonnull ItemStack output, @Nonnegative int syphon, @Nonnegative int ticks, @Nonnegative int minimumTier, @Nonnull Object... input) {
    Preconditions.checkNotNull(output, "output cannot be null.");
    Preconditions.checkArgument(syphon >= 0, "syphon cannot be negative.");
    Preconditions.checkArgument(ticks >= 0, "ticks cannot be negative.");
    Preconditions.checkArgument(minimumTier >= 0, "minimumTier cannot be negative.");
    Preconditions.checkNotNull(input, "input cannot be null.");
    List<Ingredient> ingredients = Lists.newArrayList();
    for (Object object : input) {
        if (object instanceof ItemStack && ((ItemStack) object).getItem() instanceof IBloodOrb) {
            ingredients.add(new IngredientBloodOrb(((IBloodOrb) ((ItemStack) object).getItem()).getOrb((ItemStack) object)));
            continue;
        }
        ingredients.add(CraftingHelper.getIngredient(object));
    }
    addAlchemyTable(output, syphon, ticks, minimumTier, ingredients.toArray(new Ingredient[0]));
}
Also used : IngredientBloodOrb(WayofTime.bloodmagic.core.recipe.IngredientBloodOrb) Ingredient(net.minecraft.item.crafting.Ingredient) IBloodOrb(WayofTime.bloodmagic.orb.IBloodOrb) ItemStack(net.minecraft.item.ItemStack)

Aggregations

IngredientBloodOrb (WayofTime.bloodmagic.core.recipe.IngredientBloodOrb)2 IBloodOrb (WayofTime.bloodmagic.orb.IBloodOrb)2 ItemStack (net.minecraft.item.ItemStack)2 Ingredient (net.minecraft.item.crafting.Ingredient)2