use of com.witchworks.api.ritual.RitualHolder 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();
}
}
}
Aggregations