Record Class SkyContext

java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.sky.SkyContext
Record Components:
skybox - the skybox being updated
player - the local player, if in a world
level - the client level, if in a world
partialTick - the partial tick of the frame
time - seconds of real time since the game started, wrapping every hour
deltaTime - seconds of real time since the previous frame
age - seconds since the skybox last became visible, 0 while hidden
visibility - how visible the skybox is, from its fade: 0 to 1
dayTime - ticks into the day of the dimension's clock, 0 to 24000 (0 is sunrise)
rain - the rain level, 0 to 1
thunder - the thunder level, 0 to 1

public record SkyContext(Skybox skybox, @Nullable net.minecraft.client.player.LocalPlayer player, @Nullable net.minecraft.client.multiplayer.ClientLevel level, float partialTick, float time, float deltaTime, float age, float visibility, float dayTime, float rain, float thunder) extends Record
What a skybox's callbacks see of the current frame.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SkyContext(Skybox skybox, @Nullable net.minecraft.client.player.LocalPlayer player, @Nullable net.minecraft.client.multiplayer.ClientLevel level, float partialTick, float time, float deltaTime, float age, float visibility, float dayTime, float rain, float thunder)
    Creates an instance of a SkyContext record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    age()
    Returns the value of the age record component.
    float
    Returns the value of the dayTime record component.
    float
    Returns the value of the deltaTime record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    inDimension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
     
    boolean
     
    boolean
    Whether it's night: between dusk (13000) and dawn (23000).
    @Nullable net.minecraft.client.multiplayer.ClientLevel
    Returns the value of the level record component.
    net.minecraft.client.Minecraft
     
    float
    Returns the value of the partialTick record component.
    @Nullable net.minecraft.client.player.LocalPlayer
    Returns the value of the player record component.
    float
    Returns the value of the rain record component.
    Returns the value of the skybox record component.
    float
    Returns the value of the thunder record component.
    float
    Returns the value of the time record component.
    final String
    Returns a string representation of this record class.
    float
    Returns the value of the visibility record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SkyContext

      public SkyContext(Skybox skybox, @Nullable @Nullable net.minecraft.client.player.LocalPlayer player, @Nullable @Nullable net.minecraft.client.multiplayer.ClientLevel level, float partialTick, float time, float deltaTime, float age, float visibility, float dayTime, float rain, float thunder)
      Creates an instance of a SkyContext record class.
      Parameters:
      skybox - the value for the skybox record component
      player - the value for the player record component
      level - the value for the level record component
      partialTick - the value for the partialTick record component
      time - the value for the time record component
      deltaTime - the value for the deltaTime record component
      age - the value for the age record component
      visibility - the value for the visibility record component
      dayTime - the value for the dayTime record component
      rain - the value for the rain record component
      thunder - the value for the thunder record component
  • Method Details

    • minecraft

      public net.minecraft.client.Minecraft minecraft()
    • inWorld

      public boolean inWorld()
    • inDimension

      public boolean inDimension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension)
    • isNight

      public boolean isNight()
      Whether it's night: between dusk (13000) and dawn (23000).
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • skybox

      public Skybox skybox()
      Returns the value of the skybox record component.
      Returns:
      the value of the skybox record component
    • player

      @Nullable public @Nullable net.minecraft.client.player.LocalPlayer player()
      Returns the value of the player record component.
      Returns:
      the value of the player record component
    • level

      @Nullable public @Nullable net.minecraft.client.multiplayer.ClientLevel level()
      Returns the value of the level record component.
      Returns:
      the value of the level record component
    • partialTick

      public float partialTick()
      Returns the value of the partialTick record component.
      Returns:
      the value of the partialTick record component
    • time

      public float time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • deltaTime

      public float deltaTime()
      Returns the value of the deltaTime record component.
      Returns:
      the value of the deltaTime record component
    • age

      public float age()
      Returns the value of the age record component.
      Returns:
      the value of the age record component
    • visibility

      public float visibility()
      Returns the value of the visibility record component.
      Returns:
      the value of the visibility record component
    • dayTime

      public float dayTime()
      Returns the value of the dayTime record component.
      Returns:
      the value of the dayTime record component
    • rain

      public float rain()
      Returns the value of the rain record component.
      Returns:
      the value of the rain record component
    • thunder

      public float thunder()
      Returns the value of the thunder record component.
      Returns:
      the value of the thunder record component