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 Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientboundTrackedWaypointPacket.OperationThe field for theoperationrecord component.static final StreamCodec<RegistryFriendlyByteBuf, ClientboundTrackedWaypointPacket> private final TrackedWaypointThe field for thewaypointrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundTrackedWaypointPacket(ClientboundTrackedWaypointPacket.Operation operation, TrackedWaypoint waypoint) Creates an instance of aClientboundTrackedWaypointPacketrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaddWaypointAzimuth(UUID identifier, Waypoint.Icon icon, float angle) addWaypointChunk(UUID identifier, Waypoint.Icon icon, ChunkPos chunk) addWaypointPosition(UUID identifier, Waypoint.Icon icon, Vec3i position) voidapply(TrackedWaypointManager manager) final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener listener) Passes this Packet on to the PacketListener for processing.final inthashCode()Returns a hash code value for this object.Returns the value of theoperationrecord component.removeWaypoint(UUID identifier) final StringtoString()Returns a string representation of this record class.type()updateWaypointAzimuth(UUID identifier, Waypoint.Icon icon, float angle) updateWaypointChunk(UUID identifier, Waypoint.Icon icon, ChunkPos chunk) updateWaypointPosition(UUID identifier, Waypoint.Icon icon, Vec3i position) waypoint()Returns the value of thewaypointrecord component.Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
operation
The field for theoperationrecord component. -
waypoint
The field for thewaypointrecord 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 aClientboundTrackedWaypointPacketrecord class.- Parameters:
operation- the value for theoperationrecord componentwaypoint- the value for thewaypointrecord component
-
-
Method Details
-
removeWaypoint
-
addWaypointPosition
public static ClientboundTrackedWaypointPacket addWaypointPosition(UUID identifier, Waypoint.Icon icon, Vec3i position) -
updateWaypointPosition
public static ClientboundTrackedWaypointPacket updateWaypointPosition(UUID identifier, Waypoint.Icon icon, Vec3i position) -
addWaypointChunk
public static ClientboundTrackedWaypointPacket addWaypointChunk(UUID identifier, Waypoint.Icon icon, ChunkPos chunk) -
updateWaypointChunk
public static ClientboundTrackedWaypointPacket updateWaypointChunk(UUID identifier, Waypoint.Icon icon, ChunkPos chunk) -
addWaypointAzimuth
public static ClientboundTrackedWaypointPacket addWaypointAzimuth(UUID identifier, Waypoint.Icon icon, float angle) -
updateWaypointAzimuth
public static ClientboundTrackedWaypointPacket updateWaypointAzimuth(UUID identifier, Waypoint.Icon icon, float angle) -
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
Description copied from interface:PacketPasses this Packet on to the PacketListener for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
apply
-
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 withObjects::equals(Object,Object). -
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
waypoint
Returns the value of thewaypointrecord component.- Returns:
- the value of the
waypointrecord component
-