Fermion - 用于 Forge 1.14+ 的 Java 核心模组库
您可能已经了解到,在 Minecraft 1.13 中,Forge 趁机进行了自我重写。在这次重写中,Java 核心模组存在的可能性几乎被完全移除,转而采用基于 JS 的尝试方案。 Fermion 旨在恢复旧式的基于 Java 的核心模组开发方式,但以更安全的层级进行,试图避免类加载问题,并采用访问者模式(Visitor pattern)而非 ClassNode 模式。
对于用户
如果您单独下载此模组,游戏中不会发生任何变化,只是您的模组列表中会多出三个模组条目。事实上,这是一个专为开发者使用的库。一旦您安装了启动插件(Launch Plugin),或者更常见的是,安装了包含启动插件的模组,Fermion 就会激活。
对于开发者
此模组充当后端服务,允许您创建启动插件,而无需依赖 ModLauncher 或 Forge 的内部机制。您可以参考 GitHub 上提供的 Wiki,获取有关如何为模组创建启动插件的快速入门指南。
主要优势
- 稳定的 API 和预制件集合:跨 Minecraft 版本兼容:这意味着除非您编辑的方法的字节码发生变化,否则当 ModLauncher 内部发生变更时,您无需更新核心模组结构。
- 配置系统:所有转换器均可由用户启用或禁用,但它们也可以提供自定义配置,以根据用户需求定制体验。
- 良好的 IDE 支持:除非您在 IDE 中使用 JS 插件,否则新的核心模组系统不提供语法高亮或自动补全。启动插件使用 Java 编写,因此现在您可以享受这些功能了。
- 目标的描述符(Descriptors for Targets):您无需加载类即可引用它,也不必仅依赖方法名来定位正确的方法;您可以使用类、方法和字段的描述符来更快地完成工作。
- 启动插件与模组位于同一文件中:无需从归档文件中提取启动插件或模组 JAR。
- 快速崩溃(Crash fast):如果在创建启动插件时出现错误,游戏甚至不会启动,并且会在日志中打印错误消息。这将使您能够自动捕获错误。
重要提示
为确保 Forge 正确加载 Fermion,该系统将在运行时复制自身,实际上是在 mods 目录中创建一个新的 JAR 文件。这是为了规避 ModLauncher 加载系统中的限制。这 不是不同的模组,也不是恶意攻击:您可以随意反编译该 JAR 文件,或将提取出的文件与原始文件进行对比。生成的文件将在 Minecraft 关闭时自动删除。
Fermion - The Java coremodding library for Forge 1.14+
As you may probably be aware, with Minecraft 1.13 Forge took the opportunity to rewrite itself. In this rewrite, the possibility for Java coremods to exist was almost completely removed, opting for a JS-based attempt instead. What Fermion aims to do is bring back what was the old Java-based coremodding, but on a safer level, trying to avoid class loading issues and relying on the Visitor pattern instead of the ClassNode one.
For the User
If you download this mod alone, nothing in your game will change, apart from having three more mod entries in your list. This mod is in fact a library that is meant for developers usage. As soon as you will have a Launch Plugin installed (or, more probably, a mod that has a Launch Plugin), Fermion will activate.
For the Developer
This mod acts as a back-end service that allows you to create Launch Plugins without having to rely on the internals of ModLauncher or Forge. You can refer to the Wiki available on GitHub for a quick start guide on how to create a Launch Plugin for your mod.
Main advantages
- Stable API and Prefab Collection that will be compatible across Minecraft versions: this means that you won't have to update your coremod structure in case something changes in ModLauncher, unless the bytecode of the methods you are editing does.
- Configuration system: all transformers may be enabled or disabled by the user, but they can also provide custom configuration to tailor the experience according to the user needs.
- Proper IDE support: unless you have a JS plugin in your IDE, the new coremod system doesn't provide syntax highlighting or automatic completion. Launch Plugins are written in Java, so now you can.
- Descriptors for Targets: you won't have to classload a class to refer to it, or rely only on method names to target the correct one; you can use Class-, Method-, and FieldDescriptors to do your job quicker.
- Launch Plugin and mod in the same file without having to extract the Launch Plugin or the mod JAR from the archive.
- Crash fast: if something is wrong in the creation of the Launch Plugin, the game won't even start up and an error message will be printed in the logs. This will allow you to catch errors automatically.
IMPORTANT NOTE
To ensure that Fermion is loaded correctly by Forge, the system will copy itself at runtime, effectively creating a new JAR file in the mods directory. This is intended to circumvent a restriction in ModLauncher's loading system. It is not a different mod or a malicious attack: feel free to decompile the JAR or confront the extracted one with the original. The generated file will be automatically deleted when Minecraft closes.
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Fermion Lib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
这是 Fermion 1.0.2+hotfix 的一个版本,禁用在生产环境中运行测试。
未进行其他更改。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