Skip to content

minor: internal language feature cleanup - #9368

Merged
MukjepScarlet merged 4 commits into
nextgenfrom
refactor/minor-cleanup
Oct 7, 2026
Merged

MukjepScarlet merged 4 commits into
nextgenfrom
refactor/minor-cleanup

Conversation

@MukjepScarlet

Copy link
Copy Markdown
Contributor
  1. use String literal as FormattedCharSequence (skip re-order) instead of Component
  2. use Java comparator functions (indy) instead of Kotlin crossinline functions (new class + new instance, by 2.4.20)
  3. NOOP suppresses

Kotlin's crossinline functions will not be created as `indy` or singleton up to now. Switch to Java equivalent to reduce class count.
@liquidbounce-support-bot

Copy link
Copy Markdown
Contributor

Thanks for the cleanup — the comparator conversions look behaviour-preserving, and a couple of small things stood out while reading the diff:

  • ModuleBlockIn.kt and ModuleBlockTrap.kt now use Vec3i.BY_Y / Vec3i.BY_Y_DESC, but the net.ccbluex.liquidbounce.utils.math.BY_Y / BY_Y_DESC imports were left in place. Both are unused now and should be flagged by detekt's UnusedImports.
  • In ModuleBlockTrap, comparingDouble { -it.distToCenterSqr(...) } inverts by negation; comparingDouble { it.distToCenterSqr(...) }.reversed() states the intent more directly and matters if two positions ever have equal distance (tie order differs between the two).
  • internal constructor on KAsyncCommand narrows the public surface — fine if nothing outside the module instantiates it (add-ons/scripts included), just worth confirming.

No docs impact expected for an internal cleanup like this.


🤖 Automated support reply — a human maintainer will review if this doesn't help.

@MukjepScarlet
MukjepScarlet merged commit f51e4e5 into nextgen Oct 7, 2026
6 checks passed
@MukjepScarlet
MukjepScarlet deleted the refactor/minor-cleanup branch October 7, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant