FarAwayController.PlayerData
A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
A player's chunk and head position as sent by FarAwayController, so clients can draw markers for players too far away to be loaded.
Constructors
Fields
3 private and internal fields
| Member | What it is |
|---|
private Chunk chunk | The chunk the player's controller is in, or the global chunk when empty. |
private int id | Backing field for Id. |
private Vector3 position | Backing field for Position. |
Properties
| Member | What it is |
|---|
int Id { get; } | The player's user id. |
bool IsEmpty { get; private set; } | True when the player has no usable position (no head, no chunk, or in the global chunk). |
Vector3 Position { get; } | The player's head position in its chunk. |
IPlayer TargetPlayer { get; private set; } | The player this data is for. |
Methods
| Member | What it is |
|---|
void Serialize(Stream stream) | Syncs the id, chunk and position, and looks up the Player for the id on read. |
void Update() | Server: refreshes chunk and head position from the player, or marks it empty. |
Used in
Members of other types that take, return or hold a PlayerData: