java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.sky.SkyboxManager

public final class SkyboxManager extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    afterSky(Runnable skyFogSetup)
    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.
    all()
     
    static void
    beginFrame(float partialTick)
     
    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.
    static void
     
    static void
    Called by the loader modules when the dimension's own sky renderer (Forge's DimensionSpecialEffects#renderSky, Fabric API's DimensionRenderingRegistry) 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 Skybox
    get(net.minecraft.resources.ResourceLocation id)
     
    static float
    How hidden a part of vanilla's sky is this frame, from 0 (drawn as usual) to 1 (not drawn).
    static Skybox
    register(net.minecraft.resources.ResourceLocation id, @Nullable net.minecraft.resources.ResourceLocation definitionId, @Nullable SkyboxDefinition definition)
     
    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.
    static void
    Draws the visible skyboxes' layers of a stage, inside vanilla's sky pass.
    static void
    renderWithoutVanillaSky(@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 void
    skyColor(float[] rgb)
    Vanilla's sky color, faded towards the fog color as far as VanillaSky.SKY is hidden, into rgb.
    static boolean
    unregister(net.minecraft.resources.ResourceLocation id)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • register

      public static Skybox register(net.minecraft.resources.ResourceLocation id, @Nullable @Nullable net.minecraft.resources.ResourceLocation definitionId, @Nullable @Nullable SkyboxDefinition definition)
    • get

      @Nullable public static @Nullable Skybox get(net.minecraft.resources.ResourceLocation id)
    • all

      public static Collection<Skybox> 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's DimensionSpecialEffects#renderSky, Fabric API's DimensionRenderingRegistry) 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

      public static void afterSky(Runnable skyFogSetup)
      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.
    • hidden

      public static float hidden(VanillaSky part)
      How hidden a part of vanilla's sky is this frame, from 0 (drawn as usual) to 1 (not drawn).
    • skyColor

      public static void skyColor(float[] rgb)
      Vanilla's sky color, faded towards the fog color as far as VanillaSky.SKY is hidden, into rgb.
    • render

      public static void render(SkyLayerStage stage)
      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()