0x03 S03PacketTimeUpdate
Synchronizes the world time (total world age and day/night cycle time). Sent every few seconds or when time accelerates (sleeping).
Fields
| Field | Type | Description |
|---|---|---|
| totalWorldTime | long | Total ticks since world creation (monotonically increasing) |
| worldTime | long | Current day/night time (0-24000). worldTime % 24000 for time-of-day. |
Wire Encoding
| Field | Type | Notes |
|---|---|---|
| World Age | long | Incremented each tick |
| Time of Day | long | 0-24000, wraps around |
MCP References
MCP
NetHandlerPlayClient.handleTimeUpdate()Handler Interface
HND
INetHandlerPlayClientNotes
Time values: 0=dawn, 6000=noon, 12000=sunset, 18000=midnight. When all players sleep, time jumps to 0 (dawn). S03 is used by modules to calculate server TPS (ticks per second) by measuring the time between S03 updates.
implementation Implementation Cases
Ambience
(Gugustus, Tenacity 6.0)
Cancel or modify world time for custom day/night cycle.
if (event.getPacket() instanceof S03PacketTimeUpdate) {
S03PacketTimeUpdate s03 = (S03PacketTimeUpdate) event.getPacket();
event.setCancelled(true);
// Send modified time
}TimeChanger
(Gugustus, Tenacity 6.0)
Cancel or modify world time for custom day/night cycle.
if (event.getPacket() instanceof S03PacketTimeUpdate) {
S03PacketTimeUpdate s03 = (S03PacketTimeUpdate) event.getPacket();
event.setCancelled(true);
// Send modified time
}WorldTime
(Gugustus, Tenacity 6.0)
Cancel or modify world time for custom day/night cycle.
if (event.getPacket() instanceof S03PacketTimeUpdate) {
S03PacketTimeUpdate s03 = (S03PacketTimeUpdate) event.getPacket();
event.setCancelled(true);
// Send modified time
}