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

[Bug] Changing config doesn't work #48

Closed Zano1999 closed 11 months ago

Zano1999 commented 11 months ago

This is the configuration where I tried to set the disenchantment cost based on the sum of the spell power (Efficiency III = 3 levels), it doesn't seem to work.

{ "allow_removing_curses": false, "dedicated_server_options": { "alternative_cost_display_enabled": false }, "client_options": { "show_enchantment_cost": true }, "disenchant_to_book": { "enabled": true, "consume_enchanted_item": false, "cost_function": { "function": { "type": "grindenchantments:count_levels" }, "factor": 1.0, "offset": 0.0, "type": "grindenchantments:transform" } }, "move_enchantments": { "enabled": true, "cost_function": { "function": { "function": { "normal_factor": 1.0, "treasure_factor": 2.0, "type": "grindenchantments:count_levels" }, "type": "grindenchantments:first_enchantment" }, "factor": 0.5, "offset": 0.5, "type": "grindenchantments:transform" } }, "version": 2 }

mschae23 commented 11 months ago

I believe there are two fields missing here:

"function": {
    "type": "grindenchantments:count_levels",
    "normal_factor": 1.0,
    "treasure_factor": 1.0 // You can use this as a cost multiplier for "treasure" enchantments like Mending
}
Zano1999 commented 11 months ago

Ok, but this doesn't solve the problem, I have problems not only with "treasure" enchantments but with any

mschae23 commented 11 months ago

These fields have to be there for the config to load correctly, though, even if you don't use them. I can't see any other problems, so if you have added them and it still doesn't work, try looking in the game's logs (.minecraft/logs/latest.log) for any errors mentioning the config.

Zano1999 commented 11 months ago

It seems like you were right, for some reason the generated configuration file is wrong, so as you noticed it requires manual editing to work, I'll insert the configuration below in case anyone needs it

Zano1999 commented 11 months ago

{ "allow_removing_curses": false, "dedicated_server_options": { "alternative_cost_display_enabled": true }, "client_options": { "show_enchantment_cost": true }, "disenchant_to_book": { "enabled": true, "consume_enchanted_item": false, "cost_function": { "function": { "normal_factor": 1.0, "treasure_factor": 1.0, "type": "grindenchantments:count_levels" }, "factor": 1.0, "offset": 0.0, "type": "grindenchantments:transform" } }, "move_enchantments": { "enabled": true, "cost_function": { "function": { "function": { "normal_factor": 1.0, "treasure_factor": 1.0, "type": "grindenchantments:count_levels" }, "type": "grindenchantments:first_enchantment" }, "factor": 1.0, "offset": 0.0, "type": "grindenchantments:transform" } }, "version": 2 }