Class SkyboxManager

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

public final class SkyboxManager extends Object
Runs skyboxes: GameRenderer's mixin calls beginFrame(DeltaTracker) and endFrame(); SkyRenderer's calls extract(SkyRenderState) and render(SkyLayerStage, RenderPass), and asks what to hide of vanilla's sky; ShaderManager's calls reload(ResourceManager) once shaders are (re)loaded.
  • Field Summary

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

    Modifier and Type
    Method
    Description
    all()
     
    static void
    beginFrame(net.minecraft.client.DeltaTracker deltaTracker)
     
    static void
     
    static void
     
    static void
    extract(net.minecraft.client.renderer.state.level.SkyRenderState state)
    After vanilla extracts its sky: keeps the angles layers can follow, and gives dimensions without a sky one while a skybox with layers shows, its vanilla parts all hidden.
    static @Nullable Skybox
    get(net.minecraft.resources.Identifier 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.Identifier id, @Nullable net.minecraft.resources.Identifier definitionId, @Nullable SkyboxDefinition definition)
     
    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.
    static void
    render(SkyLayerStage stage, com.mojang.renderpearl.api.commands.RenderPass pass)
    Draws the visible skyboxes' layers of a stage, inside vanilla's sky pass (open while it draws the sky).
    static org.joml.Vector3fc
    skyColor(org.joml.Vector3fc skyColor)
    Vanilla's sky color, faded towards the fog color as far as VanillaSky.SKY is hidden.
    static boolean
    unregister(net.minecraft.resources.Identifier id)
     

    Methods inherited from class Object

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

  • Method Details

    • register

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

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

      public static Collection<Skybox> all()
    • unregister

      public static boolean unregister(net.minecraft.resources.Identifier id)
    • beginFrame

      public static void beginFrame(net.minecraft.client.DeltaTracker deltaTracker)
    • endFrame

      public static void endFrame()
    • extract

      public static void extract(net.minecraft.client.renderer.state.level.SkyRenderState state)
      After vanilla extracts its sky: keeps the angles layers can follow, and gives dimensions without a sky one while a skybox with layers shows, its vanilla parts all 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 org.joml.Vector3fc skyColor(org.joml.Vector3fc skyColor)
      Vanilla's sky color, faded towards the fog color as far as VanillaSky.SKY is hidden.
    • render

      public static void render(SkyLayerStage stage, com.mojang.renderpearl.api.commands.RenderPass pass)
      Draws the visible skyboxes' layers of a stage, inside vanilla's sky pass (open while it draws the sky).
    • 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()