Class SkyboxManager
java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.sky.SkyboxManager
Runs skyboxes: GameRenderer's mixin calls
beginFrame(net.minecraft.client.DeltaTracker), endFrame() and reload(net.minecraft.server.packs.resources.ResourceManager);
LevelRenderer's calls beginSky(org.joml.Matrix4f, org.joml.Matrix4f, float, net.minecraft.client.Camera, java.lang.Runnable) as the sky pass starts, render(net.ixdarklord.coolcatcanvas.api.client.sky.SkyLayerStage) per stage, and asks what to hide of
vanilla's sky.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Skybox> all()static booleanAs the End sky starts; true if it's fully hidden, so skipped (its layers drawn instead).static voidbeginFrame(net.minecraft.client.DeltaTracker deltaTracker) static booleanbeginSky(org.joml.Matrix4f view, org.joml.Matrix4f projection, float partialTick, net.minecraft.client.Camera camera, Runnable skyFogSetup) As vanilla's sky pass starts: keeps the camera and the angles layers can follow.static voidclose()static voidAfter the End sky: both stages of layers.static voidendFrame()static voidfadeCelestial(VanillaSky part) Fades the sun or the moon, about to be drawn with the shader color.static voidFades the stars, about to be drawn with the shader color.static @Nullable Skyboxget(net.minecraft.resources.ResourceLocation id) static floathidden(VanillaSky part) How hidden a part of vanilla's sky is this frame, from 0 (drawn as usual) to 1 (not drawn).static Skyboxregister(net.minecraft.resources.ResourceLocation id, @Nullable net.minecraft.resources.ResourceLocation definitionId, @Nullable SkyboxDefinition definition) static voidreload(net.minecraft.server.packs.resources.ResourceManager resourceManager) After shaders load: finds resource pack skyboxes, then rebuilds every skybox from the new resources.static voidrender(SkyLayerStage stage) Draws the visible skyboxes' layers of a stage, inside vanilla's sky pass (depth writes already off).static net.minecraft.world.phys.Vec3skyColor(net.minecraft.world.phys.Vec3 skyColor) Vanilla's sky color, faded towards the fog color as far asVanillaSky.SKYis hidden.static float @Nullable []sunriseColor(float @Nullable [] color) Vanilla's sunrise glow, faded out as far asVanillaSky.SUNRISEis hidden; null skips it.static booleanunregister(net.minecraft.resources.ResourceLocation id)
-
Field Details
-
FOLDER
- See Also:
-
-
Method Details
-
register
public static Skybox register(net.minecraft.resources.ResourceLocation id, @Nullable @Nullable net.minecraft.resources.ResourceLocation definitionId, @Nullable @Nullable SkyboxDefinition definition) -
get
-
all
-
unregister
public static boolean unregister(net.minecraft.resources.ResourceLocation id) -
beginFrame
public static void beginFrame(net.minecraft.client.DeltaTracker deltaTracker) -
endFrame
public static void endFrame() -
beginSky
public static boolean beginSky(org.joml.Matrix4f view, org.joml.Matrix4f projection, float partialTick, net.minecraft.client.Camera camera, Runnable skyFogSetup) As vanilla's sky pass starts: keeps the camera and the angles layers can follow. In a dimension without a sky, while a skybox with layers shows, draws them as the whole sky; true if it did, so vanilla's pass is skipped. -
skyColor
public static net.minecraft.world.phys.Vec3 skyColor(net.minecraft.world.phys.Vec3 skyColor) Vanilla's sky color, faded towards the fog color as far asVanillaSky.SKYis hidden. -
sunriseColor
public static float @Nullable [] sunriseColor(float @Nullable [] color) Vanilla's sunrise glow, faded out as far asVanillaSky.SUNRISEis hidden; null skips it. -
fadeCelestial
Fades the sun or the moon, about to be drawn with the shader color. -
fadeStars
public static void fadeStars()Fades the stars, about to be drawn with the shader color. -
beginEndSky
public static boolean beginEndSky()As the End sky starts; true if it's fully hidden, so skipped (its layers drawn instead). -
endEndSky
public static void endEndSky()After the End sky: both stages of layers. -
render
Draws the visible skyboxes' layers of a stage, inside vanilla's sky pass (depth writes already off). -
reload
public static void reload(net.minecraft.server.packs.resources.ResourceManager resourceManager) After shaders load: finds resource pack skyboxes, then rebuilds every skybox from the new resources. -
close
public static void close()
-