mschae23 / grind-enchantments

Put enchantments back on a book using a grindstone.
https://legacy.curseforge.com/minecraft/mc-mods/grind-enchantments
GNU Lesser General Public License v3.0
12 stars 13 forks source link

Config error missing consume_enchanted_item #15

Closed PuppetMasterZee closed 2 years ago

PuppetMasterZee commented 2 years ago

Console error: [11:11:13] [Render thread/ERROR]: [Grind Enchantments] Error decoding config: No key consume_enchanted_item in MapLike[{"enabled":true,"cost_config":{"count_mode":"count_levels","cost_factor":1.0,"cost_offset":0.0}}]

mschae23 commented 2 years ago

Does it crash, or does it still use the default config in this case?

mschae23 commented 2 years ago

To fix this issue, you'll have to edit the config (in .minecraft/config/grindenchantments.json) and add a consume_enchanted_item field to the disenchant object (with false as the value).

Or, if you haven't edited the config previously, you can also just delete that file. The mod should just regenerate it then.

PuppetMasterZee commented 2 years ago

Does it crash, or does it still use the default config in this case?

It does not crash. No, we haven't edited it. Let me try re-generating the config.

PuppetMasterZee commented 2 years ago

To fix this issue, you'll have to edit the config (in .minecraft/config/grindenchantments.json) and add a consume_enchanted_item field to the disenchant object (with false as the value).

Or, if you haven't edited the config previously, you can also just delete that file. The mod should just regenerate it then.

That has produced: [11:18:26] [Render thread/INFO]: [Grind Enchantments] Writing default config.

mschae23 commented 2 years ago

That has produced: [11:18:26] [Render thread/INFO]: [Grind Enchantments] Writing default config.

That means it writes back the default config to the file.

For why this is happening in the first place, it's because you had the mod in version 1.3 before (which introduced the config). In version 1.4, I added another option to it. So the mod was expecting that new field, which wasn't there because it was generated in the old version.

That also means that this error will re-appear every time a new config option is added.

PuppetMasterZee commented 2 years ago

That has produced: [11:18:26] [Render thread/INFO]: [Grind Enchantments] Writing default config.

That means it writes back the default config to the file.

For why this is happening in the first place, it's because you had the mod in version 1.3 before (which introduced the config). In version 1.4, I added another option to it. So the mod was expecting that new field, which wasn't there because it was generated in the old version.

That also means that this error will re-appear every time a new config option is added.

Thank you, you have been very helpful. Greatly appreciated.