Class ViewportEvent.ComputeFov

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ViewportEvent
net.neoforged.neoforge.client.event.ViewportEvent.ComputeFov
Enclosing class:
ViewportEvent

public static class ViewportEvent.ComputeFov extends ViewportEvent
Fired for altering the raw field of view (FOV). This is after the FOV settings are applied, and before modifiers such as the Nausea effect.

This event is not cancellable, and does not

invalid reference
have a result
.

This event is fired on the main Forge event bus, only on the logical client.

See Also:
  • Field Details Link icon

    • usedConfiguredFov Link icon

      private final boolean usedConfiguredFov
    • fov Link icon

      private double fov
  • Constructor Details Link icon

    • ComputeFov Link icon

      @Internal public ComputeFov(GameRenderer renderer, Camera camera, double renderPartialTicks, double fov, boolean usedConfiguredFov)
  • Method Details Link icon

    • getFOV Link icon

      public double getFOV()
      Returns the raw field of view value.
      Returns:
      the raw field of view value
    • setFOV Link icon

      public void setFOV(double fov)
      Sets the field of view value.
      Parameters:
      fov - the new FOV value
    • usedConfiguredFov Link icon

      public boolean usedConfiguredFov()
      Returns whether the base fov value started with a constant or was sourced from the fov set in the options.
      Returns:
      whether the base fov value started with a constant or was sourced from the fov set in the options