Clean up adjacency condition serialization#4260
Merged
jurrejelle merged 11 commits intoGregTechCEu:1.20.1from Jan 20, 2026
Merged
Clean up adjacency condition serialization#4260jurrejelle merged 11 commits intoGregTechCEu:1.20.1from
jurrejelle merged 11 commits intoGregTechCEu:1.20.1from
Conversation
…ed as a string blob "reverts" GregTechCEu#3833 and GregTechCEu#3830
jurrejelle
requested changes
Dec 3, 2025
Contributor
jurrejelle
left a comment
There was a problem hiding this comment.
Needs docs for the v7.5.0 change on what addon/packdevs have to change in their custom recipe conditions to make it happy with the generics, apart from that lgtm
src/test/java/com/gregtechceu/gtceu/api/recipe/GTRecipeSerializerTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jurre Groenendijk <jurre@jilles.com>
Contributor
Author
|
well, technically they can just ignore the generics and it will work; it'll just have a few warnings but AFAIK it shouldn't fail to compile. |
Contributor
ALright, then could you update the Custom Recipe Condition page to at least have the right generics? |
…'t have any fields of their own
jurrejelle
requested changes
Jan 20, 2026
jurrejelle
approved these changes
Jan 20, 2026
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
Proper fix for #3816.
Implementation Details
The fluid & block adjacency conditions now once again serialize to a list of holders rather than a string, implemented via a codec that parses the input data lazily (so tags will exists when the condition needs to be parsed).
I also added a generic type to
RecipeConditionso the actual type be specified in a better way on methods likecreateTemplate.Outcome
no error when joining a server and no odd serialized data format
Potential Compatibility Issues
If anyone has custom condition types (someone probably does?), they'll need to add the generic argument to their class and swap some method return types to the condition's actual type