Class SkyboxManager
java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.sky.SkyboxManager
Runs skyboxes: GameRenderer's mixin calls
beginFrame(float) and reload(net.minecraft.server.packs.resources.ResourceManager); LevelRenderer's calls
beginSky(org.joml.Matrix4fc, org.joml.Matrix4fc) and render(net.ixdarklord.coolcatcanvas.api.client.sky.SkyLayerStage) from vanilla's sky pass (or renderWithoutVanillaSky(net.minecraft.client.multiplayer.ClientLevel) where there's
none), and asks what to hide of vanilla's sky.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidRight after the sky pass: where the dimension's own renderer drew the sky, the layers of both stages go over it, in the sky's fog.static Collection<Skybox>all()static voidbeginFrame(float partialTick) static voidbeginSky(org.joml.Matrix4fc view, org.joml.Matrix4fc projection) At the start of vanilla's sky pass: keeps the camera's rotation and the projection, for the layers.static voidclose()static voidCalled by the loader modules when the dimension's own sky renderer (Forge'sDimensionSpecialEffects#renderSky, Fabric API'sDimensionRenderingRegistry) draws the sky this frame instead of vanilla's pass, so the layers go over it once the sky is done (afterSky(java.lang.Runnable)).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 vanilla's 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.static voidrenderWithoutVanillaSky(@Nullable net.minecraft.client.multiplayer.ClientLevel level) Draws both stages in a dimension whose sky vanilla doesn't draw at all (the Nether), while a skybox with layers shows there.static voidskyColor(float[] rgb) Vanilla's sky color, faded towards the fog color as far asVanillaSky.SKYis hidden, intorgb.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(float partialTick) -
beginSky
public static void beginSky(org.joml.Matrix4fc view, org.joml.Matrix4fc projection) At the start of vanilla's sky pass: keeps the camera's rotation and the projection, for the layers. -
renderWithoutVanillaSky
public static void renderWithoutVanillaSky(@Nullable @Nullable net.minecraft.client.multiplayer.ClientLevel level) Draws both stages in a dimension whose sky vanilla doesn't draw at all (the Nether), while a skybox with layers shows there. -
customSkyRendered
public static void customSkyRendered()Called by the loader modules when the dimension's own sky renderer (Forge'sDimensionSpecialEffects#renderSky, Fabric API'sDimensionRenderingRegistry) draws the sky this frame instead of vanilla's pass, so the layers go over it once the sky is done (afterSky(java.lang.Runnable)). -
afterSky
Right after the sky pass: where the dimension's own renderer drew the sky, the layers of both stages go over it, in the sky's fog. What skyboxes hide only applies to vanilla's sky, so nothing of a custom sky is hidden. -
skyColor
public static void skyColor(float[] rgb) Vanilla's sky color, faded towards the fog color as far asVanillaSky.SKYis hidden, intorgb. -
render
Draws the visible skyboxes' layers of a stage, inside vanilla's sky pass. -
reload
public static void reload(net.minecraft.server.packs.resources.ResourceManager resourceManager) After vanilla's shaders load: finds resource pack skyboxes, then rebuilds every skybox from the new resources. -
close
public static void close()
-