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

    • usedConfiguredFov

      private final boolean usedConfiguredFov
    • fov

      private double fov
  • Constructor Details

    • ComputeFov

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

    • getFOV

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

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

      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