Complete event list
Status: Implemented. Every event in the tables fires. The events in the last section are Planned.
Generated tables with every payload field: Event table. How events work: Events.
Columns:
- C: the constant is
CL_EV_plus the name in upper case with dots replaced by_(block.break→CL_EV_BLOCK_BREAK). C++ usesclight::ev::BlockBreak. Lua uses the name. - Payload: the C struct the handler receives. Several events share one (
cl_ev_player,cl_ev_tick,cl_ev_lifecycle). - Ctx: M = main (startup), T = TICK, R = RENDER, A = any thread.
- Side: S = server, C = client, B = both.
- X: cancellable (✔), cancellable with a result ®, or neither (–).
- Fields: bold fields can be changed by a handler.
lifecycle.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
lifecycle.register |
cl_ev_lifecycle |
M | B | – | level |
Register blocks, items, payload channels, keybinds |
lifecycle.registries_frozen |
cl_ev_lifecycle |
M | B | – | level |
Ids are final; holders resolve |
lifecycle.common_setup |
cl_ev_lifecycle |
M | B | – | level |
Setup that needs the final ids |
lifecycle.client_setup |
cl_ev_lifecycle |
M | C | – | level |
Physical client only: HUD layers, keybinds |
lifecycle.server_setup |
cl_ev_lifecycle |
M | S | – | level |
Dedicated server only |
lifecycle.resources_reloaded |
cl_ev_lifecycle |
M | C | – | level |
After a resource reload (F3+T, pack screen) |
lifecycle.data_reloaded |
cl_ev_lifecycle |
M | S | – | level |
After /reload |
lifecycle.server_starting |
cl_ev_lifecycle |
M | S | – | level |
Levels not loaded yet |
lifecycle.server_started |
cl_ev_lifecycle |
M | S | – | level |
The world is ready |
lifecycle.server_stopping |
cl_ev_lifecycle |
M | S | – | level |
Stop your tasks |
lifecycle.server_stopped |
cl_ev_lifecycle |
M | S | – | level |
Also when leaving a singleplayer world; clear per-world state |
lifecycle.level_load |
cl_ev_lifecycle |
M | S | – | level |
Once per level; level is set |
lifecycle.level_save |
cl_ev_lifecycle |
T | S | – | level |
Autosave, /save-all, shutdown; level is set |
lifecycle.level_unload |
cl_ev_lifecycle |
M | S | – | level |
Once per level; level is set |
lifecycle.mod_reload |
cl_ev_lifecycle |
M | B | – | level |
After a Lua hot reload that worked |
lifecycle.shutdown |
cl_ev_lifecycle |
M | B | – | level |
The process is exiting |
tick.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
tick.server_pre |
cl_ev_tick |
T | S | – | level, tick_count |
Before the server tick |
tick.server_post |
cl_ev_tick |
T | S | – | level, tick_count |
After the server tick |
tick.level_pre |
cl_ev_tick |
T | S | – | level, tick_count |
Before one level’s tick |
tick.level_post |
cl_ev_tick |
T | S | – | level, tick_count |
After one level’s tick |
tick.client_pre |
cl_ev_tick |
T | C | – | level, tick_count |
Before the client tick |
tick.client_post |
cl_ev_tick |
T | C | – | level, tick_count |
After the client tick (good for client logic) |
player.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
player.join |
cl_ev_player |
T | S | – | player |
The player is in the world |
player.leave |
cl_ev_player |
T | S | – | player |
Before the player is removed |
player.respawn |
cl_ev_player |
T | S | – | player |
After respawning |
player.chat |
cl_ev_player_chat |
T | S | ✔ | player, message |
Cancel: not broadcast. message can be changed. |
player.command |
cl_ev_player_command |
T | S | ✔ | player, command |
Cancel: the command doesn’t run. command can be changed. |
player.interact_block |
cl_ev_player_interact_block |
T | S | R | player, level, hand, pos, face |
Right-click on a block. A result other than pass skips vanilla. |
player.interact_item |
cl_ev_player_interact_item |
T | S | R | player, level, hand, stack |
Right-click with an item. A result other than pass skips vanilla. |
player.attack_entity |
cl_ev_player_attack_entity |
T | S | ✔ | player, target |
Cancel: no attack |
player.interact_entity |
cl_ev_player_interact_entity |
T | S | R | player, target, level, hand |
API 1.20. Right-click on an entity. Cancel or a result other than pass skips vanilla. Filter: target type. |
block.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
block.break |
cl_ev_block_break |
T | S | ✔ | level, pos, state, player, tool, xp, drop_items |
Cancel: the block stays and is resynced. xp and drop_items can be changed. Filter: block id. |
block.place |
cl_ev_block_place |
T | S | ✔ | level, pos, state, placer, hand, replaced_state |
Cancel: the placement is undone. Filter: block id. |
entity.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
entity.damage |
cl_ev_entity_damage |
T | S | ✔ | entity, level, source, attacker, amount |
Cancel: no damage. amount can be changed. Filter: entity type. |
entity.death |
cl_ev_entity_death |
T | S | ✔ | entity, level, source, attacker |
Cancel: the death is stopped. Filter: entity type. |
entity.spawn |
cl_ev_entity_spawn |
T | S | ✔ | entity, level, loaded |
API 1.20. An entity joined a level (before it is first sent). Cancel: removed again. Filter: entity type. |
entity.change_dimension |
cl_ev_entity_change_dimension |
T | S | – | entity, from, to |
API 1.20. Arrived in another dimension. |
The A2a-A5a entity events (entity.tick, entity.anim_event, entity.synced, entity.knockback, entity.data_changed) are in Entities.
server.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
server.command_register |
cl_ev_command_register |
M | S | – | dedicated |
Register commands (at start and after /reload) |
client.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
client.connect |
cl_ev_client_connect |
R | C | – | address |
Joining a server or world (address) |
client.disconnect |
cl_ev_lifecycle |
R | C | – | level |
Leaving a server or world |
client.screen_open |
cl_ev_screen_open |
R | C | – | screen_id |
Cancel: the screen doesn’t open. Filter: screen id. |
client.key |
cl_ev_key |
R | C | ✔ | key, scancode, action, modifiers, screen_open |
Cancel: the key is consumed before the game and screens see it |
client.chat_received |
cl_ev_chat_received |
R | C | ✔ | message, overlay |
Cancel: the line is hidden. message (plain text) can be changed; overlay = action bar. |
client.chat_send |
cl_ev_chat_send |
T | C | ✔ | message |
Cancel: not sent. message can be changed. |
client.sound_play |
cl_ev_sound_play |
A | C | ✔ | sound, category, pos, volume, pitch, positional |
Cancel: silent. volume and pitch can be changed. |
config.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
config.reloaded |
cl_ev_config_reloaded |
A | B | – | mod_id, file |
A config file of a mod was read again. Filter: mod id. |
mod.*
| Event | Payload | Ctx | Side | X | Fields | Notes |
|---|---|---|---|---|---|---|
mod.permission_changed |
cl_ev_permission_changed |
M | B | – | capability, granted |
API 1.20. The player decided one of the mod’s capabilities; only that mod sees it. |
Planned events
These names are reserved for planned events; they don’t exist yet (cl_event_type_lookup returns CL_E_NOT_FOUND). Names and payloads may change before they ship.
| Family | Planned events |
|---|---|
block.* |
break_progress, use, attack, changed, neighbor_update, random_tick, explode, fluid_flow, grow, spread, fade, burn, ignite, redstone, drops, trample |
entity.* |
join_level, leave_level, remove, damage_post, heal, drops, xp_drop, target, teleport, effect_add, effect_remove, projectile_hit, breed, tame, transform, equipment_change, jump, fall, lightning, item_pickup, item_merge, item_expire, and per-entity ticks |
player.* |
login, kicked, gamemode, custom_click, pickup_item, drop_item, craft, smelt_take, xp_change, level_change, advancement, sleep, wake, portal, move, container_open, container_close, container_click, held_slot, swap_hands, fish, edit_sign, edit_book, use_finish, bed_enter, settings |
item.* |
tooltip, durability, enchant, anvil_update, grindstone, use_tick, creative_tab_contents |
chunk.* |
load, unload, save, generated |
level.* |
weather, time_skip, portal_create, explosion_start, explosion_detonate, game_rule |
worldgen.* |
chunk_status, structure_placed |
data.* |
registries_load, tags_load, tags_updated, recipes_updated, loot_table_load, advancement_load |
server.* |
status_ping, whitelist_check, save |
net.* |
configuration_start, handshake_complete, client_mods |
client.* |
world_change, screen_init, screen_close, char_typed, mouse_button, mouse_scroll, mouse_move, command_send, command_register, music_select, toast, options_changed, camera, fov, fog, title, resize, focus |
render.* |
stage, entity_pre, entity_post, block_outline, hand, name_tag |
Value events (a mutable result that starts as the vanilla value) are listed in Value event list.