API docs

One WebSocket per fighting player. A JSON hello, then one binary frame of game state per tick in and one binary action per tick out. Everything is little-endian.

Reference client. mca_client.py is a complete client in standard-library Python (3.9+): the WebSocket, the frame encoder and the action decoder, about 300 lines. Port it to Java or anything else by following this page. For Java there is already a working Fabric mod that plays a model on your player and tests your key, the session and your latency: section 9.

1. Ask for a session, then connect to the GPU directly

Your client streams straight to the GPU that runs the models, so a frame and its answer cross the internet once. First ask the API for a session with your key (in the header, never in a URL). Send a User-Agent that names your client: requests carrying Python urllib's default one are refused by our CDN (error 1010).

Choose Europe (EU), North America (NA) or Asia for each API key on your account page. Existing keys use EU. The key determines the region; all regions share your credits and plan limits. Pro allows two bots to run together, in any regions. EU usually runs in a German datacenter, NA in a Texas datacenter, and Asia in a South Korean datacenter. GPUs are rented on demand from datacenters we do not own. When every GPU at a region's usual site is taken by other renters, your session starts at the next datacenter in the same region instead, which can add delay. For EU that is another European datacenter (currently Ireland or Czechia), for NA another US or Canadian datacenter; Asia has none, so it waits or reports gpu_unavailable. Asia’s GPUs cost about 2.6 times as much, so a minute there costs 1.5 times the model’s credits (the session reply’s credits_per_min shows the rate you are paying). Changing a key’s region ends its sessions; reconnect to get a new regional ticket.

POST https://minecraftcombatai.com/api/v1/session
Authorization: Bearer mca_live_…
{"model": "v32"}

While a GPU is starting you get 202 with retry_after seconds; ask again until you get 200:

{"url": "wss://85.10.218.46:37081/v1/stream",
 "cert_sha256": "9f2c…", "ticket": "eyJ2Ijox…", "session": "…",
 "expires_in": 60, "credits_per_min": 1.0, "region": "eu"}

Pin the certificate. The GPU presents a certificate made for that rental, which no public authority signed. Connect with TLS 1.3, compute the SHA-256 of the server's certificate (DER bytes) and close the connection unless it equals cert_sha256, before sending anything. Then open the WebSocket and send the ticket within 60 seconds. A ticket works once. After ready, send a frame every game tick straight away: the server never speaks first, and a session with no frame within 15 seconds is closed.

{"type": "hello", "ticket": "eyJ2Ijox…", "client": "mymod/1.0"}
// -> {"type": "ready", "session": "…", "model": "v32", "frame_bytes": 221, …}

