Skip to content

Commit

Permalink
Fix crash for illegal item tag chars in recipe in LP
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Apr 8, 2024
1 parent d5eeff5 commit c9ec5d0
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,16 @@ public Component validate() {
} catch (NumberFormatException e) {
return new TranslatableComponent(L10NValues.VALUETYPE_ERROR_INVALIDINPUT, outputEnergy);
}
// Validate input item tag strings if they are defined
for (ItemMatchProperties inputStack : inputStacks) {
if (inputStack.getItemTag() != null) {
try {
new ResourceLocation(inputStack.getItemTag());
} catch (ResourceLocationException e) {
return new TranslatableComponent(L10NValues.VALUETYPE_ERROR_INVALIDINPUT, inputStack.getItemTag());
}
}
}
return null;
}

Expand Down

0 comments on commit c9ec5d0

Please sign in to comment.