Forge Config API Port

Forge Config API Port

30M Downloads

[Bug]: save() does not save the file

alejandrocoria opened this issue ยท 4 comments

commented

Mod Loader (Required)

Fabric

Minecraft Version(s) (Required)

1.21.1

Mod Version(s) (Required)

21.1.1

Minimal Setup (Required)

Yes

Notes (Required)

MapFrontiers developer here.
In both Fabric and NeoForge I can't save Forge configs in these latest versions. It gets to this line and the if is false so it does nothing.

The log is not helpful, you can see the repository here, ask whatever you want.

latest.log (Required)

https://gist.github.com/alejandrocoria/6e66c35be8bf6abfa62dec53933a9baf

commented

Forge config on Fabric and NeoForge both internally use the NeoForge config system as that system is a lot more stable (mainly regarding concurrency related issues such as read-write conflicts leading to blank or corrupted files, or even crashes).

Unfortunately it's not very straight forward to adapt one system to the other. I'll try to implement an additional internal wrapper class extending FileConfig, so ForgeConfigSpec will properly save the config.
But in the long run I highly recommend ditching ForgeConfigSpec in favor of ModConfigSpec.

commented

I just pushed v21.1.2 to the Maven, does it fix the issue for you?
Please provide some feedback, until that I'll hold off on publishing a new release to CF & Modrinth.

commented

It worked, good job!
I will keep your recommendation in mind.
Thank you very much!

commented

Great, v21.1.2 is out on CF & Modrinth now.