Record Class ShowElementalReactionS2CPayload
java.lang.Object
java.lang.Record
io.github.xrickastley.sevenelements.networking.ShowElementalReactionS2CPayload
- All Implemented Interfaces:
SevenElementsPayload,FabricPacket
public record ShowElementalReactionS2CPayload(Vec3d pos, ElementalReaction reaction)
extends Record
implements SevenElementsPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.xrickastley.sevenelements.networking.SevenElementsPayload
SevenElementsPayload.Id<T extends SevenElementsPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ShowElementalReactionS2CPayload>static final SevenElementsPayload.Id<ShowElementalReactionS2CPayload>private final Vec3dThe field for theposrecord component.private final ElementalReactionThe field for thereactionrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionShowElementalReactionS2CPayload(Vec3d pos, ElementalReaction reaction) Creates an instance of aShowElementalReactionS2CPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.com.mojang.serialization.Codec<? extends SevenElementsPayload>getCodec()SevenElementsPayload.Id<? extends SevenElementsPayload>getId()final inthashCode()Returns a hash code value for this object.pos()Returns the value of theposrecord component.reaction()Returns the value of thereactionrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.xrickastley.sevenelements.networking.SevenElementsPayload
getType, write
-
Field Details
-
pos
The field for theposrecord component. -
reaction
The field for thereactionrecord component. -
CODEC
-
ID
-
-
Constructor Details
-
ShowElementalReactionS2CPayload
Creates an instance of aShowElementalReactionS2CPayloadrecord class.- Parameters:
pos- the value for theposrecord componentreaction- the value for thereactionrecord component
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceSevenElementsPayload
-
getCodec
- Specified by:
getCodecin interfaceSevenElementsPayload
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
reaction
Returns the value of thereactionrecord component.- Returns:
- the value of the
reactionrecord component
-