Package net.minecraftforge.client.event
Class EntityViewRenderEvent.RenderFogEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.EntityViewRenderEvent
net.minecraftforge.client.event.EntityViewRenderEvent.FogEvent
net.minecraftforge.client.event.EntityViewRenderEvent.RenderFogEvent
- Enclosing class:
- EntityViewRenderEvent
This event allows for customization of parameters related to fog rendering. The plane distances are based on the player's render distance.
For the event to have an effect, you must cancel it.
The FogMode is NOT customizable. It describes the type of fog being modified.
A FogMode of FOG_SKY is the skybox's fog.
A FogMode of FOG_TERRAIN is what the fog induced by render distance uses. This works best for reducing the camera's visibility.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.client.event.EntityViewRenderEvent
EntityViewRenderEvent.CameraSetup, EntityViewRenderEvent.FieldOfView, EntityViewRenderEvent.FogColors, EntityViewRenderEvent.FogDensity, EntityViewRenderEvent.RenderFogEvent
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 float
private FogShape
private float
private final FogRenderer.FogMode
-
Constructor Summary
ConstructorDescriptionRenderFogEvent
(FogRenderer.FogMode type, Camera camera, float partialTicks, float distance) Deprecated, for removal: This API element is subject to removal in a future version.Use other constructor with all the params.RenderFogEvent
(FogRenderer.FogMode type, Camera camera, float partialTicks, float nearPlaneDistance, float farPlaneDistance, FogShape fogShape) -
Method Summary
Modifier and TypeMethodDescriptionfloat
getMode()
float
void
scaleFarPlaneDistance
(float factor) void
scaleNearPlaneDistance
(float factor) void
setFarPlaneDistance
(float distance) void
setFogShape
(FogShape shape) void
setNearPlaneDistance
(float distance) Methods inherited from class net.minecraftforge.client.event.EntityViewRenderEvent
getCamera, getPartialTicks, getRenderer
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
type
-
farPlaneDistance
private float farPlaneDistance -
nearPlaneDistance
private float nearPlaneDistance -
fogShape
-
-
Constructor Details
-
RenderFogEvent
@Deprecated(forRemoval=true, since="1.18.2") public RenderFogEvent(FogRenderer.FogMode type, Camera camera, float partialTicks, float distance) Deprecated, for removal: This API element is subject to removal in a future version.Use other constructor with all the params. Will be removed in 1.19 -
RenderFogEvent
public RenderFogEvent(FogRenderer.FogMode type, Camera camera, float partialTicks, float nearPlaneDistance, float farPlaneDistance, FogShape fogShape)
-
-
Method Details
-
getMode
- Overrides:
getMode
in classEntityViewRenderEvent.FogEvent
-
getFarPlaneDistance
public float getFarPlaneDistance() -
getNearPlaneDistance
public float getNearPlaneDistance() -
getFogShape
-
setFarPlaneDistance
public void setFarPlaneDistance(float distance) -
setNearPlaneDistance
public void setNearPlaneDistance(float distance) -
setFogShape
-
scaleFarPlaneDistance
public void scaleFarPlaneDistance(float factor) -
scaleNearPlaneDistance
public void scaleNearPlaneDistance(float factor)
-