use of com.witchworks.api.recipe.KettleBrewRecipe in project Witchworks by Um-Mitternacht.
the class KettleRegistry method registerKettleBrewRecipe.
public static KettleBrewRecipe registerKettleBrewRecipe(ItemStack stack, Object... objects) {
final KettleBrewRecipe recipe = new KettleBrewRecipe(stack, objects);
KETTLE_BREW_RECIPES.add(recipe);
return recipe;
}
use of com.witchworks.api.recipe.KettleBrewRecipe in project Witchworks by Um-Mitternacht.
the class TileKettle method potionRecipeLogic.
public void potionRecipeLogic(EntityPlayer player, EnumHand hand, ItemStack stack) {
List<KettleBrewRecipe> potions = KettleRegistry.getKettleBrewRecipes();
Optional<KettleBrewRecipe> optional = potions.stream().filter(recipe -> recipe.canTake(stack) && recipe.matches(ingredients)).findAny();
if (optional.isPresent()) {
ItemStack potion = optional.get().getResult();
potion.setCount(1 + getBrewMultiplier(player));
giveItem(player, hand, stack, potion);
inv.setFluid(null);
onLiquidChange();
}
}
Aggregations