PacketPassengerRegistry

public final class PacketPassengerRegistry

Per-observer synthetic passengers, composed with each authoritative passenger snapshot.

Types

Link copied to clipboard
public final class Attachment extends Record
A synthetic passenger and the rotation its viewer must keep showing it with.

Functions

Link copied to clipboard
public static void attach(UUID viewer, int vehicle, int passenger, float yaw, float pitch)
Vehicles may turn a passenger they take to their own view (horses do, on the client as well), so the rotation the passenger was spawned with is kept here and restored after every passenger packet.
Link copied to clipboard
public static List<PacketPassengerRegistry.Attachment> attachments(UUID viewer, int vehicle)
The viewer's synthetic passengers of the vehicle, in attachment order.
Link copied to clipboard
public static void clear()
Link copied to clipboard
public static void clearViewer(UUID viewer)
Link copied to clipboard
public static Array<int> compose(UUID viewer, int vehicle, Array<int> nativePassengers)
Preserve native ordering (including the controlling passenger) and do not mutate shared packets.
Link copied to clipboard
public static void detach(UUID viewer, int vehicle, int passenger)
Link copied to clipboard
public static boolean hasAttachments(UUID viewer)