A headless Minecraft client that moves exactly like the real one.
ghast is a Rust library for writing Minecraft: Java Edition bots. One API covers 1.8.9 to 26.3, and its player physics match the vanilla client bit for bit.
cargo add ghast
Checked against the real client, bit by bit
An oracle runs the vanilla client’s own movement code headless and records what it does on every tick. ghast gets the same inputs. Positions, velocities, flags and packets must then be equal by their bits, not close.
| vanilla | ghast | equal | |
|---|---|---|---|
| y | 4050000000000000 | 4050000000000000 | = |
| vy | bfb4133333333334 | bfb4133333333334 | = |
| on_ground | 1 | 1 | = |
| Compared with vanilla | Result | Size of the run |
|---|---|---|
| Player physics on 1.8.9, 1.12.2 and 1.16.5 | 0 diffs | 17.72 million ticks of randomized input |
| Player physics on 26.1 | 0 diffs | 12.20 million ticks, including elytra, riptide, boats and minecarts |
| Player physics on 26.2 | 0 diffs | 16.20 million ticks, adding slime, beds and the bounce attributes |
| Player physics on 26.3 | 0 diffs | 17.2 million ticks in 182,000 randomized cases, adding pistons |
| Window clicks against vanilla’s own prediction | 0 diffs | About 154,000 random clicks per version up to 1.16.5; 237,292 each on 26.1 and 26.2; 493,900 on 26.3 |
| Protocol codecs | byte-exact | Every packet of every version, both directions, against node-minecraft-protocol |
| Sessions on Paper with the Grim anticheat | 0 flags | 30 minutes of mixed walking, sprinting, digging, placing and clicking per version |
Grim and vanilla disagree in a few corner cases where the real client sends the same packets; those are documented one by one. How the numbers are measured
A bot is a type with a tick
The game advances in steps of 50 ms. ghast calls your behaviour once per step, with the world as the client sees it and the controls a player would have.
interests- Name what you want to hear about. Packets nobody asked for are dropped before they are decoded.
tick- Read the state, set the inputs. Movement comes out of the same physics the vanilla client runs.
GameVersion- Change this one value and the same bot joins a server of another version.
use ;
;
async
Old servers and new ones, behind one API
Each version is verified against that version’s own client, and each is a cargo feature, so a bot for one server compiles only what it uses.
- 1.8.9 protocol 47 and 1.8 to 1.8.8
- 1.12.2 protocol 340 and 1.12.1
- 1.16.5 protocol 754 and 1.16.2 to 1.16.4
- 26.1 protocol 775 to 26.1.2
- 26.2 protocol 776
- 26.3 protocol 777
Small enough to run by the hundred
A few megabytes a bot
An idle bot built for a single version takes 5.0 MB of memory on 1.8.9 and 6.4 MB on 26.1 (resident set, x86-64, measured 2026-11-12).
Many bots, few threads
Swarm runs any number of bots on a handful of worker threads. Bots standing in the same area can hold each identical chunk section once. Running swarms
Made for small machines
The design target is many bots on a Raspberry Pi 5: CPU first, then robustness, then memory. This website is served from one, too.
Three optional tools
ext- Write a bot as a script: look, dig, place, open a chest, wait for chat. Async helpers that still run on the tick loop.
pathfinder- A* planning with costs measured in the physics, and a follower that checks every move against it before making it.
viewer- See what the bot sees: a live 3D view of its world in a browser tab, with recordings and replays.