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
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.client.event.ViewportEvent
ViewportEvent.ComputeCameraAngles, ViewportEvent.ComputeFogColor, ViewportEvent.ComputeFov, ViewportEvent.RenderFog
-
Field Summary
-
Constructor Summary
ConstructorDescriptionComputeFov
(GameRenderer renderer, Camera camera, double renderPartialTicks, double fov, boolean usedConfiguredFov) -
Method Summary
Methods inherited from class net.neoforged.neoforge.client.event.ViewportEvent
getCamera, getPartialTick, getRenderer
-
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
-