0x00 S00PacketKeepAlive

Server sends a keep-alive ID that the client must echo back in C00PacketKeepAlive.

Clientbound (Server → Client) · PLAY · net/minecraft/network/play/server/S00PacketKeepAlive.java

Published 2026-06-18 · Updated 2026-10-14

connectionplayer
Comprehensive 7/8

Fields

FieldTypeDescription
idVarIntRandom keep-alive ID to echo back

Wire Encoding

FieldTypeNotes
Keep Alive IDintRandom ID

MCP References

MCPNetHandlerPlayClient.handleKeepAlive()

Handler Interface

HNDINetHandlerPlayClient

Vanilla Source

S00PacketKeepAlive.java49 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayClient;
7
8
public class S00PacketKeepAlive implements Packet<INetHandlerPlayClient>
9
{
10
    private int id;
11
12
    public S00PacketKeepAlive()
13
    {
14
    }
15
16
    public S00PacketKeepAlive(int idIn)
17
    {
18
        this.id = idIn;
19
    }
20
21
    /**
22
     * Passes this Packet on to the NetHandler for processing.
23
     */
24
    public void processPacket(INetHandlerPlayClient handler)
25
    {
26
        handler.handleKeepAlive(this);
27
    }
28
29
    /**
30
     * Reads the raw packet data from the data stream.
31
     */
32
    public void readPacketData(PacketBuffer buf) throws IOException
33
    {
34
        this.id = buf.readVarIntFromBuffer();
35
    }
36
37
    /**
38
     * Writes the raw packet data to the data stream.
39
     */
40
    public void writePacketData(PacketBuffer buf) throws IOException
41
    {
42
        buf.writeVarIntToBuffer(this.id);
43
    }
44
45
    public int func_149134_c()
46
    {
47
        return this.id;
48
    }
49
}

Deobfuscated MCP 1.8.9 source of S00PacketKeepAlive, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S00PacketKeepAlive.java) at build time and verified present.

Deep Dive

Role in the protocol

S00PacketKeepAlive is the clientbound half of the play-state liveness probe. NetHandlerPlayServer sends it roughly once per second from its update loop with a server-chosen int key (field_147378_h), and the vanilla client echoes it back as C00PacketKeepAlive with the same key. NetHandlerPlayServer.processKeepAlive compares the echoed key and folds the round-trip into the player's ping EMA: ping = (ping * 3 + delta) / 4. Because it is the only timing-only packet in the play state, it is the reference clock that ping spoofers, disablers and timing-based velocity exploits all anchor on.

Vanilla handling

NetHandlerPlayClient.handleKeepAlive echoes immediately: addToSendQueue(new C00PacketKeepAlive(packetIn.func_149134_c())). Server side, processKeepAlive is a pure timing check: a matching key updates the ping EMA, a wrong key is silently ignored. There is no per-connection timeout in the vanilla 1.8.9 server for a missing echo; timeouts are enforced by the network layer read timeout or by anti-cheat plugins. That asymmetry, an immediate client echo versus a server that never punishes a missing one, is what every keepalive-timing exploit depends on.

Why clients touch it

Four distinct uses in the 8 clients. (1) Debugger in Rise 5.99, 6.1.30 and 6.2.4 prints incoming keepalive ids to chat so the user can watch server cadence while tuning other modules. (2) Rise 6.2.4 WatchdogVelocity and WatchdogPredictionVelocity cancel the keepalive while a velocity spoof is armed, silencing the server's timing reference during the spoof window. (3) Sigma 4.11 Disabler Erisium mode captures the key on receive and replays a stale C00 every 1500ms, freezing the measured ping. (4) Rise 6.x NetworkAPI registers the class so JavaScript scripts can hook its receive. Note the corpus has no PingSpoof hit for S00: the spoofers in these clients intercept the C00 echo side instead.

Exploit surface

