From mschae’s docs
Begin documenting config options
Server: Add basic structure for server config
Line 95: Line 95:


<div class="treeview">
<div class="treeview">
* {{Json|object}}: Server config.
* {{Json|object}}: server config.
** {{Json|object|disenchant_to_book}}: Configuration for the “disenchant to book” feature.
** {{Json|object|disenchant_to_book}}: configuration for the “disenchant to book” feature.
*** {{Json|boolean|enabled}}: whether to enable the feature (default: <code>true</code>).
*** {{Json|boolean|enabled}}: whether to enable the feature (default: <code>true</code>).
*** ...
*** {{Json|boolean|consume_enchanted_item}}: if enabled, the original item will be consumed when disenchanting; only the enchantments themselves can be obtained (default: <code>false</code>).
** {{Json|object|move_enchantments}}: Configuration for the “move enchantments between books” feature.
*** {{Json|object|cost_function}}: function for calculating the level cost of disenchanting.
**** ...
** {{Json|object|move_enchantments}}: configuration for the “move enchantments between books” feature.
*** {{Json|boolean|enabled}}: whether to enable the feature (default: <code>true</code>).
*** {{Json|boolean|enabled}}: whether to enable the feature (default: <code>true</code>).
*** {{Json|object|cost_function}}: function for calculating the level cost of moving enchantments.
**** ...
** {{Json|object|reset_repair_cost}}: configuration for the “reset repair cost” feature.
*** {{Json|boolean|enabled}}: whether to enable the feature (default: <code>false</code>).
*** {{Json|object|cost_function}}: function for calculating the level cost of resetting a repair cost.
**** ...
** {{Json|object|filter}}: filters for all enchantment movements.
*** ...
*** ...
** ...
** {{Json|int|version}}: config version (defaults to <code>4</code>).
** {{Json|int|version}}: Config version (defaults to <code>4</code>).
</div>
</div>

Revision as of 14:45, 13 October 2025

The configuration files of Grind enchantments can be found in the .minecraft/config/grindenchantments directory. If you don't know how to find this, see the .minecraft page on the Minecraft wiki. If the files don't exist, the mod will create them automatically. There should be two files here: server.json and client.json.

Defaults

The default values in the server config:

{
  "disenchant_to_book": {
    "enabled": true,
    "consume_enchanted_item": false,
    "cost_function": {
      "function": {
        "function": {
          "type": "grindenchantments:count_min_power"
        },
        "factor": 0.3,
        "offset": 8.0,
        "type": "grindenchantments:transform"
      },
      "type": "grindenchantments:filter"
    }
  },
  "move_enchantments": {
    "enabled": true,
    "cost_function": {
      "function": {
        "function": {
          "function": {
            "normal_factor": 3.0,
            "treasure_factor": 8.0,
            "type": "grindenchantments:count_levels"
          },
          "factor": 0.5,
          "offset": 0.5,
          "type": "grindenchantments:transform"
        },
        "type": "grindenchantments:first_enchantment"
      },
      "type": "grindenchantments:filter"
    }
  },
  "reset_repair_cost": {
    "enabled": false,
    "catalyst_items": "minecraft:diamond",
    "requires_enchantment": true,
    "cost_function": {
      "function": {
        "function": {
          "normal_factor": 1.0,
          "treasure_factor": 4.0,
          "type": "grindenchantments:count_levels"
        },
        "type": "grindenchantments:average_count"
      },
      "factor": 1.5,
      "offset": 4.0,
      "type": "grindenchantments:transform"
    }
  },
  "filter": {
    "enabled": true,
    "item": {
      "enchantments": [],
      "action": "deny"
    },
    "enchantment": {
      "enchantments": [],
      "action": "ignore"
    },
    "cursed_enchantments": "ignore"
  },
  "dedicated_server_options": {
    "alternative_cost_display_enabled": false
  },
  "version": 4
}

The default values in the client config:

{
  "show_enchantment_cost": true,
  "sync_options": {
    "use_local_server_config_if_unsynced": true,
    "log_received_config": false
  },
  "version": 4
}

Server

The server.json file contains the majority of the mod's configuration options, being used on the logical server. Most importantly, it is possible to disable certain features and change the disenchantment costs.

  • object: server config.
    • "disenchant_to_book" (object): configuration for the “disenchant to book” feature.
      • "enabled" (boolean): whether to enable the feature (default: true).
      • "consume_enchanted_item" (boolean): if enabled, the original item will be consumed when disenchanting; only the enchantments themselves can be obtained (default: false).
      • "cost_function" (object): function for calculating the level cost of disenchanting.
        • ...
    • "move_enchantments" (object): configuration for the “move enchantments between books” feature.
      • "enabled" (boolean): whether to enable the feature (default: true).
      • "cost_function" (object): function for calculating the level cost of moving enchantments.
        • ...
    • "reset_repair_cost" (object): configuration for the “reset repair cost” feature.
      • "enabled" (boolean): whether to enable the feature (default: false).
      • "cost_function" (object): function for calculating the level cost of resetting a repair cost.
        • ...
    • "filter" (object): filters for all enchantment movements.
      • ...
    • "version" (int): config version (defaults to 4).