Namespace OnixRuntime.Api.Events
Classes
- OnixEventAudio
Provides events for client audio related things.
- OnixEventCommon
Provides common event hooks for tick, rendering, input, and chat message events.
- OnixEventGame
Provides game-related events (URI invocations, etc.).
- OnixEventGui
Provides events for GUI screens such as container screens and chat screens.
- OnixEventInputs
Provides events for input actions, analog movement, player input ticks, text input, and input reset.
- OnixEventLocalServerWorld
The class hosting the local server events.
- OnixEventPlayer
Provides events for local player actions such as breaking, building, using items, and interacting with entities.
- OnixEventRendering
Provides rendering-related events (world, HUD, screen rendering, 2D/Direct2D hooks). Subscribe to the events to receive renderer objects and timing deltas. Handlers are invoked with an appropriate renderer instance depending on the current rendering backend.
- OnixEventWorld
Provides events for handling world-related actions.
- OnixEvents
Root container for all Onix event groups. Provides typed access to each domain of events (session, rendering, input, GUI, game, etc.). Instantiate once and subscribe to the specific event group(s) you need.
- OnixEventsSession
Provides events for session tick, join, leave, and game pause/resume.
Delegates
- OnixEventAudio.OnSoundPlayedInUiDelegate
Called when a sound is played in the UI.
- OnixEventAudio.OnSoundPlayedInWorldDelegate
Called when a sound is played in the world.
- OnixEventGame.OnUriInvokedDelegate
Called when a URI is invoked. specific to plugins. Not logic safe. The plugin uri that was invoked, the format goes as follows. minecraft://plugin.onixclient.com/{verb}?{key}={value}&{myKey}={myValue} You should use this whenever possible to make it clear it's for plugins and avoid conflicts if you're implementing custom ones.
- OnixEventGame.OnUriInvokedRawDelegate
The raw uri that was invoked e.g. "minecraft://openServersTab" When implementing your own uri handlers you should use UriInvoked.
- OnixEventGui.OnChatScreenTabCompleteDelegate
Delegate for handling chat screen tab completion events.
- OnixEventGui.OnChatScreenTickDelegate
Delegate for handling chat screen tick events.
- OnixEventGui.OnContainerScreenHoverTextRequestedDelegate
Represents a method that is called to retrieve the hover text for a container screen when an item is hovered over. You can change or replace the text however you want, return the text that will be shown to the user. If you have no changes to make, you should return
text
DO NOT USE GetHoverText(RuntimeWorld, bool, bool) or GetHoverText(bool, bool) unless you set vanilla to true. Otherwise, you will get infinite recursion.
- OnixEventGui.OnContainerScreenTickDelegate
Delegate for handling container screen tick events.
- OnixEventInputs.OnInputDelegate
Delegate for handling input events (keyboard, mouse, etc.).
- OnixEventInputs.OnInputResetDelegate
Delegate for handling input reset events.
- OnixEventInputs.OnPlayerInputTickDelegate
Delegate for handling player input tick events.
- OnixEventInputs.OnRawTextCharDelegate
Delegate for handling raw text character input events.
- OnixEventInputs.OnShouldCancelAnalogMovementDelegate
Delegate for handling analog movement cancellation events.
- OnixEventInputs.OnTextCharDelegate
Delegate for handling text character input events.
- OnixEventLocalServerWorld.OnAreaChangedDelegate
Delegate that is invoked whenever an area in the world changes.
- OnixEventLocalServerWorld.OnBlockChangedDelegate
Delegate that is invoked whenever a block in the world changes. Provides context about the region, position, old and new blocks, as well as how the change should be propagated and rendered. If you want to keep the block, use
region
's GetBlock(BlockPos) atposition
. You can also use the runtime ID and the GetBlockFromRuntimeId(uint) for both old or new block if you want to keep it.
- OnixEventPlayer.OnLocalServerPlayerAttackDelegate
Delegate for handling when a player attacks an entity.
- OnixEventPlayer.OnLocalServerPlayerBreakBlockDelegate
Delegate for handling when a player breaks a block.
- OnixEventPlayer.OnLocalServerPlayerBuildBlockDelegate
Delegate for handling when a player builds a block.
- OnixEventPlayer.OnLocalServerPlayerInteractDelegate
Delegate for handling when a player interacts with an entity.
- OnixEventPlayer.OnLocalServerPlayerStartBreakBlockDelegate
Delegate for handling when a player starts breaking a block.
- OnixEventPlayer.OnLocalServerPlayerStopUsingItemDelegate
Delegate for handling when a player stops using an item.
- OnixEventPlayer.OnLocalServerPlayerUseItemDelegate
Delegate for handling when a player uses an item.
- OnixEventPlayer.OnLocalServerPlayerUseItemOnDelegate
Delegate for handling when a player uses an item on a block.
- OnixEventRendering.OnHudRender2DDelegate
This event is called when on hud, hide hud is false and there is no client UI screen opened. This will be called from the user's preferred 2D renderer. This may or may not be a logic callback so don't access game state, entities, etc.
- OnixEventRendering.OnHudRenderDelegate
Called when HUD should be rendered via the game's renderer. Logic-safe: game state and entities are available.
- OnixEventRendering.OnPreRenderScreenDelegate
Delegate for the game's rendering callbacks (always logic-safe).
- OnixEventRendering.OnPreRenderScreenDirect2DDelegate
This event is called all the time. The Pre is before the client's screens are rendered, not the game's. You should avoid this if RenderHudDirect2D gives you what you need. debug_screen should always be there if you want to pick that one, otherwise you can ignore debug_screen and toast_screen to have just the main screen. This will never be a logic callback so don't access game state, entities, etc.
- OnixEventRendering.OnRenderHudDirect2DDelegate
This event is called when on hud, hide hud is false and there is no client UI screen opened. This will be called from the user's preferred 2D renderer. This will never be a logic callback so don't access game state, entities, etc.
- OnixEventRendering.OnRenderScreen2DDelegate
This event is called all the time. You should avoid this if HudRender gives you what you need. This will be called from the user's preferred 2D renderer. This may or may not be a logic callback so don't access game state, entities, etc. There is no PreRenderScreen2D event, because depending on the renderer, pre means different things. You can handle this case manually by checking the different pre events and MainRenderer.
- OnixEventRendering.OnRenderScreenDelegate
This event is called all the time. (always logic-safe) This is a logic callback so you can access game state, entities, etc.
- OnixEventRendering.OnRenderScreenDirect2DDelegate
This event is called all the time. You should avoid this if RenderHudDirect2D gives you what you need. This will never be a logic callback so don't access game state, entities, etc.
- OnixEventRendering.OnWorldRenderDelegate
Called when the world (3D) should be rendered. Logic-safe: game state and entities are available.
- OnixEventRendering.ShouldHideScreenDelegate
This is only for game screens, returning true will prevent that screen from rendering. Delegate used to determine whether a given game screen should be hidden. Return true to prevent rendering of that screen.
- OnixEventWorld.OnAreaChangedDelegate
Delegate that is invoked whenever an area in the world changes.
- OnixEventWorld.OnBlockChangedDelegate
Delegate that is invoked whenever a block in the world changes. Provides context about the region, position, old and new blocks, as well as how the change should be propagated and rendered.
- OnixEventsSession.OnDimensionChangedDelegate
Delegate for handling dimension change events.
- OnixEventsSession.OnSessionJoinedDelegate
Delegate for handling join events.
- OnixEventsSession.OnSessionLeftDelegate
Delegate for handling leave events.
- OnixEventsSession.OnTickDelegate
Delegate for handling game tick events.