Skip to content
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

Workaround for UUIDs in item nbt tags #28

Closed
wants to merge 1 commit into from

Conversation

Globbi
Copy link

@Globbi Globbi commented Jun 25, 2023

This fixes an issue with int array representation of UUIDs in nbt tags for items.

Minecraft does not used the standard array format for UUIDs but presumably expects a marker at the beginning.

UUID:[11,22,33,44] // not recognized by Minecraft
UUID:[I;11,22,33,44] // this however is

To solve this issue a little post processing step has been introduced which inserts the expected I; for every UUID in int array representation.

@Stevertus
Copy link
Owner

Does this only apply to items? I guess this would also be relevant to other places where nbt is used.
I guess a UUID class would be a bit cleaner, with the library of @MinimineLP, we could write a custom converter:
https://github.com/MinimineLP/dart-gson/blob/master/lib/values.dart#L5

@Globbi
Copy link
Author

Globbi commented Jun 27, 2023

I'll take a look at those converters. a UUID class would definitely be cleaner than a post processor!

@Globbi
Copy link
Author

Globbi commented Jun 28, 2023

solved with 3da5882

@Globbi Globbi closed this Jun 28, 2023
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