Getting started
Introduction
This page tells you what ghast is and what it is not, which Minecraft versions it supports, what it claims and how those claims are checked, and how stable the API is today. At the end there is a map of the rest of the guide.
What ghast is
ghast is a headless Minecraft: Java Edition client and bot library written in Rust. A bot built with it logs in to a server like a player would, keeps the connection alive, receives chunks, moves with the vanilla client's physics, digs, places, clicks in inventories and chats. It does all of this without a window and without a GPU.
ghast is not:
- A server. It is the client side of the protocol only.
- A game client with a window. There is no rendering of its own. The optional
viewerfeature (theghast-viewercrate) draws a read-only 3D view of the bot's world in a browser page; it never sends anything to the game. A client with its own window is not planned. - A mod or a cheat client. It is an independent implementation. The repository contains no Mojang code or assets, and the tests that compare it with vanilla download the vanilla jar at run time.
A bot is a Rust type that implements the Behavior trait. Its tick method is called once per
game tick, every 50 ms:
use ;
;
async
Who it is for
- People who want to run bots in Rust, and people who run many at once: the design puts CPU first, so that many bots fit on a small machine such as a Raspberry Pi 5.
- Authors of mineflayer bots. ghast's tick contract is close to a tick-driven mineflayer bot,
and the
ghast-extcrate adds mineflayer-style async helpers on top (see Async helpers (ext)). - People who need one layer only. The crates are published separately, so you can use the protocol crate, the physics or the world store on their own.
Supported versions
| Game versions | Protocol | GameVersion |
|---|---|---|
| 1.8 – 1.8.9 | 47 | V1_8_9 |
| 1.12.1 | 338 | V1_12_1 |
| 1.12.2 | 340 | V1_12_2 |
| 1.16.2, 1.16.3 | 751, 753 | V1_16_2, V1_16_3 |
| 1.16.4 – 1.16.5 | 754 | V1_16_5 |
| 26.1, 26.1.1, 26.1.2 | 775 | V26_1 |
| 26.2 | 776 | V26_2 |
| 26.3 | 777 | V26_3 |
1.12.1, 1.16.2 and 1.16.3 run the code of 1.12.2 and 1.16.5 with their own protocol number. How a version is chosen and where versions differ is in Versions.
Three claims
Old and current versions behind one API. The versions above live in one workspace, under a version-agnostic bot API. A behaviour never sees packets or version numbers unless it asks for them, so a bot written once runs on all of them.
Vanilla-exact physics, proven against an oracle. The oracle is a Java harness that loads the real vanilla client code headless and records what it does. ghast replays those records and compares positions, velocities, flags and packets bit for bit. The root README reports 0 diffs over 17.72 million randomized ticks on 1.8.9, 1.12.2 and 1.16.5, and 0 diffs over 12.20, 16.20 and 17.2 million ticks against the 26.1, 26.2 and 26.3 clients. Window clicks, block breaking times and the crosshair raytrace are checked the same way. Live sessions run against Paper servers with the Grim anticheat; the 30-minute mixed sessions per version report 0 Grim flags. How this works is in Accuracy.
Light. Packets a bot does not ask for are dropped before they are decoded, and one bot is one thread. Two measurements from the ghast-client README, with their conditions:
- An idle AFK bot standing at a superflat spawn for 600 s (local lab, 2026-11-03): 0.41 % of one core on 1.8.9 and 0.31 % on 1.16.5, RSS 3.9 MB and 3.8 MB, one thread each.
- One bot against a busy fake 1.8 server sending about 900 packets per second (WSL2 desktop, 2026-11-03): 0.25 % of one core.
Status and stability
ghast is early and pre-1.0; this guide describes 0.5.4. All crates share one version number and are released together. Until 1.0:
- a patch release (0.y.Z) adds features and fixes without breaking the public API;
- a minor release (0.Y.0) may break it, and the changelog says how to migrate.
New Minecraft versions arrive as new GameVersion variants in patch releases. Types the library
may extend are #[non_exhaustive], so match them with a _ arm. 1.0 is a checklist, not a
date: every supported version verified against the oracle with zero physics diffs and a clean
lab run, no breaking change for two months of releases, real bots in production for a month,
and a guide.
Use bots only where the server's rules allow them.
Where to go next
- Installation: add ghast to a project and choose features.
- First bot: a bot that joins a local server and says hello.
- The tick model: the tick loop every bot runs on.
- Versions: one bot for every version.
- World and entities and Inventory: reading the game.
- Async helpers (ext), Path finding, Bot screen (viewer), Accounts and proxies and Swarms: going further.
- Architecture: how the crates fit together.