这是一个面向 Fabric、Forge、NeoForge 和 Quilt 的配置 API。
它包含一个配置界面,如果特定模组使用此系统作为其配置系统,该界面将自动添加。
这是一个“核心”模组,专为多加载器项目设计。它允许你轻松创建适用于客户端(Client)、通用(Common)和服务端(Server)的新配置,风格类似于 Forge 和 NeoForge 的配置系统。
为什么你应该使用这个而不是 Forge 和 NeoForge 的配置系统?
- 自动添加一个功能完整的配置界面
- 你可以使用更多方法,如
getComments()、getKey()、getRange()等 - 跨平台支持 Fabric、Forge、NeoForge 和 Quilt
开发者指南
- 打开你的
build.gradle文件 - 将此插件添加到你其他的插件中
-
plugins { id 'io.github.0ffz.github-packages' version '1.2.+' }
-
- 下一步是添加此仓库:
-
repositories { maven githubPackage.invoke("Craftjakob/Config-API") }
-
- 之后,你可以添加依赖并选择以下实现之一用于你的项目。(如果你不能使用
modImplementation,请使用compileOnly和runtimeOnly)-
dependencies { modImplementation "com.craftjakob:configapi-common:${mc_version}-${configapi_version}" modImplementation "com.craftjakob:configapi-fabric:${mc_version}-${configapi_version}" modImplementation "com.craftjakob:configapi-forge:${mc_version}-${configapi_version}" modImplementation "com.craftjakob:configapi-neoforge:${mc_version}-${configapi_version}" modImplementation "com.craftjakob:configapi-quilt:${mc_version}-${configapi_version}" }
-
- 最后,重新加载你的
build.gradle文件。
更多信息,请访问 GitHub 页面。
更新日志
CONFIG API 版本 2.4.0
- 新增 对 1.21.2 和 1.21.3 的支持
- 移除 对后台配置的支持,因为 Minecraft 发生了许多变化
- 更改
registerConfig方法中的参数顺序 - 清理 代码并提升性能
- 重构 ConfigTracking 以提高效率
- 更改 “重置所有服务端配置”按钮的位置
CONFIG API 版本 2.3.2
- 修复了打开界面时的崩溃问题
- 添加了 HolderHelper,这是一个工具类
CONFIG API 版本 2.3.1
- 添加了 SimpleResourceLocation,因为新系统是不必要的
CONFIG API 版本 2.3.0
- 更新以支持 Fabric 和 NeoForge 的 1.21 版本
CONFIG API 版本 2.2.1
感谢 xLuPo, ornithoptercat
- 从 quilt.mod.json 中移除了许可证信息,以防止崩溃
- 恢复了对 NeoForge 1.20.4 的支持
- 修复了由于 Logo 导致的 Forge 在 1.20.4 上的崩溃
- 修复了服务端兼容性问题,ServiceLoader 曾尝试在服务端加载客户端方法
CONFIG API 版本 2.0.0
- 使 ConfigTracker 更高效
- 添加了停止跟踪配置的方法
- 为类型为 SERVER 的配置添加了服务端支持
- 这些配置仅在服务端加载
- 服务端配置保存在世界文件夹内
- 这允许你仅在特定世界中设置某些内容
- 添加了 ConfigWorldSelectionScreen
- 如果你想打开一个服务端配置但不在任何世界中,你可以选择要修改哪个配置
- 如果你在某个世界中,你可以直接对其进行修改
- 为配置界面添加了一个示例配置
- 修复了 quilt mixin 的问题
CONFIG API 版本 1.2.0
- 添加了 CheckboxButton
- 添加了深度搜索功能
- 如果你处于文件夹中,启用后,该文件夹及之后的所有配置都将显示
- 现在你需要输入 '#' 来搜索提示文本
- 为 SearchBox 添加了新的机制
- 搜索建议
- 现在通过搜索放大镜显示
- 如果你搜索过内容,可以点击删除按钮
- 修复了 Fabric 上未跟踪客户端配置的问题
- 优化了加载和跟踪方法
- 重写了 ConfigFileWriter 以提升性能
- 优化了其他一些内容
CONFIG API 版本 1.1.1
- 修复了服务端兼容性问题
- 添加了 ConfigEditBox 以提升易用性
- 现在你可以按 Enter 键退出 EditBox/Searchbox
- 以及其他一些改进
- 修复了 Enum 和 ListScreen 的重置按钮,之前未能正确重置
CONFIG API 版本 1.1.0
关键变更:新文件格式为 .cfg,目录结构已移动,不再与 v1.0.0 兼容
- 添加了导航按钮
- 显示的配置文件名在大写字母后现在有一个空格
- 修复了重置按钮,之前无法重置所有配置
- 移除了配置界面中的“重置所有”按钮
- 重构了配置类型选择界面
- 为每种配置类型添加了图标
- 添加了重置文件的按钮
- 添加了打开配置文件按钮
- 添加了 SearchBox 作为额外组件
- 添加了 ImageTextButton 作为额外组件
- 添加了获取配置目录、检查模组是否加载及获取环境的服务
CONFIG API 版本 1.0.0
- 支持 Modloaders Fabric、Forge、NeoForge 和 Quilt
- Fabric 需要 Fabric API
- 配置界面功能:
- 自动添加
- 按类别组织
- 目前仅适用于 Forge 和 NeoForge
- 配置文件仅在特定环境中保存和跟踪
- 通用配置始终被跟踪并直接加载,它们是最安全的使用方式
- 使用说明请参阅 Github 上的 README.md 文件
- 目前由于需要密码密钥,暂时无法访问
This is a Config API for Fabric, Forge, NeoForge and Quilt.
It has a Config Screen, which is automatically added, if the specific mod uses this as config system.
This is a "core" mod, specifically designed for multiloader projects. It allows you to create easily new configs, for Client, Common and Server, in the style of Forge's and NeoForge's Config System.
Why you should use this instead of Forge's and NeoForge's Config System?
- Automatically adds a fully functional Config Screen
- You can use more methods like getComments(), getKey(), getRange(), etc.
- It's cross-platform for Fabric, Forge, NeoForge and Quilt
For developer
- Open your build.gradle
- Add this plugin to your other plugins
-
plugins { id 'io.github.0ffz.github-packages' version '1.2.+' }
-
- Next step is, to add this repository:
-
repositories { maven githubPackage.invoke("Craftjakob/Config-API") }
-
- After that, you can add a dependency and choose one of these implementations for your project. (If you can not use 'modImplementation' use 'compileOnly' and 'runtimeOnly')
-
dependencies { modImplementation "com.craftjakob:configapi-common:${mc_version}-${configapi_version}" modImplementation "com.craftjakob:configapi-fabric:${mc_version}-${configapi_version}" modImplementation "com.craftjakob:configapi-forge:${mc_version}-${configapi_version}" modImplementation "com.craftjakob:configapi-neoforge:${mc_version}-${configapi_version}" modImplementation "com.craftjakob:configapi-quilt:${mc_version}-${configapi_version}" }
-
- Finally, you can reload your build.gradle.
For more information, visit the GitHub page.
Changelog
CONFIG API VERSION 2.4.0
- Added support for 1.21.2 and 1.21.3
- Removed support of background configs, due to many changes from Minecraft
- Changed the parameter order in the
registerConfigmethod - Cleaned-Up code and performance improvements
- Reworked the ConfigTracking for increasing efficient
- Changed the Position of the Reset All Server Config Button
CONFIG API VERSION 2.3.2
- Fixed a crash, when opening the screen
- Added HolderHelper that's a utility class
CONFIG API VERSION 2.3.1
- Added SimpleResourceLocation, because the new system is unnecessary
CONFIG API VERSION 2.3.0
- Updated to 1.21 for Fabric and NeoForge
CONFIG API VERSION 2.2.1
Thanks to xLuPo, ornithoptercat
- Removed license from quilt.mod.json, to prevent a crash
- Added back the support for NeoForge 1.20.4
- Fixed Forge crash on 1.20.4, because of the Logo
- Fixed Server Compatibility, the ServiceLoader had tried to load Client methods on Server
CONFIG API VERSION 2.0.0
- Made the ConfigTracker more efficient
- added a method to stop tracked configs
- Added Server support for Config with the type SERVER
- These configs are only loaded on the server
- The server configs are saved inside the worlds folder
- That allows you to set specific things only in the World
- Added ConfigWorldSelectionScreen
- If you want to open a Server config, and you are not in a world, you can choose which config do you want to modify
- If you are inside a world, you can directly modify it
- Added an example config for the Config Screen
- fixed quilt mixin
CONFIG API VERSION 1.2.0
- Added CheckboxButton
- Added Deep Search
- If your in a folder, and then enabling it, all configs in and after the folder will be displayed
- Now you need to type an '#' to search for tooltips
- Added new mechanics to the SearchBox
- A search suggestion
- It's now displayed with a search lupe
- If you had searched something, you can click on a delete button
- Fixed client config, does not tracked on fabric
- Optimized load & track methode
- Rewritten the ConfigFileWriter for better performance
- Optimized some other things
CONFIG API VERSION 1.1.1
- Fixed server compatibility
- Added ConfigEditBox for friendlier usability
- Now you can press Enter to get out of the EditBox/Searchbox
- And some other things
- Fixed Enum & ListScreen's reset button, does not set correctly
CONFIG API VERSION 1.1.0
Critical Changes: new file format is .cfg, moved directories, now it's not compatible with v1.0.0
- added navigation buttons
- the displayed config names have now a space after a capital letter
- fixed reset button, do not reset all configs
- removed reset all button in Config Screen
- rework of Config Type Selection Screen
- Added Icons for the specific config type
- Added reset button, to reset the file
- Added Open Config File Button
- Added SearchBox as extra Widget
- Added ImageTextButton as extra Widget
- Added Services for getConfigDirectory, isModLoaded & getEnvironment
CONFIG API VERSION 1.0.0
- Supported Modloaders Fabric, Forge, NeoForge and Quilt
- Fabric requires Fabric API
- Config Screen features:
- Automatically added
- Organized with categories
- Currently available only for Forge and NeoForge
- Config files are saved and tracked only when you are in the specific environment
- Common Configs are always tracked and directly loaded, they are the safest to use
- For usage instructions, please refer to the README.md file on Github
- Access is currently not possible, due to the requirement of a password key
下载 Config API
下载 Config API
下载 Config API
下载 Config API
下载 Config API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Config API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Config API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Config API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Config API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Config API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
配置 API 版本 3.3.1
- 修复了一个网络问题,该问题会导致尝试调用一个不存在的方法
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
评论 0
登录后参与评分
还没有评论,来抢沙发吧