Skip to content

OrderFiller

Developer edited this page Jun 11, 2026 · 1 revision

OrderFiller — payment-gated order picker

Pops one paid order at a time, routes to the reserved kit shulkers in the stash, withdraws them, deposits the order into a dedicated outgoing chest, and writes a manifest. This is the fulfil half of the Order System; it draws on the snapshot written by StashScanner.

Command: .orderfiller (alias .of).

Requires the stash database + Redis. Enable database.enabled + database.stashEnabled first. See Order System → setup.

What it does

  • One job at a time. Polls the Redis orders:queue; an order only lands there after payment is confirmed (the Order System gates it). Never runs two fills at once.
  • Routes + withdraws. Groups the order's reserved shulkers by chest, visits them nearest-first, and pulls each with the ShiftClick fix (modelled on Regear's withdraw). Carries up to maxpertrip shulkers, deposits, then resumes — it never carries a shulker it can't deposit.
  • Deposits to a per-order outgoing chest. Each order is assigned a free chest with role='outgoing' (register them with .order outgoing …). Customers only ever see the outgoing chest — stash coordinates never leave the database.
  • Handles drift gracefully. A missing shulker (stock changed since the scan) is logged as a discrepancy and the kit ends up short; an unreachable chest or a full outgoing chest is logged and surfaced on the manifest. Partial fills still complete — the manifest shows the exact shortfall.
  • Never breaks or places. allowBreak=false / allowPlace=false for the whole run. pauseplayer soft-pauses the withdraw if an untrusted player approaches (anti-theft).
  • Manifest. On completion it publishes a terminal status; the Order System posts the per-kit requested / delivered / short manifest (plus any unreachable chests) to Discord and decrements stock.

Setup guide

  1. Data layer up + a current scan (StashScanner).
  2. Register outgoing chests: .order outgoing <x> <y> <z> [label] for each chest in your pickup line (they feed your hopper/collection plumbing downstream — out of scope here).
  3. Tune: .of maxpertrip <n> (≈ free inventory slots), .of partial on/off, .of manifestchannel <id>.
  4. Enable: .of on. It idles until a paid job arrives. To test without Discord/Redis: .of test <order_id>.

Commands

.orderfiller on/off
.of pause / resume
.of maxpertrip <n>                 # shulkers per trip (≈ free inv slots)
.of partial on/off                 # allow partial fills (vs all-or-nothing)
.of manifestchannel <id>           # Discord channel for the manifest (empty = main)
.of test <order_id>                # manually dispatch a paid order (no Redis)
.of status

Order intake (.order …), stock, catalog, and the payment gate live on the Order System page.

Clone this wiki locally