Class EntityViewRenderEvent.RenderFogEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
Enclosing class:
EntityViewRenderEvent

public static class EntityViewRenderEvent.RenderFogEvent extends EntityViewRenderEvent.FogEvent
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.
  • Field Details

    • type

      private final FogRenderer.FogMode type
    • farPlaneDistance

      private float farPlaneDistance
    • nearPlaneDistance

      private float nearPlaneDistance
    • fogShape

      private FogShape 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

      public FogRenderer.FogMode getMode()
      Overrides:
      getMode in class EntityViewRenderEvent.FogEvent
    • getFarPlaneDistance

      public float getFarPlaneDistance()
    • getNearPlaneDistance

      public float getNearPlaneDistance()
    • getFogShape

      public FogShape getFogShape()
    • setFarPlaneDistance

      public void setFarPlaneDistance(float distance)
    • setNearPlaneDistance

      public void setNearPlaneDistance(float distance)
    • setFogShape

      public void setFogShape(FogShape shape)
    • scaleFarPlaneDistance

      public void scaleFarPlaneDistance(float factor)
    • scaleNearPlaneDistance

      public void scaleNearPlaneDistance(float factor)