Record Class ArmatureCommandPayload
java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.internal.armature.ArmatureCommandPayload
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record ArmatureCommandPayload(ArmatureCommandPayload.Target target, int entityId, net.minecraft.core.BlockPos pos, boolean offhand, ArmatureCommandPayload.Action action, String layer, @Nullable Motion motion, float fade, String variable, double value)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
The server telling clients to do something to an armature: play a motion on a layer, stop a layer, or set a Molang
variable. The armature belongs to an entity, a block entity, or the stack in an entity's hand.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumNested 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, ArmatureCommandPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ArmatureCommandPayload> -
Constructor Summary
ConstructorsConstructorDescriptionArmatureCommandPayload(ArmatureCommandPayload.Target target, int entityId, net.minecraft.core.BlockPos pos, boolean offhand, ArmatureCommandPayload.Action action, String layer, @Nullable Motion motion, float fade, String variable, double value) Creates an instance of aArmatureCommandPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.intentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.floatfade()Returns the value of thefaderecord component.final inthashCode()Returns a hash code value for this object.layer()Returns the value of thelayerrecord component.@Nullable Motionmotion()Returns the value of themotionrecord component.booleanoffhand()Returns the value of theoffhandrecord component.net.minecraft.core.BlockPospos()Returns the value of theposrecord component.target()Returns the value of thetargetrecord 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()doublevalue()Returns the value of thevaluerecord component.variable()Returns the value of thevariablerecord component.
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<ArmatureCommandPayload> TYPE -
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ArmatureCommandPayload> STREAM_CODEC
-
-
Constructor Details
-
ArmatureCommandPayload
public ArmatureCommandPayload(ArmatureCommandPayload.Target target, int entityId, net.minecraft.core.BlockPos pos, boolean offhand, ArmatureCommandPayload.Action action, String layer, @Nullable @Nullable Motion motion, float fade, String variable, double value) Creates an instance of aArmatureCommandPayloadrecord class.- Parameters:
target- the value for thetargetrecord componententityId- the value for theentityIdrecord componentpos- the value for theposrecord componentoffhand- the value for theoffhandrecord componentaction- the value for theactionrecord componentlayer- the value for thelayerrecord componentmotion- the value for themotionrecord componentfade- the value for thefaderecord componentvariable- the value for thevariablerecord componentvalue- the value for thevaluerecord 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. -
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
pos
public net.minecraft.core.BlockPos pos()Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
offhand
public boolean offhand()Returns the value of theoffhandrecord component.- Returns:
- the value of the
offhandrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
layer
Returns the value of thelayerrecord component.- Returns:
- the value of the
layerrecord component
-
motion
Returns the value of themotionrecord component.- Returns:
- the value of the
motionrecord component
-
fade
public float fade()Returns the value of thefaderecord component.- Returns:
- the value of the
faderecord component
-
variable
Returns the value of thevariablerecord component.- Returns:
- the value of the
variablerecord component
-
value
public double value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-