diff --git a/src/main/java/com/klikli_dev/occultism/crafting/recipe/RitualRecipe.java b/src/main/java/com/klikli_dev/occultism/crafting/recipe/RitualRecipe.java index 13d4755d2..13b41a394 100644 --- a/src/main/java/com/klikli_dev/occultism/crafting/recipe/RitualRecipe.java +++ b/src/main/java/com/klikli_dev/occultism/crafting/recipe/RitualRecipe.java @@ -71,7 +71,7 @@ public class RitualRecipe implements Recipe { Ingredient.CODEC.optionalFieldOf("item_to_use").forGetter(r -> Optional.ofNullable(r.itemToUse)), Codec.STRING.optionalFieldOf("command").forGetter(r -> Optional.ofNullable(r.command)) ).apply(instance, (pentacleId, ritualType, ritualDummy, result, entityToSummon, entityNbt, activationItem, ingredients, duration, spiritMaxAge, spiritJobType, entityToSacrifice, itemToUse, command) -> new RitualRecipe(pentacleId, ritualType, ritualDummy, result, entityToSummon.orElse(null), entityNbt.orElse(null), activationItem, - NonNullList.copyOf(ingredients), duration, spiritMaxAge, spiritJobType.orElse(null), entityToSacrifice.orElse(null), itemToUse.orElse(null), command.orElse(null))) + NonNullList.copyOf(ingredients), duration, spiritMaxAge, spiritJobType.orElse(null), entityToSacrifice.orElse(null), itemToUse.orElse(Ingredient.EMPTY), command.orElse(null))) ); public static Serializer SERIALIZER = new Serializer(); final ItemStack result; @@ -224,7 +224,7 @@ public Ritual getRitual() { } public String getEntityToSacrificeDisplayName() { - return this.entityToSacrifice.displayName(); + return this.entityToSacrifice != null ? this.entityToSacrifice.displayName() : ""; } public ResourceLocation getSpiritJobType() {