Class ComputeFovModifierEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.ComputeFovModifierEvent
public class ComputeFovModifierEvent
extends net.neoforged.bus.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
, and does not
invalid reference
cancellable
.invalid reference
have a result
This event is fired on the main Forge event bus, only on the logical client.
- See Also:
-
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.
-
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)
-