Package net.neoforged.neoforge.client.event
@ParametersAreNonnullByDefault
package net.neoforged.neoforge.client.event
Events fired only on the client-side, chiefly related to rendering and user interfaces (screens and input).
-
ClassDescriptionThis event allows mods to register client-side reload listeners to the resource manager.This event can be used to add static geometry to chunk sections.A rendering callback that will be invoked during chunk meshing.Fired for hooking the maximum distance from the player to the camera in third-person view.Fired inwhen retrieving the values of mouse sensitivity and cinematic camera, prior to running calculations on these values.
invalid reference
MouseHandler#turnPlayer()
Fired when the client is about to send a chat message to the server.Fired when a chat message is received on the client.Fired when a player chat message is received on the client.Fired when a system chat message is received on the client.Fired when game pause state is about to changeFired when pause is already changedFired when pause is going to changeFired when the client player is notified of a change ofGameTypefrom the server.Fired for different client connectivity events.Fired when the client player respawns, creating a new player instance to replace the old player instance.Fired when the client player logs in to the server.Fired when the client player logs out.Fires after the client has completed loading or reloading its resources successfully.Base class of the two client tick events.ClientTickEvent.Postis fired once per client tick, after the client performs work for the current tick.ClientTickEvent.Preis fired once per client tick, before the client performs work for the current tick.Fired after the field of vision (FOV) modifier for the player is calculated to allow developers to adjust it further.Fired during GpuDevice creation to allow optional features to be enabled.Fired when configuring the main render target during startup.Fired for hooking intoAbstractContainerScreenevents.Fired every time anAbstractContainerScreenrenders.Fired after the container screen's foreground layer and elements are drawn, but before rendering the tooltips and the item stack being dragged by the player.Fired when an overlay is about to be rendered to the screen to allow the user to modify it.Fired before a boss health bar is rendered to the screen.Fired before the chat messages overlay is rendered to the screen.Fired for on different events/actions relating to entity renderers.Fired for registering entity renderer layers at the appropriate time, after the entity and player renderers maps have been created.Fired for registering additional skull models.Fired for registering layer definitions at the appropriate time.Fired for registering entity and block entity renderers at the appropriate time.Fired after theBlockOutlineRenderStateis extracted.Fired when theLevelRendererextracts level render state, after all vanilla states have been extracted.Fired when the frame graph is set up at the start of level rendering, right before the vanilla frame passes are set up.This event is called whenEffectsInInventorydraws the tooltip lines for a hoveredMobEffectInstancein anAbstractContainerScreen.Fired duringMinecraftinitialization and datagen startup to allow initializing custom client-only "registries".Fired when an input is detected from the user's input devices.Fired when a keymapping that by default involves clicking the mouse buttons is triggered.Fired when a keyboard key input occurs, such as pressing, releasing, or repeating a key.Fired when a mouse button is pressed/released.Fired when a mouse button is pressed/released, after processing.Fired when a mouse button is pressed/released, before being processed by vanilla.Fired when a mouse scroll wheel is used outside of a screen and a player is loaded, before being processed by vanilla.Houses events related to models.Fired when theModelManageris notified of the resource manager reloading.Fired while theModelManageris reloading models, after the model registry is set up, but before it's passed to theBlockModelShaperfor caching.Allows users to register their ownunbaked model loadersfor use in block/item models.Fired when theModelDiscoveryis notified of dependency discovery of its top models.Fired after the player's movement inputs are updated.Fired byGui.HeartType.forPlayer(net.minecraft.world.entity.player.Player)to allow mods to change the heart sprite which is displayed in the player's health bar.This event is fired on the client when it has finished receiving recipe data from the server.Fire to register new types ofCustomUnbakedBlockStateModelandCustomBlockModelDefinition.Fired to allow mods to register client commands.Allows users to register customClientTooltipComponentfactories for theirTooltipComponenttypes.Fired for registering block and item color handlers at the appropriate time.Fired for registering block color handlers.Allows registration of customColorResolverimplementations to be used withBlockAndTintGetter.getBlockTint(BlockPos, ColorResolver).Fired for registering item color handlers.Event fired when special model renderers are registered.Event fired when debug entries are registered.Allows users to register customDimensionSpecialEffectsfor their dimensions.Event for registering screen effects when transitioning across dimensions.Allows users to register custom shaders to be used when the player spectates a certain kind of entity.Allows users to register customlayersfor GUI rendering.Allows users to register custom IItemDecorator to Items.Event fired when item models are registered.Allows registering customAnimationTargets andinterpolation functions for loading JSON entity animation files.Allows users to register customkey mappingsandkey mapping categories.Allows users to register custom namedrender types.Fired for registering additional particle group factories.Fired for registering particle providers at the appropriate time.Event to register customPictureInPictureRenderers for specialized rendering in UIs.Event for registeringPresetEditorscreen factories for world presets.Event fired when special model renderers are registered.Event to registerExtendedRecipeBookCategoryinstances for search.Fired to allow mods to register custom render buffers.Fired to allow mods to register custom pipelines.Event fired when item model property selectors are registered.Event fired when special block model renderers are created.Event fired when special model renderers are registered.Fired to allow mods to register their own SpriteSource codecs.Fired for registering texture atlases to theAtlasManager.Fired before the player's arm is rendered in first person.Fired before a block texture will be overlaid on the player's view.The type of the block overlay to be rendered.Base class of the two render frame events.RenderFrameEvent.Postis fired once per frame, after the current frame is rendered via.invalid reference
GameRenderer#render(float, long, boolean)RenderFrameEvent.Preis fired once per frame, before the current frame is rendered via.invalid reference
GameRenderer#render(float, long, boolean)Fired when the HUD is rendered to the screen.Fired after the HUD is rendered to the screen, if the correspondingRenderGuiEvent.Preis not cancelled.Fired before the HUD is rendered to the screen.Fired when a GUI layer is rendered to the screen.Fired after a GUI layer is rendered to the screen, if the correspondingRenderGuiLayerEvent.Preis not cancelled.Fired before a GUI layer is rendered to the screen.Fired before a hand is rendered in the first person view.Fired before an item stack is rendered in an item frame.Fires at various times during LevelRenderer.renderLevel(com.mojang.blaze3d.resource.GraphicsResourceAllocator, net.minecraft.client.DeltaTracker, boolean, net.minecraft.client.Camera, org.joml.Matrix4f, org.joml.Matrix4f, org.joml.Matrix4f, com.mojang.blaze3d.buffers.GpuBufferSlice, org.joml.Vector4f, boolean) and GameRenderer.renderLevel(net.minecraft.client.DeltaTracker).Fired within LevelRenderer.addMainPass(com.mojang.blaze3d.framegraph.FrameGraphBuilder, net.minecraft.client.renderer.culling.Frustum, org.joml.Matrix4f, com.mojang.blaze3d.buffers.GpuBufferSlice, boolean, net.minecraft.client.renderer.state.LevelRenderState, net.minecraft.client.DeltaTracker, net.minecraft.util.profiling.ProfilerFiller) after entities and block entities have been rendered.Fired within GameRenderer.renderLevel(net.minecraft.client.DeltaTracker) after LevelRenderer.renderLevel(com.mojang.blaze3d.resource.GraphicsResourceAllocator, net.minecraft.client.DeltaTracker, boolean, net.minecraft.client.Camera, org.joml.Matrix4f, org.joml.Matrix4f, org.joml.Matrix4f, com.mojang.blaze3d.buffers.GpuBufferSlice, org.joml.Vector4f, boolean) is called.Fired early in LevelRenderer.addMainPass(com.mojang.blaze3d.framegraph.FrameGraphBuilder, net.minecraft.client.renderer.culling.Frustum, org.joml.Matrix4f, com.mojang.blaze3d.buffers.GpuBufferSlice, boolean, net.minecraft.client.renderer.state.LevelRenderState, net.minecraft.client.DeltaTracker, net.minecraft.util.profiling.ProfilerFiller) after solid and cutout chunk geometry has been rendered.Fired at the end of LevelRenderer.addParticlesPass(com.mojang.blaze3d.framegraph.FrameGraphBuilder, com.mojang.blaze3d.buffers.GpuBufferSlice) after particles have been rendered.Fired at the end of LevelRenderer.addSkyPass(com.mojang.blaze3d.framegraph.FrameGraphBuilder, net.minecraft.client.Camera, com.mojang.blaze3d.buffers.GpuBufferSlice) after the sky has been rendered.Fired within LevelRenderer.addMainPass(com.mojang.blaze3d.framegraph.FrameGraphBuilder, net.minecraft.client.renderer.culling.Frustum, org.joml.Matrix4f, com.mojang.blaze3d.buffers.GpuBufferSlice, boolean, net.minecraft.client.renderer.state.LevelRenderState, net.minecraft.client.DeltaTracker, net.minecraft.util.profiling.ProfilerFiller) after translucent chunk geometry has been rendered.Fired near the end of LevelRenderer.addMainPass(com.mojang.blaze3d.framegraph.FrameGraphBuilder, net.minecraft.client.renderer.culling.Frustum, org.joml.Matrix4f, com.mojang.blaze3d.buffers.GpuBufferSlice, boolean, net.minecraft.client.renderer.state.LevelRenderState, net.minecraft.client.DeltaTracker, net.minecraft.util.profiling.ProfilerFiller) after tripwire chunk geometry has been rendered.Fired near the end of LevelRenderer.addWeatherPass(com.mojang.blaze3d.framegraph.FrameGraphBuilder, net.minecraft.world.phys.Vec3, com.mojang.blaze3d.buffers.GpuBufferSlice) after weather has been rendered, before world border rendering.RenderLivingEvent<T extends LivingEntity,S extends LivingEntityRenderState, M extends EntityModel<? super S>> Fired when aLivingEntityis rendered.RenderLivingEvent.Post<T extends LivingEntity,S extends LivingEntityRenderState, M extends EntityModel<? super S>> Fired after an entity is rendered, if the correspondingRenderLivingEvent.Postis not cancelled.RenderLivingEvent.Pre<T extends LivingEntity,S extends LivingEntityRenderState, M extends EntityModel<? super S>> Fired before an entity is rendered.This event is fired before an entity renderer renders the nameplate of an entity.This event is fired when an entity renderer extracts the render state of an entity relevant to rendering the nametag.This event is fired before an entity renderer renders the nameplate of an entity.Fired when a player is being rendered.Fired after the player is rendered, if the correspondingRenderPlayerEvent.Preis not cancelled.Fired before the player is rendered.Fired during tooltip rendering.Fired when a tooltip gathers theTooltipComponents to be rendered, before any text wrapping or processing.Fired before the tooltip is rendered.Fired when the textures for the tooltip background are determined.Fired on different events/actions when aScreenis active and visible.Fired when a keyboard key corresponding to a character is typed.Fired after the character input is handled, if not handled by the screen and the correspondingScreenEvent.CharacterTyped.Preis not cancelled.Fired before the character input is handled by the screen.Fired before aScreenis closed.Fired when a screen is being initialized.Fired after the screen's overridable initialization method is called.Fired before the screen's overridable initialization method is fired.Fired whenever a keyboard key is pressed or released.Fired when a keyboard key is pressed.Fired after the key press is handled, if not handled by the screen and the correspondingScreenEvent.KeyPressed.Preis not cancelled.Fired before the key press is handled by the screen.Fired when a keyboard key is released.Fired after the key release is handled, if not handled by the screen and the correspondingScreenEvent.KeyReleased.Preis not cancelled.Fired before the key release is handled by the screen.Fired when a mouse button is pressed.This event is fired after the mouse click is handled, if the correspondingScreenEvent.MouseButtonPressed.Prewas not cancelled.Fired before the mouse click is handled by the screen.Fired when a mouse button is released.This event is fired after the mouse release is handled, if the correspondingScreenEvent.MouseButtonReleased.Prewas not cancelled.Fired before the mouse release is handled by the screen.Fired when the mouse was dragged while a button is being held down.Fired after the mouse drag is handled, if not handled by the screen and the correspondingScreenEvent.MouseDragged.Preis not cancelled.Fired before the mouse drag is handled by the screen.Fired whenever an action is performed by the mouse.Fired when the mouse was dragged while a button is being held down.Fired after the mouse scroll is handled, if not handled by the screen and the correspondingScreenEvent.MouseScrolled.Preis not cancelled.Fired before the mouse scroll is handled by the screen.Fired before anyScreenis opened, to allow changing it or preventing it from being opened.Fired when a screen is being drawn.Fired after the screen's renderBackground and before its render method.Fired after the screen is drawn.Fired before the screen is drawn.Fired ahead of rendering any active mob effects in theEffectsInInventoryheld by aAbstractContainerScreen.Fired when a screenshot is taken, but before it is written to disk.Fired when theMusicManagerchecks what situational music should be used.Fired after a texture atlas is stitched together and all textures therein have been loaded.Fired when the client queues aToastmessage to be shown onscreen.Fired for hooking into the entity view rendering inGameRenderer.Fired to allow altering the angles of the player's camera.Fired for customizing the color of the fog visible to the player.Fired for altering the raw field of view (FOV).Fired for rendering custom fog.