Skip to content

API reference / @jsprismarine/prismarine / network/OutboundPacketTrace / OutboundPacketTrace

Class: OutboundPacketTrace ​

Defined in: prismarine/src/network/OutboundPacketTrace.ts:30

Keeps clientbound packet records so replay runs can compare each tick's output.

Implements ​

Constructors ​

Constructor ​

new OutboundPacketTrace(): OutboundPacketTrace

Returns ​

OutboundPacketTrace

Methods ​

getPayloadBytes() ​

getPayloadBytes(): number

Defined in: prismarine/src/network/OutboundPacketTrace.ts:74

The encoded packet bytes, without JavaScript objects or batch framing overhead.

Returns ​

number


packetDigestsByTick() ​

packetDigestsByTick(): ReadonlyMap<number, string>

Defined in: prismarine/src/network/OutboundPacketTrace.ts:44

Hashes each tick's packets in connection id and per-connection sequence order.

Returns ​

ReadonlyMap<number, string>


record() ​

record(packet): void

Defined in: prismarine/src/network/OutboundPacketTrace.ts:34

Adds a private copy of the encoded packet bytes.

Parameters ​

packet ​

OutboundPacketRecord

Returns ​

void

Implementation of ​

OutboundPacketRecorder.record


records() ​

records(): readonly OutboundPacketRecord[]

Defined in: prismarine/src/network/OutboundPacketTrace.ts:39

Returns records in transport framing order with independent packet buffers.

Returns ​

readonly OutboundPacketRecord[]