Record Class ClientboundTrackedWaypointPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundTrackedWaypointPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundTrackedWaypointPacket(ClientboundTrackedWaypointPacket.Operation operation, TrackedWaypoint waypoint)
extends Record
implements Packet<ClientGamePacketListener>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static enum
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientboundTrackedWaypointPacket.Operation
The field for theoperation
record component.private final TrackedWaypoint
The field for thewaypoint
record component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundTrackedWaypointPacket
(ClientboundTrackedWaypointPacket.Operation operation, TrackedWaypoint waypoint) Creates an instance of aClientboundTrackedWaypointPacket
record class. -
Method Summary
Modifier and TypeMethodDescriptionaddWaypointAzimuth
(UUID pUuid, Waypoint.Icon pIcon, float pAngle) addWaypointChunk
(UUID pUuid, Waypoint.Icon pIcon, ChunkPos pChunkPos) addWaypointPosition
(UUID pUuid, Waypoint.Icon pIcon, Vec3i pPosition) void
apply
(TrackedWaypointManager pWaypointManager) final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener pHandler) Passes this Packet on to the PacketListener for processing.final int
hashCode()
Returns a hash code value for this object.Returns the value of theoperation
record component.removeWaypoint
(UUID pUuid) final String
toString()
Returns a string representation of this record class.type()
updateWaypointAzimuth
(UUID pUuid, Waypoint.Icon pIcon, float pAngle) updateWaypointChunk
(UUID pUuid, Waypoint.Icon pIcon, ChunkPos pChunkPos) updateWaypointPosition
(UUID pUuid, Waypoint.Icon pIcon, Vec3i pPosition) waypoint()
Returns the value of thewaypoint
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
-
operation
The field for theoperation
record component. -
waypoint
The field for thewaypoint
record component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ClientboundTrackedWaypointPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundTrackedWaypointPacket
public ClientboundTrackedWaypointPacket(ClientboundTrackedWaypointPacket.Operation operation, TrackedWaypoint waypoint) Creates an instance of aClientboundTrackedWaypointPacket
record class.- Parameters:
operation
- the value for theoperation
record componentwaypoint
- the value for thewaypoint
record component
-
-
Method Details
-
removeWaypoint
-
addWaypointPosition
public static ClientboundTrackedWaypointPacket addWaypointPosition(UUID pUuid, Waypoint.Icon pIcon, Vec3i pPosition) -
updateWaypointPosition
public static ClientboundTrackedWaypointPacket updateWaypointPosition(UUID pUuid, Waypoint.Icon pIcon, Vec3i pPosition) -
addWaypointChunk
public static ClientboundTrackedWaypointPacket addWaypointChunk(UUID pUuid, Waypoint.Icon pIcon, ChunkPos pChunkPos) -
updateWaypointChunk
public static ClientboundTrackedWaypointPacket updateWaypointChunk(UUID pUuid, Waypoint.Icon pIcon, ChunkPos pChunkPos) -
addWaypointAzimuth
public static ClientboundTrackedWaypointPacket addWaypointAzimuth(UUID pUuid, Waypoint.Icon pIcon, float pAngle) -
updateWaypointAzimuth
public static ClientboundTrackedWaypointPacket updateWaypointAzimuth(UUID pUuid, Waypoint.Icon pIcon, float pAngle) -
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the PacketListener for processing.- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
apply
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
operation
Returns the value of theoperation
record component.- Returns:
- the value of the
operation
record component
-
waypoint
Returns the value of thewaypoint
record component.- Returns:
- the value of the
waypoint
record component
-