Record Class SyncHandleMessage
java.lang.Object
java.lang.Record
net.rocketpowered.connector.network.SyncHandleMessage
public record SyncHandleMessage(int entityId, net.minecraft.network.FriendlyByteBuf data)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSyncHandleMessage(int entityId, net.minecraft.network.FriendlyByteBuf data) Creates an instance of aSyncHandleMessagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.FriendlyByteBufdata()Returns the value of thedatarecord component.static SyncHandleMessagedecode(net.minecraft.network.FriendlyByteBuf in) voidencode(net.minecraft.network.FriendlyByteBuf out) intentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfinal inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SyncHandleMessage
public SyncHandleMessage(int entityId, net.minecraft.network.FriendlyByteBuf data) Creates an instance of aSyncHandleMessagerecord class.- Parameters:
entityId- the value for theentityIdrecord componentdata- the value for thedatarecord component
-
-
Method Details
-
encode
public void encode(net.minecraft.network.FriendlyByteBuf out) -
decode
-
handle
-
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 '=='. -
entityId
public int entityId()Returns the value of theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
data
public net.minecraft.network.FriendlyByteBuf data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-