Because the vanilla echo is immediate, any delay, cancellation or replay shows up as a ping shift or a stalled keepalive stream. The Watchdog velocity modules cancel S00 while holding S12/S32 packets so the server cannot correlate a latency spike with the velocity cancel; WatchdogPredictionVelocity re-injects the buffered keepalive on the strafe trigger to restore sequencing. Sigma's Erisium mode cancels C00 echoes and re-sends the last captured key on a timer, which keeps the server's key comparison failing silently so the ping EMA never updates. The trade-off is structural: cancellation is invisible to the packet stream but leaves the connection dead on servers that do track keepalive gaps.

Server-Side Handling

NetHandlerPlayServer sends S00PacketKeepAlive(field_147378_h) roughly every second from its tick loop. processKeepAlive: if the echoed key matches field_147378_h, ping = (ping * 3 + (now - lastPingTime)) / 4; wrong or missing keys are silently dropped with no penalty. There is no vanilla timeout for a dead keepalive; connection liveness is the network layer's job.

Protocol Analysis

PLAY state, id 0x00, one VarInt int key (server-tick counter in vanilla). Clientbound; the serverbound echo is C00PacketKeepAlive with the same id value but a different class in the opposite direction. The key is opaque to the client: modules that mutate or replay it rely on the server never validating beyond equality with the last sent key. Because it arrives constantly, it is also the cheapest packet for modules to use as a timing beacon.

Anti-Cheat Landscape

NCP and AAC track keepalive timing to separate real latency from timer abuse; a frozen or wildly inflated ping is a classic timer/fly tell. Verus-era checks correlate keepalive gaps with C0F transaction gaps, which is why the Rise 6.2.4 Watchdog modes cancel S00 and S32 together, and why Sigma's Erisium mode replays keys instead of cancelling outright: pure cancellation is strong but lethal on servers with keepalive timeouts. Debugger and NetworkAPI are observation-only and never flag.

implementation Implementation Cases

The clientbound keepalive, echoed instantly by vanilla and used by clients as the timing reference for ping, disabler and velocity-spoof logic. Corpus hits: Debugger (Rise 5.99/6.x), WatchdogVelocity and WatchdogPredictionVelocity (Rise 6.2.4), Sigma's Erisium disabler mode, and the Rise 6.x script NetworkAPI registry.

Debugger (Rise 5.99, Rise 6.1.30, Rise 6.2.4)

Print incoming keepalive ids to chat so the user can observe the server's keepalive cadence while developing or tuning timing-based modules.

A PacketReceiveEvent handler checks instanceof S00PacketKeepAlive and prints 'KeepAlive | id: ' via Rise.addChatMessage; it prints S32PacketConfirmTransaction ids the same way. Rise 6.x gates the branch behind a keepAlive BooleanValue and formats through ChatUtil.display.

Source: Rise 5.99, dev/rise/module/impl/other/Debugger.java

Vanilla hook: PacketReceiveEvent
None: observation only, no wire mutation, so the vanilla echo still fires and nothing is flagged.
Variations: Rise 6.1.30 and 6.2.4 Debugger.java (lines 113-114) add the keepAlive BooleanValue toggle and switch to ChatUtil.display; both still read func_149134_c() for the id.
WatchdogVelocity / WatchdogPredictionVelocity (keepalive cancel) (Rise 6.2.4)

Cancel incoming keepalives while a velocity spoof is armed, so the server's timing probes stay silent during the window where the client holds velocity and transaction packets.

A PacketReceiveEvent switch: while active, S12PacketEntityVelocity and S32PacketConfirmTransaction are buffered and cancelled, and the S00PacketKeepAlive case either cancels outright (WatchdogVelocity, gated by a spoof BooleanValue) or buffers it on every third tick (WatchdogPredictionVelocity). On the strafe/boost trigger the buffer is replayed through PacketUtil.receive, restoring the keepalive and transaction sequence.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/module/impl/combat/velocity/WatchdogPredictionVelocity.java

