teleportToPos

fun teleportToPos(collection: MutableCollection<out Entity>, serverLevel: ServerLevel, pos: Vec3, rot: Vec2? = null)

Teleport a collection of entities to a given position and optionally set rotation.

Parameters

collection

entities to teleport

serverLevel

destination level

pos

destination position

rot

optional rotation vector; if null, keeps entity rotation


fun teleportToPos(collection: MutableCollection<out Entity>, serverLevel: ServerLevel, pos: Vec3, lookAt: Entity, anchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET, lookAtAnchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET)

Teleport a collection of entities to a position and make them look at an entity.

Parameters

collection

entities to teleport

serverLevel

destination level

pos

destination position

lookAt

entity to look at after teleport

anchor

anchor used for target orientation

lookAtAnchor

anchor used for lookAt orientation


fun teleportToPos(collection: MutableCollection<out Entity>, serverLevel: ServerLevel, pos: Vec3, lookAt: Vec3, anchor: EntityAnchorArgument.Anchor = EntityAnchorArgument.Anchor.FEET)

Teleport a collection of entities to a position and make them look at a position.

Parameters

collection

entities to teleport

serverLevel

destination level

pos

destination position

lookAt

position to look at

anchor

anchor used for target orientation