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 class
SkyProperties.End
static class
SkyProperties.Nether
static class
SkyProperties.Overworld
static class
SkyProperties.SkyType
-
Field Summary
Fields Modifier and Type Field Description private boolean
alternateSkyColor
private boolean
brightenLighting
private static Object2ObjectMap<Identifier,SkyProperties>
BY_IDENTIFIER
private float
cloudsHeight
private boolean
darkened
private float[]
rgba
private SkyProperties.SkyType
skyType
-
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 Vec3d
adjustFogColor(Vec3d color, float sunHeight)
Transforms the given fog color based on the current height of the sun.static SkyProperties
byDimensionType(DimensionType dimensionType)
float
getCloudsHeight()
float[]
getFogColorOverride(float skyAngle, float tickDelta)
Returns a fog color override based on the current sky angle.SkyProperties.SkyType
getSkyType()
boolean
isAlternateSkyColor()
boolean
isDarkened()
boolean
shouldBrightenLighting()
abstract boolean
useThickFog(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
null
if 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()
-