← Назад к ресурсам

Data Config

A mod that gives Minecraft datapacks a visual graphical configuration interface. Datapack authors only need to write simple JSON configurations, and players can adjust datapack parameters directly through the Cloth Config interface in-game, without manuall

Modrinth management

Описание

## Introduction **Datapack Config Mod** is a utility mod for Minecraft Forge 1.20.1 that provides datapack developers with a convenient graphical configuration interface. By integrating the Cloth Config API, the mod allows players to modify datapack parameters directly in-game without manually editing JSON files or restarting the game. --- ## Main Features ### 🎨 Graphical Configuration Interface - Uses Cloth Config to provide a user-friendly interface - Supports **10+ configuration types**: sliders, text boxes, dropdown menus, color pickers, etc. - Changes take effect immediately — no game restart required ### 🌍 Full Localization Support - Bilingual interface (Chinese and English) - Config option names, descriptions, and tooltips can be set per language ### 📦 Global Datapack Loading - Automatically loads `.zip` datapacks from `config/datapack-config-mod/` - Each datapack can be toggled on/off via the config interface - Datapacks are loaded with the highest priority ### 🔧 Main Menu Shortcut - A "Datapack Config" button is added to the top‑right corner of the main menu for one‑click access --- ## Supported Configuration Types | Type | Description | |------|-------------| | `boolean` | Boolean toggle | | `int` / `slider` | Integer input / slider | | `double` / `double_slider` | Floating‑point input / slider | | `string` | Text input | | `enum` / `enum_selector` | Dropdown menu / enum selector | | `color` | Color picker | --- ## Quick Start ### For Datapack Authors Create a `datapack_config.json` file in the root directory of your datapack: ```json { "config": { "spawn_rate": { "type": "slider", "default": "50", "min": 0, "max": 100, "name": { "zh_cn": "生物生成率", "en_us": "Mob Spawn Rate" }, "filePath": "data/mydatapack/config.json", "key": "spawn_rate" } } } ```