quilt-mappings icon indicating copy to clipboard operation
quilt-mappings copied to clipboard

Feature Flag Mapping

Open l-Luna opened this issue 2 years ago • 4 comments

Maps feature flag related code - FeatureFlag, FeatureFlagBitSet, FeatureGroup, and friends. Also maps the sync packet, a number of usages of feature flags, and some creative tab code that interacts with them.

Marking as draft because I'm not confident in some names (like FeatureFlagBitSet) and because the creative tab mappings might be unnecessary for this PR.

l-Luna avatar Oct 19 '22 22:10 l-Luna

🚨 Target branch is already set to 22w42a

github-actions[bot] avatar Oct 20 '22 00:10 github-actions[bot]

Some reasoning on the names:

  • FeatureFlagGroup is tricky. In strings and mojmap, it's a "universe", but this is a non-descriptive name that has already caused confusion in conversations. Since these are groups of feature flags stored together, I call them groups, but there might be a better way of writing that.
  • FeatureFlagBitSet is a set of flags from a particular group, stored using their bitmasks. This could have been called a FeatureFlagSet directly, but that's literally a synonym of group, and using BitSet (hopefully) emphasises their role as a modifiable/copyable collection of flags, rather than part of the flags' definition/configuration like groups are.
  • FeatureAndDataSettings is hard. It's a collection of feature flags and their associated datapacks; this needs to be distinct from both worldgen features while also somehow indicating the datapacks included. The mojmap name is (subjectively) worse.
  • FeatureAndDataSettings.MINIMAL, FeatureFlags.VANILLA, MAIN_REGISTRY could maybe all use one term. Also idk what the difference is between DEFAULT_SET and VANILLA_SET
  • ItemCollector collects item stacks without considering size; GatedItemCollector implements that while considering feature flag. Here we diverge from #256, which uses ItemStackCollector (better) and SplitStackCollector, which is misleading because all collectors are split, but only this one is feature-gated.
  • UnsizedItemStackSet is wordy, and implies that the set itself is unsized, but I couldn't think of a better way of indicating "stack size doesn't matter" that doesn't have the same issue. Feedback appreciated

l-Luna avatar Oct 20 '22 19:10 l-Luna

🚀 Target branch has been updated to 22w43a

github-actions[bot] avatar Oct 26 '22 14:10 github-actions[bot]

🚨 Please fix merge conflicts before this can be merged

github-actions[bot] avatar Oct 26 '22 14:10 github-actions[bot]

🚀 Target branch has been updated to 22w44a

github-actions[bot] avatar Nov 02 '22 17:11 github-actions[bot]

🚨 Please fix merge conflicts before this can be merged

github-actions[bot] avatar Nov 02 '22 17:11 github-actions[bot]

🚀 Target branch has been updated to 22w45a

github-actions[bot] avatar Nov 09 '22 17:11 github-actions[bot]

🚨 Please fix merge conflicts before this can be merged

github-actions[bot] avatar Nov 09 '22 17:11 github-actions[bot]

🚀 Target branch has been updated to 22w46a

github-actions[bot] avatar Nov 16 '22 17:11 github-actions[bot]

🚨 Please fix merge conflicts before this can be merged

github-actions[bot] avatar Nov 16 '22 17:11 github-actions[bot]

Superceeded by #271

OroArmor avatar Nov 16 '22 17:11 OroArmor