mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
fixed the book breaking when an invalid altar recipe is found
closes #339
This commit is contained in:
parent
244ee2486e
commit
7b17349917
1 changed files with 3 additions and 3 deletions
|
@ -23,8 +23,7 @@ public class ProcessorAltar implements IComponentProcessor {
|
|||
return switch (key) {
|
||||
case "input" -> PatchouliCompat.ingredientVariable(this.recipe.input);
|
||||
case "output" -> IVariable.from(this.recipe.output);
|
||||
case "catalyst" ->
|
||||
this.recipe.catalyst != Ingredient.EMPTY ? PatchouliCompat.ingredientVariable(this.recipe.catalyst) : null;
|
||||
case "catalyst" -> this.recipe.catalyst != Ingredient.EMPTY ? PatchouliCompat.ingredientVariable(this.recipe.catalyst) : null;
|
||||
case "name" -> IVariable.wrap(this.recipe.output.getHoverName().getString());
|
||||
default -> null;
|
||||
};
|
||||
|
@ -32,6 +31,7 @@ public class ProcessorAltar implements IComponentProcessor {
|
|||
|
||||
@Override
|
||||
public boolean allowRender(String group) {
|
||||
return group.isEmpty() || group.equals(this.recipe.catalyst == Ingredient.EMPTY ? "altar" : "catalyst");
|
||||
return group.isEmpty() || this.recipe != null && group.equals(this.recipe.catalyst == Ingredient.EMPTY ? "altar" : "catalyst");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue