Package net.minecraftforge.client.event
Class ViewportEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ViewportEvent
- Direct Known Subclasses:
ViewportEvent.ComputeCameraAngles
,ViewportEvent.ComputeFogColor
,ViewportEvent.ComputeFov
,ViewportEvent.RenderFog
public abstract class ViewportEvent
extends net.minecraftforge.eventbus.api.Event
Fired for hooking into the entity view rendering in
GameRenderer
.
These can be used for customizing the visual features visible to the player.
See the various subclasses for listening to different features.
These events are fired on the main Forge event bus, only on the logical client.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Fired to allow altering the angles of the player's camera.static class
Fired for customizing the color of the fog visible to the player.static class
Fired for altering the raw field of view (FOV).static class
Fired for rendering custom fog.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
Modifier and TypeFieldDescriptionprivate final Camera
private final double
private final GameRenderer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the camera information.double
Returns the partial tick.Returns the game renderer.Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
renderer
-
camera
-
partialTick
private final double partialTick
-
-
Constructor Details
-
ViewportEvent
-
-
Method Details
-
getRenderer
Returns the game renderer.- Returns:
- the game renderer
-
getCamera
Returns the camera information.- Returns:
- the camera information
-
getPartialTick
public double getPartialTick()Returns the partial tick.- Returns:
- the partial tick
-