Overview
Modules (also called “hacks”) are the core building blocks of LiquidBounce. Each module represents a specific feature or functionality that can be toggled on and off, configured with custom settings, and bound to keyboard keys for quick access.All modules extend the
ClientModule class defined in features/module/ClientModule.kt:53Module Categories
LiquidBounce organizes modules into 8 distinct categories, each serving a specific purpose in gameplay enhancement.- Combat
- Player
- Movement
- Render
- World
- Misc
- Exploit
- Fun
Combat - Modules focused on player-versus-player combat scenariosExamples:
- KillAura - Automatically attacks nearby enemies
- Velocity - Modifies knockback behavior
- Criticals - Forces critical hits on attacks
Defined in
features/module/ModuleCategories.kt:28Module Structure
Every module in LiquidBounce follows a consistent structure that enables configuration, event handling, and lifecycle management.Core Properties
Reference:
features/module/ClientModule.kt:53-64Module Lifecycle
Registration
When a module is first loaded, the Reference:
onRegistration() method is called. This is where you should initialize any resources the module needs.ClientModule.kt:122Toggling
When a module is enabled or disabled, Reference:
onToggled() is called. This method handles state changes and fires events.ClientModule.kt:145-171Enabled Effect
The Reference:
enabledEffect() coroutine runs when the module is turned on, allowing for async initialization.ClientModule.kt:143Module Configuration
Modules can expose configurable settings through the value system:Settings can be accessed via scripts using
module.settings.<settingname>Real-World Example: KillAura
Here’s how a combat module is structured in practice:Source:
features/module/modules/combat/killaura/ModuleKillAura.kt:84-120Tags and Display
Modules can display dynamic information on the HUD through tags:Event Handling
Modules implement theEventListener interface, allowing them to handle game events:
Key Bindings
Each module can be bound to a keyboard key for quick toggling:- TOGGLE - Press once to enable, press again to disable
- HOLD - Module is only active while key is held
Reference:
ClientModule.kt:77-84Best Practices
Use Value Trees for Complex Settings
Use Value Trees for Complex Settings
Group related settings using
tree() to create organized configuration hierarchies.Implement Proper Cleanup
Implement Proper Cleanup
Always reset state in
onDisabled() to prevent side effects:Use Event Priorities
Use Event Priorities
Control event handler execution order with priorities:
Document Your Module
Document Your Module
Add description keys to translation files for user-facing documentation.
Next Steps
Commands
Learn about the command system for controlling modules
Scripts
Create custom modules using JavaScript or Python
API Reference
Explore the complete module API documentation
Examples
Follow tutorials for building your own modules