Package net.minecraftforge.client.event
Class ViewportEvent.ComputeCameraAngles
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ViewportEvent
net.minecraftforge.client.event.ViewportEvent.ComputeCameraAngles
- Enclosing class:
- ViewportEvent
Fired to allow altering the angles of the player's camera.
This can be used to alter the player's view for different effects, such as applying roll.
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.
-
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
ConstructorDescriptionComputeCameraAngles
(GameRenderer renderer, Camera camera, double renderPartialTicks, float yaw, float pitch, float roll) -
Method Summary
Modifier and TypeMethodDescriptionfloat
getPitch()
Returns the pitch of the player's camera.float
getRoll()
Returns the roll of the player's camera.float
getYaw()
Returns the yaw of the player's camera.void
setPitch
(float pitch) Sets the pitch of the player's camera.void
setRoll
(float roll) Sets the roll of the player's camera.void
setYaw
(float yaw) Sets the yaw of the player's camera.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
-
yaw
private float yaw -
pitch
private float pitch -
roll
private float roll
-
-
Constructor Details
-
ComputeCameraAngles
@Internal public ComputeCameraAngles(GameRenderer renderer, Camera camera, double renderPartialTicks, float yaw, float pitch, float roll)
-
-
Method Details
-
getYaw
public float getYaw()Returns the yaw of the player's camera.- Returns:
- the yaw of the player's camera
-
setYaw
public void setYaw(float yaw) Sets the yaw of the player's camera.- Parameters:
yaw
- the new yaw
-
getPitch
public float getPitch()Returns the pitch of the player's camera.- Returns:
- the pitch of the player's camera
-
setPitch
public void setPitch(float pitch) Sets the pitch of the player's camera.- Parameters:
pitch
- the new pitch
-
getRoll
public float getRoll()Returns the roll of the player's camera.- Returns:
- the roll of the player's camera
-
setRoll
public void setRoll(float roll) Sets the roll of the player's camera.- Parameters:
roll
- the new roll
-