events
Contains all events you can hook while creating a module table.
BEWARE: If an event has any parameters, you need to add a generalized event argument to your function, NOT THE PARAMETERS THEMSELVES. You can access all the event parameters from the argument!
on_enable()
Called once the module is enabled
on_disable()
Called once the module is disabled
on_tick()
Called on client tick (every 0.05s)
Parameters
name | type | description |
---|---|---|
pre | boolean | Defines if the event was called pre or post tick |
on_update()
Called before and after client position update, this is done once every tick.
Parameters
name | type | description |
---|---|---|
pre | boolean | Whether the event was invoked before or after sending the position updates to the server. Keep in mind position, rotation and ground attributes can only be modified when this is true, otherwise changes will be ignored |
x | double | The x position sent to the server |
y | double | The y position sent to the server |
z | double | The z position sent to the server |
yaw | float | The yaw rotation sent to the server (Will update the third-person rotations once modified) |
pitch | float | The pitch rotation sent to the server (Will update the third-person rotations once modified) |
ground | boolean | The ground state sent to the server |
on_move()
Called before the movement of the player gets applied
Mainly used to make the player strafe or move faster
Parameters
name | type | description |
---|---|---|
x | double | The x motion used to apply the move |
y | double | The y motion used to apply the move |
z | double | The z motion used to apply the move |
on_packet_send()
Called once the client sends a packet to the server.
Additional parameters are available for specific packets.
Editing is currently supported for the following packets: 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x11, 0x13, 0x14, 0x18, 0x19, 0x0B, 0x0C, 0x0E, 0x0F
Parameters
name | type | description |
---|---|---|
packet_id | int | The packet id |
cancel | boolean | Whether the packet sending should be canceled or not |
on_packet_receive()
Called once the client receives a packet from the server.
Additional parameters are available for specific packets.
Editing is currently supported for the following packets: 0x00, 0x08, 0x14, 0x27, 0x32, 0x48
Only reading additionally is supported for the following packets: 0x02
Parameters
name | type | description |
---|---|---|
packet_id | int | The packet id |
cancel | boolean | Whether the packet processing should be canceled or not |
on_overlay_render()
Called once the overlay of the client is being rendered
Parameters
name | type | description |
---|---|---|
partial_ticks | float | The partial ticks |
pre | boolean | Whether its pre or post overlay render |
on_world_render()
Called once the world is rendered
Parameters
name | type | description |
---|---|---|
partial_ticks | float | The partial ticks |
on_effect_render()
Called once any blur effects are rendered (shadow, blur)
Parameters
name | type | description |
---|---|---|
blur | boolean | Whether the blur or shadow is called |
partial_ticks | float | The partial ticks |