Fix Converter compatibility for Property Expressions #5507
Merged
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.
Description
Currently, addons making use of PropertyExpression will error with a NoSuchMethodError, like this one:
This is because these classes were made to require usage of the new Converter class. Of course, we can easily rectify this issue by having the method make use of the old Converter class. This also makes SimplePropertyExpression and Getter implement/extend (respectively) the old Converter class. This should have a minimal impact internally while allowing these addons to function. Some syntax classes have been updated so that they are using lambdas (allowing this to easily work regardless of which Converter class is required).
Since old Converter extends new Converter, Getter and SimplePropertyExpression are still both new Converters as well (they are just also old ones again too).
Target Minecraft Versions: Any
Requirements: N/A
Related Issues: N/A (reported on Discord)