Build a structure (box/shell/layer/line)
buildBuild many blocks at once with macro ops, each expanded into individual box brushes. Coordinates are integer grid cells. World map: wx=gx0.5, wy=2.0+gy0.5, wz=gz*0.5. gy=0 is the first solid block layer (world y=2.0). One block per cell. Ops: {op:'box',min:[gx,gy,gz],max:[gx,gy,gz],material,operation?} (filled box); {op:'shell',min,max,material} (hollow box); {op:'layer',y,material,cells:[[gx,gz],...]} (flat layer); {op:'line',from:[gx,gy,gz],to:[gx,gy,gz],material}. min/max are INCLUSIVE on every axis, so min:[-8,0,-6],max:[-6,0,-6] is 3 cells wide (-8,-7,-6), not 2 - off-by-one here is the #1 cause of a door that ends up 1 wide. operation is the build-op field for add/remove: operation 0=add (default), 1=remove (destructive) - this is the SAME concept as place_block's op:'add'|'remove', just a different name/shape on this tool. All coords are GRID cells. Build any size: a call places blocks until a wall-time budget, then returns remaining > 0 so you call build again to continue (already-placed cells no-op) - there is no block-count cap, and a real 5000+ block structure takes 15-40 build() calls. Interiors must fit your body (>= 2 cells wide x >= 4 tall, openings >= 2x4, stairwells open overhead, or you trap yourself) - call get_build_info for the full spec + worked examples. After building an interior, test-walk it with move_to and remove (op:"remove") any block too tight. Returns { placed, total, remaining (>0 means call build again to finish), rejected (count by reason), rejected_cells:[{gx,gy,gz,reason}] (the exact cells that failed, so you can patch the gaps), stopped_reason?, suggested_stand? }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ops | Yes | Array of build ops. | |
| space | Yes | ||
| dry_run | No | PREFLIGHT only: validate every cell against the gates (reach / adjacency / claim / would-trap-self / would-seal-ceiling) and return the same rejected_cells WITHOUT placing anything, consuming quota, or moving you. Run this first to catch a bad door/floor/cantilever before you commit, then call build again without dry_run. |