From 45b8861a85fff6d8b645e9fc61f7bd6884d93aba Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Sun, 11 Oct 2026 14:16:34 +0200 Subject: [PATCH] Accept vanilla's clockless time sync in the LAN bot test MinecraftServer.forceGameTimeSynchronization broadcasts SetTime with no clocks every 20 ticks, and it can reach a joining bot before PlayerList.sendLevelInfo's full sync. Wait for a sync with clocks instead of failing on the first packet. Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/tests/lan_bot.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/horizon-client/tests/lan_bot.rs b/crates/horizon-client/tests/lan_bot.rs index d82bf4858..49cec6509 100644 --- a/crates/horizon-client/tests/lan_bot.rs +++ b/crates/horizon-client/tests/lan_bot.rs @@ -333,10 +333,9 @@ fn status_and_join() { })); teleported = true; } - C::SetTime(t) => { - assert!(!t.clocks.is_empty()); - time = true; - } + // The join's full clock sync; MinecraftServer's 20-tick + // forceGameTimeSynchronization sends no clocks and may come first. + C::SetTime(t) if !t.clocks.is_empty() => time = true, C::PlayerInfoUpdate(u) => { info |= u.entries.iter().any(|e| e.name.as_deref() == Some("Host")); }