Record Class SkyContext
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.sky.SkyContext
- Record Components:
skybox- the skybox being updatedplayer- the local player, if in a worldlevel- the client level, if in a worldpartialTick- the partial tick of the frametime- seconds of real time since the game started, wrapping every hourdeltaTime- seconds of real time since the previous frameage- seconds since the skybox last became visible, 0 while hiddenvisibility- how visible the skybox is, from its fade: 0 to 1dayTime- ticks into the day of the dimension's clock, 0 to 24000 (0 is sunrise)rain- the rain level, 0 to 1thunder- 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
ConstructorsConstructorDescriptionSkyContext(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 aSkyContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatage()Returns the value of theagerecord component.floatdayTime()Returns the value of thedayTimerecord component.floatReturns the value of thedeltaTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleaninDimension(net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension) booleaninWorld()booleanisNight()Whether it's night: between dusk (13000) and dawn (23000).@Nullable net.minecraft.client.multiplayer.ClientLevellevel()Returns the value of thelevelrecord component.net.minecraft.client.MinecraftfloatReturns the value of thepartialTickrecord component.@Nullable net.minecraft.client.player.LocalPlayerplayer()Returns the value of theplayerrecord component.floatrain()Returns the value of therainrecord component.skybox()Returns the value of theskyboxrecord component.floatthunder()Returns the value of thethunderrecord component.floattime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.floatReturns the value of thevisibilityrecord component.
-
Constructor Details
-
SkyContext
public 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 aSkyContextrecord class.- Parameters:
skybox- the value for theskyboxrecord componentplayer- the value for theplayerrecord componentlevel- the value for thelevelrecord componentpartialTick- the value for thepartialTickrecord componenttime- the value for thetimerecord componentdeltaTime- the value for thedeltaTimerecord componentage- the value for theagerecord componentvisibility- the value for thevisibilityrecord componentdayTime- the value for thedayTimerecord componentrain- the value for therainrecord componentthunder- the value for thethunderrecord 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
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
skybox
-
player
-
level
-
partialTick
public float partialTick()Returns the value of thepartialTickrecord component.- Returns:
- the value of the
partialTickrecord component
-
time
-
deltaTime
-
age
-
visibility
public float visibility()Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-
dayTime
-
rain
-
thunder
-