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]));
}
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]));
}
Aggregations