关于 Cryonic Config 模组

- 跨版本易于移植的配置工具,依赖极少
- 特别注重易用性和可移植性
- 叫 Cryonic 是因为它酷毙了
功能说明
- 这会将 json 文件存储在 {minecraftdir}/config 下,文件名为 "modid.json"
- 所有配置文件都会在早期初始化时由 "cryonicconfig.json" 中的字典读取
- 配置只能通过直接编辑 json 来修改,没有 GUI 配置的计划
- 为了便于移植,同步变量会直接发送到玩家的聊天栏并被拦截
- 使用哈希表来查找 Str 到 ConfigStorage 以及 Str 到 Obj(变量)
API
Groovy(build.gradle)添加依赖
添加 Maven:
repositories { maven { url "https://api.modrinth.com/maven" } }
Modern/Architectury:如果只用 fabric 或 neoforge,请将 ${project.name} 替换为 fabric、forge、neoforge
dependencies { modImplementation "maven.modrinth:cryonicconfig:fabric-${project.name}:1.0.0+mc${rootProject.minecraftversion}" }
b1.7.3:
dependencies { modImplementation "maven.modrinth:cryonicconfig:babric:1.0.0+mcb1.7.3" }
简单用法:
// 你可以存储或即时使用,这可以在任何地方调用 ConfigStorage config = CryonicConfig.getConfig("modid"); // 你可以存储 int、double、boolean 和 string // 通过获取它们,你同时也设置了它们的默认值 // getter 格式(变量名,默认值) // 你不能重复使用变量名!它们会被覆盖。 config.getInt("varName", 3); config.getDouble("name", 3.3); config.getBoolean("var", true); config.getString("str", "Geronimo!") // 该变量会同时存在于客户端和服务端本地 // 如果你想让连接的服务端玩家使用服务端配置 // 你必须调用它,让客户端使用服务端的值 config.sync("varName", playerEntity); // 随意使用这种格式: CryonicConfig.getConfig("modid").getInt("varName", 3); // 你可以手动设置变量,而不是让 get 生成它们 // 这对于覆盖旧值也很有用 config.setInt("varName", 3); config.setDouble("name", 3.3); config.setBoolean("var", true); config.setString("str", "Geronimo!");
标记依赖
在 fabric.mod.json 中:
{ "depends": { "cryonicconfig": "" } }
在 mods.toml/neoforge.mods.toml 中:
[[dependencies.cryonicconfig]] modId = "cryonicconfig" type = "required" versionRange = "[0,)"
如何安装 Cryonic Config
With Millida Launcher
Install Millida Launcher
The launcher is free: download it at millida.net/launcher and sign in with any nickname.
Click “Install” on this page
The launcher opens and installs the mod for Minecraft 1.20–26.3 on Fabric, Forge, NeoForge or Quilt automatically.
Launch the game
A profile with it appears in the launcher: click “Play”.
Manually
Install Fabric, Forge, NeoForge or Quilt
The loader must match the game version of the mod file, for example Minecraft 26.3. After installing it, a separate profile appears in your launcher.
Download the file for your version
In the version list above, pick the file cryonicconfig-neoforge-1.0.0+mc26.3.jar (129 KB) for your game version and loader.
Put it in the mods folder
The folder is inside .minecraft (Windows: %appdata%\.minecraft\mods). If it does not exist, create it.
Launch the loader profile
Open “Mods” in the main menu: Cryonic Config should be in the list.
版本
含依赖项
| Minecraft | 加载器 | 文件 | 日期 | 操作 |
|---|---|---|---|---|
| 26.3 | NeoForge | [26.3] NeoForge 1.0.0129 KB | ||
| 26.3 | Fabric, Quilt | [26.3] Fabric 1.0.019.8 KB 1 | ||
| 1.20.1 | Forge | [1.20.1] Forge 1.0.0131 KB |
常见问题
Which Minecraft versions does Cryonic Config work on?
There are files for 26.3, 1.20.1, 1.20. The newest is 26.3.
Is Cryonic Config for Forge or Fabric?
There are files for Fabric: 26.3, for Forge: 1.20–1.20.1, for NeoForge: 26.3 and for Quilt: 26.3.
Does Cryonic Config need other mods?
The author lists no required dependencies: the Fabric, Forge, NeoForge or Quilt loader is enough.
Where can I download Cryonic Config safely?
On this page: the file cryonicconfig-neoforge-1.0.0+mc26.3.jar (129 KB) is stored on Millida’s server, with no link shorteners. SHA-1 checksum: ac470fed16c33467342e1686d6b58bf9320b74ad.
评价
成为第一个评价 Cryonic Config 的人

