ReplicationClient
Defined in: net/replication/client.ts:123
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new ReplicationClient(
world,options?):ReplicationClient
Defined in: net/replication/client.ts:148
Parameters
Section titled “Parameters”options?
Section titled “options?”ReplicationClientOptions = {}
Returns
Section titled “Returns”ReplicationClient
Accessors
Section titled “Accessors”connected
Section titled “connected”Get Signature
Section titled “Get Signature”get connected():
boolean
Defined in: net/replication/client.ts:164
Returns
Section titled “Returns”boolean
connectionId
Section titled “connectionId”Get Signature
Section titled “Get Signature”get connectionId():
number
Defined in: net/replication/client.ts:168
Returns
Section titled “Returns”number
netIds
Section titled “netIds”Get Signature
Section titled “Get Signature”get netIds():
NetIds
Defined in: net/replication/client.ts:160
Returns
Section titled “Returns”NetIds
predictionEnabled
Section titled “predictionEnabled”Get Signature
Section titled “Get Signature”get predictionEnabled():
boolean
Defined in: net/replication/client.ts:230
Returns
Section titled “Returns”boolean
serverTick
Section titled “serverTick”Get Signature
Section titled “Get Signature”get serverTick():
number
Defined in: net/replication/client.ts:173
The tick stamped on the newest applied state (server time axis).
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get table():
ReplicationTable
Defined in: net/replication/client.ts:156
Returns
Section titled “Returns”ReplicationTable
Methods
Section titled “Methods”applyPending()
Section titled “applyPending()”applyPending():
void
Defined in: net/replication/client.ts:296
Apply everything received since the last fixed step, in the order it arrived — which is the order the authority sent it. Within one server tick that is already spawn → remove → despawn → state, so a frame never precedes the spawn it references and nothing has to be re-sorted here. With prediction enabled, ends by reconciling every owned entity: live state ← authority copy ⊕ replay of unacknowledged inputs.
Returns
Section titled “Returns”void
connect()
Section titled “connect()”connect(
transport):Promise<void>
Defined in: net/replication/client.ts:185
Handshake over the transport; rejects (and detaches) on any mismatch.
Parameters
Section titled “Parameters”transport
Section titled “transport”Returns
Section titled “Returns”Promise<void>
disconnect()
Section titled “disconnect()”disconnect():
void
Defined in: net/replication/client.ts:251
Returns
Section titled “Returns”void
enablePrediction()
Section titled “enablePrediction()”enablePrediction(
options):void
Defined in: net/replication/client.ts:241
Enable (or reconfigure) prediction after construction — the path for game code whose connection a HOST made (the editor’s multiplayer preview connects the client realm itself, options-free): call from a fixed-tick system once the session is a client. Owned entities that already spawned get their authority copies seeded from current state.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”void
ownsEntity()
Section titled “ownsEntity()”ownsEntity(
entity):boolean
Defined in: net/replication/client.ts:285
True when this client’s connection owns the entity (Replicated.owner).
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Returns
Section titled “Returns”boolean
sampleInterpolation()
Section titled “sampleInterpolation()”sampleInterpolation(
deltaTicks):void
Defined in: net/replication/client.ts:596
Present the buffered state at the trailing render clock. Runs each
render frame (PostUpdate); deltaTicks = render delta in tick units.
Parameters
Section titled “Parameters”deltaTicks
Section titled “deltaTicks”number
Returns
Section titled “Returns”void
sendInput()
Section titled “sendInput()”sendInput(
actions):void
Defined in: net/replication/client.ts:271
Send an input command (typically the InputMap’s evaluated action values, once per fixed tick — with prediction enabled that cadence is the contract, since the server consumes one command per tick). The seq stamp makes stale deliveries harmless. With prediction the command also applies to the owned entities immediately.
Parameters
Section titled “Parameters”actions
Section titled “actions”Record<string, unknown>
Returns
Section titled “Returns”void