PackMode
Do you fondly remember "pack modes" from the old 1.7 modpacks? Your wishes have come true!
PackMode is an extremely straightforward mod that brings this functionality back into the game. Its main purpose is flexible management of CraftTweaker script loading depending on the selected pack mode (technically referred to as "preprocessors").
The operating principle is very simple: you specify special directives in script files (.zs) that tell PackMode which modes should load that particular file. For example, if you add the line #packmode expert at the beginning of a script, this file will only load when the "expert" mode is activated in PackMode's settings.
You can also specify multiple valid modes simultaneously. A script with the directive `#packmode expert superduperexpert" will work when either of the two mentioned modes is selected, but will remain inactive if "normal" or any other mode is chosen.
Important note: if you don't add any #packmode ... line to your scripts at all, the mod doesn't interfere with their execution — they load always, regardless of the selected pack mode. Essentially, without using these directives, PackMode remains inactive!
The mod's configuration allows you to set up an unlimited number of pack modes and choose the default mode. During first installation, PackMode automatically creates two standard modes ("expert" and "normal") and sets "normal" as the active one.
Additional functionality: PackMode can conditionally block the loading of datapack recipes using JSON conditions, if needed for your project.