Lightman's Currency

Lightman's Currency

331k Downloads

Upgrading from 1.17.1 to 1.18.1 resets everything

Dyljyn opened this issue ยท 8 comments

commented

So I spent today upgrading my server from version 1.17.1 to 1.18.1. After the upgrade, all vending machines were reset:

  • Trading items were empty
  • Owner was unknown
  • Inventory empty

Is this considered a bug or intended behavior? I wish, it would have kept the data as we now will have to reconfigure and restock the vending machines.

commented

This is very much not an intended behaviour, however as well as I know my code, this should not be something that my mod could/would be causing, as the NBT (or "Tag" as they're called now as of 1.17+) data is saved & loaded in exactly the same format in both versions, so my best guess is this is some forge related issue. That said, I'll look into it, so I can look into what's causing it (whether some data gets carried over, while some doesn't, whether the block entity is still the correct block entity type, etc.)

commented

Yep. Copied my 1.17.1 test world into my 1.18.1 testing worlds folder, loaded it up in 1.18.1, and all of the traders were empty and un-owned.

commented

At least you can reproduce it. That's a plus. I'll leave you to it for now.
Keep me posted on what your plan is for this issue. I'll postpone my upgrade in case you are able to find a fix within a reasonable time.

commented

FYI, These were the mod's versions:

Previous version: lightmanscurrency-1.17.1-1.0.0.3.jar
Current version: lightmanscurrency-1.18-1.0.1.7.jar

commented

I've tested it and it does the same even with the latest versions, and I honestly have no idea why...

commented

One thing I'm also checking because honestly, I am a bit confused with my hosting service. It might be that I was still using 1.18 and not 1.18.1.

However, am I reading it correctly that you are seeing the same behavior even with 1.18.1?

commented

I'll be honest I have no clue why this is happening at this point, cause I set up some debug messages on the traders load function, but it appears that all of the NBT data from the old world is just straight up lost for no apparent reason... I don't know if vanilla minecraft's world conversion process is hard-coded to exclude non-vanilla data when changing the chunk data to match the new world height limits or what, but I don't think there's anything I can really do to help with this sadly.

Edit: If you can I'd just recommend moving all of each traders storage, stored coins, and the traders themselves into a chest back in the 1.17 world, and then convert the world to 1.18 and re-place the traders and restore their contents from the chests. If this is a public server, this might not be 100% viable, since you won't know the location of all of the traders, but this is the only way I can think of to properly copy their contents over sadly...

commented

Thank you for trying to figure it out. You may close this issue.

Also, my compliments on your work on the mod.