Configory 图标

Configory

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.2.0
本资源为搬运资源,原资源地址: https://modrinth.com/mod/configory
资源信息

Minecraft 版本: 1.14 1.14.1 1.14.2 1.14.3 1.14.4 1.15 1.15.1 1.15.2 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2 26.2

平台: fabric forge neoforge

资源介绍

Configory

Convention-based configuration for Minecraft mods.

Configory is a small Java configuration library that makes mod config feel simple at the call site without giving up type safety where your code needs it. Define a value once — with its type, default, and constraints — and use it safely everywhere.

public static final ConfigKey<Float> SPEED_MULTIPLIER =
        config.defineFloat("core.speed_multiplier", 1.0f)
                .range(0.1f, 10.0f)
                .describe("Global speed multiplier.")
                .register();

float speed = getConfig(SPEED_MULTIPLIER);
setConfig(SPEED_MULTIPLIER, 3.0f).save();

Need dynamic access for debug tooling or scripts? Reach for the same config by string path:

float speed = getConfig("core.speed_multiplier").asFloat();
setConfig("core.speed_multiplier", 3.0f).save();

Features

  • Typed config keys — read and write values with compile-time type safety.
  • Dot-notation paths — nest values inside a config's JSON file, or keep a simple mod to a single flat file.
  • Fluent validation — declare ranges and constraints once; invalid writes are rejected.
  • Generated command surface — expose your config through your mod's own in-game command, with zero Brigadier boilerplate.
  • JSON-backed files — human-readable config, with explicit saving so you control when it's written.
  • Per-mod isolation — each mod maps to its own config file, cleanly separated.
  • Lightweight bootstrap conventions — minimal setup to get going.

Notes

Configory is a loader-agnostic library mod (it depends only on Gson and targets Java 21). Compile against it as a normal dependency, but don't bundle it — ship it as a required dependency and let players install the Configory jar separately, so several mods can share one copy. A single jar loads on Fabric, Forge and NeoForge and it works across a very wide range of Minecraft versions.

Links


Icon: book_scroll_written by Malcolm Riley, CC BY 4.0, upscaled.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Izzys Cobblemon

价格:0 墨喵币
下载量:0

查看详情
Actually 3D Blocks & Items!

价格:0 墨喵币
下载量:0

查看详情
Azulite's Create Pack

价格:0 墨喵币
下载量:0

查看详情
EU P2P Tunnel

价格:0 墨喵币
下载量:0

查看详情