|
詹姆斯的配置库 (Jamess Config Lib)Github |相关wiki |源站链接支持: fabric , forge , neoforge , quilt詹姆斯的配置库是一款轻量级、可扩展且简单的配置库,适用于 Forge 和 Fabric 模组。它提供了两种内置的配置类型:注册表配置和设置配置。
功能简介
注册表配置
注册表配置是一种可以包含任意数量对象的配置,所有对象都会被读取到配置中。每个非原始对象都需要指定其类型。
设置配置
设置配置包含固定数量的对象,每个对象都属于特定类型。由于设置配置中的对象数量是固定的,因此无需指定类型。
开发者文档
以下内容仅供开发者参考。
使用 Maven 进行依赖管理
添加仓库
詹姆斯的配置库使用 Modrinth Maven 进行文件托管。要添加仓库,请在您的 `build.gradle` 文件中的 `repositories` 块中添加以下内容:
gradle
repositories {
maven {
name = \"Modrinth Maven\"
url = \"https://api.modrinth.com/maven\"
}
}Copy已复制!
添加依赖
要添加依赖,请在您的 `build.gradle` 文件中的 `dependencies` 块中添加以下内容:
gradle
dependencies {
implementation(fg.deobf(\"maven.modrinth:config-lib:VERSION-MODLOADER\"))
}Copy已复制!
其中 VERSION 表示库的版本(例如 1.2),MODLOADER 表示加载器类型(Fabric 和 Quilt 使用 fabric,Forge 和 Neoforge 使用 forge)。
编写您的第一个配置
要编写您的第一个配置,请查看 `common/src/main/java/net/vakror/jamesconfig/config/example` 目录。此目录包含了注册表配置和设置配置的示例。
来自Modrinth所有游戏版本1.17.11.181.18.11.18.21.191.19.11.19.21.19.31.19.41.201.20.11.20.21.20.31.20.4所有类型fabricforgeneoforgequilt1.4.1-fabricjamesconfig-1.4.1.jar下载1.4.1#Releasejamesconfig-1.4.1-sources.jar下载1.4.1#Releasefix some method clashing展开版本: 1.4.1支持游戏: 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类型:FabricRelease下载次数: 6531.4.1-forgejamesconfig-1.4.1.jar下载1.4.1#Releasejamesconfig-1.4.1-sources.jar下载1.4.1#Releasefix some method clashing展开版本: 1.4.1支持游戏: 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类型:ForgeRelease下载次数: 4561.4-forgejamesconfig-1.4.jar下载1.4#Release# Additions+ Required Mods for config load (not hard dependencies)+ Performance analysis (analyzers for default types are included)+ `/config analyze` command (runs analysis)+ reload commands (client and server; reload either a single config or all of them and a sync option for reloading server configs)# Fixes+ a malicious client could crash the server# Technical stuff+ add a CommandManager+ add new packet to tell the client to reload展开版本: 1.4支持游戏: 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类型:ForgeNeoForgeRelease下载次数: 1051.4-fabricjamesconfig-1.4.jar下载1.4#Release# Additions+ Required Mods for config load (not hard dependencies)+ Performance analysis (analyzers for default types are included)+ `/config analyze` command (runs analysis)+ reload commands (client and server; reload either a single config or all of them and a sync option for reloading server configs)# Fixes+ a malicious client could crash the server# Technical stuff+ add a CommandManager+ add new packet to tell the client to reload展开版本: 1.4支持游戏: 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类型:FabricQuiltRelease下载次数: 1841.3-forgejamesconfig-1.3.jar下载1.3#Release# Additions+ New type of config, single object type registry configs+ Add new example config# Changes+ Remove times from logging# Internal+ Clean up old code+ Optimize packet sending and handling+ Easier way to register managers# Single Object Type ConfigsConfigs that contain objects of a single type. Objects inside of these will not need to specify their type, though nested objects may need to. Single Object Type Configs work the same as regular registry configs.展开版本: 1.3支持游戏: 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类型:ForgeNeoForgeRelease下载次数: 811.3-fabricjamesconfig-1.3.jar下载1.3#Release# Additions+ New type of config, single object type registry configs+ Add new example config# Changes+ Remove times from logging# Internal+ Clean up old code+ Optimize packet sending and handling+ Easier way to register managers# Single Object Type ConfigsConfigs that contain objects of a single type. Objects inside of these will not need to specify their type, though nested objects may need to. Single Object Type Configs work the same as regular registry configs.展开版本: 1.3支持游戏: 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类型:FabricQuiltRelease下载次数: 891.2-forgejamesconfig-1.2.jar下载1.2#ReleaseSplit forge and fabric jars apartMake SettingConfigObject into an interfaceOptimize (~2 millisecond speedup)展开版本: 1.2支持游戏: 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类型:ForgeNeoForgeRelease下载次数: 651.2-fabricjamesconfig-1.2.jar下载1.2#ReleaseSplit forge and fabric jars apartMake SettingConfigObject into an interfaceOptimize (~2 millisecond speedup)展开版本: 1.2支持游戏: 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类型:FabricQuiltRelease下载次数: 771.1jamesConfig-1.1-1.19.2.jar下载1.1#Releasesupport 1.18+展开版本: 1.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类型:ForgeNeoForgeRelease下载次数: 621.0jamesConfig-1.0-1.19.2.jar下载1.0#ReleaseCreate mod展开版本: 1.0支持游戏: 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1类型:FabricForgeQuiltRelease下载次数: 76全部版本
markdown_parsed
文章类型:收录
layui.use([\'form\'], function(){
var form = layui.form;
});
詹姆斯的配置库 |
楼主
2025-8-10 18:08:14
回复(0)
收起回复
|