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.Post
,ScreenEvent.Render.Pre
- Enclosing class:
ScreenEvent
Fired when a screen is being drawn.
See the two subclasses for listening before and after drawing.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired after the screen is drawn.static class
Fired before the screen is drawn.Nested classes/interfaces inherited from class net.neoforged.neoforge.client.event.ScreenEvent
ScreenEvent.BackgroundRendered, ScreenEvent.CharacterTyped, ScreenEvent.Closing, ScreenEvent.Init, ScreenEvent.KeyPressed, ScreenEvent.KeyReleased, ScreenEvent.MouseButtonPressed, ScreenEvent.MouseButtonReleased, ScreenEvent.MouseDragged, ScreenEvent.MouseScrolled, ScreenEvent.Opening, ScreenEvent.Render, ScreenEvent.RenderInventoryMobEffects
-
Field Summary
Modifier and TypeFieldDescriptionprivate final GuiGraphics
private final int
private final int
private final float
-
Constructor Summary
ModifierConstructorDescriptionprotected
Render
(Screen screen, GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTick) -
Method Summary
Modifier and TypeMethodDescriptionReturns the gui graphics used for rendering.int
Returns the X coordinate of the mouse pointer.int
Returns the Y coordinate of the mouse pointer.float
Returns the partial tick.Methods inherited from class net.neoforged.neoforge.client.event.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, GuiGraphics 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
-