Vanilla hook: PacketReceiveEvent, PreMotionEvent, StrafeEvent
Suppressing keepalive echoes during a knockback spoof prevents the server from measuring a latency spike that correlates with the velocity cancel. Cancelling S00 and S32 together keeps the two timing references consistent, which matters because Verus-style checks correlate keepalive gaps with transaction gaps.
Variations: WatchdogVelocity.java (line 125) cancels the keepalive without buffering it, gated by its own spoof BooleanValue and paired with S16/S15/S17 entity-look buffering; WatchdogPredictionVelocity adds the 3-tick buffering and yaw-based release logic.
Disabler (Erisium keepalive replay) (Sigma 4.11)

Freeze the server's ping measurement by cancelling C00 echoes and re-sending a stale captured key on a fixed 1500ms cadence.

The EventPacket receive handler intercepts S00PacketKeepAlive, stores func_149134_c() as lastKey, and arms the erisium flag. In EventUpdate, when erisium is set and the timer hits 1500ms, the module sends C00PacketKeepAlive(lastKey) via sendPacketNoEvent. The send-side branch cancels real C00 echoes in Faithful, Erisium, SagePvP and ColdNetwork modes.

Source: Sigma 4.11, info/sigmaclient/module/impl/other/Disabler.java

Vanilla hook: EventPacket (receive), EventUpdate (replay timer)
The stale key makes processKeepAlive drop the update silently, freezing ping with no packet-level anomaly. The periodic replay keeps the connection alive on servers that do track keepalive gaps, which pure cancellation cannot claim. The mode pairs with the transaction cancels in the same module (SagePvP/ColdNetwork) for servers that correlate the two.
Variations: No other client in the corpus implements the capture-and-replay pattern on this packet; Rise 6.x and Memeware implement the same idea on the C00 send side instead.
NetworkAPI (script registry) (Rise 6.1.30, Rise 6.2.4)

Expose S00PacketKeepAlive to the JavaScript scripting API so user scripts can hook its receive event.

A static Class array named clientbound lists S00PacketKeepAlive.class alongside every other play-state server packet; the script engine maps the registered classes to receive events for script handlers. The corresponding serverbound array lists C00PacketKeepAlive.class for the send side.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/script/api/NetworkAPI.java

Vanilla hook: Script event dispatch (receive routing)
None: scripts run client-side and the registry itself never mutates packets; any flagging risk comes from what the script does with the event.
Variations: Rise 6.1.30 ships the identical registry at com/alan/clients/script/api/NetworkAPI.java. No other client exposes this packet to a scripting layer.
PacketReceiveEvent is the universal hook for the clientbound S00. Rise 6.x uses @EventLink listeners; Sigma uses its RegisterEvent EventPacket bus; the script path routes through NetworkAPI's class registry.
Rise 5.99 uses per-module onPacketReceive overrides; Rise 6.x uses component and @EventLink listener APIs with PacketUtil.receive/sendNoEvent for replay; Sigma mutates nothing on receive but stores the key for its send-side replay; Spicy, Memeware, Nekoware and Tenacity have no module-level reference in this corpus.

anticheat Anti-Cheat Checks

S00 is the server's keep-alive probe: the client must echo the id back in C00. Anticheats use the round trip as their latency clock: the server records when it sent each id and when the matching reply arrives, which yields the player's ping and exposes ping-spoof, timer and connection-manipulation cheats. The corpus shows the same echo-tracking pattern at every scale, from the four-line ConnectionManager in Frequency to NCP's keepalive-frequency check with kick actions and Grim's validation that the replied id was actually sent.

BadPacketsO (Grim) (GrimAnticheat-Grim)

Flags keep-alive replies whose id was never sent by the server, the signature of a spoofed or replayed keep-alive stream.

