A Fabric mod for choosing between sets of Fabric mods.
This branch (master
) is the active development branch for latest Minecraft (currently 1.17.1).
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.
- 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
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.
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.
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.
- 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.json
andchoices.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 Groovy) 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.