SamB440/Tale-of-Kingdoms

[Coins] Not properly saving, set to 0 on client restart.

Closed this issue · 1 comments

Summary

When you sell items to get coins, the coins will stay known so long as the client does not close, i.e you can save and exit the world, re-enter and the coins will still be there, but when closing, they don't get saved or not saved properly and get set back to 0.

Steps to reproduce

  1. Sell an item, confirm you have more than 0 coins.
  2. Save and exit
  3. Re-enter
  4. You should still have more than 0 coins
  5. Exit the client
  6. Re-open the client
  7. Open the world
  8. You should now have 0 coins

Expected behaviour

The coins should save for each world and be retrieved on load so that the client can restart and the end-user does not lose their coins.

Mod list

Tale of Kingdoms: A new Conquest v1.0.4

Possible fixes

No response

Relevent logs and/or screenshots/videos

No response

Other

No response

This issue was caused due to the development environment for Fabric, by default grabbing a random username each client startup, which results in a new uuid for the user and the coins are understandably linked by uuid so this is invalid, but this is a good thing to document for the future (if this occurs again).