mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +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) {
|
return switch (key) {
|
||||||
case "input" -> PatchouliCompat.ingredientVariable(this.recipe.input);
|
case "input" -> PatchouliCompat.ingredientVariable(this.recipe.input);
|
||||||
case "output" -> IVariable.from(this.recipe.output);
|
case "output" -> IVariable.from(this.recipe.output);
|
||||||
case "catalyst" ->
|
case "catalyst" -> this.recipe.catalyst != Ingredient.EMPTY ? PatchouliCompat.ingredientVariable(this.recipe.catalyst) : null;
|
||||||
this.recipe.catalyst != Ingredient.EMPTY ? PatchouliCompat.ingredientVariable(this.recipe.catalyst) : null;
|
|
||||||
case "name" -> IVariable.wrap(this.recipe.output.getHoverName().getString());
|
case "name" -> IVariable.wrap(this.recipe.output.getHoverName().getString());
|
||||||
default -> null;
|
default -> null;
|
||||||
};
|
};
|
||||||
|
@ -32,6 +31,7 @@ public class ProcessorAltar implements IComponentProcessor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean allowRender(String group) {
|
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