Armor Points ++

Armor Points ++

4M Downloads

[Bug]: Config values reset

noawx opened this issue ยท 6 comments

commented

Is there an existing issue for this?

  • I have searched the existing issues

Are you using the latest version currently available?

  • I am using the latest version currently available

Description

The "Protection Representation" config value keeps resetting to 0.0 every time I leave a server.

Version

3.1.x for Minecraft Fabric 1.20+

Version

No response

To Reproduce

  1. Set the "Protection Representation" config to any value other than 0.0
  2. Restart Minecraft
  3. The value is reset to 0.0

Expexted Behavior

The config value keeps itself after leaving a server / restarting the game.

Additional Context

This bug occurs when changing the config via Mod Menu / armorpointspp.json5

Screenshots

No response

Relevant Log / Crash-Report Output

No response

commented

Found a fix, once you have all the settings in the config set to what you want, set the config file to read only.

commented

Found a fix, once you have all the settings in the config set to what you want, set the config file to read only.

this likely only prevents any changes from written to the file and does not stop the internal config state from being changed/reset/overridden

on another note, i have double-checked my code and am currently suspecting some bug in the config library i'm using - i have yet to find the time to investigate further

commented

The value seems to reset randomly too.

commented

It happened on value 0.625, but not on value 1.0

Might have something to do with decimals

commented

can't see what's causing this at a glance - if anything, it technically should fallback to the default value of 0.5 if anything goes wrong internally

will have to investigate

commented

Can confirm this happens to me. The representative value for protection I had set at 0.5, but it keeps resetting to 0.0 making it so I don't see it at all.