Overview
LiquidBounce provides a comprehensive event system with events for game ticks, player actions, network packets, rendering, and more. All events extend the baseEvent class.
Event Categories
Game Events
Core game loop and timing events.GameTickEvent
Fired every game tick (20 times per second).GameRenderEvent
Fired during game rendering.TickPacketProcessEvent
Fired during packet processing phase.Player Events
Events related to player actions and movement.PlayerTickEvent
Fired during player tick (cancellable).PlayerMoveEvent
Fired when the player moves. Properties:type: MoverType- The type of movementmovement: Vec3- The movement vector (modifiable)
PlayerJumpEvent
Fired when the player jumps (cancellable). Properties:motion: Float- Jump motion (modifiable)yaw: Float- Jump direction (modifiable)
PlayerStepEvent
Fired during step-up mechanics. Properties:height: Float- Step height (modifiable)
PlayerSafeWalkEvent
Controls safe walk (prevents falling off edges). Properties:isSafeWalk: Boolean- Enable/disable safe walk
Network Events
Events related to network packets.PacketEvent
Fired for all incoming and outgoing packets (cancellable). Properties:origin: TransferOrigin- SEND or RECEIVEpacket: Packet<*>- The packet instanceoriginal: Boolean- Whether this is the original packet
BlinkPacketEvent
Fired when packets are queued by blink features.Input Events
User input events.KeyEvent
Fired when a key is pressed or released. Properties:key: InputConstants.Key- The key that was pressedaction: Int- PRESS, RELEASE, or REPEAT
MouseButtonEvent
Fired for mouse button events.MouseRotationEvent
Fired when the player rotates the camera (cancellable). Properties:cursorDeltaX: Double- Horizontal rotation deltacursorDeltaY: Double- Vertical rotation delta
MovementInputEvent
Fired when processing movement input. Properties:directionalInput: DirectionalInput- Forward/backward/left/rightjump: Boolean- Jump inputsneak: Boolean- Sneak input
Combat Events
AttackEntityEvent
Fired when attacking an entity (cancellable).TargetChangeEvent
Fired when the combat target changes.RotationUpdateEvent
Fired when rotations should be updated.Render Events
WorldRenderEvent
Fired during world rendering.OverlayRenderEvent
Fired during overlay rendering.ScreenRenderEvent
Fired when rendering GUI screens.DrawOutlinesEvent
Fired when entity outlines should be drawn.World Events
WorldChangeEvent
Fired when changing worlds/servers.ChunkLoadEvent
Fired when a chunk is loaded.ChunkUnloadEvent
Fired when a chunk is unloaded.BlockChangeEvent
Fired when a block changes.Client Events
ClientStartEvent
Fired when the client starts.ClientShutdownEvent
Fired when the client shuts down.SessionEvent
Fired when the session changes. Properties:session: User- The new session
DisconnectEvent
Fired when disconnecting from a server.ServerConnectEvent
Fired when connecting to a server (cancellable).Module Events
ModuleToggleEvent
Fired when a module is toggled.ModuleActivationEvent
Fired during module activation.ValueChangedEvent
Fired when a module value changes.Chat Events
ChatSendEvent
Fired when sending a chat message (cancellable). Properties:message: String- The message being sent
ChatReceiveEvent
Fired when receiving a chat message (cancellable). Properties:message: String- The message texttextData: Component- Raw message componenttype: ChatType- CHAT_MESSAGE, DISGUISED_CHAT_MESSAGE, or GAME_MESSAGE
Inventory Events
ScheduleInventoryActionEvent
Fired to schedule inventory actions.SelectHotbarSlotSilentlyEvent
Fired for silent hotbar slot selection.ClientPlayerInventoryEvent
Fired when the player inventory changes.Entity Events
EntityHealthUpdateEvent
Fired when an entity’s health updates.EntityMarginEvent
Fired to modify entity collision margins.EntityEquipmentChangeEvent
Fired when entity equipment changes.Block Events
BlockShapeEvent
Fired to modify block shapes.BlockVelocityMultiplierEvent
Fired to modify block velocity multipliers.BlockSlipperinessMultiplierEvent
Fired to modify block slipperiness.BlockBreakingProgressEvent
Fired during block breaking.Event Properties
Cancellable Events
Many events extendCancellableEvent and can be cancelled:
Event State
Some events have a state property:PRE- Before the actionPOST- After the action
Creating Event Handlers
Using handler Function
With Priority
One-time Handlers
See Also
- EventManager - Event system documentation
- Module Development - Using events in modules