Config Datapack
🎯 Main Features
This mod provides a convenient configuration system for Minecraft datapacks. Create interactive configuration panels that allow players to change parameters directly in the game without needing to edit files.
🛠️ How to Use
Access to settings can be obtained through the pause menu in the Config or Custom Options/Config sections. However, the recommended method is using the /trigger config command, which displays only those settings that have been changed by the player.
The system works through special function tags and dialog windows. Here's an implementation example:
Configuration Example
data/config/tags/function/show.json
{"values":["example:setup_config"]}
data/example/function/setup_config.mcfunction
data modify storage config:list configs append value <config screen>
execute store result storage config:list configs[-1].inputs[0].initial int 1 run scoreboard players get @s exampleValue
data/config/tags/dialog/list.json
{"values":["example:config"]}
data/example/dialog/config.json
{
"type": "minecraft:multi_action",
"title": "Example Config",
"inputs": [
{
"type": "minecraft:number_range",
"key": "int",
"label": "Int",
"start": 0,
"end": 100,
"step": 1,
"initial": 10
},
{
"type": "minecraft:number_range",
"key": "float",
"label": "Float",
"start": 0,
"end": 100,
"step": 0.1,
"initial": 40
},
{
"type": "minecraft:single_option",
"key": "enum",
"label": "Enum",
"options": [
"first",
"second",
"third"
]
}
],
"columns": 1,
"actions": [
{
"label": "Save",
"action": {
"type": "dynamic/run_command",
"template": "function example:config {int:$(int),float:$(float),enum:\"$(enum)\"}"
}
}
]
}
📄 License
Versions prior to 1.2 are distributed under the ARR license. All subsequent versions are released under the GNU GPL v3 license.