Skip to content

feat(config): include Render/Fun modules in .localconfig save#8457

Open
CompileRider wants to merge 1 commit into
CCBlueX:nextgenfrom
CompileRider:feat/localconfig-render-flag
Open

feat(config): include Render/Fun modules in .localconfig save#8457
CompileRider wants to merge 1 commit into
CCBlueX:nextgenfrom
CompileRider:feat/localconfig-render-flag

Conversation

@CompileRider

@CompileRider CompileRider commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Adds support for including Render and Fun modules when saving local configs through .localconfig save.

Summary

  • New enum OptionalInclusion in config/ package with RENDER and FUN entries.
  • Refactored IncludeConfiguration from individual boolean fields (includeRender, includeFun) to Set<OptionalInclusion> — rendering, fun, and future groups handled uniformly.
  • Removed dead code includeAction: Boolean from IncludeConfiguration.
  • Added render and fun tokens to the .localconfig save include options.
  • Moved Render/Fun public-config exclusion into ClientModule via inclusionGroup propagation from ModuleCategory.
  • Renamed ModeValueGroupSerializer.PUBLIC_SERIALIZER to PUBLIC_CONFIG_SERIALIZER to avoid confusion with ValueGroupSerializer.PUBLIC_SERIALIZER.
  • Moved OptionalInclusion from config/autoconfig/ to config/ package — used across 3 subpackages.
  • Consolidated checkIfInclude() into Value.kt — serializers now call it.checkIfInclude() instead of duplicating the logic.

Behavior

  • .localconfig save <name> — previous behavior, excludes Render/Fun modules.
  • .localconfig save <name> true render fun — includes Render and Fun modules.
  • .localconfig save <name> true binds hidden render — combines all include options.
  • Existing binds and hidden options keep their behavior.

Mechanism

  • ModuleCategory.inclusionGroup: OptionalInclusion? — Render/Fun categories tag themselves with their group.
  • ClientModule.init {} propagates category.inclusionGroup to the module.
  • ValueGroup and ModeValueGroup propagate inclusionGroup to their inner values.
  • Value.checkIfInclude() returns false if doNotInclude is set, otherwise checks whether the value's inclusionGroup is in IncludeConfiguration.optionalInclusions.
  • The new PUBLIC_CONFIG_SERIALIZER (with includePrivate = false) respects checkIfInclude(), so Render/Fun values are excluded from public configs unless their group is in the set.

Fixes #8398

Comment thread src/main/kotlin/net/ccbluex/liquidbounce/config/ConfigSystem.kt Outdated
@CompileRider CompileRider marked this pull request as draft June 8, 2026 19:42
@CompileRider CompileRider force-pushed the feat/localconfig-render-flag branch from e539355 to 8c2fc6a Compare June 8, 2026 22:13
@CompileRider CompileRider marked this pull request as ready for review June 8, 2026 22:19
@minecrrrr

Copy link
Copy Markdown
Contributor

Yooo! Absolute lifesaver, thx man

@MukjepScarlet

Copy link
Copy Markdown
Contributor

To be honest there are also a lot of render configs in other categories. I think we need a better way to handle it

@CompileRider

Copy link
Copy Markdown
Contributor Author

To be honest there are also a lot of render configs in other categories. I think we need a better way to handle it

Fair point. Since render settings are indeed everywhere, maybe we can just tag individual settings as 'visual'?

Instead of filtering entire modules, we could add a simple property to the Value class to mark it as visual. That way, the render flag can surgicaly filter out things like 'Range Circles' in Combat modules or 'Line Colors' in Movement, while keeping the functional settings intact.

It keeps the configs much cleaner and addresses the 'scattered settings' problem without needing a massive overhaul. What do you think of this approach?

@MukjepScarlet

Copy link
Copy Markdown
Contributor
1.
enum class OptionalInclusion {
  RENDER,
  FUN,
}

2.
val ModuleCategories.Render = ModuleCategory("Render", inclusionGroup=RENDER)

3.
open class Value {

fun inclusionGroup(group) { ... }

Like this? This is a draft

Or simpler just remove the enum

Comment thread src/main/kotlin/net/ccbluex/liquidbounce/config/types/Value.kt Fixed
@CompileRider CompileRider marked this pull request as draft June 17, 2026 05:30
CompileRider added a commit to CompileRider/LiquidBounce that referenced this pull request Jun 17, 2026
- Rename ModeValueGroupSerializer.PUBLIC_SERIALIZER to PUBLIC_CONFIG_SERIALIZER to avoid confusion with ValueGroupSerializer.PUBLIC_SERIALIZER
- Move OptionalInclusion enum from config/autoconfig/ to config/ package (used across 3 subpackages)
- Refactor IncludeConfiguration from boolean fields to Set<OptionalInclusion> for scalability; remove dead includeAction field
- Simplify checkIfInclude() to use direct Set containment
- Use enumSetOf() instead of EnumSet.noneOf() for consistency with project conventions
@CompileRider CompileRider marked this pull request as ready for review June 17, 2026 20:38
@CompileRider CompileRider requested a review from 1zun4 June 17, 2026 20:38
@CompileRider CompileRider changed the title feat(Config): add render flag to .localconfig save include options refactor(config): add render flag to .localconfig save include options Jun 17, 2026
@TssCode

TssCode commented Jul 2, 2026

Copy link
Copy Markdown

will it also save HUD configurations?

@MukjepScarlet MukjepScarlet added the conflict PR has merge conflicts label Jul 2, 2026
@CompileRider CompileRider force-pushed the feat/localconfig-render-flag branch from ff99b9f to b541025 Compare July 3, 2026 18:41
CompileRider added a commit to CompileRider/LiquidBounce that referenced this pull request Jul 3, 2026
…e conflicts

- Replace includeRender/includeFun booleans with Set<OptionalInclusion>
- Rename ModeValueGroupSerializer.PUBLIC_SERIALIZER to PUBLIC_CONFIG_SERIALIZER
- Move OptionalInclusion from autoconfig/ to config/ package
- Consolidate checkIfInclude() into Value.kt
- Remove dead includeAction field
- Add value() helper with inclusionGroup propagation
- Remove render-specific hacks from ValueGroupSerializer

Resolves conflicts with origin/nextgen by rebasing resolved changes
on top of current base branch.
@CompileRider CompileRider force-pushed the feat/localconfig-render-flag branch from b541025 to 0b6340b Compare July 3, 2026 18:44
…e conflicts

- Replace includeRender/includeFun booleans with Set<OptionalInclusion>
- Rename ModeValueGroupSerializer.PUBLIC_SERIALIZER to PUBLIC_CONFIG_SERIALIZER
- Move OptionalInclusion from autoconfig/ to config/ package
- Consolidate checkIfInclude() into Value.kt
- Remove dead includeAction field
- Add value() helper with inclusionGroup propagation
- Remove render-specific hacks from ValueGroupSerializer

Resolves conflicts with origin/nextgen by rebasing resolved changes
on top of current base branch.
@CompileRider CompileRider force-pushed the feat/localconfig-render-flag branch from 0b6340b to f7c9411 Compare July 3, 2026 18:46
@CompileRider CompileRider changed the title refactor(config): add render flag to .localconfig save include options feat(config): include Render/Fun modules in .localconfig save Jul 3, 2026
@CompileRider

Copy link
Copy Markdown
Contributor Author

will it also save HUD configurations?

Yes, it does save HUD configurations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflict PR has merge conflicts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add option to include render modules in config saves

6 participants