Record Class ClientboundMoveVehiclePacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundMoveVehiclePacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundMoveVehiclePacket(Vec3 position, float yRot, float xRot)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Vec3
The field for theposition
record component.static final StreamCodec
<FriendlyByteBuf, ClientboundMoveVehiclePacket> private final float
The field for thexRot
record component.private final float
The field for theyRot
record component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundMoveVehiclePacket
(Vec3 position, float yRot, float xRot) Creates an instance of aClientboundMoveVehiclePacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static ClientboundMoveVehiclePacket
fromEntity
(Entity p_387934_) void
handle
(ClientGamePacketListener p_132590_) final int
hashCode()
Returns a hash code value for this object.position()
Returns the value of theposition
record component.final String
toString()
Returns a string representation of this record class.type()
float
xRot()
Returns the value of thexRot
record component.float
yRot()
Returns the value of theyRot
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
position
The field for theposition
record component. -
yRot
private final float yRotThe field for theyRot
record component. -
xRot
private final float xRotThe field for thexRot
record component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundMoveVehiclePacket
Creates an instance of aClientboundMoveVehiclePacket
record class.- Parameters:
position
- the value for theposition
record componentyRot
- the value for theyRot
record componentxRot
- the value for thexRot
record component
-
-
Method Details
-
fromEntity
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
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 '=='. -
position
Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
yRot
public float yRot()Returns the value of theyRot
record component.- Returns:
- the value of the
yRot
record component
-
xRot
public float xRot()Returns the value of thexRot
record component.- Returns:
- the value of the
xRot
record component
-