Package net.minecraft.component.type
Record Class SwingAnimationComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.SwingAnimationComponent
- Record Components:
type-duration-
- Mappings:
Namespace Name named net/minecraft/component/type/SwingAnimationComponentintermediary net/minecraft/class_12126official dnmnamed typeintermediary comp_4975official dnamed durationintermediary comp_4976official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<SwingAnimationComponent> static final SwingAnimationComponentprivate final intThe field for thedurationrecord component.static final PacketCodec<ByteBuf, SwingAnimationComponent> private final SwingAnimationTypeThe field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSwingAnimationComponent(SwingAnimationType type, int duration) Creates an instance of aSwingAnimationComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
duration
private final int durationThe field for thedurationrecord component. -
DEFAULT
- Mappings:
Namespace Name Mixin selector named DEFAULTLnet/minecraft/component/type/SwingAnimationComponent;DEFAULT:Lnet/minecraft/component/type/SwingAnimationComponent;intermediary field_63413Lnet/minecraft/class_12126;field_63413:Lnet/minecraft/class_12126;official aLdnm;a:Ldnm;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/SwingAnimationComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_63414Lnet/minecraft/class_12126;field_63414:Lcom/mojang/serialization/Codec;official bLdnm;b:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/SwingAnimationComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_63415Lnet/minecraft/class_12126;field_63415:Lnet/minecraft/class_9139;official cLdnm;c:Laat;
-
-
Constructor Details
-
Method Details
-
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 '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-