use of com.witchworks.api.recipe.KettleItemRecipe in project Witchworks by Um-Mitternacht.
the class TileKettle method itemRitualLogic.
@SuppressWarnings("unchecked")
public void itemRitualLogic() {
Optional<KettleItemRecipe> optional = KettleRegistry.getKettleItemRituals().stream().filter(i -> i.matches(ingredients)).findAny();
if (optional.isPresent()) {
KettleItemRecipe recipe = optional.get();
setRitual(new RitualHolder<>(recipe.getRitual()));
if (ritual.canPerform(this, world, getPos())) {
setMode(Mode.RITUAL);
markDirty();
} else {
failHorribly();
}
}
}
use of com.witchworks.api.recipe.KettleItemRecipe in project Witchworks by Um-Mitternacht.
the class KettleRegistry method registerKettleItemRitual.
public static KettleItemRecipe registerKettleItemRitual(ItemRitual ritual, Object... objects) {
final KettleItemRecipe recipe = new KettleItemRecipe(ritual, objects);
KETTLE_ITEM_RITUALS.add(recipe);
if (!RITUALS.contains(ritual))
RITUALS.add(ritual);
return recipe;
}
Aggregations