Skip to content

Conversation

@Zorbatron
Copy link
Member

@Zorbatron Zorbatron commented May 9, 2025

What

Fixes the saving and loading of the stored player UUID to track a machine's owner.
The problem was that when setting the UUID it used setUniqueId("key", uuid) which sets "(key)Most" and "(key)Least" to store the two longs that make up the UUID, but when checking if the NBT tag had a stored UUID, it only checked if it had a tag with the key "key", which it never would.

Implementation Details

Saves the owner to a compound tag "Owner" and check/get that instead.

Outcome

Machines don't lose their owner on world reloads.

Potential Compatibility Issues

N/A

@Zorbatron Zorbatron requested a review from a team as a code owner May 9, 2025 16:26
@Zorbatron Zorbatron added the type: bug Something isn't working label May 9, 2025
@Zorbatron Zorbatron merged commit 07dfb7a into master May 10, 2025
3 of 4 checks passed
@Zorbatron Zorbatron deleted the zb/fix-mte-owner branch May 10, 2025 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants