Record Class ClientInteractEntityPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.play.ClientInteractEntityPacket
- All Implemented Interfaces:
ClientPacket, ClientPacket.Play, Packet
public record ClientInteractEntityPacket(int targetId, PlayerHand hand, Vec location, boolean usingSecondaryAction)
extends Record
implements ClientPacket.Play
-
Nested Class Summary
Nested classes/interfaces inherited from interface ClientPacket
ClientPacket.Configuration, ClientPacket.Handshake, ClientPacket.Login, ClientPacket.Play, ClientPacket.Status -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientInteractEntityPacket(int targetId, PlayerHand hand, Vec location, boolean usingSecondaryAction) Creates an instance of aClientInteractEntityPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.hand()Returns the value of thehandrecord component.final inthashCode()Returns a hash code value for this object.location()Returns the value of thelocationrecord component.inttargetId()Returns the value of thetargetIdrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theusingSecondaryActionrecord component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
ClientInteractEntityPacket
public ClientInteractEntityPacket(int targetId, PlayerHand hand, Vec location, boolean usingSecondaryAction) Creates an instance of aClientInteractEntityPacketrecord class.- Parameters:
targetId- the value for thetargetIdrecord componenthand- the value for thehandrecord componentlocation- the value for thelocationrecord componentusingSecondaryAction- the value for theusingSecondaryActionrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
targetId
public int targetId()Returns the value of thetargetIdrecord component.- Returns:
- the value of the
targetIdrecord component
-
hand
Returns the value of thehandrecord component.- Returns:
- the value of the
handrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
usingSecondaryAction
public boolean usingSecondaryAction()Returns the value of theusingSecondaryActionrecord component.- Returns:
- the value of the
usingSecondaryActionrecord component
-