Runelic

Runelic

21M Downloads

[BUG] Runelic saves invalid configuration file

dninemfive opened this issue ยท 4 comments

commented

Minecraft Version

1.21.1

Mod Version

21.1.3

Mod Loader

NeoForge

What environment are you running the mod in?

Client

Issue Description

When deserializing the config file, Runelic expects the banner_stencil_trade.currency_item.value field to be in the format namespace:item (e.g. minecraft:emerald), but on serialization the config file saves this field as an object with format {namespace:"namespace",path:"path"} (e.g. {namespace:"minecraft",path:"emerald"}).

This causes a crash when attempting to create a new world. Not sure if it causes issues when loading existing worlds as Minecraft alerts the user of a datapack error.

i'm not sure why this started happening, but i have confirmed that the pack works with only Runelic disabled, and the error message explicitly describes this error as being the cause. It was fixed by restoring the config file to a state luckily preserved in my config folder as runelic.json.15c7e547132f4.bak - not sure what mod causes config changes to be backed up like that, but it might help.

Here's a crash report. The procedure for getting this was to boot the game and attempt to create a new world. Often, this hangs on a "Saving world..." message rather than directly crashing.

i'll try to replicate the issue with only Runelic and its dependencies loaded and report back on the results.

commented

i don't seem to be getting the same issue with the mod on its own, so it might be a conflict with one of the several configuration mods in the pack this bug was identified on. i'll update here if i find any more information.

commented

Thanks for the bug report, this error is really odd. I am using the Prickle library for config files which uses Mojang Codec's under the hood. This is the same system that Mojang uses for datapack files. The vanilla code will never split the ID into namespace and path like you are experiencing, so one of the mods you have installed is messing with it.

commented

Thanks for the response! It is definitely strange, i wasn't able to replicate it again until this morning when i removed a datapack and it came up again. If you're confident it's not related to this mod feel free to close the issue.

commented

For the record, i am now fairly sure this is an issue with Greenhouse Config, from other mods, which is a bit hard to track down because it seems to usually be used as an embedded rather than external dependency. Not sure why it only breaks Runelic configs, though.