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.Identifier 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>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
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.Identifier 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.Identifierskybox()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.Identifier 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
-
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
public net.minecraft.resources.Identifier 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
-
layer
-
index
-
values
-