Package net.minecraft.client.render
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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSkyProperties.Endstatic classSkyProperties.Netherstatic classSkyProperties.Overworldstatic classSkyProperties.SkyType -
Field Summary
Fields Modifier and Type Field Description private booleanalternateSkyColorprivate booleanbrightenLightingprivate static Object2ObjectMap<Identifier,SkyProperties>BY_IDENTIFIERprivate floatcloudsHeightprivate booleandarkenedprivate float[]rgbaprivate SkyProperties.SkyTypeskyType -
Constructor Summary
Constructors Constructor Description SkyProperties(float cloudsHeight, boolean alternateSkyColor, SkyProperties.SkyType skyType, boolean brightenLighting, boolean darkened) -
Method Summary
Modifier and Type Method Description abstract Vec3dadjustFogColor(Vec3d color, float sunHeight)Transforms the given fog color based on the current height of the sun.static SkyPropertiesbyDimensionType(DimensionType dimensionType)floatgetCloudsHeight()float[]getFogColorOverride(float skyAngle, float tickDelta)Returns a fog color override based on the current sky angle.SkyProperties.SkyTypegetSkyType()booleanisAlternateSkyColor()booleanisDarkened()booleanshouldBrightenLighting()abstract booleanuseThickFog(int camX, int camY)
-
Field Details
-
BY_IDENTIFIER
-
rgba
private final float[] rgba -
cloudsHeight
private final float cloudsHeight -
alternateSkyColor
private final boolean alternateSkyColor -
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
-
getFogColorOverride
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
nullif fog color should not be overridden
-
getCloudsHeight
public float getCloudsHeight() -
isAlternateSkyColor
public boolean isAlternateSkyColor() -
adjustFogColor
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
-
shouldBrightenLighting
public boolean shouldBrightenLighting() -
isDarkened
public boolean isDarkened()
-