MagicLib
❗在报告问题之前,请务必尝试最新的 beta 版本,以确认问题是否仍然存在。
描述
一个通用的模组依赖库。
依赖关系
| 依赖项 | 类型 | 环境 | 链接 |
|---|---|---|---|
| Carpet | 可选 | 客户端 / 服务端 | CurseForge | GitHub |
| MaliLib | 可选 | 客户端 | CurseForge |
| Mod Menu | 可选 | 客户端 | CurseForge | Modrinth |
功能
兼容 API
- 多版本兼容:是的,我们采用了多种手段使其与 Fabric Loader 上运行的所有最新 Minecraft 版本(1.14+)兼容。这是如何做到的?魔法 :(
- 我们为平衡版本间的差异编写了兼容 API。对于同时维护多个 MC 版本模组的开发者来说,可以在一定程度上忽略 Mojang 对 MC 的更改。你不必关心 Mojang 做了什么,使用此 API,你将能够轻松地在不同 MC 版本之间使用相同的代码。
依赖检查
我们添加了一个完整的依赖检查系统,通过表达式甚至自定义谓词来验证依赖项的可用性,这些检查可应用于各种场景,例如:
- MagicLibMixinPlugin 为模块提供了额外的依赖检查,弥补了 Fabric Loader 的一些不足,例如为客户端和服务端设置不同的依赖项。
- 依赖检查也可应用于 Mixin,只有满足条件时才会应用 Mixin。
- 依赖检查还可应用于配置管理,以便仅在满足条件时显示配置项。
- 未来开发中可能会包含更多功能。
I18n(国际化)
- 我们重新实现了独立于 MC 的 I18n,并可以为 MagicLib I18n 设置备用语言列表。Mojang 在使用 I18n 文本时使用了一些技巧,导致 String.format 的一些功能不可用,这通常令人困扰。
Malilib 扩展
- 我们为 Malilib 编写了一个非常有用的配置管理模块,我们将使用带有 Java 注解的基本数据类型,尽可能生成配置列表。此外,针对配置文件,我们包含了一个配置版本控制系统,这将帮助你在配置文件结构发生重大变化时快速编写自定义迁移方案。
- 我们从更高版本的 Malilib 移植了一些功能,以便在使用适配较低版本 Minecraft 的 Malilib 时更轻松地使用相同的功能。
开发
支持
目前主要开发的 Minecraft 版本为:1.20.1
并使用 preprocess 以兼容所有版本。
注意:我只接受以下版本的问题反馈。请注意,此信息具有时效性,未在此列出的任何版本的问题都将被关闭。
- Minecraft 1.14.4
- Minecraft 1.15.2
- Minecraft 1.16.5
- Minecraft 1.17.1
- Minecraft 1.18.2
- Minecraft 1.19.2
- Minecraft 1.19.3
- Minecraft 1.19.4
- Minecraft 1.20.1
映射表 (Mappings)
我们使用 Mojang 官方 映射表来反混淆 Minecraft 并插入补丁。
文档
英文文档与中文文档逐行对齐。
许可证
本项目采用 LGPLv3 许可证提供。欢迎学习并用于你自己的项目中。
MagicLib
❗Before reporting a problem, be sure to try the latest beta version to check if the problem still exists.
Description
A library of versatile mod dependencies.
Dependencies
| Dependency | Type | Environment | Link |
|---|---|---|---|
| Carpet | Optional | Client / Server | CurseForge | GitHub |
| MaliLib | Optional | Client | CurseForge |
| Mod Menu | Optional | Client | CurseForge | Modrinth |
Feature
Compat API
- Multi-version compatibility, yes, we have used a number of means to make it compatible with all the latest releases of Minecraft (1.14+) running on the Fabric Loader. How is this done? Magic :(
- We have written compatibility APIs for balancing the differences between versions. For developers maintaining multiple MC versions of mods at the same time, it is possible to ignore Mojang's changes to MC to a certain extent. You don't have to care about what Mojang has done, using the API you will easily be able to use the same code between MC versions.
Dependency check
We have added a complete dependency checking system to verify dependency availability by means of expressions and even custom predicates, who can be applied in a variety of scenarios, e.g.
- MagicLibMixinPlugin provides additional dependency checking for the module, which makes up for some shortcomings of Fabric Loader, for example by setting different dependencies for the client side and the server side.
- Dependency checking can also be applied to Mixin, and Mixin will only be applied if the conditions are met.
- Dependency checking can also be applied to configuration management so that the configuration item is only displayed if the conditions are met.
- Further features may be included in future developments.
I18n
- We have reimplemented I18n independent of MC and can set the list of alternate languages for MagicLib I18n. Mojang uses some tricks with I18n text to make some features of String.format unavailable, which is usually annoying.
Malilib extensions
- We have written a very useful configuration management module for Malilib where we will use basic data types with Java annotations to generate configuration lists wherever possible. Also, for configuration files we have included a configuration versioning system which will help you to quickly write your own custom migration solution in the event of a major change to the configuration file structure.
- We have ported some features from a higher version of Malilib to make it easier to use the same features when using Malilib adapted to a lower version of Minecraft
Development
Support
Current main development for Minecraft version: 1.20.1
And use preprocess to be compatible with all versions.
Note: I only accept the following versions of issues. Please note that this information is time-sensitive and any version of the issue not listed here will be closed
- Minecraft 1.14.4
- Minecraft 1.15.2
- Minecraft 1.16.5
- Minecraft 1.17.1
- Minecraft 1.18.2
- Minecraft 1.19.2
- Minecraft 1.19.3
- Minecraft 1.19.4
- Minecraft 1.20.1
Mappings
We are using the Mojang official mappings to de-obfuscate Minecraft and insert patches.
Document
The English doc and the Chinese doc are aligned line by line.
License
This project is available under the LGPLv3 license. Feel free to learn from it and incorporate it in your own projects.
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 MagicLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
功能
- 添加客户端命令 API (#380)
- 优化依赖检查逻辑 (#386)
- 支持 Minecraft 26.3 (#392)
修复
- 修复
TextRenderer在 26.2 中无法工作的问题
鸣谢
- 特别感谢 @ToobLac 在 Bug 修复方面提供的帮助
新贡献者
- @ToobLac 在 #370 中完成了首次贡献
完整更新日志:
构建信息
- 文件名:
MagicLib-mc26.3-neoforge-0.8.882-stable.jar - SHA-256:
62c2a659f2d0b27ff849125df9fc3993f725550b149ac017853ba129c496c4c8 - 构建来源:
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
评论 0
登录后参与评分
还没有评论,来抢沙发吧