Record Class ClientboundTeleportEntityPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundTeleportEntityPacket(int id, PositionMoveRotation change, Set<Relative> relatives, boolean onGround)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PositionMoveRotation
The field for thechange
record component.private final int
The field for theid
record component.private final boolean
The field for theonGround
record component.The field for therelatives
record component.static final StreamCodec
<FriendlyByteBuf, ClientboundTeleportEntityPacket> -
Constructor Summary
ConstructorsConstructorDescriptionClientboundTeleportEntityPacket
(int id, PositionMoveRotation change, Set<Relative> relatives, boolean onGround) Creates an instance of aClientboundTeleportEntityPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionchange()
Returns the value of thechange
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_133544_) final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the value of theid
record component.boolean
onGround()
Returns the value of theonGround
record component.Returns the value of therelatives
record component.teleport
(int p_379814_, PositionMoveRotation p_379503_, Set<Relative> p_379757_, boolean p_380240_) final String
toString()
Returns a string representation of this record class.type()
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
-
id
private final int idThe field for theid
record component. -
change
The field for thechange
record component. -
relatives
The field for therelatives
record component. -
onGround
private final boolean onGroundThe field for theonGround
record component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundTeleportEntityPacket
public ClientboundTeleportEntityPacket(int id, PositionMoveRotation change, Set<Relative> relatives, boolean onGround) Creates an instance of aClientboundTeleportEntityPacket
record class.- Parameters:
id
- the value for theid
record componentchange
- the value for thechange
record componentrelatives
- the value for therelatives
record componentonGround
- the value for theonGround
record component
-
-
Method Details
-
teleport
public static ClientboundTeleportEntityPacket teleport(int p_379814_, PositionMoveRotation p_379503_, Set<Relative> p_379757_, boolean p_380240_) -
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 '=='. -
id
public int id()Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
change
Returns the value of thechange
record component.- Returns:
- the value of the
change
record component
-
relatives
Returns the value of therelatives
record component.- Returns:
- the value of the
relatives
record component
-
onGround
public boolean onGround()Returns the value of theonGround
record component.- Returns:
- the value of the
onGround
record component
-