Skip to content

Fix RecordCodecs not maintaining field order #102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

senseiwells
Copy link

This PR fixes the issue outlined in #101.

The issue is caused by com.mojang.serialization.codecs.RecordCodecBuilder$Instance, specifically the MapEncoders provided by the overiden methods lift1, ap2, ap3, ap4, the order of operations is incorrect which results in the fields of record codecs being incorrectly ordered.

This is only true for the encoders, the decoding is done in the correct order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants