Record Class SwapData
java.lang.Object
java.lang.Record
com.mrbysco.armorposer.data.SwapData
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, SwapData> -
Constructor Summary
ConstructorsConstructorDescriptionSwapData(UUID entityUUID, SwapData.Action action) Creates an instance of aSwapDatarecord class.SwapData(net.minecraft.network.FriendlyByteBuf packetBuffer) -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.Returns the value of theentityUUIDrecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandleData(net.minecraft.world.entity.decoration.ArmorStand armorStand, net.minecraft.world.entity.player.Player player) final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.FriendlyByteBuf, SwapData> STREAM_CODEC
-
-
Constructor Details
-
SwapData
public SwapData(net.minecraft.network.FriendlyByteBuf packetBuffer) -
SwapData
Creates an instance of aSwapDatarecord class.- Parameters:
entityUUID- the value for theentityUUIDrecord componentaction- the value for theactionrecord component
-
-
Method Details
-
handleData
public void handleData(net.minecraft.world.entity.decoration.ArmorStand armorStand, net.minecraft.world.entity.player.Player player) -
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. All components in this record class are compared withObjects::equals(Object,Object). -
entityUUID
Returns the value of theentityUUIDrecord component.- Returns:
- the value of the
entityUUIDrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-