Class SkyProperties

java.lang.Object
net.minecraft.client.render.SkyProperties
Direct Known Subclasses:
SkyProperties.End, SkyProperties.Nether, SkyProperties.Overworld

@Environment(CLIENT)
public abstract class SkyProperties
extends Object
  • Field Details

    • BY_IDENTIFIER

      private static final Object2ObjectMap<Identifier,​SkyProperties> BY_IDENTIFIER
    • rgba

      private final float[] rgba
    • cloudsHeight

      private final float cloudsHeight
    • alternateSkyColor

      private final boolean alternateSkyColor
    • skyType

      private final SkyProperties.SkyType skyType
    • brightenLighting

      private final boolean brightenLighting
    • darkened

      private final boolean darkened
  • Constructor Details

    • SkyProperties

      public SkyProperties​(float cloudsHeight, boolean alternateSkyColor, SkyProperties.SkyType skyType, boolean brightenLighting, boolean darkened)
  • Method Details

    • byDimensionType

      public static SkyProperties byDimensionType​(DimensionType dimensionType)
    • getFogColorOverride

      @Nullable public float[] getFogColorOverride​(float skyAngle, float tickDelta)
      Returns a fog color override based on the current sky angle. This is used in vanilla to render sunset and sunrise fog.
      Returns:
      an RGBA array of four floats, or null if fog color should not be overridden
    • getCloudsHeight

      public float getCloudsHeight()
    • isAlternateSkyColor

      public boolean isAlternateSkyColor()
    • adjustFogColor

      public abstract Vec3d adjustFogColor​(Vec3d color, float sunHeight)
      Transforms the given fog color based on the current height of the sun. This is used in vanilla to darken fog during night.
    • useThickFog

      public abstract boolean useThickFog​(int camX, int camY)
    • getSkyType

      public SkyProperties.SkyType getSkyType()
    • shouldBrightenLighting

      public boolean shouldBrightenLighting()
    • isDarkened

      public boolean isDarkened()