Class ScreenEvent.Render
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ScreenEvent
net.neoforged.neoforge.client.event.ScreenEvent.Render
- Direct Known Subclasses:
ScreenEvent.Render.Background, ScreenEvent.Render.Foreground, ScreenEvent.Render.Post, ScreenEvent.Render.Pre
- Enclosing class:
ScreenEvent
Fired when a screen is being drawn.
See the subclasses for the various rendering stages.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFired after the screen's renderBackground and before its render method.static classFired after the screen's main contents and before deferred elements (e.g. tooltips and the preedit overlay).static classFired after the screen is drawn.static classFired before the screen is drawn.Nested classes/interfaces inherited from class ScreenEvent
ScreenEvent.CharacterTyped, ScreenEvent.Closing, ScreenEvent.Init, ScreenEvent.KeyPressed, ScreenEvent.KeyReleased, ScreenEvent.MouseButtonPressed, ScreenEvent.MouseButtonReleased, ScreenEvent.MouseDragged, ScreenEvent.MouseScrolled, ScreenEvent.Opening, ScreenEvent.Preedit, ScreenEvent.Render, ScreenEvent.RenderInventoryMobEffects -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GuiGraphicsExtractorprivate final intprivate final intprivate final float -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRender(Screen screen, GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTick) -
Method Summary
Modifier and TypeMethodDescriptionReturns the gui graphics used for rendering.intReturns the X coordinate of the mouse pointer.intReturns the Y coordinate of the mouse pointer.floatReturns the partial tick.Methods inherited from class ScreenEvent
getScreen
-
Field Details
-
guiGraphics
-
mouseX
private final int mouseX -
mouseY
private final int mouseY -
partialTick
private final float partialTick
-
-
Constructor Details
-
Render
@Internal protected Render(Screen screen, GuiGraphicsExtractor guiGraphics, int mouseX, int mouseY, float partialTick)
-
-
Method Details
-
getGuiGraphics
Returns the gui graphics used for rendering.- Returns:
- the gui graphics used for rendering
-
getMouseX
public int getMouseX()Returns the X coordinate of the mouse pointer.- Returns:
- the X coordinate of the mouse pointer
-
getMouseY
public int getMouseY()Returns the Y coordinate of the mouse pointer.- Returns:
- the Y coordinate of the mouse pointer
-
getPartialTick
public float getPartialTick()Returns the partial tick.- Returns:
- the partial tick
-