Record Class ClientInteractEntityPacket
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.client.play.ClientInteractEntityPacket
- All Implemented Interfaces:
ClientPacket
public record ClientInteractEntityPacket(int targetId, ClientInteractEntityPacket.Type type, boolean sneaking)
extends Record
implements ClientPacket
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic interface -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientInteractEntityPacket(int targetId, ClientInteractEntityPacket.Type type, boolean sneaking) Creates an instance of aClientInteractEntityPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleansneaking()Returns the value of thesneakingrecord component.inttargetId()Returns the value of thetargetIdrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
SERIALIZER
-
-
Constructor Details
-
ClientInteractEntityPacket
public ClientInteractEntityPacket(int targetId, ClientInteractEntityPacket.Type type, boolean sneaking) Creates an instance of aClientInteractEntityPacketrecord class.- Parameters:
targetId- the value for thetargetIdrecord componenttype- the value for thetyperecord componentsneaking- the value for thesneakingrecord 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
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
sneaking
public boolean sneaking()Returns the value of thesneakingrecord component.- Returns:
- the value of the
sneakingrecord component
-