[1.21.3] Add condition to validate feature flags enabled state #1706
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modders who maintain multi-jar mods, that being mods whose feature set is split across multiple jars, may want a single flag in their common jar which toggles features across all of their mod jars. Due to the nature of how feature packs work and are enabled, this is not possible.
While you can have multiple packs which all enable the same flag, they will all display as individual selections in the "experiments" screen, when the intention is to have 1 toggle for all these packs.
To work around that, modders can make use of the newly added condition in this PR, which takes in a set of feature flags and whether to validate for them being enabled or disabled to conditionally load their desired elements without needing to be in the same feature pack.