MaxFastBuild treats the server as the only authority. A client submits shape intent (mode, anchors, hollow flag, material for place); the server regenerates the shape, filters unchanged blocks, validates every mutation, calculates materials and fees, then persists a task before execution.
There is no durable inventory escrow in the current release: place materials and economy fees are taken when the task is accepted. Unused materials and unfinished variable fees are returned on completion, cancel, or failure settlement. EscrowStore exists in the storage module for a future durable-reservation path and is not wired into Paper.
The Paper submit path regenerates arc and array shapes from their anchors and spacing parameters. The older standalone transform helpers remain separate utilities and are not part of request processing.
The public /mfb selector sends green-glass block-change packets only to the selecting player. It never writes those blocks to the world; preview and apply both use the shared shape generator, and clearing the selection restores the current real block states.
The one channel where the client submits a block list is the Litematica bulk paste (/__mfb p with a gzipped paste envelope). It skips only shape generation: every pasted mutation still goes through world-state, protection, tool, material and economy validation and is persisted as a normal task. See docs/protocol.md.
- Intercept
/__mfb(not registered in Brigadier). Primary intents are single-lineplace/break. Optional legacy path:hellosession + chunkedpenvelopes with HMAC (still accepted; not required for compact commands). - Check
maxfastbuild.use, request rate limit, and concurrent task limits. - Validate the selected region volume (including air) and X/Y/Z dimensions, then generate the shape on the server. The planned unique mutations must also stay within
execution.max-affected-blocks. - Reject invalid materials, forbidden place/break blocks, and coordinates outside world height.
- Local protection checks only during planning (no synthetic
BlockBreakEvent/BlockPlaceEvent— those multi-logged in CoreProtect).
Execute with vanilla APIs: break =breakNaturally(CP records one break); place =setBlockData. Soft cells skip break. Per-block fees charge place + each replace-break. - Count inventory (optional shulker contents when configured); take materials immediately when accepted.
- Write a withdrawal intent, withdraw through Vault when economy is enabled, then record the result.
- Persist the task (including
cursorandapplied_count) before queueing.escrow_idis unused (null). - Revalidate expected state and protection immediately before each mutation.
- CoreProtect: trust
breakNaturallyfor removals (do not alsologRemoval). After placesetBlockData, calllogPlacementonce. - Persist cursor and applied count after each execution step (restart-safe partial refunds).
- On completion or cancel, refund unfinished per-block/per-area fees and return unused place materials (inventory or world drop if full/offline).
Vault and SQLite cannot share an ACID transaction. The ledger therefore uses durable transaction intents and unique transaction IDs. If persistence fails after withdrawal, MaxFastBuild performs a compensating refund and leaves a recoverable ledger row if that refund fails.
Fabric server entry is a stub: internal commands return maxfastbuild.error.fabric_server_todo. The Fabric client talks to a Paper/Leaf host. Shared EconomyService is retained for a later Fabric economy adapter.
Two client modules compile the same shared sources against different Minecraft versions:
maxfastbuild-fabric— Minecraft 26.2:KeyMapping.Category, HUD elements (HudElementRegistry), gizmos preview (LevelRenderEvents.BEFORE_GIZMOS+ per-frame gizmo collection). Java 25.maxfastbuild-fabric-1_21_7— Minecraft 1.21.7 (obfuscated era): String key category +KeyBindingHelper,HudRenderCallback, classicWorldRenderEvents.AFTER_TRANSLUCENTpreview. Built with loom-remap + official Mojang mappings (shared mojmap sources compile unchanged) and remapped to intermediary in the published jar. Embedsapi/core/storagejar-in-jar; everything in the jar is Java 21 bytecode.
Shared sources live under maxfastbuild-fabric/src/{main,client}/java and may only use APIs that exist in both versions. Everything version-volatile goes through the per-version ClientPlatformImpl (key binding, screen access, HUD, preview renderer, message delivery, physical key state, hotbar-scroll hook — no-op on 1.21.7, whose fabric-api has no such event).