Feature: Mutable module priority by beanbag44 · Pull Request #220 · lambda-client/lambda · GitHub
Skip to content

Feature: Mutable module priority - #220

Merged
beanbag44 merged 8 commits into
1.21.11from
feature/module-priority
Mar 5, 2026
Merged

Feature: Mutable module priority #220
beanbag44 merged 8 commits into
1.21.11from
feature/module-priority

Conversation

@beanbag44

Copy link
Copy Markdown
Member

Makes the priority field in listeners an updatableLazy so that modules can adjust their priority and update the sorting within the listener collections.

A modules priority, if being set (which is only necessary if it might conflict with other modules), should be set at the beginning of the init block. This is just as a default and can be changed by the user in-game.

The listener collections are updated by removing the owners listeners, updating their priority, and adding them back again. This minimizes cost, and resorting only occurs when the user changes a module priority

@beanbag44
beanbag44 requested a review from emyfops January 11, 2026 12:12

@emyfops emyfops left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to discuss to find another solution. This feels extremely hacky and does not seem fine for the long run. We can't just add hacks on top of the existing event system. I hate to be that person but I would much rather ship features at low rate than merging lots of hacks.

@beanbag44

Copy link
Copy Markdown
Member Author

# Conflicts:
#	src/main/kotlin/com/lambda/module/Module.kt
#	src/main/kotlin/com/lambda/module/modules/combat/KillAura.kt
#	src/main/kotlin/com/lambda/module/modules/player/ClickFriend.kt
# Conflicts:
#	src/main/kotlin/com/lambda/config/AutomationConfig.kt
#	src/main/kotlin/com/lambda/gui/components/SettingsWidget.kt
#	src/main/kotlin/com/lambda/interaction/managers/Manager.kt
#	src/main/kotlin/com/lambda/interaction/managers/PostActionHandler.kt
#	src/main/kotlin/com/lambda/interaction/managers/breaking/BreakManager.kt
#	src/main/kotlin/com/lambda/interaction/managers/breaking/BrokenBlockHandler.kt
#	src/main/kotlin/com/lambda/interaction/managers/breaking/RebreakHandler.kt
#	src/main/kotlin/com/lambda/interaction/managers/hotbar/HotbarManager.kt
#	src/main/kotlin/com/lambda/interaction/managers/interacting/InteractManager.kt
#	src/main/kotlin/com/lambda/interaction/managers/interacting/InteractedBlockHandler.kt
#	src/main/kotlin/com/lambda/interaction/managers/inventory/InventoryManager.kt
#	src/main/kotlin/com/lambda/interaction/managers/rotating/RotationManager.kt
#	src/main/kotlin/com/lambda/module/modules/movement/BetterFirework.kt
#	src/main/kotlin/com/lambda/module/modules/player/RotationLock.kt
@beanbag44
beanbag44 merged commit 51fade3 into 1.21.11 Mar 5, 2026
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.

2 participants