Skip to main content

LocomotionController.TeleportArgument

A protected class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

Network argument for a teleport: target position, chunk, teleport mode and locomotion function.

Constructors​

MemberWhat it is
TeleportArgument()Creates a LocomotionController.TeleportArgument from position, chunk, mode and function.
TeleportArgument(Vector3 position, Chunk chunk, TeleportMode mode, LocomotionFunction function)Creates a LocomotionController.TeleportArgument from position, chunk, mode and function.

Fields​

5 private and internal fields
MemberWhat it is
private Chunk chunkChunk of the target position.
private int functionIndexBacking value for Function.
private bool isPositionWithinChunkTrue if the position is inside the location chunk's buffer bounds, so it can be sent compactly.
private int modeIndexBacking value for Mode.
private Vector3 positionBacking field for Position.

Properties​

MemberWhat it is
LocomotionFunction Function { get; }The locomotion function that caused the move.
TeleportMode Mode { get; }The teleport mode.
Vector3 Position { get; }The target position.

Methods​

MemberWhat it is
void Serialize(Stream stream)Writes or reads the argument; the position is sent relative to the chunk when it falls inside it.

Used in​

Members of other types that take, return or hold a TeleportArgument: