Record Class SkyboxPayload
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.internal.sky.SkyboxPayload
- Record Components:
ticks- the duration ofSkyboxPayload.Action.ENABLE_FOR, or of the transition of the layer actions (0 for instant)layer- the layer a layer action changes, empty otherwiseindex- the paramSkyboxPayload.Action.SET_LAYER_PARAMchangesvalues- the opacity or visibility (first value), or the param's components
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record SkyboxPayload(net.minecraft.resources.ResourceLocation skybox, SkyboxPayload.Action action, int ticks, String layer, int index, float[] values)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
The server telling a client what to do with one of its skyboxes.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B extends net.minecraft.network.FriendlyByteBuf>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B extends net.minecraft.network.FriendlyByteBuf,T extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, SkyboxPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<SkyboxPayload> -
Constructor Summary
ConstructorsConstructorDescriptionSkyboxPayload(net.minecraft.resources.ResourceLocation skybox, SkyboxPayload.Action action, int ticks, String layer, int index, float[] values) Creates an instance of aSkyboxPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.layer()Returns the value of thelayerrecord component.net.minecraft.resources.ResourceLocationskybox()Returns the value of theskyboxrecord component.intticks()Returns the value of theticksrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()float[]values()Returns the value of thevaluesrecord component.
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<SkyboxPayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,SkyboxPayload> STREAM_CODEC
-
-
Constructor Details
-
SkyboxPayload
public SkyboxPayload(net.minecraft.resources.ResourceLocation skybox, SkyboxPayload.Action action, int ticks, String layer, int index, float[] values) Creates an instance of aSkyboxPayloadrecord class.- Parameters:
skybox- the value for theskyboxrecord componentaction- the value for theactionrecord componentticks- the value for theticksrecord componentlayer- the value for thelayerrecord componentindex- the value for theindexrecord componentvalues- the value for thevaluesrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<? extends net.minecraft.network.protocol.common.custom.CustomPacketPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
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. -
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. -
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 '=='. -
skybox
public net.minecraft.resources.ResourceLocation skybox()Returns the value of theskyboxrecord component.- Returns:
- the value of the
skyboxrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
ticks
public int ticks()Returns the value of theticksrecord component.- Returns:
- the value of the
ticksrecord component
-
layer
Returns the value of thelayerrecord component.- Returns:
- the value of the
layerrecord component
-
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
values
public float[] values()Returns the value of thevaluesrecord component.- Returns:
- the value of the
valuesrecord component
-