teleport To Pos
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
server Level
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
server Level
destination level
pos
destination position
look At
entity to look at after teleport
anchor
anchor used for target orientation
look At Anchor
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
server Level
destination level
pos
destination position
look At
position to look at
anchor
anchor used for target orientation