Enum Class SkyLayerType

java.lang.Object
java.lang.Enum<SkyLayerType>
net.ixdarklord.coolcatcanvas.api.client.sky.SkyLayerType
All Implemented Interfaces:
Serializable, Comparable<SkyLayerType>, Constable, net.minecraft.util.StringRepresentable

public enum SkyLayerType extends Enum<SkyLayerType> implements net.minecraft.util.StringRepresentable
What a sky layer draws. Every type can take its own fragment_shader instead of the built-in one; the type then only decides the shape drawn and whether a texture is bound.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>

    Nested classes/interfaces inherited from interface net.minecraft.util.StringRepresentable

    net.minecraft.util.StringRepresentable.EnumCodec<E extends Enum<E> & net.minecraft.util.StringRepresentable>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A texture wrapped around the whole sky as a cube: one image holding the six square faces in a 3x2 grid, north, east and south on the top row, west, up and down on the bottom one.
    A vertical color gradient over the whole sky, no texture: params 0, 1 and 2 are the zenith, horizon and nadir colors, and the first component of param 3 sharpens the horizon (1 for linear, higher for a thinner band).
    A texture wrapped around the whole sky as an equirectangular panorama (twice as wide as it's tall): north in the middle, east to its right, the zenith along the top edge.
    A procedural sky from the layer's own fragment shader, over the whole sky.
    A single image on a square facing the camera from the sky, like vanilla's sun and moon: a planet, a moon, a logo.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<SkyLayerType>
     

    Fields inherited from interface net.minecraft.util.StringRepresentable

    PRE_BUILT_MAP_THRESHOLD
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    Whether it's drawn as a square in the sky, rather than around the whole sky.
    boolean
    Whether a layer of this type must have a texture.
    Returns the enum constant of this class with the specified name.
    static SkyLayerType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • CUBEMAP

      public static final SkyLayerType CUBEMAP
      A texture wrapped around the whole sky as a cube: one image holding the six square faces in a 3x2 grid, north, east and south on the top row, west, up and down on the bottom one. Side faces are upright as seen from inside; up and down are as seen while facing north (so north touches the bottom edge of up and the top edge of down). Frames of an animation are stacked vertically, each its own 3x2 grid.
    • PANORAMA

      public static final SkyLayerType PANORAMA
      A texture wrapped around the whole sky as an equirectangular panorama (twice as wide as it's tall): north in the middle, east to its right, the zenith along the top edge.
    • SPRITE

      public static final SkyLayerType SPRITE
      A single image on a square facing the camera from the sky, like vanilla's sun and moon: a planet, a moon, a logo. It sits at the zenith before the layer's orientation and rotation; its size is an angle.
    • GRADIENT

      public static final SkyLayerType GRADIENT
      A vertical color gradient over the whole sky, no texture: params 0, 1 and 2 are the zenith, horizon and nadir colors, and the first component of param 3 sharpens the horizon (1 for linear, higher for a thinner band).
    • SHADER

      public static final SkyLayerType SHADER
      A procedural sky from the layer's own fragment shader, over the whole sky. Binds a texture only if it has one.
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<SkyLayerType> CODEC
  • Method Details

    • values

      public static SkyLayerType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SkyLayerType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • needsTexture

      public boolean needsTexture()
      Whether a layer of this type must have a texture.
    • isSprite

      public boolean isSprite()
      Whether it's drawn as a square in the sky, rather than around the whole sky.
    • getSerializedName

      public String getSerializedName()
      Specified by:
      getSerializedName in interface net.minecraft.util.StringRepresentable