登陆 注册 QQ登陆
快捷导航
查看: 1|回复: 0

[模组分享] 詹姆斯的配置库 (Jamess Config Lib)-MOD模组

[复制链接]

5257

主题

50

回帖

6491

积分

龙❁妻

Rank: 8Rank: 8

经验
6491 EP
金粒
1144 粒
绿宝石
20 块
爱心
0 点
发表于 2025-8-10 18:08:14 | 显示全部楼层 |阅读模式
詹姆斯的配置库 (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 回复 收起回复
小僵尸论坛感谢有你~
回复 论坛版权

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册 手机动态码快速登录

本版积分规则



介绍

我的世界(Minecraft)小僵尸论坛
收录了来自各地的我的世界(MC)爱好者们的各种资源

须知: 切勿滥用举报,任何与举报相关的信息必须属实!

"Minecraft"以及"我的世界"为Mojang Synergies AB的商标 本站与Mojang以及微软公司没有从属关系

官方

新浪微博 腾讯微博 微信公众号 投稿规则 版权声明 捐助我们

官方QQ①群: 291907844 (点击加群)
官方QQ②群: 421312192
官方QQ③群: 528726532

我的世界(Minecraft)小僵尸论坛

新会员

QQ|Archiver|手机版|小黑屋|Minecraft(我的世界)小僵尸论坛 |网站地图

GMT+8, 2025-9-11 10:49 , Processed in 0.195746 second(s), 49 queries .

快速回复 返回顶部 返回列表