Tracks every OUT keep-alive id in a queue. On the IN keep-alive reply, searches the queue for the id: a match removes the id (pruning the queue) and passes, while a reply with an unknown id flags and cancels the packet.

Detects: Ping-spoof clients that fabricate keep-alive replies, and lag-switch or timer tools that replay stale ids.

Source: GrimAnticheat-Grim, common/src/main/java/ac/grim/grimac/checks/impl/badpackets/BadPacketsO.java

Variations: Hydro's KeepAliveTracker and Frequency's ConnectionManager implement the same echo matching; only Grim validates and cancels the reply.
KeepAliveAdapter + KeepAliveFrequency (NoCheatPlus) (Updated-NoCheatPlus-NoCheatPlus)

Limits keep-alive reply frequency and records last keep-alive timing for the god-mode and moving checks.

ProtocolLib adapter on both keep-alive directions: the receiving side always updates lastKeepAliveTime (even when the check is disabled, because fight.godmode depends on it) and runs the KeepAliveFrequency check, which cancels the reply when the frequency exceeds the configured limits; the sending side records the outgoing id so the expected-reply model stays consistent.

Detects: Keep-alive spam, timer manipulation that shows up as impossible reply frequency, and the desync that ping-spoofing produces.

Source: Updated-NoCheatPlus-NoCheatPlus, NCPCompatProtocolLib/src/main/java/fr/neatmonster/nocheatplus/checks/net/protocollib/KeepAliveAdapter.java

Variations: Frequency's ConnectionManager keeps the same last-sent-time map but only computes ping; NCP adds frequency limits and actions.
KeepAliveTracker (Hydro) (Incognitolol-Hydro)

Tracks the keep-alive round trip as the player's latency clock, feeding ping data to every other check.

On the OUT keep-alive, stores the id with a send timestamp in an expected map. On the IN reply, looks up the id, removes it and computes keepAlivePing as the receive timestamp minus the send timestamp, setting the acceptedKeepAlive flag. The ping value is displayed in the /hydro debug command and feeds the ping-based exclusions.

Detects: Ping spoofing is exposed because the computed ping diverges from the transport-level expectation; the tracker itself is data, not a flagger.

Source: Incognitolol-Hydro, src/main/java/integral/studios/hydro/model/tracker/impl/KeepAliveTracker.java

Variations: Frequency and Tecnio's ConnectionTracker use the identical map-and-measure pattern; Hydro exposes the value to its GUI and checks.
ConnectionManager (Frequency) (ElevatedDev-Frequency)

Converts keep-alive and transaction echoes into a measured ping that every check reads for latency exemptions.

TickManager sends the OUT keep-alive and stores the id with a timestamp; the incoming processor calls onKeepAlive when the reply arrives. ConnectionManager looks up the recorded send time for that id and stores the difference as keepAlivePing. PingSpoofA/B and the lag exemptions then compare this keep-alive ping against the transaction ping.

Detects: Ping-spoof and timer cheats: a keep-alive ping that disagrees with the transaction ping is the flag condition in PingSpoofA.

Source: ElevatedDev-Frequency, src/main/java/xyz/elevated/frequency/data/impl/ConnectionManager.java

Variations: Hydro's KeepAliveTracker is the same pattern; Frequency pairs it with the transaction clock, which Hydro handles in a separate tracker.

Wiki Cross-Reference

The server kicks the client if it does not respond to a keep-alive within 15 seconds, and the client disconnects with a timeout if the server sends none for 20 seconds.

The vanilla server generates the keep-alive ID from a system-dependent time in milliseconds.

MCP 1.8.9 S00PacketKeepAlive implements Packet dispatching to INetHandlerPlayClient.handleKeepAlive; wire serde is readPacketData/writePacketData via readVarIntFromBuffer.

1.8.9 callers: NetHandlerPlayServer.update sends new S00PacketKeepAlive (line 152): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/network/NetHandlerPlayServer.java

Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.

Vanilla Internals

Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.