Changelog
All crates share one version number.
Versioning: 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 says how to migrate. 1.0 comes only when the API has been stable for a while and the 1.0 criteria in CONTRIBUTING.md are met.
Unreleased
0.5.6
Added
-
26.x boxes of the entity types without a centred dimensions box: item frames and glow item frames (from the block they hang on and the facing, 1 × 1 with a framed map), paintings (the variant's size, even sizes shifted half a block), leash knots, shulkers (snapped onto their block, the lid's opening the client animates, scale capped at 3), interaction entities (width / height entries) and wind charges (lowered by 0.15).
Entity::bounding_boxwasNonefor them; the tracker now also places hanging entities and shulkers where the client does and turns frames and paintings with their facing. The crosshair pick therefore hits them: attacks and right clicks on item frames, paintings, shulkers and interaction entities now work end to end. Oracle: newEntityBoxDump(tests/golden/26.{1,2,3}/entity_boxes.jsonl.gz), 0 diffs on all three versions; the engine replay of the entity click cases went from 127 / 131 / 144 pick differences (26.1 / 26.2 / 26.3) to 7 each, all with a spear in the main hand (attack range picks, not modelled), and now fails on any other pick difference. -
26.x item uses in the air for the items whose
usereads more than the stack: spawn eggs (their own block ray), filled buckets (water, lava, the mob buckets: pour into air, the hand becomes an empty bucket outside creative), boats and rafts (the boat box against blocks, the border and the entities it may collide with), bundles, books, empty maps, fishing rods, knowledge books, bows and crossbows (ammunition). A use the item fails now hands the turn to the off hand as vanilla does, and a success ends it with the swing. The engine replay of the entity click cases went from 41 / 46 / 32 item-use differences (26.1 / 26.2 / 26.3) to 0 and now fails on any. -
ghast-ext:Bot::interact(id), one right click on an entity (turns until the crosshair is on it, presses for one tick): put an item into an item frame or turn it, trade, shear, name.Bot::attackaims at the box centre of the types without dimensions (item frames, paintings, shulkers, ...), so it knocks an item out of a frame. -
item_frameexample (ghastfeatureext) andlab/item_frame.sh: puts the held item into a frame, turns it and knocks it out withBot::interact/Bot::attack, the server's side read back with op commands. Lab results: PASS with 0 Grim flags on 1.8.9, 1.12.2, 1.16.5 and 26.3.
Fixed
- 1.16.5 boxes of item frames, paintings, leash knots and shulkers, now proven by the oracle
(new
EntityBoxDump,tests/golden/1.16.5/entity_boxes.jsonl.gz, 0 diffs on drawn position, rotation, box and targeting margin, with entity data tracked and without):- position packets move a hanging entity by its tracked position: an item frame hangs on the block of the new tracked position, a leash knot sits in its centre (its box stays where it spawned: only the knot's constructor builds one), a painting moves its block by the floored distance from its position to the tracked one, whose start is the origin (the painting spawn never sets it). Before, the entity jumped to the packet coordinates;
- a painting is turned to its facing (yaw = facing × 90) and position packets never turn it;
- an item frame's facing takes any spawn data (
Direction.byId:abs(data % 6)); - a shulker's lid: the box grows away from the attached face by the opening the client animates 0.05 a tick towards the peek amount (it was the closed shell), and attached-block entity data moves the shulker onto the block at once;
- a mob spawn clamps the pitch to ±90 (
updatePositionAndAngles).
- 1.12.2 boxes of the same types, proven the same way (
tests/golden/1.12.2/entity_boxes.jsonl.gz, 0 diffs):- hanging entities follow their tracked position on every relative move, look and bare
entitypacket (a look re-hangs them from it too), a teleport within 1/32 of the client's position leaves them where they are, a painting turns to its facing and never by packets, an item frame's facing takes any spawn data (Direction.fromHorizontal:abs(data % 4)); - a shulker no longer follows position packets (vanilla ignores them, the look too): its
attached-block entity data puts it on the block at once, its tick keeps it there with the
box stretched away from the attached face by the lid's opening (animated towards the peek
amount), and turns it to yaw 180 (
tickMovement). The entity data of the spawn packet counts. With the client view on (the ghast client's default) the 1.12.2 tracker now reads shulker entity data even withoutConfig::metadata.
- hanging entities follow their tracked position on every relative move, look and bare
- 1.8.9 boxes of item frames, paintings and leash knots, proven the same way
(
tests/golden/1.8.9/entity_boxes.jsonl.gz, 0 diffs): a position packet puts a hanging entity at its tracked position itself and keeps its box; only a new block re-hangs a frame or a painting there (a painting first moves onto its block's corner); a leash knot never re-hangs and keeps its spawn box. A painting turns to its facing and never by packets; an item frame's facing takes any spawn data. Not modelled: such a packet also pushes the entity up out of the blocks its box meets (the tracker has no world; a 1.8 server sends hanging entities hardly any position packets). - Legacy click proof for these types: new
aim_*cases in the 1.8.9 / 1.12.2 / 1.16.5attacks.jsonl.gzattack and right-click item frames (empty, with an item, with a map), paintings of four sizes, leash knots and (1.12.2 / 1.16.5) closed and open shulkers from random aims around their boxes (edge hits, the 1.8 pick margin, misses, out of reach), and right-click frames with an empty hand; the engine replays them with identical packets (20 / 24 / 24 new cases). - 1.16.5: a right click with an empty hand on an item frame that holds an item is taken by the
frame (SUCCESS: it turns the item), as
ItemFrameEntity.interactanswers on the client; the engine took every frame for empty and also sent the off hand's click, so the server turned the item twice (seen live on the lab). The tracker now keeps an item frame's item (entity data 7) withoutConfig::metadata, as it does for item entities. ghast-ext:EntityInfo::itemis filled on 26.x too (the item entity's stack id and count); it was alwaysNonethere.- 26.x: a creative (invulnerable) player eats when full, as
Player.canEatallows (Capabilities::invulnerable_eatingisAlwayson 26.x). - A join, a respawn and a game mode change give the player the game mode's abilities at once
(vanilla
GameType.updatePlayerAbilities, every version), before the server's abilities packet: a spectator flies (it fell for those ticks, so its eye and picks were off), creative may fly and builds instantly, survival / adventure lose all of it. A respawn also starts from fresh abilities (a new client player). - 26.x: a painting variant sent inline (
set_entity_datawith a direct holder) is read with its VarInt width and height (the tracker's own reader). ghast-protocol26.x: the generatedEntityMetadataPaintingVariantand the skip path of thepainting/variantitem component now read and write the width and height as VarInts, as vanilla'sPaintingVariant.DIRECT_STREAM_CODECdoes (26.1.2, 26.2, 26.3; minecraft-data has twoi32, corrected by the codegen patch layer, which fails once upstream changes it). The public type is unchanged (width/heightstayi32); before, an inline variant misread the rest of the packet.- 26.x: a shulker's scale is capped at 3 (
Shulker.sanitizeScale).
0.5.5
Added
-
With
Interests::ENTITY_PHYSICS, experience orbs now follow the nearest player within 8 blocks on every version, as the vanilla client's own orb tick does (26.xExperienceOrb.followNearbyPlayer; 1.8.9 / 1.12.2 / 1.16.5ExperienceOrbEntity.tick: a target search every 20 +id % 100ticks of the orb's clock, 1.8.9 pulling towards the full eye height, later versions half of it). The players are ours and the tracked ones, each where it is when the orb ticks (one that ticks after the orb is read before its own interpolation step), with its eye height (1.8.9 / 1.12.2 from the sneaking and gliding flags, 1.12.2's box height following at the player's tick; 1.16.5 / 26.x from the pose), its tab-list spectator flag and (26.x) its health; an orb keeps following a player object that left the world. New inghast-physics:orb::OrbPlayerandtick_drop_near/Drop::followingper version,v1_12::collides_with_any_block,modern::LoadGate::player_dead; inghast-entity:Entities::tab_generation,v26_x::tab_generation,v1_16_5::Tracker::client_eye_height. WithENTITY_PHYSICSthe tracker also keeps the players' names and game modes on 1.8.9 / 1.12.2 / 1.16.5, and 1.8.9 reads entity data for the simulated entities even when the tracker does not (a dangerous wither skull's flag was missed there). Oracle: orb cases in everynonliving_tracking.jsonl.gz(our player on the floor, up to three other players coming and going), 0 diffs on all six versions. -
Cached large runs of the non-living tracking dump (
oracle/cache/<v>/fuzz-nonliving/, git-ignored, orb cases included) and the ignoredghast-clienttestnonliving_cache_matches_the_oracle(per version) that replays them one line at a time: 720 cases per 26.x version, 920 per legacy version, 0 diffs. They found that a followed player's pose or flags sent just before it leaves the world must change the eye height the orb keeps reading (fixed). -
Queued-click oracle cases on 1.12.2 and 1.16.5 (
tests/golden/<v>/attacks.jsonl.gz, casesattack_player_clicks,attack_player_clicks_creative: three clicks on one pick with a cooldown reset each, held clicks, misses at the sky with the delay inside a tick, a yaw turn away), as on 1.8.9 and 26.x; the engine replays them at 0 diffs.oracle/run.sh verifyfor 1.12.2 and 1.16.5: every golden the same. -
Grim-vs-vanilla case (12) in the ghast-client README: a signed 1.8.9 book's pages are bare JSON strings (vanilla
BookEditScreen.finalizeBookthroughText.Serializer; ghast sends the same bytes), and Grim 2.3.73's ExploitB on a 1.8 server reads them as{"text": …}objects with the server's strict Gson 2.2.4, which throwsMalformedJsonException(logged, no flag, the book is signed). ghast keeps the vanilla encoding. -
sign_book_bedexample: each check waits up to 100 ticks for the server's answer (and 20 ticks after its first line) and printsWAIT[<step>]. On the 1.8 lab the bot still gets no answer to its failing/blockdata: CraftBukkit 1.8.8 reports a failed vanilla command to the other ops and the console only (packet trace: no chat packet after the command), so the script keeps reading the sign from the console.
Fixed
- Item drop spreads (
launch::drop_velocityon every version) are now bit-exact: the random angle'sMath.cos/Math.sincome from a platform-independent double-double reference corrected by a table of HotSpot x86-64's own values for all 2^24 angles anextFloat()can make (MC=26.1 oracle/run.sh jdk-drop-trig; 20,299 cosine and 20,876 sine one-ulp exceptions; JDK 21 and 25, interpreted or compiled, agree). Rust'sf64::cos/f64::sinmissed the JVM by one ulp on about 0.2 % of the angles; the launch tests no longer allow it (1.8.9, 1.12.2, 1.16.5, 26.x goldens: 0 drop lines off). - Behaviour change: the held mouse buttons now pick their target with the look of this
tick's turn, on every version. Vanilla turns the player at frame time, between ticks, and the
tick's crosshair pick and key handling read that look (1.8.9
MinecraftClient.runGameLoop, 1.12.2 its game loopmethod_14464:tickthenGameRenderer.render→Entity.increaseTransforms; 1.16.5MinecraftClient.render→tickthenMouse.updateMouse; 26.xMinecraft.runTick→tickthenMouseHandler.handleAccumulatedMovement). The engine turned after the key handling unless a press was queued, so withset_aimand a held button the click acted on what the old look picked while the movement packet carried the new one, andTickContext::press_preview/planned_lookdisagreed with the click. The turn now runs before the key handling on every tick; the previews were already right.Client::hold_turn_on_actionnow only holds for the behaviour's own digs, places, uses and attacks (the buttons pick with the turned look, so they never need it). Oracle evidence: the 1.8.9 / 1.12.2 / 1.16.5attacks+item_usegoldens and the 26.xheld_diggoldens replayed with each tick's look arriving as the tick's turn: 27 / 27 / 50 of 129 / 131 / 160 attack cases and 249 / 249 / 254 of 268 held-dig cases differed before, 0 after.
0.5.4
Added
- Item cooldowns on 1.12.2, 1.16.5, 26.1, 26.2 and 26.3 (
ghast_client::cooldown): the server'sset_cooldown(an item on 1.12.2 / 1.16.5, a cooldown group on 26.x; 0 removes it) and the client's own cooldowns (1.12.2 / 1.16.5 an ender pearl's 20 ticks; 26.x theuse_cooldowncomponent after an instant use, a use on a block or a finished use: ender pearls, wind charges, chorus fruit, custom groups shared by several items), counted in the player tick, gone with a new player entity. A right click with a cooling stack now sends its packets and nothing else, like vanilla: holding the use key with ender pearls throws one every 20 ticks (the "pearls held down" gap of 0.4.7). Oracle-proven:tests/golden/<v>/cooldowns.jsonl.gz(oraclecooldowns; 1.12.2 / 1.16.5 10 cases, 712 ticks; 26.x 13 cases, 829 ticks with the client's cooldowns and hands each tick; 0 diffs). API:TickContext/TickViewitem_cooldowns,item_cooldown,held_cooldown;TickEvents::cooldowns;Inbound::ItemCooldown;Capabilities::item_cooldowns(ItemCooldownRules);ghast_inventory::modern::use_cooldown(UseCooldown);ghast_ext::Bot::held_cooldown,wait_cooldown. 1.8.9 has no item cooldowns. - 26.x: thrown items (snowballs, eggs, ender pearls, bottles o' enchanting, splash / lingering potions, wind charges) answer their use with the client swing (26.1 / 26.2 send it) and end the click there, and take one item from the hand on the client.
- Fishing on every version (
ghast_client::fishing): with entity tracking the client knows the bot's own bobber (the spawn whose object data is our entity id):TickContext::fishing(Bobber: id, position,BobberStateflying / bobbing / hooked, hooked entity,biting, age) andTickEvents::fishing(FishingEvent::Cast,Bite,BiteEnded,Hooked,Unhooked,Gone);bite_signal(BiteSignal). The bite is exact on 1.16.5 / 26.x (the synced biting flag) and a documented heuristic on 1.8.9 / 1.12.2 (the bobber splash sound within 2 blocks of our bobber; the sound packets are read only while a bobber is out). Nothing runs per tick without a bobber.ghast_ext::Bot::{cast, wait_for_bite, reel_in, fish, bobber},Event::Fishing,Error::{NoBobber, AlreadyCast}; examplefishing;lab/fishing.sh(3 of 3 catches on all six versions, 0 Grim flags). - The bobber's client physics, oracle-proven (
tests/golden/<v>/fishing.jsonl.gz, oraclefishing/fishing-fuzz; 1.16.5 and 26.x 44 cases / 2,669 ticks, 1.12.2 42 cases / 2,537 ticks, 0 diffs): a bobber hooked to an entity follows it and lets go when it is removed (1.12.2, 1.16.5, 26.x:BobberState::Hooked,HookedEntity,Projectile::set_hooked), and on 1.16.5 / 26.x the bite jerks it down and pulls while it bites, from the bobber's random that vanilla seeds with its UUID and the game time (Projectile::with_uuid_lsb,set_game_time,set_biting,biting,hooked). WithInterests::ENTITY_PHYSICSa hooked bobber is simulated now (it was frozen) and a biting one takes the jerk.ghast_physics::{v1_12, v1_16_5, modern}::projectile::bobber_liquid_heightandv1_8::projectile::water_at. - Lab:
LAB_PORTruns a lab script on another port (withLAB_PROPS="server-port=N"). - Queued clicks on every version:
TickContext::press(Button::Left)queues one press for this tick's key handling, as a click between two ticks does in vanilla (while (attackKey.wasPressed()), 26.xconsumeClick); N calls are N clicks. On a tick with queued presses the turn comes before the key handling, which picks once (1.8 with the head yaw) and runs every click on that pick: the attack with its swing in the version's order and its slow-down, the 1.9+ cooldown reset per click, a miss's 10-tick delay that holds back the rest of the tick. More than 10 clicks per second, the turn not held. Oracle-proven: 1.8.9attacks.jsonl.gz(new casesattack_player_clicks,attack_player_clicks_creative) and 26.1 / 26.2 / 26.3held_dig.jsonl.gz(attack_mob_clicks,attack_mob_clicks_creative), 0 diffs. The right button is not queued (pressreturnsfalse).ghast_ext::Bot::left_click. Lab:lab/combat.sh <v> clicks<N>/clicks<N>-mob(combat_probePROBE=clicks, strafing and turning): 1.8.9 at 12 and 20 clicks per second, 60 s each on a walking player and on a mob, 0 Grim flags, 0 setbacks. TickContext::sprinting(the client's sprint flag after this tick's entity data, whichpose().sprintingshows only after the step) andTickContext::attack_slows(entity)(whether an attack issued now slows the bot).TickContext::set_turn_rate/turn_rateandRotation::set_turn_rate: the aim's cap per tick changed mid-session, the carried mouse budget kept.ghast_entity::Event::Swing { id, off_hand }: arm swings of tracked entities, withInterests::ENTITY_EVENTS(the trackers' newEVENT_IDS; 1.16.5 / 26.x read the packet only then).TickEvents::knockback(common::Knockback { motion, explosion }): our own velocity packets and explosion pushes in arrival order.
Changed
TickContext::attackandset_aimrustdoc: whatattackchecks (the sent pick only; no miss delay, cooldown or click rate) and the configurable turn rate.
Fixed
- 1.12.2 / 1.16.5: a thrown item the server put on a cooldown is no longer taken from the hand on the client when its use is refused.
0.5.3
Added
- 26.1, 26.2, 26.3: the client-side physics of tracked projectiles, item entities,
experience orbs, primed TNT and falling blocks (
Interests::ENTITY_PHYSICS, off by default, on top of entity tracking): each runs its own client tick between server updates like vanilla's, soEntityposition, velocity, rotation and ground flag are the vanilla client's. Oracle-proven:tests/golden/<v>/nonliving_tracking.jsonl.gz(oraclenonliving-tracking,NonLivingTrackDump.java; a cached 300-case run, 88,395 entity states per version, 0 diffs).ghast_entity26.xTracker::client_simulated,client_predicted_move,client_discarded;ghast_physics::modernProjectile/Dropsetters (set_pos,set_vel,set_rotation,set_on_ground,set_in_ground,set_acceleration_power,set_dangerous,set_fuse),set_interpolation_startandmoved_last_tick. - 1.16.5:
Interests::ENTITY_PHYSICStoo: the client copy follows each packet the wayClientPlayNetworkHandlerhands it on (spawn without the packet's motion, moves to the tracked position,setVelocityClient, a bobber ignoring moves, entity data), then runs its own client tick. Oracle-proven:tests/golden/1.16.5/nonliving_tracking.jsonl.gz; cached runs of 300 × 48 and 150 × 96 ticks (146,128 entity states), 0 diffs.ghast_entity::v1_16_5::Tracker::client_simulated,client_discarded;ghast_physics::v1_16_5Projectile::{set_pos, set_vel, set_rotation, set_on_ground, set_velocity_client, skip_tick, set_dangerous, set_tipped, set_no_gravity},Drop::{set_pos, set_vel, set_on_ground, set_fuse, set_no_gravity, set_fire_immune}. - 1.12.2:
Interests::ENTITY_PHYSICSas well, with 1.12's handlers (spawn motion only for object data above 0, the teleport's 1/32 rule, every held entity ticks). Oracle-proven:tests/golden/1.12.2/nonliving_tracking.jsonl.gz; cached runs of 300 × 48 and 150 × 96 ticks (141,857 entity states), 0 diffs.ghast_entity::v1_12::Tracker::client_simulated,client_discarded;ghast_physics::v1_12Projectile::{set_pos, set_vel, set_rotation, set_on_ground, set_velocity_client, skip_tick, set_dangerous, set_tipped, set_no_gravity},Drop::{set_pos, set_vel, set_on_ground, set_fuse, set_no_gravity}. - 1.8.9:
Interests::ENTITY_PHYSICSas well (now on every version), with 1.8's handlers:updateTrackedPositionAndAnglespushes the copy up onto the block boxes it runs into, an arrow moves plainly, a fishing bobber interpolates toward a position packet over 3 ticks. Oracle-proven:tests/golden/1.8.9/nonliving_tracking.jsonl.gz; cached runs of 300 × 48 and 150 × 96 ticks (145,940 entity states), 0 diffs.ghast_entity::v1_8::Tracker:: client_simulated,client_discarded;ghast_physics::v1_8Projectile::{set_pos, set_vel, set_rotation, set_on_ground, set_tracked_position, set_velocity_client, skip_tick, set_dangerous},Drop::{set_pos, set_tracked_position, set_vel, set_on_ground}. TickContext::predict_throw(ghast_client::throw:Throw,ThrowPrediction,ThrowHit) on every version: the expected flight and first block hit of a throw or shot from the sent pose;ghast-ext:Bot::predict_throw.- 26.1, 26.2, 26.3: other moving entities' own physics, as the server ticks them and as a
client shows them between server updates, oracle-proven bit for bit on both sides
(
tests/golden/<v>/projectiles.jsonl.gz, 165 cases, 6,489 ticks; cached fuzz 0 diffs over 1.10 M entity ticks per version):ghast_physics::modern::projectile(Projectile,ProjectileKind: snowballs, eggs, ender pearls, bottles o' enchanting, splash / lingering potions, wind charges, arrows, spectral arrows, tridents, small / large / dragon fireballs, wither skulls, the fishing bobber;tick_projectilewith the tick's block hit,run_projectileto the first hit),ghast_physics::modern::drop(Drop,DropKind: item entities, experience orbs, primed TNT, falling blocks (client);tick_drop,run_drop),modern::Side, andghast_physics::modern::launch(shoot/LaunchSpec/Noise: the exact launch of thrown, shot and wind-charge projectiles with the server's random spread separated,bow_power,drop_velocity;tests/golden/<v>/projectile_launch.jsonl.gz). NewRulesitems with defaults:interaction_shape,state_id,FLOAT_AIR_DRAG,SIMULATED_ON_CLIENT,BOBBER_DEFAULT_GRAVITY. Oracle:projectiles,projectiles-fuzz,projectile-launch(Projectiles.java). - Oracle: the same non-living entity vectors for 1.8.9, 1.12.2 and 1.16.5 (thrown items,
arrows, tridents, fireballs, wither skulls, the fishing bobber, items, orbs, primed TNT,
falling blocks; client and server sides;
tests/golden/<v>/projectiles.jsonl.gzandprojectile_launch.jsonl.gz, legacyProjectiles.javaper version). - 1.8.9, 1.12.2, 1.16.5: the same non-living entity physics in each version module
(
v1_8,v1_12,v1_16_5:projectile,drop,launch,Side), oracle-proven bit for bit on both sides: goldenprojectiles.jsonl.gz(157 / 168 / 188 cases),projectile_launch.jsonl.gz(450 / 500 / 500 lines; item drop spreads allow one unit in the last place where the JVM'sMath.sin/Math.cosintrinsic differs) and the cached fuzz (14,000 cases, about 1.15 M entity ticks per version, 0 diffs; one 1.8.9 case listed as a known world change). Covers the thrown items, arrows (tipped and spectral from 1.12.2, tridents on 1.16.5), fireballs and wither skulls, the fishing bobber, item entities, experience orbs, primed TNT and falling blocks of each version, with their launch constructors. - The HUD on every version (
Interests::HUD, off by default;ghast_client::hud):TickContext::hud/TickView::hud(Hud: boss bars, title and subtitle with the vanilla countdown and fade times, the action bar, the tab list's header and footer) andTickEvents::hud(HudEvent, including the countdowns running out). Each version's client rules are kept (subtitle before title, times for the next title, the 1.8 – 1.16.5clearand 1.8 / 1.12resetquirks, empty headers, the 1.12 / 1.16.5 boss bar fog flag, the 26.x reset at a reconfiguration). Boss bars are 1.9+ (Capabilities::boss_bars). Without the interest the packets are dropped undecoded. - Tab completion on every version:
TickContext::tab_complete/tab_complete_with(Outbound::TabComplete, vanilla transaction ids on 1.13+) and the answers inTickEvents::tab_completions(TabCompletion: request number, replaced range, matches with 1.13+ tooltips;Inbound::TabComplete). NewInboundvariantsBossBar,Title,ActionBar,TabList,TabComplete. ghast-ext:Bot::tab_complete(text).await,Bot::hud,Event::Hud,Event::TabComplete.hudexample (--features ext) andlab/hud.sh(26.3, 1.16.5, 1.12.2, 1.8.9 PASS, 0 Grim flags).- Sign editing on every version (
ghast_client::sign):TickContext::sign_editor,write_sign/close_sign(Outbound::UpdateSign, written in call order before the movement packet),TickEvents::signs(SignEvent: opened, closed by the client, ignored),Inbound::OpenSign,Capabilities::sign_editor(SignRules). The vanilla screen's rules: its character filter, 1.8.9 JSON lines, the 26.x side, an editor replacing another, the 1.16.5 first-tick check and the 26.x sign / distance checks; the keys are released while it is open.ghast-ext:Bot::sign_editor,wait_sign_editor,write_sign,close_sign,Event::Sign,Error::Sign. - Book and quill editing on every version (
ghast_client::book):TickContext::edit_book(Done or Sign with a title;Outbound::EditBook,BookEdit,BookError,Capabilities::book/BookRules): 1.8.9 / 1.12.2MC|BEdit/MC|BSignwith the stack, 1.16.5 and 26.xedit_bookwith the slot; the screens' limits, filter and trailing-page rules, and the held stack's change on the client (1.8.9's signing makes it a written book).ghast-ext:Bot::edit_book,Error::Book. - Sleeping on every version:
TickContext::sleeping,sleep_ticks,leave_bed(EntityAction::LeaveBed),TickEvents::sleep(common::SleepEvent),Inbound::UseBed/WakeUp(1.8 / 1.12),Capabilities::sleep_levels_pitch. The client puts the player on the bed as each version's client does (1.8 / 1.12 facing offsets in float, 1.16.5, 26.1 and 26.2 the centre + 0.6875, 26.3 the bed's sleep height + 0.125), keeps it still and its look level, and counts the sleep timer.ghast-ext:Bot::sleep_in,leave_bed,sleeping,Event::Sleep,Error::NotAsleep. - Sleeping is oracle-proven on every version (
tests/golden/<v>/sleep.jsonl.gz, oraclesleep: every facing, walls at head height, keys held, server pushes, the wake-up, the leave-bed packet, a bed broken under the sleeper, the full timer; replayed through the engine with 0 diffs). The sleeping player has vanilla's 0.2 × 0.2 box (it moves, collides and is pushed out of blocks with it) and eye height 0.2; 1.16.5 and 26.x apply the server's sleeping pose at once. Physics:v1_8::tick_asleep,v1_8::sleeping_box_at,v1_8::SLEEP_SIZE,v1_12::SLEEP_SIZE,PlayerExt::sleeping(v1_12,v1_16_5,modern),v1_16_5::PlayerState::set_pose,modern::PlayerState::set_pose. ghast-ext:Bot::follow_straight(the straight-line walker under a name that says so).- The HUD is oracle-proven on every version (
tests/golden/<v>/hud.jsonl.gz, oraclehud: the real client's handlers and HUD tick under scripted and seeded random title, subtitle, times, clear / reset, action bar, boss bar and tab list header / footer packets; their bytes replayed through each version's wire layer and the engine with 0 diffs over 1,580 ticks per version).
Changed
- A plain engine tick costs no more than in 0.5.2 on any version: the sign editor, sleeping and death share one cold flag in the key handling, the movement keys and the pick's eye height; a sleeping tick holds the look through the existing gate-tick branch; 26.x tests the non-living entity physics once per entity tick; the post-look check's action scan is inline again.
Deprecated
ghast-ext:Bot::follow(usefollow_straight, orfollow_pathfor planned paths).ghast-inventory: the 0.4.1_26_1method aliases (Inventory::set_registries_26_1,on_open_screen_26_1, …,Window::menu_26_1); use their_modernnames.
Fixed
- 1.12.2: an empty tab list header or footer is no header / footer (
Hud::header/footerNone), as the 1.12.2 client's formatted string skips empty parts; only 1.8.9 keeps an empty one. Found by the HUD golden. - 1.12.2 entity tracking: a fishing bobber whose owner is our own player is tracked (vanilla's
getEntityByIdanswers the client player for its id; before, only other players' bobbers were). 1.8.9: a bobber whose owner is not a player the client knows (or ours) is not tracked, as vanilla creates none (before, every bobber was). - Oracle: the 1.12.2 projectile vectors record a primed TNT's countdown (
fuseTimer), not the synced start value;projectiles.jsonl.gzregenerated. - 26.1, 26.2, 26.3: the generated serverbound
CustomClickActionpacket types (play and configuration;ghast_protocol::v26_1/v26_2/v26_3) now read and write the vanilla layout: the id, then the payload as one unnamed NBT tag (TAG_EndwhennbtisNone) behind its VarInt byte length (at most 65536; a longer payload is anEncodeError::LengthOverflow). They used minecraft-data's layout (a presence boolean, then the tag), which no server reads; the 0.4.3 note said fixing it would be breaking, but the type keeps its fields (id,nbt: Option<AnonNbt>), so only the bytes change. Checked against the vanilla 26.1.2, 26.2 and 26.3 classes (codegen patch). The client now sends the packet through this type; its bytes are unchanged.
0.5.2
Added
-
1.12.2, 1.16.5: boat seats: a second passenger in front of or behind the player (
Boat::set_seat,BoatSeat), a boat someone else drives (interpolated from the server's moves,look+steer_vehicleonly), hand-overs of the front seat, the left-over turn, the boat the player left;v1_16_5::PlayerState::start_riding,v1_16_5::boat_push_from_player,ghast_entity::v1_16_5::Tracker::{client_vehicle_moved, client_interpolation, self_dismounted},ghast_entity::Entity::traced. Oracle-proven:tests/golden/{1.12.2,1.16.5}/boats_seat.jsonl.gzand 300 k cached fuzz ticks each, 0 differences, also through the engine. -
1.8.9: riding horses (every kind) and pigs:
ghast_physics::v1_8::{Mount, JumpBar, tick_mount}and the 1.8 client wiring (boarding byattach_entity, the server's moves, looks, head yaw and entity data of the mob,look+steer_vehicle, the horse jump bar and its riding-jump action). Oracle-proven:tests/golden/1.8.9/mounts.jsonl.gzand 1 M cached fuzz ticks, 0 differences, also through the engine. -
1.16.5: riding living mounts:
ghast_physics::v1_16_5::{Mount, MountKind, tick_mount}(horse, donkey, mule, skeleton and zombie horse, llama, trader llama, pig, strider) and the 1.16.5 client wiring (boarding byset_passengers, the client-moved mount'svehicle_move, the server's corrections, the jump bar, boosts, the server-moved mount's interpolation);ghast_entity::v1_16_5::Tracker::set_steering_items. Oracle-proven:tests/golden/1.16.5/mounts.jsonl.gzand 500 k cached fuzz ticks, 0 differences, also through the engine. -
Packet::StartRidingJump/StopRidingJump,Outbound::RidingJump { entity_id, strength }andEntityAction::StopRidingJump, written by every wire layer (EntityActionstays unit-only). -
1.12.2: riding living mounts:
ghast_physics::v1_12::{Mount, MountKind, RiderJump, tick_mount}(horse, donkey, mule, skeleton and zombie horse, llama, pig) and the 1.12.2 client wiring (boarding byset_passengers, the client-moved mount'svehicle_move, the server's corrections, the jump bar, pig boosts, the server-moved mount's interpolation);ghast_entity::v1_12::Tracker::set_steer_carrot. Oracle-proven:tests/golden/1.12.2/mounts.jsonl.gzand 1.5 M cached fuzz ticks, 0 differences, also through the engine. The 1.12.2 tracker sizes a llama by its spawn's baby flag (0.9 × 1.87, it was the horse's box). -
26.1, 26.2, 26.3: riding horses, donkeys, mules, skeleton and zombie horses:
ghast_physics::modern::{Mount, MountKind, tick_mount}(the rider's input, the jump bar andstart_riding_jump, rearing, floating while ridden, step height, the server's corrections, the mount the player left) and the client wiring (boarding byset_passengers, the saddle fromentity_equipment, tame / standing flags, the mount's attributes,vehicle_move). Oracle-proven:tests/golden/26.x/mounts.jsonl.gzand 200 k cached fuzz ticks per version, 0 differences, also through the engine. -
26.1, 26.2, 26.3: riding pigs and striders (
MountKind::Pig,Strider; the stick in either hand,Mount::set_rider_sticks, boostsMount::set_boost_time, the strider on lava, cold and bobbing) and camels and camel husks (MountKind::Camel,CamelHusk; dash and cooldown, sprint, sitting against the game timeMount::set_game_time,set_camel_sitting,set_last_pose_change_tick,set_dashing), with the client wiring (saddle and entity data, the hands each tick, the game time). Oracle-proven:tests/golden/26.x/mounts_steer.jsonl.gz,mounts_camel.jsonl.gzand 200 k cached fuzz ticks each per version, 0 differences, also through the engine. -
26.1, 26.2, 26.3: riding the happy ghast (
MountKind::HappyGhast: the harness, flying along the rider's look and up by the jump key,flying_speed, the server'sSTAYS_STILLMount::set_stays_still, four seatsMount::set_seat) and the nautilus and zombie nautilus (MountKind::Nautilus,ZombieNautilus: tame and saddled, swimming along the look, the dash bar with its 40-tick cooldown and the server'sDASHflagMount::set_dash), with the client wiring (harness and saddle, entity data, the seat fromset_passengers). An unridden adult happy ghast is solid to stand on (ghast_physics::modern::happy_ghast_collides; in the client with entity tracking). Oracle-proven:tests/golden/26.x/mounts_ghast.jsonl.gz,mounts_nautilus.jsonl.gzand 200 k cached fuzz ticks each per version, 0 differences, also through the engine. -
26.1, 26.2, 26.3: two passengers. A camel or camel husk with the player behind someone (
Mount::set_seat,set_passenger_count: the back seat 0.7 back at the back's anchor height) or a boat or raft (Boat::set_passengers: 0.2 forward / 0.6 back): only the first passenger steers; a mount or boat the player rides but does not steer follows the entity tracker's interpolation (follow_tracker,server_teleport,server_on_ground,server_snap,position_passenger), an unsteered boat keeps its turn speed until 26.3 and the passenger's yaw stays clamped; hand-overs both ways. The state at the boarding: a camel's or nautilus' dash cooldown from aDASHbefore it (Mount::dash_synced,dash_clock,set_dash_state),Mount::mark_ticked.ghast_entity::v26_1::Tracker::{set_steered, client_moved}; the client wiring, andVehicle::controlledis false for a boat the player rides behind someone. Oracle-proven:tests/golden/26.x/mounts_seat.jsonl.gz,boats_seat.jsonl.gz,mounts_board.jsonl.gzand 200 k cached fuzz ticks each (camels, boats) per version, 0 differences, also through the engine with and without entity tracking. -
26.1, 26.2, 26.3: a mount or boat the player steers while an interpolation runs (boarded or taken over while the server moved it, a teleport-entity of it) takes the tracker's step before its travel and sends the interpolation's target in
vehicle_move(Mount::set_interpolation_target,Boat::set_interpolation_target; a teleport's motion and ground flag apply to it too). Before, the client started it where the tracker had it and sent its own pose (in the lab a nautilus boarded while it swam drew Grim AimModulo360). Proven through the engine:tests/golden/26.x/mounts_board_moving.jsonl.gz. Oracle lab scenariosmounts_lab.jsonl.gz(dismount teleports above the ground with the mount's push, the strider's lava-to-grass square, boarding with a yaw over 180 degrees away): 0 differences; two of them are Grim-vs-vanilla cases (crates/ghast-client/README.md, Grim compatibility (5), (6)). -
ghast-extriding helpers:Bot::vehicle(Ride: the vehicle's type name, the seat, whether the client moves it),Bot::mount(a right click on the entity until the server seats the player),Bot::dismount(sneak until off; the server's placement teleport does not interrupt it),Bot::ride_jump/Bot::dash(the jump bar, by holding the jump key),Bot::boost(carrot / warped fungus on a stick); errorsNotRideable,EntityOutOfReach,NotSeated,NotRiding. Therideexample (featureext) andlab/mounts.shrun them under Grim on every lab version. -
ghast_inventory::Inventory::take_player_touched: whether the player slots or the selected hotbar slot may have changed since the last call (every write sets it, a clone is set). The 1.16.5 and 26.x engines read the hands only when it is set, so the plain tick no longer compares the hand items.
Fixed
-
1.12.2: a pig ride reads the carrot on a stick at each packet (a pig move in the same batch as a hand change used the last tick's hands).
-
1.8.9, 1.12.2: riding a horse without the metadata store logs that its flags are unknown and taken as saddled (documented and tested).
-
26.x: a nautilus whose server
DASHcame before its first client tick starts its 40-tick cooldown when the flag clears (onSyncedDataUpdated), as vanilla. -
1.8.9: a rider with flight on no longer takes the flying travel (
PlayerEntity.travelchecks the vehicle): boats, minecarts and mounts with a creative rider. -
26.1, 26.2, 26.3: a right click on an entity sends what vanilla sends. Every click counted as not handled by the entity, so the client also sent the off hand's interact and the item uses after a click the entity consumes (boarding a saddled pig with a carrot on a stick boosted it on the server at once). The client's answer per hand now comes from a per-version table the oracle dumped from the real client (
EntityClicks: every pickable entity type, every item, the entity data, equipment, riders, leash, effects, sneak and hand that change it), with its stack change (an item taken, a bucket filled). Proven end to end bytests/golden/<26.x>/entity_clicks.jsonl.gzthrough the engine, 0 differences.ghast_entitykeeps the 26.x body and saddle equipment slots (EQUIPMENT_SLOTSis 8). -
26.1, 26.2, 26.3: the entity-click answers also hold for a default client (
Interests::ENTITIES, which decodes no equipment or effects): the tracker keeps the equipment and effects of the entity types the click table reads them for (a saddle, body armor, a carpet, a harness, an allay's or piglin's hand, a zombie villager's weakness;ghast_entity::Config::kept_types), and the owner of a tamed animal is matched through the names-only tab list too (ghast_entity::Entities::tab_uuid). Before, a default client counted a saddled pig as unsaddled and still sent the item use and the off hand's interact. The click goldens replay at 0 differences with a default client's tracker as well. -
26.1, 26.2, 26.3: boarding a mount or boat the client has been watching starts from the state vanilla's client copy has: its own motion (the add-entity motion, every
set_entity_motionand teleport delta, slowed by 0.98 on each tick without a running interpolation and cut under 0.003, pushed by the player's box; a boat's only until its next tick) and the last position packet's ground flag. Before, the mount started at rest and in the air: boarding a mount the server had walked drew Grim Simulation 0.04 – 0.49 and setbacks in the lab, and boarding a standing pig senton_groundfalse in the firstvehicle_move(Simulation 0.0044 on 26.1 / 26.2).ghast_entity::Config::motion_types,Entities::client_motion,v26_1::Tracker::push_motion,ghast_physics::modern::push_by_pair,Mount::set_watched_state,Boat::set_watched_state. Proven through the engine:tests/golden/26.x/mounts_wander.jsonl.gz(every mount kind standing, walked, walking, pushed, teleported, then boarded; with and without entity tracking) and 200 k cached fuzz ticks per version, 0 differences. Not modelled: an unridden strider in lava (Strider.floatStrideron the client copy) and fluid currents on an unridden mount. -
1.8.9, 1.12.2, 1.16.5: boarding a mount the client has been watching starts from the state vanilla's client copy has. With entity tracking every horse-family mob, pig and strider gets a watched state from its spawn packet on, fed the server's moves, looks, head yaw, velocity and entity data and ticked with the client world; boarding takes it, leaving gives it back (1.16.5 / 1.12.2: the spawn velocity, the interpolation and its steps, velocity packets with the ×0.98 decay and the cut-off, the mob's own pushes on the player, body and head yaw, walk animation, rearing, boosts; 1.8.9: the body clock, head turn and rearing animation). Before, the mount started at rest with a fresh body: boarding a horse the server had walked drew Grim Simulation 0.34 – 0.49 and setbacks in 4 of 6 lab runs on 1.16 (1.12 pig 0.04, 1.8 one setback). README case (10) lists what Grim still flags when the server moves the mount at the boarding: the vanilla client sends the same there (recorded lab rides, below). The watched state reads the entity data itself, so the flags are known without the metadata store too. 1.12.2 velocity packets now reach the ridden mount; 1.16.5 head-yaw packets and the server's rearing flag reach it too, and the hands are read again after each inventory packet while riding a pig or strider (as 1.12.2 already did).
v1_16_5::Mount::{watched, board, leave, ridden, head_steps, server_head_yaw, server_horse_flags, spawn_velocity, pushed_player},v1_16_5::{tick_watched, push_by_with},v1_12::Mount::{watched, board, leave, ridden, server_velocity, pushed_player},v1_12::{tick_watched, push_by_with}. Oracle-proven:tests/golden/{1.8.9,1.12.2,1.16.5}/mounts_board.jsonl.gzand 300 k cached fuzz ticks per version (fuzz --mount-boards true), physics and engine 0 differences; the server's dismount of a horse or pig with a placement above the ground on 1.12.2 and 1.16.5 (mounts_dismounts.jsonl.gz, the 1.8.9 dismount cases on those versions), 0 differences.lab/mounts.sh:NUDGEmoves the mount while the bot comes. -
26.1, 26.2, 26.3: boarding while the mount or boat still interpolates with the rider's yaw past +-180 (
tests/golden/26.x/mounts_board_yaw.jsonl.gz, every kind and the boat, unwrapped by -1, 0 and 2 turns): ghast sends what vanilla sends, 0 differences. The firstvehicle_movecarries the interpolation's wrapped target yaw, the next the mount's own yaw next to the rider's unwrapped one, a jump of 300 degrees and more in vanilla too. -
26.1, 26.2, 26.3:
set_entity_motionof the mount or boat the player rides sets its motion (vanilla'slerpMotionhas no authority check; servers send one right afterset_passengersand more while the player rides), and the vehicle counts as steered from the boarding packet on, so its later packets in that batch only move the packet base (Mount::server_motion,Boat::server_motion). Proven through the engine bymounts_board_yaw.jsonl.gz(the server's packets after the boarding) and 200 k cached fuzz ticks per version, 0 differences. -
26.x recordings (
Client::record) can hold riding: the packets of the mounts and boats whose spawn the session saw, the hands and the game time, replayed against vanilla byoracle/run.sh replay --in. The lab's boarding flags were checked this way (client README, Grim compatibility (11)). -
1.16.5 / 1.12.2 recordings can hold riding a living mount: its packets from its spawn on (oracle
entity_packetevent, applied by the real packet handlers), the hands, the server'svehicle_movewith the client's answer, and our real entity id in the setup (entity_id; on 1.16.5 it orders the pushes). A tick's recorded state is now the player's after the entity tick that follows the step. 40 recorded 1.16 and 15 recorded 1.12 lab rides (19 with Grim's boarding flag) replay through the vanilla client with every packet identical, the flaggedvehicle_moveincluded: README case (10) is the vanilla client's behaviour.
0.5.1
Documentation only, no code change.
Fixed
- The crate descriptions and summaries now list Minecraft 26.3:
ghastandghast-clientstopped at 26.2,ghast-worldat 1.16.5, and theghastREADME and crate docs still named 1.8.9 – 1.16.5 only. Notes that called thev26_3feature non-default are corrected (it is on by default in every crate).
0.5.0
No breaking change: 0.5.0 marks Minecraft 26.3 joining the supported versions. Code written for 0.4.x compiles unchanged.
Added
- Minecraft 26.3 (protocol 777):
GameVersion::V26_3("26.3".parse()), featurev26_3in every crate, on by default like the other versions. A bot written for 26.2 runs unchanged.- Protocol (
ghast-protocolv26_3): the 776 → 777 changes as a reviewed delta (newadd_transient_block,post_effects,swing_animationand serverboundpunch; entity moves with stepped paths,types::EntityMoveDelta; the teleport confirm with position and rotation; re-laid particles, explosion, signs, spawn info, advancements; byte-array light masks; 122 item component types). The packet table matches the 26.3 server's own packet report, and a capture of a vanilla 26.3 server decodes strictly and re-encodes byte-identically (ItemStack::read_777,ComponentPatch::{read_777, decode_777}). - Data and world (
ghast_data::v26_3,ghast_world::v26_3): 1,286 blocks, 35,723 block states, 1,658 items, 161 entities from the vanilla jar and Mojang's reports. 26.3 is the first version whose global block palette is 16 bits wide. 9,227 positions probed on a live vanilla server, all confirmed. New state flagmodern::state_flags::STURDY_DOWN. - Physics (
ghast-physicsrule rowV26_3,pick::v26_3,modern::piston::v26_3): every committed 26.3 golden replays at 0 differences and so do 17.2 million cached fuzz ticks (182,000 cases incl. boats in bubble columns and glide starts in lava). Differences from 26.2: the teleport confirm carries the pose and no position packet follows; the movement packet is built after the other entities and the moving blocks ticked; a closed liquid scan; a landing bounces only above gravity; the eyes-in-fluid test uses the camera height; signs stop fluid flow and no longer block motion; bounce is a block property (shelf mushrooms bounce, straw beds do not); no glide start in lava;Boat::bubble_column_event. - Entities (
ghast-entity): stepped move paths and the stepped interpolation of living entities, position syncs without velocity, thedye_colorserializer; a sleeping entity is put on a bed only where a bed is (apply_body_in,tick_in). The 26.3 tracking vectors (2,880 ticks, 11,954 packets) replay at 0 differences. - Inventory (
ghast-inventoryVersion::V26_3): 25,853 random clicks byte-identical with the vanilla client, 1,000 creative-screen cases, 4,000 hashed stacks. Fuel is thecooking_fuel/brewing_fuelcomponent and brewing slots read the synced recipe property sets, so data packs and component patches change the slot rules as on the real client. - Client (
ghast-client): capabilitiessends_swing,sends_punch,teleport_confirm_pose,dig_change_direction,creative_attack_dig_delay;Outbound::{Punch, TeleportConfirmPose},DigStatus::ChangeDirection. 26.3 sends no swing packet: attacks and digs sendpunch. A server teleport aborts a dig in progress. - Pathfinder, ext, viewer: 26.3 worlds, items and entities; the jump table and move costs equal 26.2's; new doors, gates, trapdoors, slabs and stairs are classed like their oak counterparts; the viewer draws 26.3 sessions (new blocks with look-alikes).
- Checked live: a vanilla 26.3 server (idle, a movement course ending at the server's position bit for bit, teleports, respawns, digs and places, a menu session of 80 clicks with the furnace and brewing stand rules, the nether, the end and a data-pack dimension with its own height: 12,079 block probes and a tour through them) and Paper 26.3 with Grim 2.3.74: 0 flags in every lab session that runs on 26.2, a 31-minute mixed soak, online-mode login against the local stand-in, proxy reconfiguration (Velocity 4.3.1) and server transfers. Note for Paper 26.3 servers: some first joins far from the world origin make the server log "moved too quickly" for a second; the server measures the first teleport confirm before the player's first tick (a vanilla 26.3 server does not, and the real client's join sequence draws the same lines), and the session goes on normally.
- Not shown on 26.3:
Client::force_step_positionmaking a difference (the landing it exists for did not occur in 80 attempts; the code is the 26.1 / 26.2 one). - 26.3 merchants: nothing can be taken from the trade result slot unless an offer is active and still paid for (a new rule of the 26.3 client); found by a 30,000-case click run and now part of the committed vectors (25,853 clicks; two 30,000-case runs with 237,292 and 256,608 clicks byte-identical).
- Protocol (
- A held-dig oracle for 26.1, 26.2 and 26.3 (
tests/golden/<version>/held_dig.jsonl.gz, about 265 cases, 14,900 ticks and 39,000 packets per version, replayed through the engine at 0 differences): the block-breaking packet rules of the modern versions are now proven against the real client (held buttons, turning to another face, tool switches, drops, server slot changes and teleports during a dig, creative mode).
Fixed
- Dropping or swapping hands after the server changed the selected slot (every version): the client's answer to the slot change goes out before the drop or swap, as the real client's key handling orders it.
- 26.x: a dig goes on after dropping part of the held stack (no abort and new start), and creative mode breaks blocks on 26.x (it was switched off): start, break, then the five-tick delay; swords, tridents and maces keep the block.
- 26.x: a passenger keeps its pose on a server teleport and only confirms it.
- 1.8.9 pistons:
piston_uncertainis no longer raised for minecarts, or for boats the player never boarded (they do not move on the client); it is raised while entity tracking that started after the join cannot know earlier entities. 26.x: also raised when a piston touches the boat the player left while entity tracking is off. - 26.2: the biome climate table lacked
sulfur_caves. - 26.1 / 26.2: the path debug packet wrote its targets in the wrong place (debug packets only).
- Viewer: boats of the other wood types were drawn as paper on 26.1 and 26.2.
Notes
- Tracker tick-order misses against the oracle (the known passenger position gap) dropped from 94 to 58 on 26.1 and from 150 to 68 on 26.2 with two ordering fixes.
- Lab: a 26.3 lab (
lab/),spots-26.3.sh,TP_EVERY=fordig-place.sh; the pistonmobslayout found no entity on 26.x before (a name format) and now compares them; the online-mode stand-in serves the discovery document the 26.3 account library reads; new examplesdimension_tourandstep_edge, andsoakcompares its final position with the server's. - The plain engine tick of every earlier version costs no more instructions than in 0.4.11: the per-tick hand state reads version flags through the capability row instead of copying them. The engine bench now also runs 26.3.
0.4.11
Fixed
- 1.8.9 pistons: moving slabs, stairs, fences, panes, trapdoors and walls are modelled
(
ghast-physics,ghast-client): the box of such a moving block follows the block's shared bounds as the real client leaves them (set by collision queries and the crosshair ray), so ticks next to them are no longer flaggedpiston_uncertainjust for being near. A tick is flagged only where those bounds are not known and would change the outcome. In the 10,000-case piston cache the flagged cases drop from 1,528 to 545, still 0 differences. New, additive:v1_8::Pistons::{begin_bounds_tick, end_bounds_tick, forget_shared_bounds, note_use_ray}. - 1.8.9 pistons: bounds are not trusted across other entities' ticks (
ghast-client): a dropped item, an arrow or another client-side moving entity can rewrite the shared bounds of a piston head (present in 0.4.9 and 0.4.10) or of the block kinds above. Such ticks now raisepiston_uncertaininstead of silently using a stale box; two oracle case families show the old difference. Without entity tracking the client cannot rule those entities out, so 1.8.9 piston ticks are then flagged far more often: turn entity tracking on for exact 1.8.9 piston movement.
Notes
- Lab: the piston
mobslayout uses named armor stands (the lab servers refuse summoned animals) and compares each one's final position with the server's; 1.8, 1.12 and 1.16 end where the server has them.
0.4.10
Fixed
- 1.8.9 pistons: far fewer "uncertain" ticks (
ghast-client,ghast-physics): the piston heads' shared bounds are known from the session start and stay known while the player is near a head, sopiston_uncertainis no longer raised just because earlier ticks ran without a piston. In the committed piston-entity cases the flagged ones drop from 50 of 81 to the 3 that are meant to be flagged; in the 10,000-case cache from 55 % to none, still 0 differences. Piston heads are now also noticed when they arrive in a newly loaded chunk. New, additive:v1_8::Pistons::{set_heads_loaded, watch_only},Section::any_state. - Block breaking compares the whole held stack of the last start (
ghast-client): the same item with other tags or components (an enchanted copy), or another damage value on an item without durability, starts the breaking again like vanilla; before, only the item id counted. - 1.16.5 and later: a finished or instant break keeps the last start's block (
ghast-client): a held attack on a block the server puts back there goes on without a new start packet. 1.8.9 and 1.12.2 keep their own rule. Proven on 1.16.5 with 27 new oracle cases of a held attack that comes back to an aborted block (160 combat cases, 0 differences); 26.x follows the same rule from reading the game code. - 1.12.2 and 1.16.5 entity pushes keep vanilla's sign of zero (
ghast-physics): no change in any recorded case (new axis-aligned push cases replay at 0 differences before and after).
0.4.9
Added
- Item uses in the air follow oracle-proven rules on 1.8.9, 1.12.2 and 1.16.5 (
ghast-client,ghast-data,ghast-physics): a right click on nothing, or one no block took, is decided like the real client. Covered: buckets, boats, glass bottles, lily pads, spawn eggs and ender eyes with their own ray through fluids (pick::{v1_8, v1_12}::item_ray,boat_item_fits), bows (and 1.16.5 crossbows) with their ammunition, food, drinks and potions, shields, swords (1.8.9), books, empty maps, ender pearls, fireworks and the fishing rod's swing. The client's own block and stack changes match vanilla: filled and emptied buckets, poured or drained fluids, filled bottles, placed lily pads, used-up boats, drawn maps, and what does not fit in the inventory is dropped. Per-item use facts come from each jar (v1_8::item_use,v1_12::item_use). Checked packet by packet, with the hand in use, every inventory slot and the client's block changes: 3,000 committed cases and a 30,000-case cache per version, 0 differences. Still answered "unknown" and left to the server: the writable book's screen, a boat item with other tracked entities close by, adventure-mode stacks with placement restrictions; item cooldowns (ender pearls held down) are not modelled. - 1.12.2: lily pads clicked on a block are placed on still water or ice and refused elsewhere.
- 1.16.5: food block items (potatoes, carrots, sweet berries) are eaten when they cannot be placed; seeds, crops, stems, nether wart and sweet berries are refused off their soil.
- Pistons on 26.1 and 26.2 (
ghast-physicsmodern::piston::{v26_1, v26_2},ghast-entity,ghast-client): moving blocks push, carry and block the player (Pistons,MovingBlock,tick_player_among_pistons,tick_with_pistons) and move the other entities' client copies (tick_after_entities_among,PistonEntity,PistonCarry,PlayerPlace,EntityFacts;Tracker::client_pushed,Tracker::next_tick_seq). The engine feeds them from block events, block updates and chunk loads and raisespiston_uncertainfor what it does not model. Checked against the real client: 206 committed cases and a 10,000-case / 1,000,000-tick cache per version, 0 differences, in the physics replay and through the engine. - Pistons move the other entities' client copies on 1.8.9, 1.12.2 and 1.16.5, and the
crosshair picks them there (
Pistons::tick_after_entities_among,PistonEntity,search_finds;Tracker::client_pushed,Entity::drawn_on_ground,Entity::drawn_in_web; 1.16.5PistonCarry,PlayerPlace,step_height,pushable,hits_pushable,climbing_at). Entities are found by the chunk entity section they are filed in, as vanilla does. - Client shape updates around moving pistons (1.16.5, 26.x): fences, bars and panes, walls,
stairs, fence gates, snowy blocks, carpets, dead corals and mushroom blocks; 1.16.5 also chests,
attached stems, campfires, chorus plants and concrete powder.
Pistons::take_unmodelledtells which update kinds were left out (they raisepiston_uncertain).
Changed
- 1.8.9
piston_uncertainis raised more often: vanilla shares one head-bounds state between piston heads and the crosshair ray, so a push can depend on a ray of a tick the engine did not trace. Such pushes and moves are flagged (Pistons::head_unknown_touching,forget_head_bounds), and the ray is traced every tick while a piston head is within reach. - Deprecated on 1.16.5:
Pistons::untracked_near(always false now),edits_need_shape_updatesandfollows_neighbours(replaced by the shape updates above).
Fixed
- A held attack that comes back to a block whose breaking was aborted goes on without a new
dig start, as vanilla's "currently breaking" test does (
ghast-client, every version; proven by the oracle on 1.8.9 and 1.12.2, read from the code on 1.16.5 and 26.x). - Held food: melon slices, carrots and potatoes are food in the hand on 1.8.9 and 1.12.2, the melon block and cake are not, and 1.8.9 hunger points come from the jar. 1.16.5 honey bottles are drunk at any hunger and cake is not food in the hand.
- 1.12.2: the fishing rod swings the hand; a bow without arrows does not start drawing.
- 1.16.5: charged crossbows, knowledge books and ender pearls change the hand's stack on the client as in vanilla.
- 1.16.5 moved multi-box blocks (walls, stairs, fences) collide with vanilla's re-simplified union of their boxes.
- Shulkers and minecarts after a piston push: a shulker a piston moved pushes from there before it sits back on its block (1.12.2, 1.16.5; with an attached block too); a legacy position set rebuilds the drawn box from the position, also for a 1.8 / 1.12 minecart that is not interpolating.
- 26.x: a mob's push on the player keeps the sign of a zero component; after a piston took the player out of its entity section the player is listed last there.
Notes
- New oracle kinds and committed vectors:
air_use(1.8.9, 1.12.2, 1.16.5),piston_entities(1.8.9, 1.12.2), modernpistonswith its facts / entities / shapes dumps (26.1, 26.2), the 1.16.5moving-shapesdump andshape_update_*hand cases.lab/pistons.shruns on the 26.1 and 26.2 labs and has amobslayout. - Not modelled and not flagged yet: 26.x moving pistons that arrive inside chunk data; items, XP orbs, projectiles and hanging entities moved by pistons on 1.8.9 / 1.12.2.
0.4.8
Added
- Client view of other entities on every version (
ghast-entity, opt-inConfig::client_motion/ each tracker'strack_client_motion):Entity::drawn_position,drawn_bounding_box,drawn_rotationandinterpolationgive what the vanilla client draws and its crosshair pick tests. 1.8.9 / 1.12.2: players, mobs and armor stands follow the server position over vanilla's 3 interpolation steps (LivingEntity.tickMovement/OtherClientPlayerEntity.tickMovement; every move, look or bareentitypacket restarts them, a teleport within 1/32 of the drawn position keeps it there; 1.12 shulkers sit on their block), stepped by the newTracker::tick_client; 1.16.5 copies its client view (living entities, boats, shulkers); 26.x already held the drawn position. Per-entity clocks stamped with the newEntities::set_tick:Entity::position_tick,spawn_tick(a re-spawn with the same id is a new spawn tick),last_hurt_tick(1.8 status 2; 1.12 / 1.16 also thorns, drowning, burning, berry bush; 26.xdamage_event) andestimated_velocity(the last two server positions over the ticks between them).Event::Hurt { id, attacker }(26.x with the attacking entity). One small heap block per living entity with the view on;Entitygrew by 8 bytes (the pointer). Oracle-checked: the newinterpdump (real spawn / move / look / teleport packets through the real 1.8.9 and 1.12.2ClientPlayNetworkHandler, thenWorld.tickEntities) replays bit for bit, positions and rotations, 12 000 entity ticks per version (tests/golden/{1.8.9,1.12.2}/interp.jsonl.gz); 1.12.2 spawns clamp the drawn pitch to ±90 asupdatePositionAndAnglesdoes. - The client picks entities at their drawn position (
ghast-client, A8 of the PvP findings): entity tracking (Interests::ENTITIES/ENTITY_TRACKING) turns the client view on, the engine steps it where vanilla ticks the world's entities and stamps its clock with the tick in which the behaviour sees a packet, andtarget_entity(),attack()and the buttons' pick testEntity::drawn_bounding_boxlike vanilla'supdateTargetedEntity(1.8.9 / 1.12.2 / 1.16.5 used the newest server position before, so a fast target could count as hit where the vanilla client, and an anticheat modelling it, saw a miss).Interests::ENTITY_EVENTS: the tracker's events asTickEvents::entities(spawns, removals, moves, statuses, hurts with our own entity included, velocity, metadata, riding, pickups; at most 4096 per behaviour tick, the rest counted inentities_dropped). These and the other new event lists (effects,hurt,deaths) are methods ofTickEventsover one boxed block that a tick touches only when something arrived: a bot without entity tracking runs the engine bench at the 0.4.7 instruction count. - Own status effects, absorption, spawn point, hurts and deaths (
ghast-client, every version, without entity tracking):TickContext::effects/TickView::effectsgiveActiveEffects (id in the classic numbering, amplifier, duration, flags, the tick it arrived;remaining(now)counts down like the client,Nonefor an infinite effect) andTickEvents::effectseveryentity_effect/remove_entity_effectfor us as anEffectEvent(a re-application with the same values included,Clearedwith a new player entity).Health::absorptionfrom our entity data (1.8 index 17, 1.12 11, 1.16 14, 26.x 17, checked against each jar).TickContext::spawn_position(SpawnPoint: position; 26.x with yaw, pitch and dimension).TickEvents::hurt(Hurt: 1.8 – 1.16.5 the hurt statuses for us, 26.xdamage_eventwith source type, attacker and direct entity) andTickContext::last_hurt_tick.TickEvents::deaths(Death: the dead player, the killer on 1.8 – 1.16.5, the message; 1.8 now decodescombat_eventtoo). NewInbound::EffectApplied,SpawnPoint,Death,Damage; the decoders emitEffectApplied/Deathwhere they emittedEffect/Died(both still accepted by the engine). - Scoreboard teams on every version (
ghast-client,Interests::TEAMS):TickContext::teams/TickView::teamsgiveteams::Teams(team_of(name),team,same_team,iter) with eachTeam's display name, prefix and suffix as plain text, colour index, friendly fire, seeing invisible mates, name tag visibility, collision rule and members, from 1.8scoreboard_team, 1.9 – 1.16.5teamsand 26.xset_player_team(each version's field order); a join starts an empty scoreboard.Inbound::Teamscarries the raw body, parsed only with the interest. - Item kinds and enchantment levels on every version (
ghast-inventory):ItemKind(sword, axe, pickaxe, shovel, hoe, bow, crossbow, trident, mace, shield, fishing rod, the four armour pieces, other) from the registry name,Stack::kind/is_sword;Inventory::enchantment_level(stack, "sharpness")reads 1.8 / 1.12 numeric ids (the vanilla registry, checked against both jars), 1.16.5 names and 26.x registry ids through the server's registry;EnchantmentId::plain_name. For the held item:ctx.inventory().held().map(|s| s.kind(ctx.inventory().version())). - Own movement state for behaviours (
ghast-client, every version):TickContext::velocity(the velocity this tick's step starts from, with knockback / explosion pushes received since the last step),horizontal_collision/vertical_collisionof the last step (also onTickView),server_flags/server_sprinting(the flags byte the server last sent for our entity, without entity tracking). Client::turn_rate(yaw, pitch): the aim's per-tick turn cap (defaults stay 14° / 10.5°; still whole mouse counts),Rotation::with_turn_rate/turn_rate.Client::gui_releases_keys(default on, see Fixed),Capabilities::attack_knockback_enchantment,Inbound::LegacyAttributes(1.12 / 1.16 movement and attack speed).- Item use events (
ghast-client, every version):TickEvents::item_uselists our use's steps ascommon::UseEvent:Started(the right button's key handling),Finished(the server's entity status 9, with the ticks it lasted),Released(release_use_item) andInterrupted(slot change, the stack left the hand, drop, 26.x spectator switch, new player entity), each with the item id and hand; behind the boxed lazy events block. TickContext::can_click: whether a click would be refused now (dead, turning, the inventory's own reasons) without sending anything.TickContext::press_preview(Button)→PressOutcome(Entity,Block,Item,Nothing): what a left / right press acts on in this tick's key handling, from the same pick the buttons run (the client's pose with the held item;target_entityis the server's view of it from the sent pose). NewButton/PressOutcomeinhands, re-exported.ghast_inventory::Events::player_synced/window_synced: the server sent the full contents of window 0 / the open window (join, respawn, a rejected click's resync).Inventory::use_equips/equip_from_hand: the right-click armor equip rules per version;Capabilities::use_equip_swings.- Pathfinder movement-only following (
ghast-pathfinder):FollowConfig::with_movement_only(true)leaves the aim to the behaviour (a fight keeps looking at its target) and steers with strafe-relative keys for the behaviour's look this tick: of the eight key directions the one whose simulated next ticks end closest to the next step and keep to the floor; digs, places, doors, gap jumps, ladders and pillars still aim while they last (Follower::aiming).Follower::waypoint/current_move(andController::waypoint) expose the point being walked to. - Pistons move the player on 1.8.9, 1.12.2 and 1.16.5 (
ghast-physics,ghast-client): the client runs the piston itself on the block-action packet (12-block push limit, slime and, on 1.16.5, honey; broken blocks), moving blocks collide while they travel and push, launch (slime) or drag (honey) the player in vanilla's order: the player's tick, the other entities (their pushes, rockets), then the moving blocks. 1.12+: the per-tick piston move limit against the client's own world time (update_time, advanced per tick); 1.16.5: the client's 5-tick hold and the moving piston's union shapes; a moving block keeps the connections and shape it had where it stood (fences, panes, bars, walls, stairs). 1.8.9: every piston head shares one set of bounds (a crosshair ray through a head leaves its plate, a collision query resets it) and a replaced moving-piston block entity removes its replacement, as vanilla does. Newv1_8/v1_12/v1_16_5Pistons,MovingBlock,Edits,tick_with_pistons,tick_player_among_pistons,Facing. A world without moving blocks pays nothing. Oracle-checked through the real client block entity (pistons,fuzz --pistons true,piston-facts, 1.16.5piston-shapes): 1,000,000 fuzz ticks per version with non-full blocks, neighbouring entities and world-time packets, physics and engine at 0 differences. TickView::piston_uncertain/TickContext::piston_uncertain: true when the last tick hit a piston case the model does not cover (the engine goes on with the model's result and the server corrects the world): 1.8.9 a moving stairs, slab, fence, wall, pane, trapdoor or iron bars next to the player (their box comes from vanilla's shared block bounds); 1.12.2 / 1.16.5 a piston next to another tracked entity; 1.16.5 client shape updates after a piston's writes and a moving stairs or trapdoor next to the player. Not flagged: on 1.8 a moving head whose box comes from a plate the crosshair left on an earlier still tick. Alsov1_8::box_is_tracked,Pistons::untracked_near,Pistons::crosshair/head_bounds,v1_16_5::edits_need_shape_updates/follows_neighbours,Pistons::touches.- Creative inventory on 1.8.9, 1.12.2 and 1.16.5 (
ghast-inventory,ghast-client): the creative screen's inventory and item tabs, delete slot, listener broadcasts, server slots while it is open, saved toolbars (1.12.2 / 1.16.5), the pick block key and creative middle-click clones in containers, packet for packet as the real client (20,000 oracle cases per version, every sent packet byte-identical).TickContext::set_creative_tab,creative_menu_click,pick_block,creative_load_hotbar(capabilitylegacy_pick_block). Drags inside the creative screen and picking a stack from outside the hotbar in survival (1.12.2 / 1.16.5) are refused. - Attack damage and attack speed of held items on 1.8.9, 1.12.2 and 1.16.5, dumped from the
jar:
ghast_data::<v>::item_attack(id),Stack::attack(version)(Nonefor a stack with its ownAttributeModifiers; enchantments are not included). Static tables of 320 / 600 / 744 bytes. - Right clicks on blocks follow oracle-proven rules on 1.8.9, 1.12.2 and 1.16.5
(
ghast_data::<v>::place): per hand, whether the block packet is sent, swing or item use, the blocks the client sets and the item it uses, byte-identical to the real client on every click the rules decide (30,000 oracle clicks per version). 1.8.9 covers most block items and items with their own use; 1.12.2 and 1.16.5 cover fewer placements. A click the rules do not decide keeps the previous behaviour and its block waits for the server; the known packet differences there are listed inoracle/README.md(blocks whose 1.8 box comes from shared bounds near the player, mushrooms (light level), wall-mounted and multi-block items on 1.16.5, buckets and boats). Outbound::PlaceInside: a block placement whose ray starts inside the clicked block's outline (see Fixed); code that handlesOutbound::Placeshould handle it too.TickContext::mob_state_known: whether right clicks on mobs follow the mob's tracked state (entity data tracked) or read every mob as fresh.Inventory::held_writes,Inventory::damage_held,Inventory::finish_into,ClickPacket::swings,Outgoing::Swing,Capabilities::own_inventory_passes_keys,living_flags_drive_use,pick_head_yaw,invulnerable_eating.- Lab:
lab/combat.sh(combat_probe: attacks on mobs and players, a crowd, miss presses, armor equips, eating, bow, blocking, the own inventory),lab/pistons.sh(piston_probe: 15 piston layouts),lab/dig-place.sh;LAB_EXAMPLESruns them on another build.
Changed
- The turn comes before the key handling, on every version: vanilla turns the player at
frame time, so the buttons pick with this tick's look and the movement packet after them
carries the same look (1.8 picks with the head yaw: the last movement step's yaw with this
tick's pitch). A tick on which the behaviour attacks or interacts with an entity
(
TickContext::attackand friends pick with the sent look) holds the turn; it follows on the next tick. Before, an attack could go out with the old look and the packet after it with the new one, a sequence no vanilla client sends.
Fixed
-
Right-click armor equip is predicted (
ghast-client, every version): the use puts the held piece on at once like the vanilla client, before the server's slot updates (a bot saw the slot empty for 1–2 ticks and pressed again). 1.8.9ArmorItem.onStartUse, 1.12.2 / 1.16.5ArmorItem.use/ElytraItem.use: only into an empty armor slot, the hand empties (a taken slot: FAIL, 1.9+ tries the off hand); 26.xEquippable.swapWithEquipmentSlot: a swappable armor-slot item swaps with the worn piece unless it is the same item or carries the binding curse outside creative (creative keeps the hand's stack when the slot was empty). 1.16.5 and 26.x swing the arm on it (SUCCESS), 1.8.9 / 1.12.2 do not. Pumpkins and heads still go on only by clicks. -
TickContext::open_inventoryis refused while turning (ClickRefused::Turning), likeclick: a screen opened mid-turn refused every click until the player was still. -
Attack slow-down (
ghast-client, every version):PlayerEntity.attackruns on the client after every attack (TickContext::attackand left clicks): a hit the client counts as landed (other players, boats, minecarts, end crystals, … — mobs never) with knockback (the held item's knockback level on 1.8 – 1.16.5, plus one for a sprint attack, on 1.9+ only at full attack strength from the server's attack speed) multiplies the velocity by 0.6 on x / z and unsprints before the movement step. Grim predicts it; sprint hits flagged Simulation before. -
Our flags byte from the server's entity data now sets the sprint flag on 1.8.9 (and on 1.12.2 / 1.16.5 without an elytra seen), like vanilla's data watcher (the flag, not the sprint speed).
-
A dead player's movement keys do nothing (
isMovementBlocked; Simulation flags at every death before), and an open screen (window, player inventory, dialog) releases them like vanilla'ssetScreen(sprint and sneak end;Client::gui_releases_keys(false)keeps the old behaviour). -
hold_turn_on_actionalso holds the turn on a tick with a plain item use when the new look would pick a block (Grim RotationPlace post-flying). -
The miss delay after an air swing (10 ticks) no longer applies in creative, and on 1.8 a block hit on air counts as a miss, like vanilla.
-
Attacks and item use on 1.8.9, 1.12.2 and 1.16.5 match the real client, checked packet for packet through the real key handling (
Combatoracle cases): what stops a use (1.8 / 1.12 any replacement of the used hand's stack, in the player tick; 1.16.5 a change of item), 1.9+ uses started and stopped by the server's living flags, the 1.9+ attack cooldown reset on an item change in the player tick, creative digging (start breaks at once, then every 5 ticks, nothing aborted; a spectator digs nothing), eating while invulnerable (1.8 / 1.12 no, 1.16.5 yes), 1.12 throwables, the 1.16.5 abilities packet (only the flying bit). -
The client's own stack changes: a food eaten to the end loses one item at the server's finish (off hand included), a potion, milk bucket or stew leaves its container, thrown items leave the hand at once, a 1.8 bow shot and a 1.8 / 1.12 hit on a player wear the held item.
-
A hotbar select right after the server set the held slot sends the server's slot back first (the server kept the old slot before).
-
Right clicks on entities: a click the client handles (armor stand, boat, minecarts, item frame, leash knot) no longer also uses the held item; 1.16.5 swings on SUCCESS. Right clicks on mobs (leads, saddles, shears, dyes, breeding food, buckets, bones, name tags, villagers) send what the real client sends and change the held stack as it does; with entity data tracked they follow the mob's state (baby, sheared, colour, saddled, tamed), otherwise a mob reads as fresh (
TickContext::mob_state_known). -
Paintings, item frames and leash knots on 1.8.9, 1.12.2 and 1.16.5 hang where the client puts them and have their boxes: they can be hit and interacted with (the pick went through them).
-
The pick order of overlapping entities follows the client's chunk-section lists.
-
Every crosshair pick uses the pose's eye height (1.12 gliding; 1.16.5 crouching, swimming, gliding, riptide).
-
1.8.9: brewing stands and end portal frames are picked with the bounds a playing client has (base plate 0.125 / frame 0.8125 high), as vanilla's shared block bounds leave them.
-
Client view of other boats, minecarts, armor stands and passengers on 1.8.9, 1.12.2 and 1.16.5 (interpolation steps, seats, the boat's passenger yaw clamp, drawn rotations; 1.16.5 also interpolates rotations and decides ticking at the client position), bit for bit against the
interpdump. -
1.16.5: the own inventory screen (survival and creative) passes keys pressed while it is open, like vanilla's
passEvents; keys held through the opening stay released. -
1.16.5: window clicks that throw or drop items swing the arm first, also when a server window replaces a screen with a carried stack; armor with the binding curse comes off in creative mode (1.12.2 too).
-
1.14+ block placements carry
insideBlock(it was always false, on 26.x too). -
1.8.9: the old seed-planting prediction used the seed twice; right clicks on blocks now come from the oracle-proven rules (see Added).
Notes
- On 1.8 / 1.12 a use restarted by a held button in the tick of a finish ends at the server's
stack update one tick later, as in the real client, while the server keeps using; release the
button for one tick on
UseEvent::Finished(see the client README). - Lab runs (Paper 1.8.8 / 1.12.2 / 1.16.5 with Grim 2.3.73): combat, item use, inventory,
placement prediction and held-click mining at 0 flags; pistons at 0 flags on 1.12.2 and
1.16.5; on 1.8 a piston moving the floor under the player is flagged although the packets
equal the real client's (oracle cases
lab_*,piston_up_under_player_*).
0.4.7
Fixes found by a survival bot on 26.2, the world time, more of the vanilla client's placement prediction, and new pathfinder moves. Everything is additive.
Added
- World time on every version (
ghast-client):TickContext::world_time,TickView::world_timeandghast_ext::Bot::world_timegive aWorldTime(game time, the dimension's day clock in ticks, its rate;time_of_day(),day(),day_frozen()), fromupdate_timeand counted on between the server's updates like the vanilla client. 1.8.9 – 1.16.5: a negative day time means the daylight cycle is off. 26.x: the day is the dimension type'sdefault_clockamong the world clocks (none in the nether), with partial ticks and a rate of 0 while paused.ghast-world:DimensionType::default_clock,Registries::world_clocks,World::day_clock. - Placed-block prediction (
ghast-client): a placement predicted on the client now also takes one item off the stack that placed it, like vanilla (not in creative), and blocks whose only property is their axis are predicted too (logs, wood, stems, hyphae, quartz and purpur pillars, basalt, hay, bone blocks: the clicked face's axis; 1.8.9 / 1.12.2 logs keep the item's variant). The 26.x place oracle gained every such block item on each face (348 cases per version, all identical to the real client, item count included); the legacy rules come from those versions' classes. Entity::is_alive(ghast-entity, every version):falseonce a living entity died (its death event sets the health to 0 like vanilla), also while its body stays tracked for the death animation.ghast_ext::EntityInfo::alive.ClickRefused::Dead: clicks and opening the inventory are refused while the player is dead.- Pathfinder moves (
ghast-pathfinder):- digging straight down with
Config::dig(MoveKind::DigDown): onto the next full floor withinmax_fall, never into or next to a liquid, so goals below the player (Goal::Y) and tree tops are left; digging a staircase down (a descent with digs, no fall damage, goes round lava); - doors, fence gates and wooden trapdoors: open ones are passed along their thin slab, closed
wooden ones in the way are clicked open (
MoveKind::Door; the follower waits for the server's answer); iron ones are never clicked; - with
Config::place: bridging over gaps (placing against the side of the floor block, sneaking back to the edge) and towering up (MoveKind::Pillar: jump, place under the feet; it relies on the client's placed-block prediction and places only once the cell is clear of the player's box); - building moves (towering, bridging, digging down) are taken only when they lead at most
half a block further from the goal, and a search reaches at most 4096 nodes by placing
moves, so a goal that cannot be reached ends with
NoPathquickly instead of using up the whole node budget. Detours round walls and low ceilings are covered by tests on every version.
- digging straight down with
Fixed
- 26.x clicks never completed in
ghast-ext:TickContext::clickreturned a ticket that matched no result for 26.xcontainer_click, so equip, deposit, withdraw, toss and swap ended inClickTimedOutalthough the server applied them. The ticket now carries the click's action number. Clicks in the 26.x creative screen, which get no result, return at once. - Memory leak in
ghast-extsince 0.2.2: everyBot::withcall kept its result slot allocated for the rest of the process, and helpers call it every tick. A bot that ran for hours (or looped over failinggotos) grew without bound; a three-bot swarm reached several gigabytes. Fixed; a test counts the allocations. - An attack on a mob that already died: a killed mob stays tracked for its death
animation, so a fight loop hit the body once more.
Bot::attacknow answersError::NoSuchEntityfor it (ctx.attackstill allows the hit, like vanilla). - No world or window actions while dead:
TickContext::place,digandattackreturnfalse, held buttons do nothing and clicks are refused until the respawn, as the vanilla death screen does. A placement written in that window was dropped by a 26.x server without an answer and its predicted block stayed on the client. ghast-ext: "tasks still busy" is logged at debug level (it is normal for loops ofwithcalls).
0.4.6
Older-version parity: what the vanilla client does on 1.8.9, 1.12.2 and 1.16.5 that ghast did not model yet. Everything is additive. "Oracle-verified" means bit-identical to the real client classes on the stated number of randomized ticks or clicks.
Added
- Minecraft 1.12.1 (protocol 338), 1.16.2 (751) and 1.16.3 (753):
GameVersion::V1_12_1,V1_16_2,V1_16_3, served by the 1.12.2 / 1.16.5 code with their own protocol number (1.12.1: VarInt keep-alive ids;ghast-protocolmodulev1_12_1on thev1_12_2feature, table rows 751 / 753 on thev1_16_5module). Oracle-verified on their own jars (every golden of their row and 1.0 – 1.2 M fuzz ticks give identical records) and lab-tested with Grim. 1.8.2 – 1.8.8 and 1.16.4 are now oracle-verified on their own jars too (1.16.4 also lab-tested); 1.8 and 1.8.1 are listed as protocol only. Known difference: before 1.8.5 the movement speed attribute has no upper limit (ghast caps at 1024 on every 1.8.x). - Elytra gliding and firework rockets on 1.12.2 and 1.16.5 (
ghast-physics,ghast-client):TickContext::start_gliding/is_glidingnow work there. 1.16.5: the client's own glide start, the glide pose, creative flight clearing it, attached rockets in entity order. 1.12.2: the glide request, the server's flag starting it, the 0.6 box, rockets. 1 M fuzz ticks per version, 0 differences, also through the engine; lab-tested with Grim. Not modelled: a glide the server starts before the bot's first jump press in the air with an elytra on. - Riding boats on 1.8.9, 1.12.2 and 1.16.5 with entity tracking (
v1_8::Boat,v1_12::Boat,v1_16_5::Boat,tick_boat): boarding from the server's attach / passengers packet, the client's own boat simulation, the steering packets every tick, the server's corrections, dismount. 1 M fuzz ticks per version, 0 differences, also through the engine; lab-tested with Grim. On 1.8.9 the boat uses Java'sMath.sin/Math.cos, whose last bit depends on the JVM: the oracle replay takes the JVM's values as an input (tick_boat_with,JavaTrig), a running bot uses the platform's. - Sitting in minecarts on 1.8.9, 1.12.2 and 1.16.5 with entity tracking: the server moves
the cart, the client interpolates it, sends look +
steer_vehicleand (1.16.5) gets off on sneak. 1 M fuzz ticks per version, 0 differences, also through the engine; lab-tested with Grim. - Placed blocks are predicted on every version (
ghast-client) for blocks with a single full-cube state; 26.x settles them withblock_changed_acklike vanilla (oracle: about 12,500 placements per version, 0 differences), older versions with the server's block updates. Blocks with placement rules (facing, slabs, stairs, logs; on 1.8.9 / 1.12.2 also the variant blocks) are left to the server. New:ghast_physics::modern::state_collides,ghast_physics::v1_16_5::state_collides. - Every container menu is predicted on 1.8.9, 1.12.2 and 1.16.5 (
ghast-inventory), each oracle-verified on 20,000+ clicks and lab-tested: brewing stand, enchanting table, beacon, furnace fuel slot and shift-click (1.16.5: blast furnace, smoker), mount inventories (saddle, horse armor, llama carpets, chest), villager trading (the output the client computes, trade use-up,Inventory::select_trade/trade_offers), the anvil (result, level cost, taking it, the rename packet;Inventory::anvil_rename,set_experience_level,set_creative,anvil_cost,take_screen_packets), and on 1.16.5 the smithing table, stonecutter, grindstone, loom, cartography table and lectern buttons (Inventory::click_button). The 1.12.2 shulker box is now proven as well. Mount slot rules are read off the tracked mount when its window opens;Inventory::set_mount_rules/TickContext::set_mount_rules(MountRules,MountArmor) override them. New slot kinds:SlotKind::BeaconPayment,TradeOutput. Left to the server: effect choice in the beacon, anvil damage, villager restocks, cartography results that need map data. Interests::RECIPES(1.16.5, default off): reads the server's recipes and item tags. The menus that need them (furnace, smithing table, stonecutter, beacon payment, llama carpets, crafting remainders) refuse a click instead of guessing without it. With the flag, the recipe book is kept in a compact form (vanilla: 17.7 kB instead of 239.5 kB per bot) and shared between bots that receive the same recipes; switching the flag off frees it (Inventory::clear_server_data).RecipeBook::is_declared.Client::recordon every version (1.12.2 and 26.x added): the recordings replay in the vanilla client with identical state and movement packets.Capabilities::spectator_block_click_swingsandspectator_switch_stops_use.- A
replaycargo profile (thin LTO, parallel codegen) for the oracle-cache replays; see CONTRIBUTING.md.
Changed
- Villager offers are read only while a merchant window is open; on 1.8.9 / 1.12.2 other plugin channels are skipped without decoding. A raw packet tap does not make the inventory decode recipes, tags or offers. A bot that opens no window decodes the same packets as in 0.4.5 plus the experience packet (the anvil's level check).
Fixed
- A refused block break is restored from the server's answer on 26.x and 1.16.5 (0.4.5) is now lab-proven; in addition a broken waterlogged block (and kelp, seagrass) leaves water, and the move-back after a refused break or placement uses the block's real collision shape for the player (model offset, scaffolding context).
- 1.12.2 elytra: the packet filter is rebuilt right after the tick and after every packet
inside a read, so the server's answer to this tick's request is not dropped (the glide never
started and the server set the bot back every tick). The same rebuild covers a window's
offers that arrive in the same read as
open_window. - 1.8.9 and 1.12.2: the player keeps ticking below y = -64 (the tick used to stop there).
- 1.8.9 / 1.12.2: no
block_placewhen vanilla's placement check fails (the spot is not replaceable, a full block would overlap the player, or on 1.12.2 with entity tracking a living entity, player, boat or shulker stands there); the item use follows as in vanilla. - A spectator's right click on a block sends the block packet and ends there; switching to spectator stops an item use only on 26.x.
- With the immediate-respawn rule the client asks to respawn every tick while dead and no screen is open, also when it joined already dead.
- Inventory: a number-key swap of a hotbar slot with itself over the slot limit.
ghast-ext: no unused import in a build without a version feature.
Known limitations
- Pistons and living mounts (horse, pig, strider) do not move the player on any version.
- Legacy placement prediction has no oracle vectors yet; 1.8.9 / 1.12.2 still send
block_placein some cases vanilla would not (anvils, slabs, support rules, and on 1.8.9 any entity in the spot). - Refused as unpredictable: taking a filled map with data from a villager, a grindstone result with two curses, anvil names that are not plain text.
- An aim equal to the last rotation the client reported sends no look packet, as in vanilla: after a server teleport that changed the rotation, re-aiming at the old angles does not reach the server until the rotation changes.
0.4.5
Added
- 1.8.9, 1.12.2 and 1.16.5: the server's resource pack prompt is answered (
ghast-client). Before,resource_pack_sendwas not decoded on these versions and the bot never answered, so servers that need a pack could kick it. Now the bot answers like the vanilla client with the server entry's pack policy set (ClientPlayNetworkHandler.onResourcePackSend): accepted then loaded, or declined, by the existingClient::accept_required_resource_packs(default on; these versions have no "required" flag, so the option decides for every pack). Nothing is downloaded. Alevel://pack and, on 1.12.2 / 1.16.5, a URL the vanilla check rejects are answered "failed download" alone; the 1.8 answer echoes the pack hash. New (sealed trait, defaulted):ClientVersion::resource_pack. No engine change (engine bench unchanged). - Drop and swap-hands keys on every version (
ghast-client,ghast-inventory).TickContext::drop_held(whole_stack)andTickContext::swap_hands()do what the vanilla keys do outside a screen (MinecraftClient.handleInputEvents): ablock_dig/ player action "drop item" (4) or "drop all items" (3), or on 1.9+ "swap held items" (6), at the origin facing down, written at once in call order like the other actions. 1.16.5 and 26.x predict the drop as vanilla does (ClientPlayerEntity.dropSelectedItem,LocalPlayer.drop): the item leaves the held slot before the server'sset_slotand, when one did, the main arm swings after the drop; 1.8.9 and 1.12.2 only send the packet. The swap predicts nothing. Refused while a screen is open, dead or in spectator mode (and the swap on 1.8.9). New:DigStatus::DropStack,DropItem,SwapHands,Capabilities::drop_prediction,Inventory::drop_held. - An item use ends when its hand no longer holds the item (
ghast-client): 1.16.5LivingEntity.tickActiveItemStackand 26.1updatingUsingItemend it silently in the player tick (a dropped stack, a swap's slot updates, any other slot update that changes the item); ghast kept "using" until the button was released (slowed movement). 1.8.9 / 1.12.2 end it on any slot update of that hand (stack identity); the item-change part is modelled there too. - 1.12.2: entities push the player and boats / shulkers are solid, as on the vanilla
client (
ghast-physics,ghast-client). Vanilla 1.12.2 pushes the local player on the client (LivingEntity.tickCramming,OtherClientPlayerEntity.tickMovement,BoatEntity.tick; only the main player is pushable there) and collides it with boats and live shulkers inWorld.doesBoxCollide; ghast did neither on 1.12.2. With entity tracking on, the 1.12.2 sim now keeps the client-side positions of the entities that matter (interpolation over 3 ticks, 10 for boats, teleports under 1/32 block ignored), pushes the player after its tick in spawn order (bats, parrots, armor stands and spectator players do not push; team collision rules from theteamspacket, by profile name for players), adds boat and shulker boxes to the player's collision query (a boat destroyed by a packet still collides for that tick) and breaks the lily pads a boat touches. New inghast-physics::v1_12:tick_in,push_by,Pusher,PushKind,push_kind,collides,lily_pads_broken_by_boat.Capabilities::client_entity_pushis now true for 1.12.2 (soInterests::ENTITIESalone also keeps the names-only tab list there). Proof: the new oracle case kindentities(23 hand cases + 60 fuzz cases,tests/golden/1.12.2/entities.jsonl.gz) replays with 0 differences through the physics and through the engine, and a 2.0 M tick cached fuzz with 0 differences through both. Cost: none without tracked entities (engine bench 18,324 → 18,325 instructions per tick); about 100 instructions per tick per tracked entity near the player. Riding (the bot or the other entity) and open shulkers are not modelled. - 1.16.5: entities push the player and boats / shulkers are solid, as on the vanilla
client (
ghast-physics,ghast-entity,ghast-client). Vanilla 1.16.5 pushes the local player on the client (LivingEntity.tickCramming,OtherClientPlayerEntity.tickMovement,BoatEntity.tick) and collides it with boats and live shulkers (Entity.isCollidable); ghast did neither on 1.16.5. With entity tracking on, the 1.16.5 tracker now keeps the client-side positions and boxes of the entities (interpolation over 3 ticks, 10 for boats, none for shulkers; boxes anchored as the client resizes them) and their order in the client world's entity map, and the sim pushes the player in that order, before or after its own tick as on the client (bats, parrots, armor stands, vexes, ender dragons and spectator players do not push; team collision rules by profile name), adds boat and shulker boxes to every collision query (movement, sneaking at an edge, pose changes, auto-jump) and applies them in the client's order relative to blocks. New inghast-physics::v1_16_5:tick_in,push_by,Pusher,PushKind,push_kind,collides.Capabilities::client_entity_pushis now true for 1.16.5 (soInterests::ENTITIESalone also keeps the names-only tab list there). Proof: the new oracle case kindentities(74 cases, 3,989 ticks,tests/golden/1.16.5/entities.jsonl.gz) replays with 0 differences through the physics and through the engine (tick order, client boxes, velocity and packets, with and without the metadata store), and a 1.0 M tick cached fuzz with 0 differences through the physics. Not modelled: riding (the bot or the other entity), an opening shulker moving the player, and entities that move themselves on the client (squids, ghasts, phantoms are left out of the oracle cases). - 1.16.5: lava pushes harder in the nether, as on the vanilla client (
ghast-physics,ghast-client). Vanilla 1.16.5 moves an entity in flowing lava with 0.007 per tick in an ultrawarm dimension and 0.0023333 elsewhere (Entity.updateWaterState); ghast always used the overworld value. The 1.16.5 sim now reads theultrawarmflag of the dimension type in the join packet (and in a respawn into another world; a respawn into the same world keeps it, asClientPlayNetworkHandler.onPlayerRespawndoes) and runs the extended tick there. Nothing else in the 1.16.5 player's movement reads the dimension type. New inghast-physics::v1_16_5:PlayerExt(#[non_exhaustive],ultrawarm) andtick_ext. Proof: the new oracle case kindnether(8 hand cases + 100 fuzz cases, 6,329 ticks,tests/golden/1.16.5/nether.jsonl.gz) replays with 0 differences through the physics and through the engine (dimension from a real join packet, with and without entity tracking), and a 1.0 M tick cached fuzz with 0 differences through the physics. Cost: none outside an ultrawarm dimension (engine bench unchanged within ±1 instruction per tick). - 1.16.5: riptide, as on the vanilla client (
ghast-physics,ghast-client). A trident with Riptide now works on 1.16.5 like vanilla:TridentItem.userefuses it out of water and rain (the held use key retries every 4 ticks), releasing it after at least 10 ticks launches the player on the client (TridentItem.onStoppedUsing: the push3 * (1 + level) / 4along the look infloat, a 1.2-block move up on the ground, the 20-tick spin counter), the counter ends on a horizontal collision or when the spin sweeps a living entity (which also reverses the motion, ×−0.2; other entities in the swept box keep a collision from ending it), and the spin pose (0.6 high) follows the server's living entity flag 4. The rain check followsWorld.hasRain: the rain gradient from the weather game events, sky light in the dimension, the biome at the block through the client's voronoi zoom (precipitation and base temperature; withWorldConfig::biomeson, otherwise every biome counts as rainy) and the motion-blocking column above. The sim reads our own entity data once a riptide trident was held (the packet filter grows byentity_metadatathen). New inghast-physics::v1_16_5:riptide,in_water_or_rain,OtherEntity,Surroundings::others/with_others,PlayerExt::{spin_attack, riptide_ticks, apply_living_flags}. The spin pose (vanillaSPIN_ATTACK) is held asPose::FallFlying, which has the same box and eye height (the 1.16.5 physics never glides);PlayerExt::spin_attacksays which it is, and the spin's behaviour is keyed on it. Proof: the new oracle case kindriptide(18 hand cases + 100 fuzz cases, 6,799 ticks,tests/golden/1.16.5/riptide.jsonl.gz) replays with 0 differences through the physics and through the engine (with entity tracking; a case ends where the player uses the trident while looking at a block, which the oracle does not do), and a 1.0 M tick cached fuzz with 0 differences through the physics (524,602 of its ticks through the engine). Cost: none without a use or a riptide trident (engine bench unchanged within ±2 instructions per tick on every version). Not modelled: an other player hit by the spin while we sprint with a full attack cooldown or a knockback trident (vanilla then also scales our motion by 0.6 and stops sprinting), the height-adjusted biome temperature (cold biomes above y ≈ 94 snow instead of rain), sky light below 15 under blocks that do not block motion (cobwebs), and the spin's hits without entity tracking. - Oracle (1.16.5): real height maps, the use key's retry, rotation before the keys
(
oracle). The harness's chunks now carry theWORLD_SURFACEandMOTION_BLOCKINGheight maps a server sends (before they were empty, so rain reached everywhere), the use key retries every 4 ticks while held (MinecraftClient.itemUseCooldown) and the tick's rotation is set before the key handling. No existing golden file changed. - Oracle (1.16.5): the entity cases are deterministic (
oracle,tests/golden). The harness now sends an item entity's velocity right after its spawn, as a server'sEntityTrackerEntry.sendPacketsdoes; before, the client item kept the random velocity of its constructor andentities.jsonl.gzchanged from run to run (only the item records; the player's states and packets are unchanged, so every replay result stays the same).
Fixed
- 26.1 / 26.2: a break the server refuses no longer leaves "ghost air" (
ghast-client). A block broken on the client stayed air until a block update said otherwise, but a server does not have to send one when it refuses or delays a break: it can answer withblock_changed_ackalone, and the vanilla client then puts its remembered state back. ghast did not read that packet, so a long-running digger could end up with permanent air in its own world (the crosshair passed through blocks that were there; reconnecting fixed it). Now the sim keeps vanilla'sBlockStatePredictionHandler: each broken block remembers the server's state under the prediction sequence of its dig packet;block_updateandsection_blocks_updatefor a predicted block only replace that remembered state (other positions change at once);block_changed_ackends every prediction up to its sequence and restores the remembered state (ClientLevel.syncBlockState), moving the player back to where it was at the prediction when the restored block would hold it (not after a later server teleport). A new level (join, respawn into another dimension) starts with no predictions. - 1.16.5: the server's dig answers are applied (
ghast-client). The vanilla client records every dig start / abort / finish with the player's position and applies the server'sacknowledge_player_digging(ClientPlayerInteractionManager.processPlayerActionResponse): when the block differs from the answer's state, the answer's state is set unless it approves a start the client recorded, and the player moves back if the block would hold it. ghast ignored the packet, so a refused break stayed air here too. 1.8.9 and 1.12.2 have no such answer (the server sends a block change) and are unchanged.
0.4.4
Additive only: every 0.4.3 API stays. Many bots in one process (Swarm, SharedChunks) and less
memory per bot for everyone; the fixes below change behaviour on 26.1 / 26.2 only.
Added
Swarm: many bots in one process (ghast-client, re-exported byghast). N worker threads (default: 1), each with its own current-thread tokio runtime andLocalSet;Swarm::spawn(|bot| async move { ... })sends the closure to the least-loaded worker (ties round-robin), where it runs, so the bot's future need not beSend. Builder: worker count, join delay (minimum spacing between bot starts across the swarm), thread name prefix, drop grace.BotHandle:stop,join(async, any runtime),join_blocking; results areResult<T, BotError>(Panicked,NotStarted,Aborted): a panicking bot only ends itself.BotContext::stopped()is the future forClient::run_until.Swarm::stop_all,Swarm::shutdown(grace)(stop, wait, abort the rest, join the threads;ShutdownReport), and a boundedDrop. Handles work after the swarm is dropped. Nothing inClientor the tick loop changed; the only new dependency is tokio'ssyncfeature.SharedChunks: one copy of identical chunk sections for many bots (ghast-world,Client::shared_chunks, opt-in, 26.1 / 26.2). Bots in one area share each identical 16×16×16 section's block storage instead of holding one copy each. Sharing is per section and copy on write: a block change (server update or local prediction) never writes to storage another bot reads, so no bot sees another bot's packets (see the next entry for what a changed section becomes). The key is a 128-bit keyed hash of the section's exact chunk-packet bytes (a skip pass finds them); a section already in the store is not decoded at all. The store holds weak references and removes an entry when the last holder drops it. Reads stay one pointer hop with no lock; the store's lock is taken while a chunk is decoded and when a last holder lets go. Uniform sections, biomes and block entities stay per world (the modern worlds keep no light). New API:SharedChunks(new,sections,heap_bytes,same_store),v26_x::World:: set_shared_chunks/shared_chunks,paletted::Section::{Shared1, Shared2, Shared4, Shared8, SharedDirect}withpaletted::SharedandSection::is_shared(the enum is#[non_exhaustive]; a shared section'sheap_bytesis 0, the store counts it once). The 1.8.9 / 1.12.2 / 1.16.5 worlds ignore the option.SharedChunkskeeps changed sections and whole columns shared; less memory per world (ghast-world, 26.1 / 26.2).- A block change in a shared section moves that world to the section with the new content,
looked up in the store by a content key and copied only when no world holds it yet. Bots
that receive the same block updates keep one copy (before, each got its own copy of every
section the server touched). The content key is the XOR over the 4096 blocks of a keyed
128-bit hash of (protocol, index, state): a change moves it by two hashes, the order of the
changes does not matter, and a
section_blocks_updateis applied in one step. A world that is the only holder changes the storage in place and moves it to its new key. A uniform section that gets a block joins the store the same way. Sections a world decoded without a store, or holds through another store, stay its own. - The per-column array of section handles is shared between worlds whose columns hold the
same sections (
Arc<[Section]>, never written while another handle exists). A chunk packet for a column another world already holds costs one store lookup. - Without a store too: the column table's slot shrank from 72 to 32 bytes (the position is no longer stored next to the key, in every version's world; biomes and block entities of the modern columns are behind one pointer that most columns do not have), and the decode scratch table (two bytes per block state) is one per thread instead of one per world.
- Reads:
ViewandWorld::block_statetake one unsigned compare for both ends of the height, and a uniform section answers without computing the block index. Engine bench, instructions per tick, same tree with and without this entry: 1.8.9 11,800 → 11,783; 1.12.2 18,372 → 18,323; 1.16.5 39,775 → 39,738; 26.1 36,236 → 35,890; 26.2 36,320 → 35,969 (the same with sharing on). Chunk decode does not allocate for biomes it does not keep. - New API:
SharedChunks::columns,paletted::Section::get_at.Shared::holderscounts handles (section arrays), not worlds.ColumnMap::table_bytescounts the table's buckets (it counted the usable capacity).
- A block change in a shared section moves that world to the section with the new content,
looked up in the store by a content key and copied only when no world holds it yet. Bots
that receive the same block updates keep one copy (before, each got its own copy of every
section the server touched). The content key is the XOR over the 4096 blocks of a keyed
128-bit hash of (protocol, index, state): a change moves it by two hashes, the order of the
changes does not matter, and a
- The block read chain of the modern worlds and the physics' per-tick block cache are always inlined (they were left to the compiler's size heuristic). Engine bench, instructions per tick: 1.8.9 12,494 → 11,792; 1.12.2 19,593 → 18,361; 1.16.5 40,462 → 39,771; 26.1 36,317 → 36,234; 26.2 36,396 → 36,318 (the same with sharing on). Outbound packet digests unchanged.
- Smaller tracked entities (
ghast-entity, every version; no API change). An entity's metadata is one exact-size block instead of a vector with spare room (a vector's first growth reserved four 112-byte entries); passengers, leash and effects sit behind one pointer that most entities never allocate; the vehicle id is packed.Entityis 168 bytes instead of 232, its map slot 176 instead of 240. A 26.1 player with the two metadata entries a server sends at spawn costs 520 bytes instead of 808 (slot + heap), a zombie with one entry 408; a test pins both (296 bytes for the player withConfig::metadataoff). The entity map, the tick-order map, the loaded-column set and the tab list give memory back once they hold under a quarter of their capacity (a crowd left), and a growth forced only by deletion markers (a steady crowd with fresh ids used to double the entity map) is undone at once; tick-order numbers are stored asu32(renumbered, order kept, after 2³² − 1 entries). - Names-only tab list (
ghast-entity, every version):Config::player_names(withplayer_listoff) reads the tab-list packets but keeps only each entry's profile name, game mode and (26.x) tab-list object generation, inline: a 48-byte map slot, about 62 bytes per entry at 100 entries, against a 120-byte slot plus heap strings for a fullPlayerInfo.Config::reads_tab_list. Answered from either list:Entities::player_name, newEntities::tab_name/tab_game_mode/tab_len, and on 26.x the newTracker::scoreboard_name(the profile name the player entity spawned with, kept after its entry leaves the tab list, as vanilla keeps theGameProfile),Tracker::game_modeandTracker::is_spectator(vanillagetPlayerInfo: an entity that looked its entry up keeps its last game mode). With either list, 26.x refuses a player spawn whose profile is not in the tab list (vanilla); with both off every spawn is kept, as before. v26_1::alive/v26_2::alive(ghast-entity): vanillaLivingEntity.isAlivefrom the health the server sent (NaN and ≤ 0 are dead), also withConfig::metadataoff. Instructions per packet on the entity benches are the same or lower (26.1 stream −1.3%, 26.1 metadata −2.3%, 1.16.5 stream −0.8%); engine bench unchanged (26.1 with 100 entities −0.2%).- Less memory per connection (
ghast-protocol,ghast-inventory,ghast-client; no behaviour change). The zlib inflater (~47 KB) and the compressor states are per thread instead of perFrameDecoder/FrameEncoder(they are reset before each use). The receive buffer is 8 KB instead of growing to 32 KB: reads ask only for the room they need, and a buffer grown for a large frame (a 2 MB chunk packet) goes back to 8 KB once 64 frames in a row fit again; the send buffers start at 256 bytes. Login and configuration frames are copied out of the receive buffer (FrameDecoder::set_detach_frames,FrameDecoder::rehomeat the switch to play), and the stack of a single-slot packet copies its components / NBT (ComponentPatch::detach,RawNbt::detach), so data kept from them no longer keeps a whole receive buffer alive. NewFrameDecoder::reserve_read(the read path of the client and ofio::FramedReader). 26.x: the click-hash registry names (HashRegistries, now oneArc), the kept tags, the enchantment registry and the recipe bytes are stored once per process for all clients that received the same content (matched by content at join; lookups take no lock). The session future no longer carries a 16 KB stack array (the close drain buffer is allocated when closing). The kept login / respawn packets and the last-seen chat signatures are copies, and the 26.x command tree (kept compressed) is shared per process too. New moduleghast_protocol::intern(shared,bytes). - At most 64 dialog events are kept between two behaviour ticks (the open dialog stays current).
Interests::ENTITY_TRACKING(ghast-client): entity tracking without the generic metadata store, roughly 450 bytes less per tracked entity. Only the generic metadata accessors (health, flags, custom names, raw values) return nothing; item entities keep their stack, and what physics, pushes and picking read is unchanged (the 26.1 entity oracle replay passes with it).Interests::ENTITIESis unchanged and keeps the metadata.swarmexample: N wandering bots in one process (--count,--workers,--join-delay-ms).- README: "Running many bots".
Fixed
- 26.1 / 26.2 (only with
WorldConfig::block_entities): a stored block entity's NBT was a slice of the packet it came in, which kept the whole chunk packet (or read buffer) alive. It is a copy of its own now, as documented and as in the older worlds. - 26.1 / 26.2: with
Interests::ENTITIESbut withoutInterests::PLAYER_LIST, a player pushing the local player was judged by the teams of its UUID instead of its profile name, so a team collision rule other thanalwayswas misapplied, and a spectator player pushed. The 26.x tracker now keeps the names-only tab list ofghast-entity(Config::player_names: name and game mode per entry) when the full one is off (new capabilityCapabilities::client_entity_push; 1.8.9 – 1.16.5, whose clients do not push the player, still decode noplayer_infowithoutPLAYER_LIST); the team check uses the profile name, spectator players no longer push (vanilla:noPhysics), and a player spawn without a tab-list profile is skipped as in vanilla.TickContext::entitiesstill lists no tab list unlessPLAYER_LISTis asked for. - 26.1 / 26.2: a shulker whose health is NaN collided with the player; it now
follows vanilla's
isAlive(ghast_entity::v26_x::alive).
0.4.3
Additive only: every 0.4.2 API stays, and nothing changes unless a new option is used.
Added
- Entity push switch in
ghast-client:Client::entity_push(bool)(default on, as in vanilla) and, at run time from a behaviour,TickContext::set_entity_push/TickContext::entity_push. Off keeps entity tracking (crosshair, attack, interact) but other entities no longer push the player. Off is not vanilla: a vanilla client always applies these pushes. On 1.8.9, 1.12.2 and 1.16.5 the client never pushes the player, so the switch does nothing there. - Server dialogs (26.1, 26.2) in
ghast-client, opt-in withInterests::DIALOGS: moduledialog(the decodedDialogwith its body, inputs, buttons and actions;DialogAnswer,InputValue,DialogOutcome,DialogSent,CommandCheck,DialogRefused,DialogEvent). In play:TickContext::dialog_events,TickContext::dialogandTickContext::answer_dialog; in the configuration state:Behavior::configuration_dialog(defaultNone). An answer sends what the vanilla client sends for that button or Escape:custom_click_action(with the inputs added to the payload in vanilla's order), the command as an unsignedchat_commandwhen vanilla would send it without asking (checked against the server's command tree; otherwise held, or sent withDialogAnswer::confirm_commands), nothing for client-only actions; ashow_dialogaction opens the next dialog. Checked byte for byte against answers written by the vanilla client classes (tests/golden/26.2/dialog_answers.txt, generator inoracle/dialogs/) and through the whole client against replayed vanilla server sessions. - Raw serverbound packets from a behaviour (every version):
TickContext::send_raw(id, body)andTickContext::send_packet(&packet)(a generated serverbound play packet of the session's version; others are refused) queue a packet in call order with the other actions, before the tick's movement packet. An escape hatch: the client does not look at these packets, so their protocol correctness is the caller's job.common::Outbound::Raw. - What the client sent, for behaviours:
TickView::outbound(inBehavior::after_tick: the tick's serverbound packets in write order, digs with their status, block and face) andTickContext::prediction_sequence/TickView::prediction_sequence(26.1+: the block-prediction sequence number of the last predicting packet written, the numberblock_changed_ackanswers with;Nonebefore 1.19). Nothing is copied or kept for them. - Example
dialog(the facade's examples): prints every dialog and answers it with a chosen button and typed input values. common::{Inbound, ConfigInbound}::{ShowDialog, ClearDialog},common::{Outbound, ConfigOutbound}::CustomClickActionandcommon::Outbound::DialogCommand.
Changed
- Docs: the
handsmodule docs describe the one state machine with its 1.8 and 1.9+ rules (they still said 1.9+ was not modelled);set_buttons,target()and the client README's digging section say plainly that withoutInterests::ENTITIESthe crosshair looks through players and mobs and nothing pushes the bot. - A configuration-state dialog that no behaviour answers is logged as a warning (a server waiting for the answer would otherwise stall the login without a word); other configuration packets the client does not handle are logged at debug level.
Fixed
scripts/package-check.shreads the packages from the actual target directory (CARGO_TARGET_DIRor a cargo config), not alwaystarget/.
Known limitations
- A dialog shown in the configuration state is covered only by the fake-server test (vanilla commands cannot show one there); play-state dialogs were also checked live on a Paper 26.2 lab.
- The command check (whether vanilla would send a dialog's command without asking) is modelled on the server's command tree and unit-tested, but not checked against vanilla's Brigadier with oracle vectors.
- Not modelled: a vanilla player's movement keys and buttons are up while a dialog screen is
open (ghast leaves that to the behaviour); the multi-line input's line limit; server links in
a
server_linksdialog;#tagdialog lists. - The generated
ghast_protocol::v26_1/v26_2CustomClickActionpacket types keep minecraft-data's layout, which is not the wire layout; the client writes the packet itself. Fixing the generated type is a breaking change and waits for 0.5.0.
0.4.2
Minecraft 26.2 (protocol 776); 26.2 is the only game version with protocol 776 so far. Additive only: every 0.4.1 API stays.
Added
- Minecraft 26.2 protocol (776) in
ghast-protocol: modulev26_2, featurev26_2(on by default), version table row 776 → 26.2. minecraft-data has no 26.2 data yet, so the packets are generated from its 26.1 data plus a reviewed delta (codegen/protocol/delta/776.json: each change names the vanilla 26.2 code it follows): the session id after the login profile,onlineModein the playlogin, the new team parameter order with an optional team colour,spectator_action(replacesspectate_entity), the geyser particles, thesulfur_cube_contentcomponent, and the 26.2 particle, component, attribute and command parser ids. 487 of the 573 definitions are shared with older protocols. Packet ids are checked against the 26.2 server's packet report; a capture from a vanilla 26.2 server (status, login, configuration, play) decodes strictly and re-encodes byte-identically (tests/capture_26_2.rs); examplelogin_26_2. slot::v775::ComponentPatch/ItemStackalso hold 26.2 stacks:read_776,decode_776,decode_all_776,from_parts_776,ComponentPatch::protocol.- 26.2 data in
ghast-data(v26_2, featurev26_2, on by default): blocks, states, properties, collision and crosshair shapes, items, tools, dig facts and entities from the real 26.2 jar (oracle dumps intests/golden/26.2/); display fields minecraft-data lacks for 26.2 are its 26.1 values by name plus a reviewed table for the new blocks, items and the sulfur cube. Same API asv26_1; the movement types (StatePhys,BlockKind,block_flags,state_flags,VoxelShapeRef,VoxelClass) are one type shared by both, and so are the shape tables. 26.2BlockData/ItemDatarows hold no pointers (noname/display_namefields);Block::name/display_nameandItem::name/display_nameread them, and are new onv26_1too. - 26.2 world in
ghast-world(v26_2, featurev26_2): the 26.1 world over the 26.2 block states and packets; checked against a vanilla 26.2 server (every chunk of a capture, 1576 block probes confirmed by the server). - 26.2 movement in
ghast-physics: rule setmodern::V26_2(featurev26_2, on by default) overghast_data::v26_2, bit-exact against the vanilla 26.2 oracle (all 26.2 movement goldens; 16.2 M cached fuzz ticks at 0 diffs, incl. 1.0 M of restitution fuzz; 3200 golden crosshair rays identical). 26.2 is the 26.1 row plus one structural change behind the new defaultedRules::RESTITUTION:Entity.restituteMovementAfterCollisions(colliding axes reflected by thebouncinessattribute, landing on slime (1) / beds (0.75, ×0.8 for a boat), gravity and drag compensation, no bounce when sneaking or on honey) and thefriction_modifier/air_drag_modifierattributes. New:modern::MovementAttributes(PlayerExt::attributes,get_mut(name); read by the extended ticks),MemoryWorld262,memory_world_26_2, per-fieldRulesmethods (friction,speed_factor,jump_factor,block_flags,offset,block_name; defaulted fromRules::block),pick::v26_2. - Oracle: one shared modern harness (
oracle/src/modern, formerlyoracle/src/mc_26_1) compiled per version with a small per-version shim (Compat); the 26.1 goldens it produces are content-identical to 0.4.1's (the 26.1entitiesgolden gains one case,push_large_scale_section_reach, for the boat-push fix below).tests/golden/26.2/(29 files, incl.fuzz_restitution_seed1;scenarioshas 108 scenarios, among them 20 restitution and movement-attribute scenarios and 15 idle drops onto slime (6 – 30 blocks) and a bed). - 26.2 entity tracking in
ghast-entity:v26_2::Tracker(featurev26_2, on by default), the 26.1 tracker source compiled a second time overghast_protocol::v26_2/ghast_data::v26_2(26.2 entity ids, the sulfur cube, sizes,SCALE_ATTRIBUTE= 30, the 776 slot codec); same API asv26_1. Replaystests/golden/26.2/entity_tracking.jsonl.gzwith every field equal (1728 ticks, 7266 packets, 305,600 fields; like 26.1, the tick order differs only around riding entities: 3306 of 3456 ticks equal) and the vanilla 26.2 capture. - 26.2 inventory in
ghast-inventory(Version::V26_2, featurev26_2, on by default): click prediction for every menu, creative screen, hashed click stacks (incl. the newsulfur_cube_content), item facts from the 26.2 reports. Proven like 26.1: the 26.2 click vectors (23,963 golden and 237,292 cached clicks) and creative vectors (19,259 packets) byte-identical, 0 differences; the real client's hashes of 4,000 stacks (108 of 111 component kinds) exact. One modern implementation over per-version tables: components are handled as canonical kinds mapped to each version's wire ids at compile time. ghast-inventoryversion-neutral modern API (dispatches on the inventory's version):Inventory::{apply_raw_modern, encode_modern, encode_creative_modern, on_open_screen_modern, on_registry_data_modern, on_update_tags_modern, on_merchant_offers_modern, on_mount_screen_modern, set_registries_modern, registries_modern, set_creative_modern, anvil_rename_modern, select_loom_pattern_modern, select_trade_modern, …},Window::menu_modern,Version::is_modern, and modulemodern(functions taking aVersion:item_name,item_id,defaults,component_id,component_name,menu_name,window_kind,item_use,component_hash,hash_covers,packet_ids, …). The 0.4.1_26_1methods andv26_1functions stay and are aliases.- Minecraft 26.2 in the client (
ghast-client,ghast):GameVersion::V26_2("26.2","776"), featurev26_2(on by default, forwarded by the facade,ghast-ext,ghast-pathfinderandghast-viewer), capability row = 26.1's with theV26_2physics and the 26.2 data. The modern client is now written once and compiled per version (a small row module per version; no run-time version branches), and ids that versions renumber are resolved by name. 26.2 deltas: the play login'sonlineModedecides whether a chat session starts; the new team parameter order; the movement attributesbounciness,friction_modifier,air_drag_modifier. Every 26.1 engine replay of the oracle goldens also runs on 26.2 (joins, teleports, elytra, riptide, entities, border, nether, boats, minecarts, item use, entity pick,player_loaded, signed chat, login encryption), plus the idle slime / bed drop scenarios, packet for packet. Lab: every 26.1 lab script passes on a Paper 26.2 + Grim 2.3.74 lab with 0 flags (one new documented Grim corner case, below). ghast-pathfinder:Version::V26_2(its jump table measured with the 26.2 physics);ghast-viewer: draws 26.2 sessions (modulev26_2, featurev26_2);ghast-ext: 26.2 block, item and entity names.Client::force_step_position(Grim compatibility, off by default) now also works on 26.1 and 26.2.- Lab: a 26.2 lab (Paper 26.2 build 135, Grim 2.3.74,
127.0.0.1:25634); the 26.x scripts takeLAB_VER=26.2(proxy switch, online mode, entities, elytra, riptide, transfers).
Changed
- Build cost of every version. The modern client, physics, inventory and tracker are one
source compiled once per modern version, so the default (every-version) build carries two
modern copies. Stripped
afkexample, release profile, x86-64, 2026-11-13: every version 7.94 MB (0.4.1: 6.25 MB), 26.1 only 4.16 MB (0.4.1: 4.13 MB), 26.2 only 4.00 MB. Idle AFK bot (RSS / private dirty): every-version build 8.56 / 2.26 MB on 26.1 (0.4.1: 8.08 / 2.21 MB; the difference is file-backed code pages) and 8.98 / 2.28 MB on 26.2; single-version builds 6.66 / 1.85 MB (26.1) and 6.50 / 1.68 MB (26.2). A bot that joins one server version should build only that version (default-features = false, features = ["v26_2", …]; see the README's Cargo features). ghast_protocol::defs::p776is#[doc(hidden)]: its shared definitions are not a stability promise; name 26.2 packets throughghast_protocol::v26_2. Switch enums and id newtypes of definition modules newer than the last published protocol (775) are#[non_exhaustive](id newtypes gainnew()).ghast-physics:ModernMemoryWorlddecodes block states when they are stored, not on every read (a second modern row stopped the decode function pointer from being folded; the plain 26.1 tick on the memory world is now about 1 % cheaper than in 0.4.1).
Fixed
Both are behaviour corrections of the modern core, so they change 26.1 as well as 26.2; all 26.1 goldens and the 12.2 M cached 26.1 fuzz ticks still replay with 0 diffs.
ghast-physicsmodern core (26.1 and 26.2): a boat pushes the player only when its push query reaches the player's entity section (Level.getEntitiesvisits the sections of the query box grown by 2 blocks horizontally and 4 downwards); a scaled-up player overlapping a boat far from its own section is not pushed. Mob pushes are unaffected (the client tests the local player's box directly). Newmodern::section_query_reachesfor callers filtering entity collision boxes. Oracle casepush_large_scale_section_reach(26.1 and 26.2entitiesgoldens).ghast-physicsmodern core (26.1 and 26.2): a zero movement input still addsVec3.ZEROto the velocity (moveRelative), which turns-0.0into+0.0as vanilla does. No 26.1 vector could show it: 26.1 never leaves a signed zero in a horizontal velocity before an input-less tick (its collisions zero the axis with0.0); 26.2's restitution does.
Known approximations
- Fluid shape cache: ghast behaves as a freshly started client. Vanilla's
FlowingFluid.getShapecaches one shape per fluid state for the whole process, built with the height of the first block it was asked about (water sources have amount 8, so a source first clipped with water above keeps a full-block shape for every later source). Only ray clips with a fluid mode read it: on the client the fall-distance raycast ofEntity.move(the clientfallDistance) and the item-use ray of buckets, bottles, lily pads and other place-on-water items, boat items and spawn eggs. In a long-lived real client whose cache is "sticky", such a ray grazing the top ninth of a water source cell hits where a fresh client misses, which can change the item-use outcome (swing packet, predicted block and held item) and the fall distance.ghast-physicscomputes the fluid height per query; the oracle starts every case with empty caches (three 26.2 cached teleport cases had picked up a full-block source shape from earlier cases in the same JVM).
Known Grim corner cases
Three situations in which Grim flags movement that the oracle proves identical to the real
client's (details in crates/ghast-client/README.md):
- A landing step-up onto a 1/8-higher block (soul sand → grass) whose move stays under the
position resend threshold (found on the 1.8.9 and 1.16.5 labs;
Client::force_step_position(true), now also on 26.1 / 26.2, avoids it). - 1.16.5 walking on slime (on-ground alternates every tick; GroundSpoof).
- New, 26.2: an idle 20-block drop onto slime. Grim 2.3.74 (and the 2.3.75 alpha) flag
Simulation 0.0417 at the tail of the bounce, where the vanilla client rests 6.2e-5 above the
slime and sends only
flying(on_ground)for a tick. ghast's packets equal the real 26.2 client's on every tick of that drop (oracle scenarioslime_drop_20_long, replayed through the engine); other drop heights (6 – 30 blocks) and beds draw no flag.force_step_positioncannot help (the position did not change).
0.4.1
Added
- Signed chat on 26.1 (online mode):
ghast_auth::chat(ProfileKeys,SignedMessageChain: SHA256withRSA over the 26.1 signed body),MicrosoftAuth::profile_keys(player/certificates;with_certificates_url,certificates_url,Stage::ProfileKeys),Client::signed_chat(default on) andClient::profile_keys, re-exportedghast::ProfileKeys. On encrypted connections each join starts a chat session (chat_session_updatefrom the connection tick), chat messages and theminecraft:messagearguments of commands are signed; the key pair is cached perClientand refreshed when due. Which commands are signable comes from the server's command tree (declare_commands, kept raw and parsed only when a command is sent). Proven byte-identical (signatures included) against the real client:tests/golden/26.1/chat_signing.jsonl.gz. - Server transfers (1.20.5+
transfer, configuration and play state):SessionEnd::Transferred { host, port },Client::follow_transfers(opt-in: log in to the target with the transfer intent and the stored cookies, at most 8 in a row),Inbound::Transfer. LoginInbound::EncryptionRequestUnauthenticated: 26.1 encryption requests withshouldAuthenticate = falseare answered without the session-server join (any account).Outbound::ChatSessionUpdate.- Oracle dumps
net-cryptoandchat-signing(26.1):tests/golden/26.1/net_crypto.jsonl.gz(session hash,hello, key packet, AES/CFB8) andchat_signing.jsonl.gz. - Lab:
proxy-switch.sh(Velocity + two 26.1 backends with different overworld heights, repeated/serverswitches),online-26.1.sh+fake-session-server.py(online mode andenforce-secure-profileagainst a local account stand-in),transfer.sh; examplesserver_switch,online_chat(featuremicrosoft), option--follow-transfers. - CI runs the protocol differential tests against node-minecraft-protocol (
setup-node,npm ci);GHAST_REQUIRE_NODE=1makes a missing harness fail instead of skip. - 26.1 click prediction for every menu, proven against the real client (oracle
clicks,tests/golden/26.1/clicks_seed1.jsonl.gz: all 25open_screenmenus, the mount screens and window 0, survival and creative, every click mode, screen actions; 237 292 clicks and actions of a 30 000-case run, all predicted and byte-identical): drags (Click::QuickCraftwithDragStage/DragKind), creative middle-click (Click::Clone), bundles, crafting results taken with their remainders, furnace / smoker / blast furnace input and fuel rules (from the server'supdate_recipesitem sets), brewing stand, enchanting table, beacon, smithing, stonecutter, cartography table, crafter (locked slots), lectern, hopper, dispenser, shulker box, and the results the client computes itself: the anvil (repair, combining, enchantment compatibility, cost, renaming), the grindstone, the loom (selectable patterns) and villager trades (offers, payment, uses and stock). - Mount inventories (
horse_screen_open):Inventory::on_mount_screen_26_1(window_id, columns, entity_type, can_saddle, can_body)— horse, donkey, mule, llama, trader llama, camel, skeleton / zombie horse, nautilus, zombie nautilus. - Screen actions:
Inventory::anvil_rename_26_1(Outgoing::RenameItem),select_loom_pattern_26_1(Outgoing::ButtonClick),select_trade_26_1(Outgoing::SelectTrade; the payment moved like the villager screen does). Server data for them:on_update_tags_26_1,on_registry_data_26_1(configuration state),on_merchant_offers_26_1;apply_raw_v26_1reads playupdate_tagsandmerchant_offers(PACKET_IDS_26_1). Recipes, tags, the enchantment registry and offers stay raw bytes until a click needs them; vanilla's enchantment definitions are built in (src/generated/enchantments_26_1.rs) for servers that send the registry by known pack. ContainerClick::swings: the arm swings the real client sends before a click that drops a stack (send them first).WindowKind::Crafter(the crafter screen opens on 26.1).Window::menu_26_1.Inventory::{on_open_screen_26_1, on_recipes_26_1, set_creative_26_1, set_experience_level_26_1};apply_raw_v26_1also readsdeclare_recipes,abilitiesandexperience(now inPACKET_IDS_26_1).v26_1::item_use(&Stack) -> Option<ItemUse>: use animation and duration,use_effects(speed multiplier, can sprint),consumable,foodof a 26.1 stack (checked against the real client's components inhashed_stacks.jsonl.gz).v26_1::{glider, can_glide_using, next_damage_will_break}: the slot a glider (theglidercomponent, the elytra by default) works from andLivingEntity.canGlideUsing(not when the next damage breaks it).Inventory::enchantment_name_26_1(id): an enchantment's registry name (minecraft:sharpness).Inventory::trident_spin_attack_strength_26_1(&Stack) -> Option<f32>(EnchantmentHelper.getTridentSpinAttackStrength): thetrident_spin_attack_strengtheffect of the stack's enchantments as the server's enchantment registry defines it (vanilla's definition for entries sent without data; level-based values and value effects evaluated like the game).v26_1::item_name(id): an item's registry name without the item defaults table. The 26.1 item, registry-name and enchantment tables ghast reads are plain read-only data now (strings as spans of one text, no pointers): about 205 KB less relocated data per process (.data.rel.roof theafkexample 1 053 560 -> 843 896 B).v26_1::defaultsbuilds its table on the first call.- 26.1 creative inventory screen: window 0 opened in creative mode sends what the real
screen sends (
Outgoing::Creative(Vec<CreativePacket>):set_creative_mode_slotfor the slots that differ from the last broadcast, drops as slot -1 with the arm swing; echoes of server slots fromtake_creative_echo_26_1; the drop spam throttle), proven against the real screen (tests/golden/26.1/clicks_creative_seed1.jsonl.gz, 19 259 packets). - Oracle dumps
clicksandcreative-clicks(26.1) andexamples/gen_menus_26_1.rs(the menus' item facts from the click vectors). - Path finding on 26.1 (
ghast-pathfinderfeaturev26_1, default on, forwarded byghast-extand the facade):Version::V26_1on the modern physics core. Block classes come from the jar's 26.1 movement records (powder snow, scaffolding, cobwebs, berry bushes, fire never entered; magma, campfires, pointed dripstone, lava cauldrons, big dripleaves, sculk sensors / shriekers never stood on); move costs and the gap-jump table are measured withmodern::tick. The look-ahead, the pre-jump check and the verification simulate with the live player (server attributes such as step height, jump strength, movement speed and scale, effects, abilities):Controller::set_modern_player,Simulation::with_modern_player; theFollowerfeedsTickContext::modern_playerevery tick. Build height from the dimension (negative Y; below the bottom is unknown):BlockSource::build_height(defaulted). The move set follows the live attributes at plan start (Search::with_modern_player, used by theFollower): step height, jump strength / jump boost / gravity (jump-ups up to the jump's apex), gap jumps only with vanilla jump, gravity, speed and scale. On 26.1 only: a walk braking before a wall without progress for 10 ticks accepts the graze (the exact look-ahead could otherwise alternate forward and back at a corridor's mouth); 1.8.9 – 1.16.5 plans and simulated runs are identical to 0.4.0 (209 cases compared).Bot::gotoworks on 26.1. Live: the lab parkour corridor and maze on Paper 26.1.2 + Grim 2.3.74, 0 flags, 0 setbacks. ghast_client::TickContext::modern_player(26.1 movement state) andWorldView::build_height(defaulted; 26.1 from the dimension).- Bot screen for 26.1 (
ghast-viewerfeaturev26_1, default on; the facade'sv26_1forwards it): a 26.1 world is drawn with the 1.8.9 assets — blocks and items mapped onto their 1.8 states (exact where 1.8 has them, look-alikes for newer ones, by shape otherwise;ghast_viewer::v26_1), the 256 rows around the bot shown, entities from the 26.1 tracker, the hotbar from the component item model. Text stays the truth: new messagesITEMS(28) andENTITY(29) carry the real 26.1 ids, English names, count, damage, enchantments, custom names (fromInventory::enchantment_name_26_1) and astandInflag;HELLOandSTATEname the game (game,drawnWith,worldMinY; replays keep them). The page shows it: the header ("26.1 (drawn with 1.8.9 assets)", world Y), the held item and armour, hotbar tooltips (name, count, enchantments, durability, id), a ≈ mark on stand-in icons, durability bars from the real damage, name tags over entities and dropped items drawn with a stand-in. 1.8.9 payloads and page behaviour are unchanged (byte-identical frames to 0.4.0).BotView::{build_height, enchantment_name}(defaulted). The crate'sincludepatterns are anchored (a localweb/node_modulesno longer leaks into the package).afk_viewer --version 26.1. ghast_physics::modern::ModernMemoryWorld::{min_y, height}.- 26.1 gliding (elytra) and firework rockets, proven against the real client (oracle
elytra,tests/golden/26.1/elytra.jsonl.gz; 1 M cached fuzz ticks, 0 diffs):ghast_physics::modern::PlayerExt(glide flag, usable glider, attached rockets, rocket arm) withtick_ext/LoadGate::step_ext,PlayerExt::apply_shared_flags(the server's shared entity flags: sprinting, swimming, gliding),attach_rocket/remove_rocket,on_climbable_ext,Packet::StartFallFlying. The glide usesMath.cosexactly as the HotSpot x86-64 JVM computes it (modern::jdk_math, a generated exception table).ghast_data::v26_1::block_flags::CAN_GLIDE_THROUGH. - 26.1 riptide, proven against the real client (oracle
riptide,tests/golden/26.1/riptide.jsonl.gz; 1 M cached fuzz ticks, 0 diffs):modern::riptide(the launch on releasing the trident),modern::in_water_or_rain,PlayerExt::{spin_attack, auto_spin_ticks, apply_living_flags, living_flags}(spin counter and pose). - 26.1 entity collision and pushing, proven against the real client (oracle
entities,tests/golden/26.1/entities.jsonl.gz; 1 M cached fuzz ticks, 0 diffs):modern::Surroundingswithtick_in/LoadGate::step_in(boxes of collidable entities: in collisions, step-up, pose and edge tests, auto-jump),modern::push_by(Pusher,PushKind),push_kind_26_1,collides_26_1,MAX_ROCKETS. - 26.1 nether movement proven against the real client (oracle
nether,tests/golden/26.1/nether.jsonl.gz; 1 M cached fuzz ticks, 0 diffs): fast lava flow (LevelInfo::fast_lava) and the 0-255 build height. - 26.1 world border, moving and set, proven against the real client (oracle
border,tests/golden/26.1/border.jsonl.gz; 1 M cached fuzz ticks, 0 diffs):modern::BorderState(the client's tick-based lerp;collision_borderlags it by a tick as vanilla's collision does). - 26.1 boats the player rides and controls, proven against the real client (oracle
boats,tests/golden/26.1/boats.jsonl.gz, 112 cases; 1 M cached fuzz ticks, 0 diffs):modern::Boat(BoatKind,BoatStatus,board,server_move) andmodern::tick_boat— the boat's tick (status, fluid pushing, floating, paddling with the previous tick's keys, collisions with blocks and entities, block effects), the player's tick as a passenger and its seat on the boat, with thesteer_boat, rotation-only movement andvehicle_movepackets in vanilla order.Packet::{MoveVehicle, PaddleBoat}. - 26.1 riding a minecart (a vehicle the server moves), proven against the real client (oracle
minecarts,tests/golden/26.1/minecarts.jsonl.gz, 105 cases; 1 M cached fuzz ticks, 0 diffs):modern::Seat+modern::tick_passenger— the passenger's tick given the vehicle's position after its own tick (rotation-only movement packet, novehicle_move), then its seat. ghast-entity26.1Tracker::{tick_seq, tick_order}: the client's entity tick order (ClientLevel.tickingEntities, also the insertion ordergetEntitieslists within a section): entities enter when they spawn into, move into or have their column loaded, leave when removed or unloaded; the local player first at login / dimension change, last at a same-dimension respawn. Checked against the real client's tick list inentity_tracking.jsonl.gz(newtick_orderfield): 3,362 of 3,456 ticks equal; the rest differ because the tracker does not place passengers on their vehicles. The full membership re-check runs only after packets were applied or when an entity's interpolation moved it into another column;Tracker::tick_earlyticks an entity ahead of the rest (a vehicle before its passenger, entities that tick before the player).- 26.1 elytra in the client:
TickContext::is_gliding/start_gliding; the client glides with the oracle-provenmodern::PlayerExt(glide start on a jump press in the air with a glider equipped,START_FALL_FLYING), applies its own shared flags from the server's entity data and the boost of firework rockets attached to it (decoded without entity tracking, only for our own id and rockets), and swings when a rocket is used while gliding.EntityAction::StartFallFlying. 13 oracle elytra cases replay through the engine packet for packet;lab/elytra.sh. - 26.1 riptide in the client: releasing a riptide trident after at least 10 ticks in water
or rain launches the player like the real client (oracle-proven
modern::riptide, along the tick's look); a riptide trident has no use state out of water and rain; the rain comes from the weather game events, the spin pose from the server's living entity flags. 11 oracle riptide cases replay through the engine;lab/riptide.sh. Rain counts only where the biome rains (see the biome climate entry). Not known: touching an entity while spinning. - 26.1 biome climate (
ghast_world::climate, oraclebiome-climate,tests/golden/26.1/biome_climate.jsonl.gz):Biome.getPrecipitationAtwith the height-adjusted temperature (the fixed-seed temperature noises, the frozen-ocean modifier, the snow line), the vanilla climate of every 26.1 biome, andBiomeManager's zoom (zoom_cell); all positions and zoomed cells identical to the real classes. The 26.1Worldkeeps each biome registry entry's climate (from its data, or vanilla's for known-pack entries), the spawn info's hashed seed and sea level, and answersbiome_at,biome_climate,precipitation_at;World::set_biomesturns biome keeping on or off at run time. The client keeps biomes once a riptide trident is held (columns loaded before that count as raining until resent);WorldConfig::biomeskeeps them from the start. - 26.1 inventory routing for every predicted menu: configuration registry and tag bodies to the
inventory (kept raw until a screen needs them), mount screens with the entity's type and saddle /
body slots (from a minimal mount lookup that works without entity tracking),
TickContext::anvil_rename/select_loom_pattern/select_trade. - 26.1 boats in the client (oracle-proven
modern::tick_boat):set_passengersnaming the player boards a boat or raft (a right click on it with the crosshair on it, or the server's/ride); while riding, the client moves the boat with the movement keys and sendssteer_boat, the look,move_vehicle(andplayer_input/ sprint changes) in vanilla order; the server'smove_vehiclecorrection is answered at once; sneaking dismounts (server-side). Works without entity tracking for the bot's own boat (boats are known from their spawn and move packets, which are decoded only while some boat is known); other boats and mobs collide with it only withInterests::ENTITIES. The boat the player left stays where it was driven.TickContext::vehicle/is_riding,Vehicle,Outbound::VehicleMove/SteerBoat. 12 hand-written and 100 fuzz cases oftests/golden/26.1/boats.jsonl.gzreplay through the engine (72 of them also without entity tracking). - 26.1 minecarts in the client (oracle-proven
modern::tick_passenger):set_passengersnaming the player on a minecart seats it; each tick the cart ticks first (its interpolation of the server's moves,Tracker::tick_early), then the passenger on its seat, sendingplayer_inputand the look as vanilla. Without entity tracking a small tracker of the vehicles only (boats and minecarts) keeps the cart's position; it replaces the boats' spawn-position bookkeeping. Riding anything else (living mounts) keeps the walking player of 0.4.0 (no mount physics before 0.4.2). 5 hand-written and 100 fuzz cases oftests/golden/26.1/minecarts.jsonl.gzreplay through the engine, with and without tracking. - 26.1 entity collision and pushing in the client (with
Interests::ENTITIESonly): the player collides with boats, rafts and living shulkers (modern::tick_in, boxes ingetEntitiessection order), and after its tick the tracked mobs and boats push it (modern::push_by, each with its box after its own tick), as the real client does. 13 hand-written and 9 fuzz cases oftests/golden/26.1/entities.jsonl.gzreplay through the engine packet for packet. Without entity tracking the bot neither collides with nor is pushed by entities (no cost; a server-side anticheat may then flag walking into a boat or a crowd). Team collision rules (set_player_teamcollisionRule, decoded only with entity tracking: the team name, rule and members) decide each push likeEntitySelector.pushableBy; other players' teams needInterests::PLAYER_LIST(their scoreboard names); the team rules are unit-tested against the decompiled predicate and lab-tested, not oracle-proven. Pushes and collision boxes follow the client's tick order (Tracker::tick_seq): entities that tick before the player (or before the vehicle it rides) tick first and push before its tick. Not modelled: an open or scaled shulker's box (the closed shell is used), the happy ghast; tick order of passengers (the tracker does not place them on their vehicles).
Changed (behaviour)
- 26.1 world border collision follows the real client: the border's lerp advances once per
client tick after the entities (
modern::BorderStatein the 26.1World), and collision reads the size from before the last step; it used to move with wall-clock time. Oracleborderandnethercases (4 + 43 fuzz each) replay through the engine. - 26.1
start_configurationnow followshandleConfigurationStart: a pending chat acknowledgement is sent beforeconfiguration_acknowledged, and the level (world columns, tracked entities) is dropped right away instead of at the next join. - 26.1 commands whose parse reaches a
minecraft:messageargument (/msg,/say,/me,/teammsg…) are sent aschat_command_signedlike vanilla (without signatures when there is no chat session, e.g. offline mode); other commands staychat_command. - A server transfer ends the session (
SessionEnd::Transferred) instead of being ignored. - 26.1 item use: whether an item has a use state comes from its components (
item_use: duration > 0, food only below a full bar unlesscan_always_eat), the item'suse_effects(can_sprint,speed_multiplier) drive the movement while using, and the use stops when the used hand no longer holds that item. The client writes the swings of a dropping click (ContainerClick::swings) before thecontainer_click, and letsupdate_recipes,abilitiesandexperiencethrough to the inventory. - 26.1 clicks: the changed slots are written in the real client's map order and each hashed stack's components in type id order (both are maps the server compares by content); bundle clicks, crafting results and the other menus above are predicted instead of sent unpredicted.
- The plain 26.1 tick (
modern::tick) compiles to the code it had in 0.4.0 again: the extensions are a compile-time type (instructions per tick at or below 0.4.0's in the tick benchmarks).
Fixed
- 26.1: the player kept still in a column that is not loaded; since the level-load gate the real client ticks it there too (the blocks read as void air).
- 26.1:
use_itemcarried the previous tick's look instead of the rotation of the tick's movement packet (what the real client sends); Grim flags it as BadPacketsJ when an item is used while turning. 1.8.9 / 1.12.2 / 1.16.5 use packets carry no rotation. - 26.1 world border collision: each bound is clamped to ±29,999,984 on both sides, and a border
clamped to a sliver collides as
Shapes.INFINITY(it blocked movement before). - 26.1: a smithing table has 4 slots (template, base, addition, result), not 3; crafting grids, the crafter and result slots no longer cap stacks at 99 when the server sets them.
oracle/run.sh golden --out DIRnow writes intoDIR(it used to ignore the flag and overwritetests/golden/<mc>/).
Known approximations
- Team collision rules: unit-tested against the decompiled predicate and lab-tested, not
oracle-proven. Other players' teams need
Interests::PLAYER_LIST. - Shulkers collide as a closed shell (an open lid or a scaled shulker is not modelled); the happy ghast does not collide.
- Living mounts (horses, pigs, striders, camels …) are not simulated: the client keeps its walking physics while on one (0.4.2).
- The tick order of passengers (the tracker does not place them on their vehicles).
- Biome lookup inside a loaded column and sky light for rain are not oracle-proven (the climate, temperature noise and zoom are).
- Incoming signed chat messages are not verified; the online-mode path is tested against a local stand-in of the account services, not real accounts.
- 26.1 riptide: touching an entity while spinning is not modelled.
Memory
Idle AFK bot, x86-64, release profile, 2026-11-12 (kB; 0.4.0 → 0.4.1, two runs each):
| build | VmRSS | private dirty |
|---|---|---|
| all versions, on 26.1 | 7,296 → 8,028–8,140 | 2,292–2,328 → 2,216–2,220 |
| all versions, on 1.8.9 | 6,912–7,168 → 6,912–7,296 | 2,452 → 2,316 |
26.1 only (--no-default-features --features v26_1,libdeflate) | — → 6,436–6,444 | — → 1,788–1,792 |
1.8.9 only (--features v1_8,libdeflate) | — → 4,992 | — → 1,616 |
Per-process private memory is lower than in 0.4.0: the inventory and data tables no longer hold load-time relocations, the idle heap keeps less. Resident shared code is higher (~0.9 MB on 26.1 with every version compiled in: the code of this release's mechanics); it is file-backed and shared between processes running the same binary, and a single-version build avoids it. A non-PIE build (README) lowers private memory further (about 1.4 MB).
0.4.0
Minecraft 26.1 (protocol 775) is the fourth supported version, built on a shared infrastructure that is meant to carry every later version: one generated definition per packet layout shared across versions, a version table, capability rows in the client instead of version checks, and one cargo feature per version in every crate. Block-breaking time and the crosshair pick now come from tables and code proven against each version's real client, which changes packet timing on several blocks (see Behaviour changes). The item model is shared: a stack carries legacy NBT or 26.1 data components behind one type.
Breaking changes / migration
See Migrating from 0.3 in the README for a short checklist; the full list:
- Cargo features per version in
ghast,ghast-client,ghast-protocol,ghast-data,ghast-world,ghast-physics,ghast-entityandghast-inventory(default: every version). Withdefault-features = false, enable the versions you use:v1_8,v1_12_2,v1_16_5,v26_1onghast/ghast-client/ghast-protocol;v1_8,v1_12,v1_16_5,v26_1on the data / world / physics / entity / inventory crates. AGameVersionwhose feature is off returnsClientError::VersionNotEnabled.ghast-ext(v1_8,v1_12_2,v1_16_5,v26_1) andghast-pathfinder(v1_8,v1_12_2,v1_16_5) have them too (default: all); each publishable crate builds on its own with any one version (checked byscripts/feature-matrix.shin CI). - ghast-pathfinder
Version: the variants exist only with their feature, andFrom<GameVersion>is replaced byVersion::from_game(v) -> Option<Version>(it mapped 26.1 to 1.16.5); theFollowerfails with the newFollowError::UnsupportedVersionon 26.1. - ghast-ext item / block / entity names and ids on 26.1 use the 26.1 tables (they used the 1.16.5 ones).
display-namesfeature (default on) inghast-data,ghast-clientandghast: the English display-name fields of the data records exist only with it. Registry names are always there. Builds withdefault-features = falsethat read display names must enable it.- ghast-inventory
Stack: the fields are private. Read them withid(),count(),damage(),data()/nbt(); build stacks withStack::new(id, count, damage)andwith_nbt,with_damage,with_count,with_data. The NBT field becamedata: ItemData(ItemData::None,ItemData::Nbt(RawNbt), and withv26_1ItemData::Components(..));stack.nbt()still returnsOption<&RawNbt>.stacks_equal/nbt_eqare unchanged. Inventory::newreturnsResult<Inventory, VersionNotEnabled>(it panicked for a version whose feature is off):Inventory::new(v)?or.expect(..).Outgoing::to_v1_8returnsOptionliketo_v1_12_2/to_v1_16_5;Nonefor the new 26.1Outgoing::ContainerClick.- ghast-protocol packet types are type aliases of shared generic definitions
(
v1_8::play::serverbound::WindowClick=defs::p47::play::serverbound::WindowClick<47>). Struct literals, patterns,decode_as::<cb::X>()andwrite_packet(&sb::X { .. })work unchanged; docs and error messages show thedefs::…path. A nested or named type that is identical in two versions is now one Rust type, so a downstream trait implemented for both would conflict. ghast_protocol::Versionis sealed (only ghast-protocol's version markers implement it, so later versions can add items without a break) and has new items (INFO,ConfigurationClientbound,ConfigurationServerbound);State::Configurationis new, soState::Play as u8changed (do not rely on such casts).- ghast-client:
MovePacketgainedhorizontal_collisionin every variant and is#[non_exhaustive];Teleportgainedrelativeanddelta(andDefault);Inbound::Respawngainedkeep; newInbound/Outboundvariants and the newConfigInbound,ConfigOutbound,KnownPack,AttributeUpdate,LoginInbound::CookieRequest;ChatMessagehas a private field (build it withChatMessage::from_json/from_text);BlockQuery/HeldItemgained crate-private fields;WorldViewgained a defaultedcrosshairmethod. The sealedClientVersiontrait changed (not implementable outside the crate).hands::pick_entityis gone (the crosshair is one block-and-entity pick now,TickContext::target/target_entity, built onghast_physics::pick::<version>::pick_target), and so isCapabilities::entity_pick_border. #[non_exhaustive]so that these types can grow in patch releases. Amatchon one of the enums needs a_ =>arm; the structs are read as before but cannot be built with a struct literal outside their crate:- enums the library returns or that will grow:
ghast_inventory::{Click, ClickOutcome},ghast_world::Applied,ghast_inventory::{ItemText, EnchantmentId},ghast_world::v26_1::BiomeSection,ghast_world::paletted::Section; - output-only structs:
ghast_inventory::{ClickPacket, Events, ContainerClick, Enchantment, VersionNotEnabled},ghast_world::{Border, v26_1::{Registries, Dimension, DimensionType}},ghast_protocol::frame::DecoderStats,ghast_client::version::Capabilities,ghast_protocol::versions::ProtocolVersion. ghast_inventory::ClickResultis#[non_exhaustive]; build one with the newClickResult::new(window_id, action, outcome)(tests and replays).
- enums the library returns or that will grow:
- New variants in already open enums:
GameVersion::V26_1,ghast_inventory::Version::V26_1,ghast_protocol::State::Configuration,Outgoing::ContainerClick.
Behaviour changes
- Block-breaking time is oracle-proven on every version. The client computes per-tick
destroy progress with each version's own tables and code, taken from the vanilla jar and
replayed bit for bit against the real client (
ghast_data::{v1_8, v1_12, v1_16_5, v26_1}::dig); 0.3 used minecraft-data's hardness / tool tables, which are wrong for some blocks. Changed break times (empty hand, diamond tools, shears):- 1.8.9 (25 block / tool pairs): mushroom blocks are no longer instant (6 ticks); cactus with an axe or sword is slower; snow layers (20 → 10 ticks) and lily pads (instant) are faster.
- 1.12.2 (187 pairs): were too fast in 0.3 — shulker boxes without a pickaxe (60 → 200 ticks), double stone slabs and non-oak fence gates (were instant), mushroom blocks, cactus with an axe, leaves with an axe, hardened clay with a shovel, grass paths; the moving piston is unbreakable. Were too slow — a pickaxe on purpur, end bricks, magma, red nether brick, bone blocks, observers, shulker boxes and hardened clay; ladders and chorus with an axe; leaves with shears; snow layers.
- 1.16.5 (233 pairs): were too fast in 0.3 — stone-type stairs and slabs, the blackstone family, bells and stonecutters without a pickaxe (45 → 150 ticks by hand), wooden slabs and pressure plates with a pickaxe, the conduit (12 → 90), leaves with an axe. Were too slow — a pickaxe on shulker boxes, purpur, bone blocks, blue ice and blackstone (45–84 → 6–11 ticks); conduit power is now applied. A break that used to finish too early could trip an anticheat's fast-break check; these now match vanilla.
- Crosshair picks are oracle-proven on every version (
ghast_physics::pick): the block and the face / cursor position sent withuse_item_on/block_digfollow vanilla's ray shapes. Changed against 0.3: 1.8.9 — the moving piston (piston_extension) is no longer targetable; 1.12.2 — stairs (each part box), flowers (model offset), connected redstone wire and the moving piston; 1.16.5 — every non-cube block now uses vanilla's outline and interaction shapes instead of a union box (full cubes unchanged).ghast_physics::pickalso picks entities with vanilla's entity loop (all four versions, oracle-proven), and the client uses one pick for block and entity likeGameRenderer.updateTargetedEntity: an entity hit beyond 3 blocks but before the block is now a miss (it used to dig the block behind it), and entity boxes grow by their type's targeting margin (Entity::targeting_margin). The pick is computed only on ticks with a mouse button down or when a behaviour asks for the target, at the same point and from the same state as before, so packets do not change. - Disconnect: quitting half-closes the socket and drains it like vanilla, so servers log "Disconnected" instead of "Connection reset by peer".
Minecraft 26.1 (protocol 775)
26.1, 26.1.1 and 26.1.2 (same protocol, identical oracle records): GameVersion::V26_1,
--version 26.1.2. Lab: Paper 26.1.2 + Grim 2.3.74, 0 flags (AFK, movement course, chat,
dig + place, chest clicks).
- ghast-protocol:
v26_1(featurev26_1), all five states including configuration (known packs, registry data, resource packs, cookies; reconfiguration not tested live), 257 packets; data components in slots, read lazily (types::slot::v775: zero-copy component patch, structural skip);nbt::AnonNbt,types::{Holder, HolderSet, LpVec3, chunk}; the version tableghast_protocol::versions. Checked against a live server capture (every packet decodes strictly and re-encodes identically) and Mojang's packet report. - ghast-data:
v26_1: block states, voxel shapes, movement records, items, dig facts and entity sizes from the 26.1 jar; property maps checked against Mojang's block report. - ghast-world:
v26_1::World: dimension heights from the configuration registries, power-of-two packed sections (about the wire size in memory), chunk batches with vanilla's batch-size calculator, block entities, the world border; decoded worlds checked block by block against a second decoder and against a live server. - ghast-physics: one modern physics core with the 26.1 rule set (attributes, powder snow, supporting block, teleports with delta movement), 0 diffs against the 26.1 oracle.
- ghast-inventory: windows and clicks with hashed stacks (vanilla
HashedStack), every component kind a client can receive hashed like the real client (4000 oracle stacks byte-identical; a live session of 129 stacks drew no correction); click results by settle ticks / corrections (26.1 has no confirm); item accessors over Mojang's item defaults. - ghast-client: 26.1 sessions end to end (configuration, chunk batch acks, player input,
tick end, block sequences), the oracle-verified pick with vanilla's eye lerp and interaction
range attributes, entity tracking with entity picks and attacks. The level-load gate
(
player_loaded) isghast_physics::modern::LoadGate, replayed against the oracle's 27 joins (incl. joining dead); it opens once the player's column and the eight around it have been loaded for two ticks (vanilla's first section compile needs them). Opening it on the player's own column, as an earlier build did, drew Grim flags when logging in above the ground. - Not yet on 26.1: path finding, the viewer, signed chat, online mode (untested).
Added in the other crates
- ghast-entity:
v26_1::Tracker(featurev26_1): every 26.1 entity packet parsed by hand, the client's entity tick (interpolation steps, head lerps, body rotation, deferred resizes, chunk ticking), passengers, tab list; replayed against the realClientPacketListenerat 0 diffs.Tracker::mark_column_loaded/mark_column_unloadedfor a tracker started late,Entity::targeting_margin. Entities of the older versions stay 232 bytes with 26.1 compiled in. - ghast-data: per-version
digmodules (v1_8,v1_12,v1_16_5,v26_1): destroy progress from the jar's block and tool tables; selection / outline / interaction shapes for the crosshair (v1_8::Block::selection, 26.1outline_shape,interaction_shape, …); 26.1 posed entity dimensions; thedisplay-namesfeature. - ghast-physics:
pick(crosshair rays and entity picks for every version),modern(the 26.1 player core,modern::LoadGatefor the level-load gate,modern::no_block_collision), one feature per version.
Shared infrastructure
- ghast-protocol codegen emits each packet layout once and shares it between versions with the same layout (−20 % generated code before 26.1); a JSON-pointer patch layer corrects minecraft-data where it disagrees with vanilla (each patch asserts the value it replaces, so a stale patch fails the build).
- ghast-client reads a capability row per version (
GameVersion::caps()) instead of comparing versions; engine cost per tick unchanged. - Item model (
ghast_inventory::ItemData): oneStackfor NBT and components; accessors (item_name,max_stack_size,max_damage,damage_value,unbreakable,custom_name,lore,enchantments,potion, …) answer per version.
Performance
- 1.8 / 1.12
window_itemscompares each slot before converting it (−17 % instructions on a 90-slot shop window), and the 1.8 crafting-grid result is memoised per grid (a player-windowwindow_items142k → 9k instructions). - The client no longer links decoders and encoders of packets it never handles (−5 % binary).
afkexample, stripped, release profile: 5.3 MB with every version; 1.9 MB with 1.8.9 only, 1.9 MB 1.12.2, 2.6 MB 1.16.5, 3.3 MB 26.1.
Verification (at release time)
- Cached oracle fuzz: 16.9 M ticks, 0 diffs (1.8.9 4.16 M, 1.12.2 4.16 M, 1.16.5 4.40 M, 26.1 4.20 M); crosshair: 400 000 cached rays (1.16.5, 26.1) and 240 000 cached picks (1.8.9, 1.12.2) bit-identical; click vectors for 1.8.9 / 1.12.2 / 1.16.5 with 0 diffs; 26.1 entity tracking against the real client: 51 728 ticks (211 362 packets, 8.96 M fields) equal; the 27 oracle joins through the level-load gate bit-identical; 26.1 click hashes: 4000 oracle stacks byte-identical.
0.3.0
Minecraft 1.12.2 is the third supported version (the same bot runs on 1.8.9, 1.12.2 and 1.16.5), the path finder jumps gaps and solves mazes, and the public enums and tables that grow with every Minecraft version are now open-ended, so that future versions (1.9 – 1.12.1, 1.13+, 1.21.x, ...) can be added in patch releases without breaking anyone.
Breaking changes / migration
#[non_exhaustive]enums. Amatchon one of these outside its crate needs a_ =>arm (building values is unchanged):- versions and protocol:
ghast_inventory::Version,ghast_protocol::State(1.20.2 adds a configuration state);GameVersionandghast_pathfinder::Versionalready were; - block shapes and data:
ghast_data::{ShapeDependency, NeighbourShape, DigMaterial, VariantApplied}; - world:
ghast_world::{Biomes, BlockEntity, WorldError}; - physics:
ghast_physics::Packet(newer versions send movement input differently); - entities:
ghast_entity::{EntityType, EntityClass, MetaValue, Event}; - inventory:
ghast_inventory::{SlotKind, ClickError, Outgoing}; - path finding:
ghast_pathfinder::{Goal, MoveKind, NodeKind}; - ext:
ghast_ext::{BlockMatch, ItemMatch}; - viewer:
ghast_viewer::{tiles::Entry, protocol::TileKind, feed::Notice, replay::ReplayCmd}; - auth errors:
ghast_auth::{AddrError, ConnectError, CryptoError, ProxyUrlError, Socks5Error},ghast_auth::microsoft::{Stage, MicrosoftError, CacheError}.
- versions and protocol:
#[non_exhaustive]data records (read their fields as before; they cannot be built with a struct literal or destructured without..outsideghast-data):ghast_data::{BlockInfo, BlockPhysics, Collision, ItemInfo, EntityInfo, BiomeInfo, EnchantmentInfo, FoodInfo, EffectInfo}.- New variants:
GameVersion::V1_12_2,ghast_inventory::Version::V1_12,ghast_pathfinder::Version::V1_12,ghast_data::NeighbourShape::ChorusPlant. The version enums are ordered oldest first, soV1_16_5 as isizechanged; do not rely on such casts. GameVersion::ALLis a slice (&'static [GameVersion], was[GameVersion; 2]):for v in GameVersion::ALLbecomesfor &v in GameVersion::ALL;.iter(),.len()and.contains(..)work as before. Its length changes with every added version.- Packet id lists are slices (
&'static [i32], were fixed-size arrays):ghast_world::v1_*::{PACKET_IDS, BLOCK_ENTITY_IDS},ghast_entity::v1_*::{CORE_IDS, METADATA_IDS, EQUIPMENT_IDS, EFFECT_IDS, PLAYER_LIST_IDS}.filter.add(&CORE_IDS)becomesfilter.add(CORE_IDS),for id in PACKET_IDSbecomesfor &id in PACKET_IDS. - Behaviour:
GameVersion::V1_12_2now plans with the 1.12 rules inghast-pathfinder(it used 1.16.5 blocks and physics); a search out of nodes now returns a partial path instead ofPlanError::NoPath(seeSearch::exhausted).
ghast-world
- 1.8: a ground-up
map_chunkwhose data is only the 256 biome bytes (sent by some servers for an empty column, with section 0 still in the mask) loads an empty column with those biomes, without an error. It used to replay vanilla's failingfillChunk(128 block states read from the biome bytes,WorldError::Truncated, a warning in the client log); dropping those client-side garbage states is a deliberate difference from vanilla, the server never has them. Real truncations stay errors with vanilla's column-kept semantics. 1.12.2 (256 biome bytes) and 1.16.5 (no section data) handle the equivalent packet the same way. A ground-up chunk with an empty mask still unloads the column on 1.8. - The client's "bad world packet" warning no longer claims the column was unloaded (1.8 keeps what vanilla keeps).
Minecraft 1.12.2 (protocol 340)
A third supported version, end to end: the same bot runs unchanged on 1.8.9, 1.12.2 and 1.16.5
(GameVersion::V1_12_2, --version 1.12.2 / 340). Structured as the first member of a
1.9 – 1.12 family (shared chunk format, physics rules and pre-flattening block ids), so 1.9 –
1.12.1 can follow as small deltas.
- ghast-protocol:
v1_12_2(featurev1_12_2), generated from minecraft-data; byte-exact against node-minecraft-protocol in both directions. - ghast-data:
v1_12(featurev1_12): blocks, items, entities, biomes, effects, enchantments, foods. Every collision box, per-state shape flag (normal cube, full cube, …), material, ray-test bound and 1.12 face shape (what fences, walls and panes connect to) comes from the vanilla 1.12.2 oracle.NeighbourShape::ChorusPlantis new. - ghast-world:
v1_12::World: 1.9 – 1.12 paletted sections (values spanning longs, the 13-bit global palette), light, biomes, block entities,unload_chunk, block changes, explosions, world border. - ghast-physics:
v1_12: vanilla-exact 1.12.2 player movement, 0 diffs against the oracle (122 scenarios, the committed fuzz, and 4.16 M ticks of randomized fuzz). What changed since 1.8.9 is in the crate README. - ghast-inventory:
Version::V1_12: vanilla 1.12.2 click prediction (offhand slot 45, shield shift-click, damage-value stacking, server-side crafting results), 0 diffs against the oracle's click vectors. - ghast-entity:
v1_12::Trackerwith vanilla 1.12.2 position fixed-point rules, 1.9+ metadata, passengers, one-slot equipment. - ghast-client:
GameVersion::V1_12_2,GameVersion::combat_1_9(); teleport confirms, 1.9+ hands (swing after the click, off hand), attack cooldown, no idle on-ground packets. - ghast-ext: block / item / entity names for 1.12.2.
- oracle:
MC=1.12.2 oracle/run.sh …(vanilla 1.12.2 + Legacy Yarn 1.12.2+build.604, fetched at run time), golden vectors intests/golden/1.12.2/. - lab:
lab/start.sh 1.12(Paper 1.12.2 build 1620 + GrimAC 2.3.73, Java 17, port 25612).
ghast-pathfinder
- 1.12.2:
Version::V1_12(GameVersion::V1_12_2maps to it; it used to plan with 1.16.5 blocks and physics): block classes from the 1.12 data, move costs and the gap-jump table measured in the 1.12 physics, the whole validation suite run on it. - Gap jumps (parkour) over 1–3 blocks on the level, onto a block one higher (also over 3) or
one or two lower, and over 4 when landing two lower; from and onto 1×1 pillars, no run-up
block needed. Each jump is offered only where the vanilla-exact physics lands it: a table
measured on canonical terrain with the controller's exact key policy from 153 start states
(
src/jump_table.rs, regenerated by an ignored test), with every cell the body sweeps checked free in the world (and, up to the landing, nothing within 0.3 under the body and no soul sand / honey half a block under the feet, whose velocity multiplier 1.16 applies even in the air); before each jump the controller runs it once more in the physics from its actual state, jumps only if it lands, and then replays exactly those keys. - Mazes: the default node budget is 250 000 (was 100 000), enough for all terrain a client
loads at view distance 10; search records are half the size and the block cache faster
(~25 % more nodes per second). A search out of nodes with nothing closer than the start
returns a partial path to its most promising frontier node instead of
NoPath. Search::exhausted(): whether the search expanded everything reachable (a partial result is then final for the loaded terrain).Follower: an unreachable goal (e.g. a flying player) ends after one search, at the block closest to it, withNoPath(no second full search). Partial-path replans count againstmax_replansunless they get closer to the goal, so a capped search cannot wander forever.- Controller: brakes before a wall instead of sliding along it at corners of narrow corridors.
ghast-ext
Bot::follow_path/follow_path_with: follow an entity along planned paths (mazes, gaps, walls);Bot::followstays the straight-line walker.
0.2.3
Additive: one new crate, behind a facade feature (the default build is unchanged).
ghast-viewer (new)
- Bot screen: a live 3D view of the bot's world in the browser (WebGL2: terrain, entities,
players with skins and armour, particles, weather, the HUD) in first person, third person or
a free camera. Read-only: it watches
after_tickand never writes to the game connection. - Costs nothing while nobody watches; per-bot HTTP / WebSocket server on loopback by default, optional token, idle stop.
- Recordings (
FeedRecorder), a dash cam that saves the last minutes on demand (DashCam), and replays on the same page. - Textures and models are built at run time from the vanilla client jar, downloaded from
Mojang's servers into a git-ignored cache (feature
download, on by default) or read from a local copy. No game assets are in the repository or the crate. - Only 1.8.9 sessions are drawn for now.
- The built web client (
web/dist) is committed, socargo buildneeds no Node.
ghast
- New feature
viewer: re-exportsghast-viewerasghast::viewer. Not enabled by default.
0.2.2
Additive: two new crates, behind facade features (the default build is unchanged).
ghast-pathfinder (new)
- A* over feet blocks with move costs measured in
ghast-physicsper version: walks (step-ups and drops up to 0.6: slabs, soul sand), diagonals, jumps up, drops (fall-damage free by default, deeper into water), 1- and 2-block gap jumps, swimming, ladders / vines (also onto a ladder from above), opt-in digging and hole filling. Unloaded blocks are never air: goals beyond them give partial paths. Controller: per-tick aim and keys with physics look-ahead (last-moment edge jumps, landing control, never stepping off the floor where the path does not go);simulateruns a path in the vanilla-exact physics, turning like the client;plan_verifiedplans around moves the simulation fails.Follower(featureclient): plans, follows and replans fromBehavior::tickthroughTickContextonly.- Validated on fake worlds for both versions (every move type, 96 fixed random terrains); 1.8 lab run: 63 legs, 0 Grim flags. Planning: ~0.3 ms for 100 blocks of open ground, ~57 ms for a 193-step detour through rough terrain.
- Incremental planning:
Pathfinder::searchreturns a resumableSearchwhosestep(world, Budget)expands at most a node / time budget;Simulationrunssimulatein slices. Both give exactly the one-shot results. TheFollowerplans and verifies across ticks withinFollowConfig::budget(default 2000 nodes / 5 ms per tick) andverify_ticks, standing still meanwhile; a 193-step detour plans in 14 ticks of at most ~5 ms instead of one 57 ms tick.Follower::is_planning,Follower::plan_ticks.
ghast-ext (new)
Ext, aBehaviorwith a tick-driven executor: write bots as sequential async code (Bot::withruns a closure in the tick, before the movement packet). Helpers for looking, digging, placing, using items, attacking, equipping, window clicks, containers, block / entity search, chat, commands, events and walking;gotowith ghast-pathfinder (featurepathfinder, default on).
ghast-client
TickContext::item_facts(&Stack): the hands' version facts of any stack (block item, food, usable, tool speeds).TickContext::dig_speed(pos, Option<&Stack>): the left button's per-tick break progress of a block with a given stack (tool, efficiency, haste / fatigue, water, on ground).
ghast
- Features
ext(ghast::ext) andpathfinder(ghast::pathfinder); examplegoto.
0.2.1
Additive fixes: public types that downstream crates could not name are now exported.
ghast-client
- Fix:
TickViewwas not exported, so no crate outside ghast-client could implementBehavior::after_tick. It is nowghast_client::TickView(andghast::TickView). - Fix:
TeleportEvent(the element type ofTickEvents::teleports) is now exported. TickView::dimension()andTickView::using_item(), as onTickContext.
ghast-world
IndexedandDirect, the boxed section storages insideSection, are now exported (opaque types).
All crates
- The
unnameable_typeslint is enabled (warn; CI denies warnings), so a public type that cannot be named from outside its crate fails the build.
0.2.0
Breaking: public configuration and event structs are now #[non_exhaustive]; build the
configuration structs with Default + with_* builders (WorldConfig, ghast_entity::Config,
ClientSettings). Future fields will not be breaking changes.
ghast-client
- Observers:
Behavior::after_tick(&TickView)runs after every movement step with a read-only view (the pose sent this tick, world, entities, inventory, events). WorldView::column(cx, cz)returns a whole stored column;ghast::worldis re-exported.Client::world_config(..)opts into light, biomes and block entities.TickContext::swings()counts every arm swing sent.Interests::ENTITIES/PLAYER_LISTcan change mid-session; newInterests::PLAYER_SKINS.
ghast-world
- Opt-in block-entity store (
WorldConfig::with_block_entities): signs and tile entity data on 1.8, chunk block entities and tile entity data on 1.16.5;Column::block_entities().
ghast-entity
PlayerInfo::textures(skin property), opt-in viaConfig::with_skins.
0.1.3
ghast-client
- A malformed chunk packet no longer ends the session: the error is logged (rate-limited) and
play continues, as the vanilla client does.
ClientError::Worldis no longer returned. - Opt-in
GHAST_DUMP_BAD_CHUNK=<dir>writes the first rejected chunk bodies for bug reports.
ghast-world
- A truncated 1.8
map_chunknow leaves the world as vanilla's chunk fill does: a ground-up chunk keeps a loaded column, blocks are filled up to the last complete pair, light and biome arrays only when whole. (Seen on a real server's login lobby: mask 1 with only the 256 biome bytes.)
0.1.2
ghast-client
- Fix: after
TickContext::close_window()the client still treated the server-opened window as open, so held mouse buttons stayed blocked (no digging or placing) for the rest of the session. Closing a window on the client side now clears it, and the buttons follow the inventory's own screen state, as in vanilla.
0.1.1
ghast-client
Behavior::raw_packets: receive selected inbound frames undecoded inTickEvents::raw(capped per tick, overflow counted inraw_dropped).TickEvents::teleports: every server position packet in arrival order, with the pose that was sent just before it and the resolved pose after it.TickContext::last_inbound()andTickContext::planned_look().- Fix: holding the left button on an instantly breakable block could send two
START_DIGGINGpackets for the same position in one tick (flagged by Grim as AirLiquidBreak); the block is now predicted as air immediately, as vanilla does.
All crates
- Version bump only.
0.1.0
First release: 1.8.9 and 1.16.5 protocol, login (offline, Microsoft), SOCKS5, chunks, entities, vanilla-exact player physics, window click and crafting prediction, dig / place / use, and the fixed-tick bot API.