ThatOrThis
一款用于在 Fabric 模组组之间进行选择的 Fabric 模组。
这是什么
ThatOrThis 主要面向整合包开发者设计。它通过 Hack 方式介入 Fabric 加载器,允许从额外的、由用户选择的可目录中加载模组。这使得最终用户可以决定将哪些模组加载到他们的整合包中,或者解决不兼容的模组集问题。
从技术层面来说,ThatOrThis 的设计灵感来源于 Modsmod 和 GrossFabricHacks,它们利用了 Fabric 加载器的 LanguageAdapter 功能。这允许该模组的部分代码在 Fabric 加载器开始初始化大多数其他模组之前 运行。随后它会读取配置文件,解析出需要额外加载的模组,并通过 Java 反射技巧将它们注入到加载器中。
特性
- 从默认
.minecraft/mods之外的目录加载模组 - 让最终用户选择他们想要的功能(例如 OptiFabric 用于光影或 Sodium 用于优化)
- 对额外模组的依赖关系和冲突进行运行时检查
- 可通过 ModMenu 集成访问的可配置设置界面
- 选项名称和工具提示支持格式化代码和翻译键
使用方法
对于普通用户(手动安装此模组的用户)
将此模组与 ModMenu 和 Fabric API 一起安装到你的 mods 文件夹中。
启动 Minecraft 并通过 ModMenu 打开设置界面。按照说明操作。
如果这样配置,ThatOrThis 将在默认的(受限的)规则集下运行。如果你需要的功能不仅仅是切换单个模组,请参阅“整合包开发者”部分。
对于整合包用户(下载了包含此模组的整合包的用户)
通过 ModMenu 打开设置界面。根据需要更改设置。完成。
请注意,新设置直到你重新 launching 游戏才会生效。
对于整合包开发者(希望将此模组集成到整合包中的用户)
将此模组与 ModMenu 和 Fabric API 一起安装到你的 mods 文件夹中。
然后,在你的 config 文件夹中创建 thatorthis 文件夹,并在其中创建文件 rules.json。如果操作正确,其路径应为 .minecraft/config/thatorthis/rules.json。
rules.json 定义了所有可用的设置及其选项。关于它的规范可以在 这里 找到。
最后,根据规则文件中定义的内容,将模组放入 mods 文件夹的子目录中。
此模组开源并采用 MIT 许可证,这意味着你可以将其包含在你的整合包中并进行再分发,无需征得许可,只要你在你的整合包中注明我的名字(当然还有所有其他模组的作者)。
兼容性
- ThatOrThis 需要 较新版本的 Minecraft
和 Fabric Loader才能工作。- Forge 支持从未计划;请改用 ModDirector。
- 目前仅支持 Fabric Loader v0.11.x。对 v0.12.x 的支持将在 ThatOrThis v0.3.0 中提供。
- ModMenu 和 Fabric API 是 可选的,这意味着在拥有有效的
rules.json和choices.json的情况下,即使没有它们,ThatOrThis 也能正常工作。- 然而,它们对于游戏内设置界面是必需的。你可以通过 ThatOrThis 加载它们,但不推荐这样做。
- 不建议通过 ThatOrThis 加载编程语言支持模组(例如 Kotlin、Scala 和 Grovvy)。
- 它们可能可以工作,但该功能尚未经过测试;如有可能,请将它们直接放入 mods 目录中。
- Modsmod 对 Fabric 加载器执行的操作与 ThatOrThis 完全相同,因此两者 不兼容。
注意:ThatOrThis 仅 适用于小型、客户端模组。如果规则和选项设计不当,可能会导致崩溃以及服务器/世界不兼容的问题。在安装此模组前后,请彻底测试你的整合包。
ThatOrThis
A Fabric mod for choosing between sets of Fabric mods.
What is this
ThatOrThis is designed mainly for modpack developers. It hacks into Fabric Loader to allow loading mods from additional user-selectable directories. This allows the end user to choose which mod(s) to load into their modpack, or workaround incompatible mod sets.
Technically speaking, ThatOrThis take its inspiration from Modsmod and GrossFabricHacks, which abuses the LanguageAdapter feature of the Fabric Loader. This allows part of this mod's code to run even before Fabric Loader starts to initialize most other mods. It then read configs, resolve for additional mods to load, and inject them into the loader via Java reflection wizardry.
Features
- Load mods from directories other than the default
.minecraft/mods - Let the end user to choose which feature(s) they want (e.g. OptiFabric for shaders or Sodium for optimization)
- Runtime check for dependencies and conflicts of additional mods
- Configurable settings screen accessible via ModMenu integration
- Option names and tooltips support formatting codes and translation keys
Usage
For ordinary users (who installed this mod manually)
Install this mod into your mods folder, along with ModMenu and Fabric API.
Launch Minecraft and open the settings screen via ModMenu. Follow the instructions.
ThatOrThis will be running under the default (limited) rule set if configured this way. If you need features more than toggling individual mods, please refer to the "modpack developers" section.
For modpack users (who downloaded a modpack containing this mod)
Open the settings screen via ModMenu. Change the settings as you desire. Done.
Note that the new settings won't come into effect until you re-launch the game.
For modpack developers (who wish to integrate this mod into a modpack)
Install this mod into your mods folder, along with ModMenu and Fabric API.
Then, create thatorthis folder in your config folder, and file rules.json in that. If done correctly, the path for it should be .minecraft/config/thatorthis/rules.json.
rules.json defines all the available settings and their options. Specs for it can be found here.
Finally, put the mods into subdirectories of the mods folder, as defined in the rule file.
This mod is open-sourced and MIT licensed, meaning that you can include it into your modpack and redistribute it without asking for permission, as long as you credit me (and of course the authors of all other mods) in your modpack.
Compatibility
- ThatOrThis requires a recent version of Minecraft
and Fabric Loaderto work.- Forge support is never planned; use ModDirector instead.
- Currently only Fabric Loader v0.11.x is supported. Support for v0.12.x will come with ThatOrThis v0.3.0.
- ModMenu and Fabric API are optional, meaning that ThatOrThis will work correctly without them given valid
rules.jsonandchoices.json.- However they are required for the in-game settings screen. You can load them via ThatOrThis, but it is not recommended.
- Loading programming language support mods (e.g. for Kotlin, Scala and Grovvy) via ThatOrThis is not recommended.
- They might work, but this feature has not been tested; place them right into the mods directory whenever possible.
- Modsmod does the exact same thing as ThatOrThis to the Fabric Loader, thus incompatible with each other.
NOTE: ThatOrThis is only intended for small, client-side mods. It may cause crashes and/or server/world incompatibilities if rules and options are not designed carefully. Test your modpack throughly before and after installing this mod.
下载 ThatOrThis
下载 ThatOrThis
下载 ThatOrThis
下载 ThatOrThis
下载 ThatOrThis
下载 ThatOrThis
下载 ThatOrThis
下载 ThatOrThis
下载 ThatOrThis
下载 ThatOrThis
此更新修复了一个在开发环境中导致崩溃的问题。这也是最后一个支持 Fabric Loader v0.11.x 的更新。
完整更新日志:
- 修复了在开发环境中加载嵌套 jar 模组时导致的崩溃问题
- 正确提示用户关于 Fabric Loader v0.12.x 的不兼容问题
- 将在下一次更新中添加支持(希望是 v0.3.0)
已在 Minecraft 1.16.5 + Fabric Loader 0.11.7 + ModMenu 1.16.22 环境下测试,应可兼容稍旧版本。
请注意,该模组是一个大型 HACK,可能会对您的整合包造成严重干扰;请谨慎使用。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
评论 0
登录后参与评分
还没有评论,来抢沙发吧