Record Class ClientboundSetEntityMotionPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundSetEntityMotionPacket(int id, Vec3 movement)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theidrecord component.private final Vec3The field for themovementrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, ClientboundSetEntityMotionPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientboundSetEntityMotionPacket(int id, Vec3 movement) Creates an instance of aClientboundSetEntityMotionPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener listener) Passes this Packet on to the NetHandler for processing.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.movement()Returns the value of themovementrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
id
private final int idThe field for theidrecord component. -
movement
The field for themovementrecord component. -
STREAM_CODEC
public static final StreamCodec<io.netty.buffer.ByteBuf, ClientboundSetEntityMotionPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundSetEntityMotionPacket
-
ClientboundSetEntityMotionPacket
Creates an instance of aClientboundSetEntityMotionPacketrecord class.- Parameters:
id- the value for theidrecord componentmovement- the value for themovementrecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
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. -
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
movement
Returns the value of themovementrecord component.- Returns:
- the value of the
movementrecord component
-