Package com.mrbysco.armorposer.data
Record Class SwapData
java.lang.Object
java.lang.Record
com.mrbysco.armorposer.data.SwapData
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSwapData(UUID entityUUID, SwapData.Action action) Creates an instance of aSwapDatarecord class. -
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) final inthashCode()Returns a hash code value for this object.static SwapDataread(net.minecraft.network.FriendlyByteBuf packetBuffer) final StringtoString()Returns a string representation of this record class.voidwrite(net.minecraft.network.FriendlyByteBuf buf)
-
Constructor Details
-
SwapData
Creates an instance of aSwapDatarecord class.- Parameters:
entityUUID- the value for theentityUUIDrecord componentaction- the value for theactionrecord component
-
-
Method Details
-
write
public void write(net.minecraft.network.FriendlyByteBuf buf) -
read
-
handleData
public void handleData(net.minecraft.world.entity.decoration.ArmorStand armorStand) -
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). -
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
-