fix some method clashing
詹姆斯的配置库 (Jamess Config Lib)
詹姆斯的配置库是一款轻量级、可扩展且简单的配置库,适用于 Forge 和 Fabric 模组。它提供了两种内置的配置类型:注册表配置和设置配置。
功能简介
注册表配置
注册表配置是一种可以包含任意数量对象的配置,所有对象都会被读取到配置中。每个非原始对象都需要指定其类型。
设置配置
设置配置包含固定数量的对象,每个对象都属于特定类型。由于设置配置中的对象数量是固定的,因此无需指定类型。
开发者文档
以下内容仅供开发者参考。
使用 Maven 进行依赖管理
添加仓库
詹姆斯的配置库使用 Modrinth Maven 进行文件托管。要添加仓库,请在您的 `build.gradle` 文件中的 `repositories` 块中添加以下内容:
gradle
repositories {
maven {
name = "Modrinth Maven"
url = "https://api.bbsmc.net/maven"
}
}
已复制!
添加依赖
要添加依赖,请在您的 `build.gradle` 文件中的 `dependencies` 块中添加以下内容:
gradle
dependencies {
implementation(fg.deobf("maven.modrinth:config-lib:VERSION-MODLOADER"))
}
已复制!
其中 VERSION 表示库的版本(例如 1.2),MODLOADER 表示加载器类型(Fabric 和 Quilt 使用 fabric,Forge 和 Neoforge 使用 forge)。
编写您的第一个配置
要编写您的第一个配置,请查看 `common/src/main/java/net/vakror/jamesconfig/config/example` 目录。此目录包含了注册表配置和设置配置的示例。
版本&下载
fix some method clashing
1.4-forge
# 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
+ 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-fabric
# 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
+ 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.3-forge
# 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 Configs
Configs 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.
+ 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 Configs
Configs 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-fabric
# 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 Configs
Configs 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.
+ 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 Configs
Configs 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.2-forge
Split forge and fabric jars apart
Make SettingConfigObject into an interface
Optimize (~2 millisecond speedup)
Make SettingConfigObject into an interface
Optimize (~2 millisecond speedup)
1.2-fabric
Split forge and fabric jars apart
Make SettingConfigObject into an interface
Optimize (~2 millisecond speedup)
Make SettingConfigObject into an interface
Optimize (~2 millisecond speedup)
1.1
support 1.18+
收录


