Record Class ServerboundAcceptTeleportationPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ServerboundAcceptTeleportationPacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
public record ServerboundAcceptTeleportationPacket(int id, double x, double y, double z, float yRot, float xRot)
extends Record
implements Packet<ServerGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theidrecord component.static final StreamCodec<FriendlyByteBuf, ServerboundAcceptTeleportationPacket> private final doubleThe field for thexrecord component.private final floatThe field for thexRotrecord component.private final doubleThe field for theyrecord component.private final floatThe field for theyRotrecord component.private final doubleThe field for thezrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionServerboundAcceptTeleportationPacket(int id, double x, double y, double z, float yRot, float xRot) Creates an instance of aServerboundAcceptTeleportationPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.voidhandle(ServerGamePacketListener listener) final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.type()doublex()Returns the value of thexrecord component.floatxRot()Returns the value of thexRotrecord component.doubley()Returns the value of theyrecord component.floatyRot()Returns the value of theyRotrecord component.doublez()Returns the value of thezrecord component.Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
id
private final int idThe field for theidrecord component. -
x
private final double xThe field for thexrecord component. -
y
private final double yThe field for theyrecord component. -
z
private final double zThe field for thezrecord component. -
yRot
private final float yRotThe field for theyRotrecord component. -
xRot
private final float xRotThe field for thexRotrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ServerboundAcceptTeleportationPacket
public ServerboundAcceptTeleportationPacket(int id, double x, double y, double z, float yRot, float xRot) Creates an instance of aServerboundAcceptTeleportationPacketrecord class.- Parameters:
id- the value for theidrecord componentx- the value for thexrecord componenty- the value for theyrecord componentz- the value for thezrecord componentyRot- the value for theyRotrecord componentxRot- the value for thexRotrecord component
-
-
Method Details
-
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. All components in this record class 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
-
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
public double z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
yRot
public float yRot()Returns the value of theyRotrecord component.- Returns:
- the value of the
yRotrecord component
-
xRot
public float xRot()Returns the value of thexRotrecord component.- Returns:
- the value of the
xRotrecord component
-