类 ViewportEvent.RenderFog
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.client.event.ViewportEvent
net.minecraftforge.client.event.ViewportEvent.RenderFog
- 封闭类:
ViewportEvent
Fired for rendering custom fog. The plane distances are based on the player's render distance.
This event is cancellable, and has a result.
The event must be cancelled for any changes to the plane distances to take effect.
This event is fired on the main Forge event bus, only on the logical client.
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraftforge.client.event.ViewportEvent
ViewportEvent.ComputeCameraAngles, ViewportEvent.ComputeFogColor, ViewportEvent.ComputeFov, ViewportEvent.RenderFog
从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
字段概要
字段修饰符和类型字段说明private float
private FogShape
private final FogRenderer.FogMode
private float
private final FogType
-
构造器概要
构造器构造器说明RenderFog
(FogRenderer.FogMode mode, FogType type, Camera camera, float partialTicks, float nearPlaneDistance, float farPlaneDistance, FogShape fogShape) -
方法概要
修饰符和类型方法说明float
返回 the distance to the far plane where the fog ends。返回 the shape of the fog being rendered。getMode()
返回 the mode of fog being rendered。float
返回 the distance to the near plane where the fog starts。getType()
返回 the type of fog being rendered。void
scaleFarPlaneDistance
(float factor) Scales the distance to the far plane of the fog by a given factor.void
scaleNearPlaneDistance
(float factor) Scales the distance to the near plane of the fog by a given factor.void
setFarPlaneDistance
(float distance) Sets the distance to the far plane of the fog.void
setFogShape
(FogShape shape) Sets the new shape of the fog being rendered.void
setNearPlaneDistance
(float distance) Sets the distance to the near plane of the fog.从类继承的方法 net.minecraftforge.client.event.ViewportEvent
getCamera, getPartialTick, getRenderer
从类继承的方法 net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
字段详细资料
-
mode
-
type
-
farPlaneDistance
private float farPlaneDistance -
nearPlaneDistance
private float nearPlaneDistance -
fogShape
-
-
构造器详细资料
-
RenderFog
@Internal public RenderFog(FogRenderer.FogMode mode, FogType type, Camera camera, float partialTicks, float nearPlaneDistance, float farPlaneDistance, FogShape fogShape)
-
-
方法详细资料
-
getMode
返回 the mode of fog being rendered。- 返回:
- the mode of fog being rendered
-
getType
返回 the type of fog being rendered。- 返回:
- the type of fog being rendered
-
getFarPlaneDistance
public float getFarPlaneDistance()返回 the distance to the far plane where the fog ends。- 返回:
- the distance to the far plane where the fog ends
-
getNearPlaneDistance
public float getNearPlaneDistance()返回 the distance to the near plane where the fog starts。- 返回:
- the distance to the near plane where the fog starts
-
getFogShape
返回 the shape of the fog being rendered。- 返回:
- the shape of the fog being rendered
-
setFarPlaneDistance
public void setFarPlaneDistance(float distance) Sets the distance to the far plane of the fog.- 参数:
distance
- the new distance to the far place- 另请参阅:
-
setNearPlaneDistance
public void setNearPlaneDistance(float distance) Sets the distance to the near plane of the fog.- 参数:
distance
- the new distance to the near plane- 另请参阅:
-
setFogShape
Sets the new shape of the fog being rendered. The new shape will only take effect if the event is cancelled.- 参数:
shape
- the new shape of the fog
-
scaleFarPlaneDistance
public void scaleFarPlaneDistance(float factor) Scales the distance to the far plane of the fog by a given factor.- 参数:
factor
- the factor to scale the far plane distance by
-
scaleNearPlaneDistance
public void scaleNearPlaneDistance(float factor) Scales the distance to the near plane of the fog by a given factor.- 参数:
factor
- the factor to scale the near plane distance by
-