Class RenderFrameEvent

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RenderFrameEvent
Direct Known Subclasses:
RenderFrameEvent.Post, RenderFrameEvent.Pre

public abstract class RenderFrameEvent extends net.neoforged.bus.api.Event
Base class of the two render frame events.

These events can be used to setup and teardown global render state that must persist for the current frame.

For the event that fires once per client tick (instead of per frame), see ClientTickEvent.

See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    RenderFrameEvent.Post is fired once per frame, after the current frame is rendered via
    invalid reference
    GameRenderer#render(float, long, boolean)
    .
    static class 
    RenderFrameEvent.Pre is fired once per frame, before the current frame is rendered via
    invalid reference
    GameRenderer#render(float, long, boolean)
    .
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.minecraft.client.DeltaTracker
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    RenderFrameEvent(net.minecraft.client.DeltaTracker partialTick)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.DeltaTracker
    Returns the current partial tick, which is either the true partial tick or the pause partial tick, depending on if the game is paused.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • partialTick

      protected final net.minecraft.client.DeltaTracker partialTick
  • Constructor Details

    • RenderFrameEvent

      protected RenderFrameEvent(net.minecraft.client.DeltaTracker partialTick)
  • Method Details

    • getPartialTick

      public net.minecraft.client.DeltaTracker getPartialTick()
      Returns the current partial tick, which is either the true partial tick or the pause partial tick, depending on if the game is paused.
      Returns:
      the current partial tick, which is either the true partial tick or the pause partial tick, depending on if the game is paused