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 have a result.invalid @linkplain
cancellable
This event is fired on the main Forge event bus, only on the logical client.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class net.neoforged.bus.api.Eventnet.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfloatReturns the original field of vision (FOV) of the player, before any modifications or interpolation.floatReturns the current field of vision (FOV) of the player.Returns the player affected by this event.voidsetNewFovModifier(float newFovModifier) Sets the new field of vision (FOV) of the player.Methods inherited from class net.neoforged.bus.api.EventgetResult, hasResult, setResult
- 
Field Details- 
player
- 
fovModifierprivate final float fovModifier
- 
newFovModifierprivate float newFovModifier
 
- 
- 
Constructor Details- 
ComputeFovModifierEvent
 
- 
- 
Method Details- 
getPlayerReturns the player affected by this event.- Returns:
- the player affected by this event
 
- 
getFovModifierpublic 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
 
- 
getNewFovModifierpublic float getNewFovModifier()Returns the current field of vision (FOV) of the player.- Returns:
- the current field of vision (FOV) of the player
 
- 
setNewFovModifierpublic void setNewFovModifier(float newFovModifier) Sets the new field of vision (FOV) of the player.- Parameters:
- newFovModifier- the new field of vision (FOV)
 
 
-