Record Class MessageCopy
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.impl.network.message.MessageCopy
- All Implemented Interfaces:
IMessage<MessageCopy>
-
Constructor Summary
ConstructorsConstructorDescriptionMessageCopy(String toCopy) Creates an instance of aMessageCopyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle()final inthashCode()Returns a hash code value for this object.voidserialize(net.minecraft.network.FriendlyByteBuf buf) toCopy()Returns the value of thetoCopyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageCopy
Creates an instance of aMessageCopyrecord class.- Parameters:
toCopy- the value for thetoCopyrecord component
-
-
Method Details
-
serialize
public void serialize(net.minecraft.network.FriendlyByteBuf buf) - Specified by:
serializein interfaceIMessage<MessageCopy>
-
handle
public void handle()- Specified by:
handlein interfaceIMessage<MessageCopy>
-
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). -
toCopy
Returns the value of thetoCopyrecord component.- Returns:
- the value of the
toCopyrecord component
-