Skip to main content

PlayerEntitySync

A class in Root.Township, Alta.Chunks.

Syncs a chunk's force-loaded state from the server to clients through the chunk's entity. Only set up for chunks that auto sync.

Constructors​

MemberWhat it is
PlayerEntitySync(Chunk chunk)Creates a PlayerEntitySync from chunk.

Fields​

MemberWhat it is
protected Chunk chunkThe chunk this syncs.
protected MethodSyncStruct<bool> syncLoadedMethod sync on the chunk entity using the ChunkStateChanged message.

Methods​

1 private and internal method
MemberWhat it is
private void ClientLoad(IPlayer player, Stream stream, bool isLoaded)Reads or writes the loaded flag. On a client, sets the chunk's IsForceLoaded from it.