[GH-ISSUE #5207] Mobs generated in packs share a UUID: vanilla clients see them frozen #1595

Closed
opened 2026-11-02 15:48:15 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ludovic111 on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5207

Originally assigned to: @ludovic111 on GitHub.

🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself.

What players see: on a Horizon server, a vanilla 26.3 client sees many mobs frozen in place: they never walk, but still push the player. Most are the mobs a chunk generates in packs (chickens, armadillos, …).

Why: save::random_uuid() seeds each UUID from the clock alone (SystemTime nanos, plus the pid). Calls in the same clock tick (a microsecond on macOS) return the same UUID, so a pack of mobs generated together shares one UUID. Vanilla's client keeps one entity per UUID (EntityLookup.add logs Duplicate entity UUID and skips the rest). The others stay in their section, but getEntity(id) can't find them, so every move packet for them is dropped.

Evidence: a vanilla client in a 20-minute session on a generated world (seed 20261031) logged 1074 Duplicate entity UUID warnings. One armadillo the server walked from (43, 77, 38) to (39.8, 76, 31.8) stayed at (43.0, 77.0, 38.0) on the client: its tracker sent the moves to that player, but level.getEntity(id) was null on the client. 10,000 back-to-back random_uuid() calls gave 2,468 distinct UUIDs.

Found while soak-testing the anticheat's movement prediction: the frozen mobs push the vanilla player where the server has no mob, which reads as a movement the keys can't make.

Originally created by @ludovic111 on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5207 Originally assigned to: @ludovic111 on GitHub. > 🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself. **What players see:** on a Horizon server, a vanilla 26.3 client sees many mobs frozen in place: they never walk, but still push the player. Most are the mobs a chunk generates in packs (chickens, armadillos, …). **Why:** `save::random_uuid()` seeds each UUID from the clock alone (`SystemTime` nanos, plus the pid). Calls in the same clock tick (a microsecond on macOS) return the same UUID, so a pack of mobs generated together shares one UUID. Vanilla's client keeps one entity per UUID (`EntityLookup.add` logs `Duplicate entity UUID` and skips the rest). The others stay in their section, but `getEntity(id)` can't find them, so every move packet for them is dropped. **Evidence:** a vanilla client in a 20-minute session on a generated world (seed 20261031) logged 1074 `Duplicate entity UUID` warnings. One armadillo the server walked from (43, 77, 38) to (39.8, 76, 31.8) stayed at (43.0, 77.0, 38.0) on the client: its tracker sent the moves to that player, but `level.getEntity(id)` was null on the client. 10,000 back-to-back `random_uuid()` calls gave 2,468 distinct UUIDs. Found while soak-testing the anticheat's movement prediction: the frozen mobs push the vanilla player where the server has no mob, which reads as a movement the keys can't make.
Author
Owner

@ludovic111 commented on GitHub (Oct 31, 2026):

/claim

<!-- gh-comment-id:6545326812 --> @ludovic111 commented on GitHub (Oct 31, 2026): /claim
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1595
No description provided.