Package net.minecraft.client.renderer
Class SkyRenderer
java.lang.Object
net.minecraft.client.renderer.SkyRenderer
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final GpuBufferprivate static final floatprivate static final floatprivate static final ResourceLocationprivate static final ResourceLocationprivate static final intprivate final GpuBufferprivate AbstractTextureprivate final GpuBufferprivate AbstractTextureprivate static final floatprivate static final ResourceLocationprivate static final floatprivate final GpuBufferprivate AbstractTextureprivate final RenderSystem.AutoStorageIndexBufferprivate static final floatprivate static final intprivate static final intprivate final GpuBufferprivate intprivate final RenderSystem.AutoStorageIndexBufferprivate static final floatprivate static final ResourceLocationprivate static final floatprivate final GpuBufferprivate static final intprivate final GpuBufferprivate AbstractTextureprivate final GpuBuffer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate GpuBufferprivate static GpuBufferprivate GpuBufferprivate voidbuildSkyDisc(VertexConsumer buffer, float y) private GpuBufferprivate GpuBufferprivate GpuBuffervoidclose()voidextractRenderState(ClientLevel level, float partialTick, Vec3 cameraPosition, SkyRenderState reusedState) private AbstractTexturegetTexture(ResourceLocation location) protected voidvoidvoidrenderEndFlash(PoseStack poseStack, float intensity, float xAngle, float yAngle) voidprivate voidrenderMoon(int moonPhase, float rainLevel, PoseStack poseStack) voidrenderSkyDisc(float red, float green, float blue) private voidrenderStars(float starBrightness, PoseStack poseStack) private voidvoidrenderSunMoonAndStars(PoseStack poseStack, float timeOfDay, int moonPhase, float rainLevel, float starBrightness) voidrenderSunriseAndSunset(PoseStack poseStack, float sunAngle, int color) private booleanshouldRenderDarkDisc(float partialTick, ClientLevel level)
-
Field Details
-
SUN_LOCATION
-
END_LIGHT_LOCATION
-
MOON_LOCATION
-
END_SKY_LOCATION
-
SKY_DISC_RADIUS
private static final float SKY_DISC_RADIUS- See Also:
-
SKY_VERTICES
private static final int SKY_VERTICES- See Also:
-
STAR_COUNT
private static final int STAR_COUNT- See Also:
-
SUN_SIZE
private static final float SUN_SIZE- See Also:
-
SUN_HEIGHT
private static final float SUN_HEIGHT- See Also:
-
MOON_SIZE
private static final float MOON_SIZE- See Also:
-
MOON_HEIGHT
private static final float MOON_HEIGHT- See Also:
-
SUNRISE_STEPS
private static final int SUNRISE_STEPS- See Also:
-
END_SKY_QUAD_COUNT
private static final int END_SKY_QUAD_COUNT- See Also:
-
END_FLASH_HEIGHT
private static final float END_FLASH_HEIGHT- See Also:
-
END_FLASH_SCALE
private static final float END_FLASH_SCALE- See Also:
-
starBuffer
-
starIndices
-
topSkyBuffer
-
bottomSkyBuffer
-
endSkyBuffer
-
sunBuffer
-
moonBuffer
-
sunriseBuffer
-
endFlashBuffer
-
quadIndices
-
sunTexture
-
moonTexture
-
endSkyTexture
-
endFlashTexture
-
starIndexCount
private int starIndexCount
-
-
Constructor Details
-
SkyRenderer
public SkyRenderer()
-
-
Method Details
-
initTextures
protected void initTextures() -
getTexture
-
buildSunriseFan
-
buildSunQuad
-
buildMoonPhases
-
buildStars
-
buildSkyDisc
-
buildEndSky
-
buildEndFlashQuad
-
renderSkyDisc
public void renderSkyDisc(float red, float green, float blue) -
extractRenderState
public void extractRenderState(ClientLevel level, float partialTick, Vec3 cameraPosition, SkyRenderState reusedState) -
shouldRenderDarkDisc
-
renderDarkDisc
public void renderDarkDisc() -
renderSunMoonAndStars
public void renderSunMoonAndStars(PoseStack poseStack, float timeOfDay, int moonPhase, float rainLevel, float starBrightness) -
renderSun
-
renderMoon
-
renderStars
-
renderSunriseAndSunset
-
renderEndSky
public void renderEndSky() -
renderEndFlash
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-