Record Class ServerboundMoveVehiclePacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ServerboundMoveVehiclePacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
public record ServerboundMoveVehiclePacket(PositionAndRotation movingTo, boolean onGround)
extends Record
implements Packet<ServerGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PositionAndRotationThe field for themovingTorecord component.private final booleanThe field for theonGroundrecord component.static final StreamCodec<FriendlyByteBuf, ServerboundMoveVehiclePacket> -
Constructor Summary
ConstructorsConstructorDescriptionServerboundMoveVehiclePacket(PositionAndRotation movingTo, boolean onGround) Creates an instance of aServerboundMoveVehiclePacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ServerboundMoveVehiclePacketfromEntity(Entity entity) voidhandle(ServerGamePacketListener listener) final inthashCode()Returns a hash code value for this object.movingTo()Returns the value of themovingTorecord component.booleanonGround()Returns the value of theonGroundrecord component.final StringtoString()Returns a string representation of this record class.type()Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
movingTo
The field for themovingTorecord component. -
onGround
private final boolean onGroundThe field for theonGroundrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ServerboundMoveVehiclePacket
Creates an instance of aServerboundMoveVehiclePacketrecord class.- Parameters:
movingTo- the value for themovingTorecord componentonGround- the value for theonGroundrecord component
-
-
Method Details
-
fromEntity
-
type
- Specified by:
typein interfacePacket<ServerGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ServerGamePacketListener>
-
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. -
movingTo
Returns the value of themovingTorecord component.- Returns:
- the value of the
movingTorecord component
-
onGround
public boolean onGround()Returns the value of theonGroundrecord component.- Returns:
- the value of the
onGroundrecord component
-