Java (inside your TrustManager's checkServerTrusted):

byte[] der = chain[0].getEncoded();
String got = HexFormat.of().formatHex(MessageDigest.getInstance("SHA-256").digest(der));
if (!MessageDigest.isEqual(got.getBytes(), pin.getBytes()))
    throw new CertificateException("GPU certificate does not match the pin");

Models: v32, reforge, v29 (Pro), and crystal (its own frame, section 7).

2. Each tick: frame in, action out

Send one 221-byte binary message per game tick with the state as your client sees it at the end of that tick; the reply is a 16-byte binary message. Apply it during the next tick. Send ticks in order with a strictly increasing tick, and do not wait for a reply before sending the next frame: replies come back in order, tagged with their tick.

OffsetFieldTypeMeaning
0pos x, y, z3 × f64Your position, world coordinates
24prevPos x, y, z3 × f64Your position last tick (vanilla xo/yo/zo). Must equal the previous frame's pos
48motion x, y, z3 × f64Your velocity, blocks per tick
72yaw, pitch2 × f32Your view angles in degrees
80healthf32Your health, 0–20
84fallDistancef32Blocks fallen since last on ground
88saturationf32Food saturation
92hurtTimei32Ticks of hurt animation left (10 → 0)
96jumpTicksi32LivingEntity.noJumpDelay (10 after a jump, counts down)
100foodLeveli32Hunger bar, 0–20
104attackStrengthTickeri32Raw ticks since your last swing (not the 0–1 scale)
108onGround, sprinting, sneaking, collidedHorizontally4 × u80 or 1. sneaking is the crouching pose
112oPos x, y, z3 × f64Opponent position as rendered
136oPrevPos x, y, z3 × f64Opponent position last tick
160oMotion x, y, z3 × f64Opponent velocity as your client knows it
184oYaw, oPitch2 × f32Opponent view angles
192oHealthf32Opponent health as visible to you; send 20 if the server hides it
196oHurtTimei32Opponent hurt animation ticks
200oOnGround, oSprinting, oSneaking, oSwinging, oCrouchPose5 × u80 or 1
205ticki32Game tick, strictly increasing
209pingMsi32Your ping to the game server
213sensitivityf32Mouse sensitivity option, 0–1 (0.5 if not applicable)
217lastAttacku81 if you actually swung last tick
218padding3 × u8Zero
OffsetFieldTypeMeaning
0ticki32The frame this answers; drop replies more than two ticks old
4yawDelta, pitchDelta2 × f32Degrees to turn this tick. Apply verbatim
12keysu8Bits: 0 forward, 1 back, 2 left, 3 right, 4 jump, 5 sprint, 6 sneak, 7 attack
13padding3 × u8Zero

3. Control messages

{"type": "new_fight"}      // new opponent: clears the model's memory of the last one
{"type": "ping", "t": 123}  // answered with {"type": "pong", "t": 123}
{"type": "bye"}            // end the session

The server may send {"type": "balance", "credits": 41.5} about once a minute, and always sends {"type": "error", "code": …, "message": …} before it closes a session.

4. Errors

  • unauthorized, rate_limited: bad key, or too many attempts from one address.
  • plan_required, concurrency, daily_cap, premium_cap, insufficient_credit: limits of your plan.
  • bad_frame: wrong size, a value out of range, or a tick that did not increase.
  • not_driving: your turns do not follow the model's. Apply the deltas verbatim.
  • synthetic_state: frames are not continuous; prevPos must equal the last frame's pos.
  • gpu_unavailable, gpu_lost, unavailable: ask for a new session after a short wait.
  • ticket_expired: the ticket is older than 60 seconds or was already used; ask for a new session.
  • region_changed: the key’s region changed; ask for a new session.
  • session_limit: sessions last two hours; reconnect to continue.
  • no_frames: no frame within 15 seconds of ready. Start sending the tick after ready; the server never speaks first.
  • idle_timeout: no frame for 30 seconds mid-session; reconnect when you send again.
  • low_rate: fewer than 5 frames a second over a minute. Send one every game tick while connected (control messages do not count).
  • keepalive (HTTP 429): in the last 3 hours your sessions held a GPU for over an hour with nobody else streaming on it while using almost no credits (short or empty sessions). New sessions pause until the time in the message. Sessions that stream normally for 20 seconds or more never trigger this.
  • idle_sessions (HTTP 429): your last few sessions sent no frames, and each one kept a GPU running. New sessions pause for 5 minutes, doubling up to an hour; the message gives the time. One session that really streams clears it.
  • cold_start_limit (HTTP 429): starting a GPU costs us money before any credit is spent, so an account's last two GPU starts must be followed by at least 5 credits of play before it can start another. You can always join a GPU that is already running; the message says when you may start one again.

A session that never connects ends as ticket_unused. Your account page says why under it: the GPU reports whether your client rejected its certificate (pin cert_sha256 as above instead of checking it against a CA), spoke plain HTTP or ws://, used TLS older than 1.3, sent no hello, or never reached it at all (the url is an IPv4 address and port; check firewalls and VPNs).

5. Limits

  • At most 20 frames a second per session, with a small burst allowance.
  • Starter: one session at a time, two hours a day. Pro: two sessions, three hours a day, ten hours of V29 a month.
  • Credits are charged per frame actually answered. Waiting for a GPU is free.

6. Example

import time
from mca_client import Client, Frame

with Client("mca_live_…", model="reforge") as bot:     # session + pinned TLS + ticket
    next_tick = time.monotonic()
    while in_fight():
        state = read_game_state()                       # your code
        bot.send(Frame(pos=state.pos, prev_pos=state.prev_pos, …, tick=state.tick))
        next_tick += 0.05
        for action in bot.poll(next_tick):              # replies that arrived this tick
            if not isinstance(action, dict):
                turn(action.yaw_delta, action.pitch_delta)  # your code
                press(action.keys)                          # your code

7. Crystal models

crystal (Crystal R1, 1.5 credits a minute, any paid account) plays crystal PvP: end crystals, respawn anchors, totems, pearls, the elytra and the mace. It takes a bigger frame, 2592 bytes, because the model needs the blocks around you; the session's frame_bytes says which a model takes. Everything else (session, ticket, pinning, control messages, errors) is the same. The model has memory: send {"type": "new_fight"} whenever the opponent changes, so it does not carry the last fight into the next.

Terrain. Map every block to an id: 0 air (and anything you can walk through), 1 bedrock, 2 stone and every other full solid block, 3 dirt or grass, 4 obsidian or crying obsidian, 5–9 a respawn anchor with charge 0–4, 10 fire. The cube covers every block the crosshair and the placement checks can reach. A column top is the highest solid block (not air, not fire) at or below floor(your Y) + 4, looking at most 40 blocks below your feet; if none is found it is the first block below that range. Both grids scan from your feet, including the five columns around the opponent. The reference client's CrystalFrame.fill_terrain(block_at) does all of this from a single block_at(x, y, z) callback.

OffsetFieldTypeMeaning
0magicu320x3158434D (the bytes MCX1)
4ticki32Game tick, strictly increasing
8pingMsi32Your ping to the game server
12sensitivityf32Mouse sensitivity option, 0–1
16pos x, y, z3 × f64Your position, world coordinates
40prevPos x, y, z3 × f64Your position last tick; must equal the previous frame's pos
64motion x, y, z3 × f64getDeltaMovement()
88fallDistancef64Blocks fallen since last on ground
96yaw, pitch2 × f32Your view angles in degrees
104eyeHeightf32getEyeHeight() for your current pose (1.62 standing, 1.27 crouching)
108health, absorption2 × f32Health 0–20 and absorption hearts
116attackStrengthf32getAttackStrengthScale(0.5f), 0–1
120fireTicksi16getRemainingFireTicks()
122useTicksu16Ticks you have been using an item (0 when not)
124sinceTotemPop, sinceElytraDrop2 × u16Ticks since your totem popped / since you stopped wearing or flying an elytra; saturate at 1000
128hurtTime, foodLevel, rightClickDelay, invLock4 × u8Hurt ticks; hunger 0–20; vanilla rightClickDelay; ticks your inventory screen still owns the client (0 normally)
132usingItemu8Item id being used, 0 when not
133flagsu8Bits: 0 onGround, 1 fallFlying, 2 sneaking (isCrouching()), 3 sprinting, 4 the use click you actually applied last tick
134effectsu8Bits: 0 slow falling, 1 weakness
135selectedu8Selected hotbar slot, 0–8
136chestWorn, chestStowed2 × u8Item in your chest slot; the other chest piece you carry (chestplate if any, else elytra, else 0)
138offhandItem, offhandCount2 × u8Offhand item id and count
140hotbarItem[9], hotbarCount[9]18 × u8Hotbar slots 0–8
158backpackItem[27], backpackCount[27]54 × u8Inventory slots 9–35
212oPos x, y, z3 × f64Opponent position as rendered
236oPrevPos x, y, z3 × f64Opponent position last tick
260oMotion x, y, z3 × f64Opponent getDeltaMovement()
284oYaw, oPitch, oHealth3 × f32Opponent view angles and visible health
296oHurtTimeu8Opponent hurt ticks
297oFlagsu8Bits: 0 onGround, 1 sprinting, 2 sneaking, 3 swinging, 4 fallFlying, 5 elytra in chest slot, 6 shield raised (using a shield ≥ 5 ticks)
298oEffectsu8Bits: 0 slow falling, 1 weakness (visible particles)
299oMainItem, oOffhandItem2 × u8What the opponent holds in each hand
301crystalCount, blastCount, projectileCount3 × u8How many entries below are used (≤ 12, 4, 4)
304crystals[12]12 × (3 × f64, u8 own, 3 pad)End crystals you can see, nearest first; own = 1 if you placed it
640blasts[4]4 × (3 × f64, f32 radius, f32 damage, u16 age, 2 pad)Last explosions, newest first: centre, radius (6 crystal, 5 anchor), health + absorption it took from you, ticks ago
784projectiles[4]4 × (3 × f64, u8 type, 3 pad)Pearls (1) and arrows (2) someone else threw
896cubeX, cubeY, cubeZ3 × i32World position of the cube's first cell: floor(eye) − 6 on each axis
908cube1099 bytes13 × 13 × 13 block ids around your eye, 4 bits each, low nibble first; cell (x, y, z) is index (y·13 + z)·13 + x
2007colTop[169]169 × i16Column tops on the 13 × 13 columns around floor(pos), index (dz+6)·13 + (dx+6); value = top Y − floor(your Y)
2345colId[169]169 × u8Block id of each of those top blocks
2514foeTop[25]25 × i16Column tops on the 5 × 5 columns around floor(oPos), index (dz+2)·5 + (dx+2); value = top Y − floor(your Y)
2564foeId[25]25 × u8Block id of each of those top blocks
2589padding3 × u8Zero
OffsetFieldTypeMeaning
0ticki32The frame this answers
4yawDelta, pitchDelta2 × f32Degrees to turn this tick. Apply verbatim
12keysu8As for sword: 0 forward, 1 back, 2 left, 3 right, 4 jump, 5 sprint, 6 sneak, 7 attack (swing at whatever the crosshair is on: a crystal or the opponent)
13useu8Bit 0: right-click once this tick (place, charge, detonate, throw, fire). Bit 1: hold the use key (eating, shield, crossbow)
14slotu8Hotbar slot to select before acting, 0–8; 255 leaves it as it is
15inventoryu80 nothing; 1 the F key (swap main hand and offhand; sent when the held item is a totem and the offhand is not); 2 swap elytra and chestplate; 3 refill: offhand totem first, then each empty hotbar slot with what it held before, else totem, crystal, obsidian, golden apple, anchor, glowstone, pearl. 2 and 3 open your inventory for 5 ticks: report that countdown in invLock; replies are neutral until it ends
Item idItems
0empty
1sword (any)
2mace
3obsidian (incl. crying)
4end crystal
5respawn anchor
6glowstone
7totem of undying
8golden apple (incl. enchanted)
9firework rocket
10elytra
11chestplate (any)
12ender pearl
13axe (any)
14shield
15wind charge
16crossbow
17arrow (incl. tipped, spectral)
18pickaxe / shovel / hoe
19experience bottle
20potion (any)
21helmet (any)
22leggings (any)
23boots (any)
24building block (stone, cobblestone, dirt, netherrack, end stone, deepslate, gravel)
25container (chests, shulker boxes, barrel)
26glowstone dust
27spear
28bow
29cobweb
30utility (bucket, water bucket, book, player head, nether star, chorus fruit, bed…)
31anything else
from mca_client import Client, CrystalFrame, Crystal, item_id

with Client("mca_live_…", model="crystal") as bot:
    f = CrystalFrame(pos=…, prev_pos=…, motion=…, yaw=…, pitch=…, tick=…,
                     hotbar=[(item_id(s.id), s.count) for s in hotbar], …,
                     crystals=[Crystal(c.pos, own=c.id in my_placements) for c in near])
    f.fill_terrain(lambda x, y, z: block_id(world.get(x, y, z)))   # your mapping
    a = bot.step(f)
    turn(a.yaw_delta, a.pitch_delta); press(a.keys)
    if a.slot is not None: select(a.slot)
    if a.use: right_click()
    if a.inventory_op: inventory(a.inventory_op)

8. UHC models

uhc_v7 (UHC GRU v7) and uhc_gru (UHC GRU v1), 1.5 credits a minute each on any paid account, play UHC with the full kit: rod, bow, crossbow, shield, lava and water buckets, webs, blocks, golden heads and apples. v7 is the newer and stronger of the two; both take exactly the same frames and send the same replies, so switching is only the model id. Neither is the UHC BETA that comes with R1 RIVET and MONARCH, which is our first UHC model. Session, ticket, pinning, control messages, errors and the reply are the same as for crystal (section 7). The models have memory, and the frame below starts them fresh: there is no need for new_fight.

Frames vary in size. A UHC frame carries the arena once, at the start of each fight, and after that only what changed. The catalog lists frame_bytes: 0 for it. The ready message gives frame_limits (the smallest and largest frame accepted) and uhc, a set of numbers you build frames with: sim_center, stand_y, grid_y0, grid_h, the id table sizes, and parity and flags (flags bit 0: the model was trained with vanilla's player pushing on).

Arena coordinates. Every position is in a 64 × 64 arena frame. Choose an offset for the fight so that the fight area falls inside x and z 0–64 (the middle is sim_center) and the floor you stand on is at y = stand_y − 1. Then subtract that offset from every position you send. The arena grid covers grid_h (20) layers from y = grid_y0 up; above it is open sky.

PartFieldTypeMeaning
headertypei321 = arena frame: the first frame of a fight. It carries the whole grid and starts the model's memory over; its tick may start again. 2 = a tick
seq, tick, pingMs3 × i32Your frame counter (not checked); the game tick, strictly increasing within a fight; your ping
type 1 onlygrid81920 × u8Block ids of the 64 × 64 × 20 arena; cell (x, y, z) is index (y·64 + z)·64 + x, at world y = grid_y0 + y
changescount, then entriesi32, count × (3 × i16, u8 id, u8 0)Blocks that changed since the last frame, in arena coordinates (at most 1024)
youself[42]42 × f64See the next table
inventorykit[37]37 × (i16 item, i16 count)Hotbar slots 0–8, the offhand at 9, inventory slots 9–35 at 10–36
opponentopp[15]15 × f64Position x, y, z; health; absorption; fire ticks; in water, in lava, in a cobweb (0/1); the item they are using; its use ticks (a bow's draw); crossbow loaded; shield cooldown; main-hand item; offhand item
opponent, as renderedremote[15]15 × f64Position x, y, z; position last tick x, y, z; yaw; pitch; onGround; sprinting; sneaking; hurtTime; visible health (on servers that hide it, the name-tag health); swinging; swing time
counterstally[2][12]24 × i32Yours, then the opponent's: bow shots, crossbow shots, bow hits, crossbow hits, golden apples eaten, heads eaten, food eaten, lava placed, water placed, webs placed, blocks placed, melee hits
arrowscount, then entriesi32, count × (6 × f64, i32 owner, i32 inGround)Arrows in the arena (at most 32): position, motion, owner (0 you, 1 the opponent), stuck in the ground (0/1)
IndexFieldMeaning
0–2pos x, y, zYour position, arena coordinates
3–5prevPos x, y, zYour position last tick; must equal the previous frame's pos
6–8motion x, y, zgetDeltaMovement()
9, 10yaw, pitchYour view angles in degrees
11onGround0 or 1
12healthHealth as your client shows it
13, 14foodLevel, saturationHunger 0–20 and saturation
15fallDistanceBlocks fallen since last on ground
16, 17sprinting, sneaking0 or 1 (the keys)
18attackStrengthTickerTicks since your last swing (vanilla's counter)
19missTimeVanilla's missTime
20, 21hurtTime, invulnerableTimeHurt ticks and damage-immunity ticks
22, 23waterHeight, lavaHeightFluid height at your feet (0 when out of it)
24, 25eyeInWater, inCobweb0 or 1
26fireTicksgetRemainingFireTicks()
27absorptionAbsorption hearts, as your client shows them
28, 29regenAmplifier, regenTicksRegeneration effect (amplifier −1 when none) and ticks left
30absorptionTicksTicks left on the absorption effect
31usingItemItem id being used, 0 when not
32useTicksgetTicksUsingItem() after this tick (1 on the tick a use starts)
33crossbowLoaded0 or 1
34shieldCooldownTicks your shield stays disabled after an axe hit
35selectedSelected hotbar slot, 0–8
36crouching1 while the crouching pose is on (it lags the sneak key)
37serverHealthHealth the server reports (your real health)
38inLava0 or 1
39invLockTicks your inventory screen still owns the client (0 normally)
40rightClickDelayVanilla's rightClickDelay
41serverAbsorptionAbsorption the server reports

The reply uses the crystal layout: keys, use (bit 0 click, bit 1 hold), a hotbar slot (255 = leave it), and an inventory op. The ops are 1 = the F key (swap main hand and offhand); 2 = restock, where each empty hotbar slot gets back what it started with and used buckets are swapped for full ones; 3 = cycle tool, where the selected slot swaps with the next inventory item the hotbar doesn't hold (bow, pickaxe, crossbow, axe, shovel, cobblestone, planks, food, rod, …). Ops 2 and 3 open your inventory for 5 ticks: report it in invLock, as for crystal. Auto-hold (eating, drawing the bow) and bucket flicks come back as plain use, slot and turn values. Apply them verbatim.

Item idItems
0empty
1sword
2mace
3obsidian
4end crystal
5respawn anchor
6glowstone
7totem
8golden apple
9firework
10elytra
11chestplate
12ender pearl
13axe
14shield
15wind charge
16crossbow
17arrow
18pickaxe
19experience bottle
20potion
21helmet
22leggings
23boots
24oak planks (and other building blocks)
25container
26glowstone dust
27spear
28bow
29cobweb
30other utility
31anything else
32water bucket
33lava bucket
34empty bucket
35golden head
36food (steak)
37shovel
38cobblestone
39fishing rod
Block idBlocks
0air
1bedrock
2stone (and every other full solid block)
3dirt
4obsidian
5respawn anchor 0
6respawn anchor 1
7respawn anchor 2
8respawn anchor 3
9respawn anchor 4
10fire
11glowstone
12oak planks
13cobblestone
14cobweb
15grass block
16–24water, level 0 (source) to 8 (falling)
25–33lava, level 0 (source) to 8 (falling)

9. Sienna

sienna (Sienna, Pro only, sharing the monthly premium minutes with V29) plays sword and pot fights. She owns her attack timing (no charge gate), strafes, trades crits, and in a pot fight throws healing potions, drinks buffs she lacks at quiet moments and refills her hotbar from her inventory. Session, ticket, pinning, control messages and errors are the same as for the other models. She has memory, and a type-1 frame starts it fresh: there is no need for new_fight.

The frame is 304 bytes: two 32-bit integers, 71 floats (the fields below, in order), then 12 bytes for the hand. A fight is a pot fight once a healing splash potion is on your hotbar; it stays one until the next type-1 frame. Several fields are filled by the server itself, so every client feeds her exactly what she was trained on; send 0 (or 1 where the table says so) in those.

Continuity. Frames must follow the game: no position may jump more than 3 blocks between consecutive ticks, and your camera must turn as the replies say. Apply the turn verbatim, as for every model.

PartFieldTypeMeaning
headertypei321 = the first frame of a fight (a new opponent or a new round): her memory starts over and the tick may start again. 2 = a tick
ticki32The game tick, strictly increasing within a fight
statef[71]71 × f32See the next table
handhotbar[9]9 × u8Hotbar slots 0–8: 0 empty, 1 sword, 2 axe, 3 healing splash potion, 4 a drinkable potion with a buff you lack or that ends within 5 seconds (speed, strength, regeneration, resistance, fire resistance, absorption, health boost; never one with a harmful effect), 5 any other splash potion, 6 anything else
selectedu8The selected hotbar slot, 0–8
flagsu8Bit 0: you are using an item (drinking). Bit 1: your inventory screen is open
backpackHealu8Healing splash potions in inventory slots 9–35
IndexFieldMeaning
0–2sx, sy, szYour position. Any origin fixed for the fight (where it started is fine): only differences are used
3, 4syaw, spitchYour view angles in degrees
5–7sground, ssprint, ssneakonGround, isSprinting, crouching pose (0/1)
8shurtYour hurtTime
9sinvYour damage-immunity clock as the client sees it: 19 on the tick your hurtTime rises, 9 on a tick your health rises, otherwise one less than last tick, down to 0
10shpYour health
11shp_known1 (the server sets it)
12sabsAbsorption hearts
13schargegetAttackStrengthScale(0.5)
14scharge_known1 (the server sets it)
15–17sswing, susing, suse_progSwinging (0/1), using an item (0/1), use progress 0–1
18sheldSend 1. In a pot round the server works it out from your hotbar
19, 20sarmor, sweaponThe server sets them
21sfoodFood level 0–20
22, 23shcol, svcolhorizontalCollision, verticalCollision (0/1)
24–36se_*, k_*Send 0. The server fills the pot-round fields from your hotbar
37–39ox, oy, ozThe opponent's position as your client renders it, same origin as yours
40, 41oyaw, opitchTheir view angles
42–45oground, osprint, osneak, ohurtonGround, sprinting, crouching pose (0/1), their hurtTime
46ohpTheir health. On servers that hide entity health, send the number the server draws (the score under their name, the name tag), in health points, not hearts
47ohp_known1 when ohp is a real number, 0 when you have none. A number that is plainly fake (it never moves through three of her hits, or rises as she hits) is set aside for the rest of the fight
48, 49oswing, ousingSwinging, using an item (0/1)
50oheldWhat they hold: 3 a splash potion, 0 nothing, 1 anything else
51–54oarmor, oe_*Send 0. The server sets them
55pot_air1 when a thrown splash potion is within 32 blocks of you
56–59pot_dx, pot_dy, pot_dz, pot_vyThe nearest one: its offset from you, and its vertical motion
60–62ping_s, ping_o, ping_knownYour ping and theirs in ms (the tab list), and 1 if you have them
63–68pa_fwd, pa_strafe, pa_jump, pa_sprint, pa_sneak, pa_attackThe keys you played last tick: forward minus back (−1/0/1), right minus left, then jump, sprint, sneak, attack (0/1)
69, 70pa_use, pa_slotSend 0. The server sets them

The reply uses the crystal layout: keys, the turn, use (bit 0 click, bit 1 hold), a hotbar slot (255 = leave it) and an inventory op. A throw comes as three replies: the slot of a healing potion, a use click, then the slot back to your sword, with no attack on those ticks. A buff drink comes as the slot of the potion, use held until the drink ends (keep flags bit 0 up to date), then the slot back. Op 3 = refill: open your inventory, move healing splash potions from inventory slots 9–35 into empty hotbar slots, close it, and report flags bit 1 while the screen is open; the replies meanwhile press nothing. Apply everything verbatim.

10. Demo mod

A small Fabric mod (Minecraft 26.1.2, Fabric API, Java 25) that runs a sword model on your player, or measures how far behind the game the model's replies land from your connection. It is a complete, working example of this page: the session request, the pinned TLS connection, the WebSocket, the frame encoder and applying the replies are plain Java you can copy (MIT licence).

  • mca-smoketest-1.1.1.jar (SHA-256 7e732ebd9d7a3a38…) and its source. Put the jar and Fabric API in mods/.
  • On first launch it asks for your API key on the title screen. The key stays in config/mca-smoketest.properties on your computer, readable only by you.
  • In a world: F9 starts the AI: the model turns, moves, sprints, jumps and attacks for you; F9 again gives you back control. F10 runs a 30-second latency test that never moves you. F7 opens the control panel (model, API key, every keybind), F8 hides the HUD. All keys can be rebound in Controls.
  • The AI fights the nearest player within 32 blocks, or, when nobody is near, the nearest hostile mob within 16 (switch that off in the panel), so singleplayer works. While it plays the AI owns the camera: the mouse is released until you press F9, because turns that are not the model's end the session.
  • The HUD shows what it is doing, who it is fighting, frame-to-action latency (p50, p95), how many ticks a reply takes, lost replies and the cost per minute. Both the AI and the test are charged at the model's rate while they stream (V32: 1 credit a minute). The region is the one set on your key.