Package net.minecraftforge.client.event
Class ViewportEvent.ComputeFov
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ViewportEvent
net.minecraftforge.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 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.minecraftforge.client.event.ViewportEvent
ViewportEvent.ComputeCameraAngles, ViewportEvent.ComputeFogColor, ViewportEvent.ComputeFov, ViewportEvent.RenderFog
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionComputeFov
(GameRenderer renderer, Camera camera, double renderPartialTicks, double fov, boolean usedConfiguredFov) -
Method Summary
Methods inherited from class net.minecraftforge.client.event.ViewportEvent
getCamera, getPartialTick, getRenderer
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
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
-