![Pufferfish's Skills [Fabric & Forge & NeoForge]](https://media.forgecdn.net/avatars/thumbnails/786/631/256/256/638138098303113835.png)
Incompatible with Preferred Gamerules
XEpicLi opened this issue ยท 2 comments
Preferred Gamerules is a mod, which you can use it to customize the default gamerule value.
Yesterday I found that changing the gamerule "gamerule.puffish_skills:announceNewPoints" in this mod to "false" won't be saved. If you change it to false in game, it will work, but once you exit and restart Minecraft, you find the value in the config screen (in game) is still "true" by default.
Then I checked the config file of preferred gamerule, I found that the preferred gamerule value is saved for sure, but for some reason it cannot be read by the mod.
I created an issue about it and the author of preferred gamerules mod told me that this is due to pufferfish mod. So I turn to here for help.
What the preferred gamerules author said is:
Upon starting Minecraft, PrefRules works by modifying new gamerules as soon as they are registered. However Pufferfish circumvents the usual registration methods and directly writes to the rule-type map, so PrefRule does not catch those rules.
What Pufferfish should do is replace their @Accessor
to Gamerules::RULE_TYPES
with an @Invoker
for Gamerules::Register
.
Mod version of both yours and preferred gamerules is 1.21.7 fabric, pufferfish skills 0.16.5, preferred gamerules v1.2.0+1.21.3.
You can see the discussion between the author and me in Estecka/mc-Preferred-Gamerules#6
Thanks for reporting and providing detailed information about the issue and proposed solution. ๐ I will implement and release a fix for this incompatibility within a few days.