PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Move player trades out of config folder

Darkere opened this issue ยท 5 comments

commented

Please move the player trades out of the config folder :)

They clearly belong to a world.

(A server owner who just had to grab the trades file from a random gist he made xD)

commented

No one is saying you need to convert the file to nbt.

Even if.. nbt explorer is a thing

commented

Yeah, I'd only considered NBT since that's what WorldSavedData is expecting. However... I probably won't move to NBT, since (1) makes it harder to inspect, and (2) Amadron offers are currently very easily serialized to JSON, but there's no code to serialize to NBT. So maybe I'll just save it to a JSON file in <world>/pneumaticcraft/AmadronPlayerOffers.json

commented

You're right, although this has been around since 1.7.10 days, so it's interesting you're the first person to spot it :) I guess player-player trading is not a heavily used feature.

Anyway, this should be pretty easy to convert to world saved data (although that would lose the advantage of easy inspection of the saved player trades...)

commented

Build 82 from https://jenkins.k-4u.nl/job/PneumaticCraft-Repressurized-1.15/ implements this, would appreciate if you could do a little testing before this goes to release. I've tested on both single-player and dedicated server and all seems to work well...

Player trades are now saved in <gamedir>/world/pneumaticcraft/AmadronPlayerOffers.cfg for dedicated server, and in <gamedir>/saves/<world-name>/pneumaticcraft/AmadronPlayerOffers.cfg for single-player. Existing saved trades will be auto-migrated out of config/pneumaticcraft (you'll see a log message to that effect) but taking a copy before you test is not a bad idea, just in case...

commented

Fixed in 2.4.5 release