Skip to content

Commit cb49fde

Browse files
authored
Add list of all Events (#30)
* Add list of all Events * Removed unused events
1 parent d36dd7f commit cb49fde

File tree

1 file changed

+138
-4
lines changed

1 file changed

+138
-4
lines changed

docs/pages/addon/features/events.md

Lines changed: 138 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,143 @@ The `ServerSwitchEvent` will be fired when the user is on a server and then join
5757
The `SettingInitializeEvent` is fired when an in-game setting was initialized; is used to modify setting Widgets at a later point (adding custom entries to a Dropdown for example).
5858
**The listener has to be registered before the setting category is added!**
5959

60-
## Every Other Event
61-
62-
todo: write
60+
## List of (nearly) all Events
61+
???+ information "Note"
62+
63+
LabyMod 4 is constantly being developed and new events are added on a regular basis. This list is therefore not guaranteed to be complete.
64+
65+
| Event Name | Description |
66+
|------------|-------------|
67+
| **Addon Lifecycle Events** |
68+
| `AddonEnableEvent` | Fired right after an addon is detected |
69+
| `AddonPostEnableEvent` | Fired after LabyMod is fully initialized or right after an addon is enabled |
70+
| `GlobalAddonEnableEvent` | Fired when any addon is enabled |
71+
| `GlobalAddonPostEnableEvent` | Fired after any addon is fully enabled |
72+
| **Block Entity Events** |
73+
| `BlockEntityPreLoadEvent` | Fired before a block entity is loaded |
74+
| `BlockEntityUpdateEvent` | Fired when a block entity is updated |
75+
| `SignBlockEntityPostLoadEvent` | Fired after a sign block entity is loaded |
76+
| **Chat Events** |
77+
| `ActionBarReceiveEvent` | Fired when an action bar message is received |
78+
| `ChatClearEvent` | Fired when the chat is cleared |
79+
| `ChatMessageAddEvent` | Fired when a message is added to the chat |
80+
| `ChatMessageGuessSenderEvent` | Fired when the sender of a chat message is being guessed |
81+
| `ChatMessageSendEvent` | Fired when sending a chat message to the server. Allows modifying the message content, checking if it's a command, controlling whether it appears in chat history, or cancelling it entirely |
82+
| `ChatMessageUpdateEvent` | Fired when a chat message is updated |
83+
| `ChatReceiveEvent` | Fired when a message is received in chat. Allows accessing and modifying the message content or cancelling the message entirely |
84+
| `ChatScreenUpdateEvent` | Fired when the chat screen is updated |
85+
| `AdvancedChatReloadEvent` | Fired when advanced chat is reloaded |
86+
| `AdvancedChatTabMessageEvent` | Fired when a message is added to an advanced chat tab |
87+
| **Component Events** |
88+
| `ComponentDeserializeEvent` | Fired when a component is deserialized |
89+
| `ComponentSerializeEvent` | Fired when a component is serialized |
90+
| `ComponentFlattenerConstructEvent` | Fired when a component flattener is constructed |
91+
| **Player Events** |
92+
| `ClientHotbarSlotChangeEvent` | Fired when the player changes their hotbar slot |
93+
| `ClientPlayerAbilitiesUpdateEvent` | Fired when player abilities are updated |
94+
| `ClientPlayerInteractEvent` | Fired when the player interacts with the world |
95+
| `DamageBlockedEvent` | Fired when damage to a player is blocked |
96+
| `FieldOfViewModifierEvent` | Fired when the field of view is modified |
97+
| `CameraLockEvent` | Fired when the camera is locked |
98+
| `CameraUnlockEvent` | Fired when the camera is unlocked |
99+
| `InventorySetSlotEvent` | Fired when an inventory slot is set |
100+
| **GUI Events** |
101+
| `HudWidgetEvent` | Fired for HUD widget-related actions |
102+
| `ActivityInitializeEvent` | Fired when an activity is initialized |
103+
| `ActivityOpenEvent` | Fired when an activity is opened |
104+
| `FileDroppedEvent` | Fired when a file is dropped onto the game window |
105+
| `IngameMenuInitializeEvent` | Fired when the in-game menu is initialized |
106+
| `ScreenDisplayEvent` | Fired when a screen is displayed |
107+
| `ScreenOpenEvent` | Fired when a screen is opened |
108+
| `ScreenResizeEvent` | Fired when the screen is resized |
109+
| `ScreenUpdateVanillaWidgetEvent` | Fired when a vanilla widget is updated |
110+
| `VanillaWidgetReplacementEvent` | Fired when a vanilla widget is replaced |
111+
| `VersionedScreenInitEvent` | Fired when a versioned screen is initialized |
112+
| `PlayerListUpdateEvent` | Fired when the player list is updated |
113+
| `ServerBannerEvent` | Fired when a server banner is displayed |
114+
| `ThemeChangeEvent` | Fired when the theme is changed |
115+
| `ThemeLoadEvent` | Fired when a theme is loaded |
116+
| `ThemeRegisterEvent` | Fired when a theme is registered |
117+
| `ThemeUnregisterEvent` | Fired when a theme is unregistered |
118+
| `ThemeUpdateEvent` | Fired when a theme is updated |
119+
| `TitleScreenLogoInitializeEvent` | Fired when the title screen logo is initialized |
120+
| `TitleScreenOpenedEvent` | Fired when the main menu is fully opened, after the open sequence is finished and all parts of the menu are initialized. Can detect if this is the first time the title screen is opened during the application's lifecycle |
121+
| `TitleScreenRenderEvent` | Fired when the title screen is rendered |
122+
| `TitleScreenSplashTextEvent` | Fired when the title screen splash text is displayed |
123+
| `WindowResizeEvent` | Fired when the game window is resized |
124+
| `WindowShowEvent` | Fired when the game window is shown |
125+
| **Input Events** |
126+
| `CharacterTypedEvent` | Fired when a character is typed |
127+
| `KeyEvent` | Fired when a keyboard key is pressed or released. Provides information about which key was affected and the action (press, release, repeat). Can be cancelled to prevent the key input from being processed |
128+
| `RegisterKeybindingEvent` | Fired when a keybinding is registered |
129+
| **Lifecycle Events** |
130+
| `GameFpsLimitEvent` | Fired when the FPS limit is changed |
131+
| `GameShutdownEvent` | Fired when the game is shutting down |
132+
| `GameTickEvent` | Fired twice every game tick (PRE and POST phases). Useful for performing periodic tasks or animations that need to be synchronized with the game's update cycle |
133+
| **Miscellaneous Events** |
134+
| `CaptureScreenshotEvent` | Fired when a screenshot is captured |
135+
| `VanillaOptionsSaveEvent` | Fired when vanilla options are saved |
136+
| `WriteScreenshotEvent` | Fired when a screenshot is written to disk |
137+
| **Network Events** |
138+
| `PlayerInfoAddEvent` | Fired when player info is added |
139+
| `PlayerInfoRemoveEvent` | Fired when player info is removed |
140+
| `NetworkDisconnectEvent` | Fired when disconnecting from a network (deprecated) |
141+
| `NetworkServerSwitchEvent` | Fired when switching servers within a network |
142+
| `NetworkSwitchEvent` | Fired when switching networks |
143+
| `ServerDisconnectEvent` | Fired when the connection to a server closes (disconnect, kick, or network interruption). Provides access to server data for cleanup operations |
144+
| `ServerJoinEvent` | Fired when the client is ready to send packets to the server/network after joining |
145+
| `ServerSwitchEvent` | Fired when switching between different server networks without fully disconnecting. Provides access to both old and new server data |
146+
| `SubServerSwitchEvent` | Fired when switching between sub-servers within the same network (e.g., moving between game modes on a BungeeCord/Velocity network) |
147+
| **Render Events** |
148+
| `ConfigureMojangShaderEvent` | Fired when Mojang shaders are configured |
149+
| `PlayerNameTagRenderEvent` | Fired when a player name tag is rendered |
150+
| `RenderEvent` | Fired during rendering |
151+
| `RenderTypeAttachmentEvent` | Fired when a render type is attached |
152+
| `CameraRotationEvent` | Fired when the camera rotates |
153+
| `EntityRenderEvent` | Fired when an entity is rendered |
154+
| `EntityRenderPassEvent` | Fired during an entity render pass |
155+
| `PlayerItemRenderContextEvent` | Fired when rendering a player's item |
156+
| `HumanoidModelAnimateEvent` | Fired when a humanoid model is animated |
157+
| `HudWidgetDropzoneElementShiftEvent` | Fired when a HUD widget dropzone element is shifted |
158+
| `PostProcessingScreenEvent` | Fired during post-processing of the screen |
159+
| `ShadowRenderPassContextEvent` | Fired during shadow rendering |
160+
| `RenderBlockSelectionBoxEvent` | Fired when rendering the block selection box |
161+
| `RenderWorldEvent` | Fired when the world is rendered |
162+
| **Resource Events** |
163+
| `ReleaseTextureEvent` | Fired when a texture is released |
164+
| `IncompatibleResourcePacksEvent` | Fired when incompatible resource packs are detected |
165+
| `ResourceReloadEvent` | Fired when resources are reloaded |
166+
| `RegisterResourceTransformerEvent` | Fired when a resource transformer is registered |
167+
| **Scoreboard Events** |
168+
| `ScoreboardObjectiveUpdateEvent` | Fired when a scoreboard objective is updated |
169+
| `ScoreboardScoreUpdateEvent` | Fired when a scoreboard score is updated |
170+
| `ScoreboardTeamUpdateEvent` | Fired when a scoreboard team is updated |
171+
| **Session Events** |
172+
| `SessionUpdateEvent` | Fired when the session is updated |
173+
| **World Events** |
174+
| `DimensionChangeEvent` | Fired when the dimension changes |
175+
| `EntityDestructEvent` | Fired when an entity is destroyed |
176+
| `EntitySpawnEvent` | Fired when an entity spawns |
177+
| `ItemStackTooltipEvent` | Fired when an item stack tooltip is displayed |
178+
| `WorldLeaveEvent` | Fired when leaving a world |
179+
| `BlockUpdateEvent` | Fired when a block is updated |
180+
| `ChunkEvent` | Fired for chunk-related actions |
181+
| `LightUpdateEvent` | Fired when lighting is updated |
182+
| **LabyMod Events** |
183+
| `LabyModRefreshEvent` | Fired when LabyMod is refreshed |
184+
| `ServiceLoadEvent` | Fired when a service is loaded |
185+
| `SubscribeMethodRegisterEvent` | Fired when a subscribe method is registered |
186+
| `ConfigurationLoadEvent` | Fired when a configuration is loaded |
187+
| `ConfigurationSaveEvent` | Fired when a configuration is saved |
188+
| `ConfigurationVersionUpdateEvent` | Fired when a configuration version is updated |
189+
| `SettingInitializeEvent` | Fired when a setting is initialized |
190+
| `SettingResetEvent` | Fired when a setting is reset |
191+
| `SettingWidgetInitializeEvent` | Fired when a setting widget is initialized |
192+
| `ImGuiInitializeEvent` | Fired when ImGui is initialized |
193+
| `LabyConnectChatMessageDeleteEvent` | Fired when a LabyConnect chat message is deleted |
194+
| `LabyConnectEvent` | Fired for LabyConnect-related actions |
195+
| `LabyConnectChatDropdownInitializeEvent` | Fired when a LabyConnect chat dropdown is initialized |
196+
| `LabyConnectChatInitializeEvent` | Fired when LabyConnect chat is initialized |
63197

64198
## Create Your Very Own Events
65199

@@ -110,4 +244,4 @@ The `AdvancementReceivedListener` needs a method annotated with `@Subscribe` and
110244

111245
}
112246
```
113-
Finally, we need to register our `AdvancementReceivedListener` class in the `enable()` method of our main addon class by calling `registerListener(new AdvancementReceivedListener())`.
247+
Finally, we need to register our `AdvancementReceivedListener` class in the `enable()` method of our main addon class by calling `registerListener(new AdvancementReceivedListener())`.

0 commit comments

Comments
 (0)