Class ViewportEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ViewportEvent
Direct Known Subclasses:
ViewportEvent.ComputeCameraAngles, ViewportEvent.ComputeFogColor, ViewportEvent.ComputeFov, ViewportEvent.RenderFog

public abstract class ViewportEvent extends net.minecraftforge.eventbus.api.Event
Fired for hooking into the entity view rendering in GameRenderer. These can be used for customizing the visual features visible to the player. See the various subclasses for listening to different features.

These events are fired on the main Forge event bus, only on the logical client.

See Also:
  • Field Details

    • renderer

      private final GameRenderer renderer
    • camera

      private final Camera camera
    • partialTick

      private final double partialTick
  • Constructor Details

    • ViewportEvent

      @Internal public ViewportEvent(GameRenderer renderer, Camera camera, double partialTick)
  • Method Details

    • getRenderer

      public GameRenderer getRenderer()
      Returns the game renderer.
      Returns:
      the game renderer
    • getCamera

      public Camera getCamera()
      Returns the camera information.
      Returns:
      the camera information
    • getPartialTick

      public double getPartialTick()
      Returns the partial tick.
      Returns:
      the partial tick