Improve Pattern Errors - #5285
Open
ghzdude wants to merge 7 commits into
Open
Conversation
rename func3 to constructor append child widget with type
screret
suggested changes
Aug 13, 2026
Contributor
There was a problem hiding this comment.
Make this return Component or add a 2nd method that does so every use of it doesnt have to be wrapped in Component.translatable and subclasses can add arguments to the translation if they need to
Contributor
There was a problem hiding this comment.
Or if not that, rename it to langKey as it shouldn't return the translated value which imo lang implies it does
Contributor
There was a problem hiding this comment.
IMO literal strings shouldn't have util methods to dissuade people from using them
Contributor
There was a problem hiding this comment.
Rename this argument to key
replace stringify method with setter and field javadocs rename lang -> langKey lang method now returns a Component rename s parameter to langKey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
As I was working on #5131, I had some gripes with how PatternError was handled
Improves PatternError along with the extending classes.
Implementation Details
PatternError constructors have been simplified to only a BlockPos or no-args. block pos is also nonnull
CoilMatchingError and FilterMatchingError extened a new class MismatchError along with codec helper method
renamed
component()toof()in PatternStringErrorPlaceholderError is now just a singleton
add constructor to PartAbilityError to simplify codec
make all codecs final
AI Usage
Outcome
better DX when extending PatternError
How Was This Tested
ran client and looked at some errors, seems fine