Under the hood
Accuracy
ghast claims that its player movement, crosshair, block breaking and window clicks match the vanilla client exactly. This page explains how that is checked, gives the measured numbers with their conditions, and lists what they do not cover.
The oracle
The oracle (oracle/, Java) is the real vanilla client code run headless. On first use it
downloads the client jar from Mojang (SHA-1 checked) and the Yarn mappings, and remaps the jar
in a git-ignored cache; nothing from Mojang enters the repository. A small harness then calls
the real classes on a fake world built from the test case: the real client world and player
entity, key input fed through the real key bindings, the real per-tick update. What is faked is
what the tick does not depend on; the network handler is the real class with its packet send
captured.
Each run writes JSON-lines golden vectors: per tick, the input, the full player state after the tick, and the packets the client sent. Every float is stored with its raw IEEE bits, which are authoritative.
The vectors are committed under tests/golden/<version>/, so plain cargo test replays them
against the Rust crates without Java or a jar. Every recorded field is compared by its bits:
position, bounding box, velocity, all flags, timers, speeds, input, the "last sent" bookkeeping,
and every movement packet. A mismatch prints the case, the first differing tick, the field, and
both values in hex and decimal.
Randomized fuzz
Besides hand-written scenarios, the oracle generates random cases on demand (millions of ticks, kept in a git-ignored cache), which the Rust tests replay the same way. The generators build random terrain from movement-relevant blocks in random states, random held keys and turns, and random server packets during the case. Separate generators produce strips of partial-height blocks next to each other to make landings and step-ups at tiny height differences frequent, and "extras" add speed modifiers of every operation, effects, spectator mode, the world border and teleports with relative flags.
The headline numbers from the README:
| what | result | conditions |
|---|---|---|
| Player physics, 1.8.9, 1.12.2 and 1.16.5 | 0 diffs over 17.72 million ticks | positions, velocities, flags and packets compared by their bits |
| Player physics, 26.1 | 0 diffs over 12.20 million ticks | incl. edges, attributes, item use, teleports, elytra, riptide, entity pushes, nether, world border, boats, minecarts; 26.1.1 and 26.1.2 give identical records |
| Player physics, 26.2 | 0 diffs over 16.20 million ticks | the same mechanics plus collision restitution: slime, beds, bounciness, friction and air-drag attributes |
| Player physics, 26.3 | 0 diffs over 17.2 million ticks | the 26.2 mechanics with the 26.3 rule changes, plus pistons; 182,000 randomized cases |
Sub-versions are checked on their own jars: 1.8.2 to 1.8.8, 1.12.1 and 1.16.2 to 1.16.4 give the same golden records as their row and replayed at least 1.0 M fuzz ticks each with 0 diffs (2026-11-16).
Window clicks
The oracle also drives vanilla's own click handling on real screen handlers, with random contents (including NBT, damaged and over-stacked stacks), a random cursor and 1 to 10 random clicks per case. For every click ghast predicts, the encoded click packet must equal vanilla's bytes, and every slot, the cursor and the player inventory must equal vanilla's afterwards.
The result: 0 diffs over about 154,000 random clicks per version on 1.8.9 to 1.16.5, 237,292 each on 26.1 and 26.2, and 493,900 on 26.3, on every menu, with byte-identical packets, crafting results included. In the 1.8.9 and 1.16.5 runs, about 1.5 % of clicks were refused by ghast (furnace shift-clicks from the player part, unknown crafting results), which ends that case rather than counting as a match; on 1.16.5 NBT is compared as trees, because vanilla itself reorders compound keys.
Protocol codecs
Packet codecs are differential-tested against node-minecraft-protocol: byte-exact agreement in both directions, plus value-level checks for positions, bit fields, UUIDs, slots and entity metadata. Every packet of every version also round-trips (value and bytes survive encode, decode, encode), and random or mutated bodies must never panic. For 26.1, 26.2 and 26.3, real bytes captured from a vanilla server decode strictly and re-encode to identical bytes.
Lab sessions with an anticheat
The whole client is also run on local Paper servers with the Grim anticheat (Grim 2.3.73 on the legacy labs, 2.3.74 on 26.x). The result: 0 Grim flags in 30-minute mixed sessions of walking, sprinting, jumping, digging, placing and clicking, per version.
A handful of situations do draw Grim flags. Each is documented in the ghast-client README as
a Grim-vs-vanilla case: the session was recorded and replayed through the vanilla client, or an
oracle scenario was built, and the real client sends the same packets. Examples:
- 26.2 and 26.3: an idle fall onto slime from exactly 20 blocks, whose landing moves less than the position threshold, draws Simulation of about 0.0417 on every such drop.
- 1.8.9: a dismount that puts the player above the ground draws one Simulation of 0.0046.
- 1.8.9 and 1.16.5 (found first, with Grim 2.3.73): a step-up onto a block 1/8 higher whose move stays under the 0.03-block resend threshold.
For that last one, ghast has an opt-in, explicitly non-vanilla Client::force_step_position
that sends the position anyway. It is off by default.
What the numbers do not claim
- Fuzz is sampling, not proof. "0 diffs" means no difference in the cases generated, over the mechanics the generators cover. A mechanic outside them is not covered by the number.
- Some things are not modelled. The physics README lists them: for example 1.8.9 client-side entity pushes (the 1.8 client leaves them to the server), the sleeping box, portals, and riding vehicles other than the listed ones. On 26.2 one known approximation remains: vanilla's process-wide fluid shape cache, where ghast behaves like a freshly started client.
- 1.8 and 1.8.1 are protocol only. They are served by the 1.8.9 code; movement is not checked against those jars.
- Online mode is lab-tested against a local stand-in of the account services, not with a real account. On 26.x, incoming signed chat messages are not verified.
- Zero flags is for specific anticheat versions and the sessions run. Another anticheat, or another Grim version, may judge differently, including in the documented cases above.
- Some limits are ghast's own choices. The aim's turn rate cap of 14 by 10.5 degrees per tick is a behaviour default, not a vanilla rule.
Every measurement is dated and described with its method in the crate READMEs and
lab/README.md. To reproduce: cargo test replays the committed vectors, and
oracle/run.sh help lists the fuzz, replay and click commands (JDK 17+ needed).