PassengerPacketEntityDsl

DSL scope for configuring a packet entity that is used as a passenger.

Passenger entities do not define their own location, viewer whitelist/blacklist, or spawn/despawn handlers. Instead, they are tied to the parent entity and are spawned and despawned with it.

Properties

Link copied to clipboard

The entity's attributes.

Link copied to clipboard

The entity's equipment slots.

Functions

Link copied to clipboard
abstract fun equipment(equipment: EquipmentDsl.() -> Unit)

Configures equipment using named equipment slots.

Link copied to clipboard
abstract fun metadata(metadata: M.() -> Unit)

Configures entity metadata.

Link copied to clipboard
abstract fun onAttack(handler: AttackDsl.() -> Unit)

Registers a handler called on the main server thread when a player attacks this passenger (left click).

Link copied to clipboard
abstract fun onAttackAsync(handler: (ServerboundAttackPacketEvent) -> Unit)

Registers a handler called on the player's Netty event-loop thread when they attack this passenger (left click).

Link copied to clipboard
abstract fun onInteract(handler: InteractDsl.() -> InteractionResult)

Registers a handler called on the main server thread when a player interacts with this passenger (right click).

Link copied to clipboard

Registers a handler called on the player's Netty event-loop thread when they interact with this passenger (right click).

Link copied to clipboard

Registers a handler called on the player's Netty event-loop thread when they pick this passenger (middle click).

Link copied to clipboard
abstract fun passengers(passengers: PacketEntityPassengersDsl.() -> Unit)

Adds nested passenger packet entities to this passenger.