Package net.minecraftforge.client.event
Class ComputeFovModifierEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ComputeFovModifierEvent
public class ComputeFovModifierEvent
extends net.minecraftforge.eventbus.api.Event
Fired after the field of vision (FOV) modifier for the player is calculated to allow developers to adjust it further.
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.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
Returns the original field of vision (FOV) of the player, before any modifications or interpolation.float
Returns the current field of vision (FOV) of the player.Returns the player affected by this event.void
setNewFovModifier
(float newFovModifier) Sets the new field of vision (FOV) of the player.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
player
-
fovModifier
private final float fovModifier -
newFovModifier
private float newFovModifier
-
-
Constructor Details
-
ComputeFovModifierEvent
-
-
Method Details
-
getPlayer
Returns the player affected by this event.- Returns:
- the player affected by this event
-
getFovModifier
public float getFovModifier()Returns the original field of vision (FOV) of the player, before any modifications or interpolation.- Returns:
- the original field of vision (FOV) of the player, before any modifications or interpolation
-
getNewFovModifier
public float getNewFovModifier()Returns the current field of vision (FOV) of the player.- Returns:
- the current field of vision (FOV) of the player
-
setNewFovModifier
public void setNewFovModifier(float newFovModifier) Sets the new field of vision (FOV) of the player.- Parameters:
newFovModifier
- the new field of vision (FOV)
-