Mechanism Editing (Configuring Mechanisms in the Editor)
In: Visual Editor · Previous: Visual Building
Related: Mechanism System · Blueprints & Objectives · Selection & Saving · Command Reference
Mechanism System covered what a mechanism is — a pure world interaction of "trigger → a sequence of actions" in the blueprint (open a door / spawn an ambush / teleport / give rewards). This page covers how to click it out / type it out in the visual editor, without hand-writing the mechanisms section.
Mechanisms have two equivalent entry points, sharing the same "mechanism builder (MechBuilder)":
- The mechanism panel (GUI) — visually pick a trigger and add common actions;
- The
/qr editor mechcommand — can configure every trigger, every action type, and all flags; the most expressive.
Prerequisite: first
/qr editor start <templateId>to enter editing (see Visual Building §1). Permissionqinhruins.admin.
🖼️ [Image placeholder] The mechanism panel 27-slot GUI: top row triggers, bottom row actions, finish/discard on the right · suggested
assets/mech-panel-gui.png
1. The mental model of mechanism building
Whether using the GUI or commands, configuring a mechanism is the same four steps, all centered on a mechanism builder:
1. Create a builder give the mechanism an id
2. Record point coords left-click blocks in the world to record "trigger block / region corner / action position" into a point list
3. Set trigger + add actions the trigger and position-type actions "reference" the points you just recorded
4. Finish the builder assembles into one mechanism, merged into the session; only save writes it to diskKey concept: the point list (points). In mechanism mode, left-clicking a block with the marker pen does not directly place a marker; instead it pushes that block's relative coordinates onto a temporary point list. Then:
- single-point triggers (interact / break / redstone) use the last point as the trigger block;
- region triggers / fill actions use the last two points as opposite corners;
- spawn actions use the last point as the spawn position.
So the typical rhythm is "first left-click to record points, then pick a trigger / add actions that reference those points".
All coordinates are likewise auto-converted relative to the structure origin, consistent with spawn points / chests (see Visual Building §4). When recording points in mechanism mode, chat additionally echoes that block's world coordinates, so you can confirm you clicked the right one.
2. Correspondence with hand-written mechanisms
A mechanism configured in the editor, once saved, is a standard mechanisms entry in blueprint.yml. Mapping:
| Operation in the editor | Corresponding YAML field |
|---|---|
mech new <id> / typing the mechanism id in the panel | mechanisms[].id |
| Pick a trigger (interact / break / redstone / region / stage / timer) | trigger.type + its coords / stage / interval |
| Add an action (fill / spawn / message / command …) | actions[] (each with type + params) |
Flags once / cooldown / require-stage / radius | top-level fields of the same name |
| Finish + save | the whole entry written into the mechanisms list |
The full semantics of the fields (6 triggers × 12 actions, their params, throttling config) are all in Mechanism System and aren't repeated here — this page only covers the interaction.
3. Using the mechanism panel (GUI)
Opening
In the main menu, right-click the "Mechanism Editing" tool (Redstone) to enter the mechanism sub-editor screen, then right-click the "Mechanism Panel" tool (Comparator) in slot 1. Opening it for the first time prompts you for a mechanism id in chat (e.g. trap1, boss-door); after input, the 27-slot panel pops up.
You can also first left-click blocks to record points in the mechanism sub-editor screen, then open the panel — the panel's triggers / actions can then reference those points.
Panel layout
| Area | Button | Effect |
|---|---|---|
| Top | Current mechanism info (Paper) | Shows the mechanism id, recorded point count, added action count |
| Trigger row | Right-click block / Break block / Redstone power | Use the last recorded point as the trigger block |
| Trigger row | Step into region | Use the last two points as the region's opposite corners (prompts if fewer than two) |
| Trigger row | Reach stage / Every N seconds | Stage number / timer seconds, click to adjust: left-click +1 / right-click -1 / Shift+left +10 / Shift+right -10 |
| Action row | +Spawn | Spawn the mob from set mob / count at the last recorded point |
| Action row | +Fill blocks | Use the last two points as the region → chat input for the material (AIR = open door) |
| Action row | +Broadcast message | Chat input for the text |
| Action row | +Run command | Chat input for the command ({player} = the trigger-er) |
| Tools | Clear points / Finish mechanism / Discard this mechanism | See below |
The panel's "spawn" action uses the mob and count from the defaults you set with
set mob/set count(see Visual Building §3). To spawn a different mob, change the defaults first.
Typical panel flow: step-into-region opens a door
1. Main menu, right-click "Mechanism Editing" (Redstone) → enter the mechanism screen
2. Right-click "Mechanism Panel" (Comparator) → chat input the mechanism id: auto_door
3. Hold the marker pen, left-click the two opposite-corner blocks of the area in front of the door (record 2 points)
4. In the panel click "Step into region" → trigger = region (last two points)
5. Hold the marker pen, left-click the two opposite-corner blocks of the doorway (record 2 more points)
6. In the panel click "+Fill blocks" → chat input AIR (filling the doorway with air = open door)
7. In the panel click "Finish mechanism (add to blueprint)"
8. /qr editor save to write to diskThe panel covers the most common open-door / ambush / prompt / command; to use the other actions like title / sound / effect / loot / teleport / particle / give / npc, or to set
once / cooldown / require-stage / radius, use the command version (§4 below).
4. Using the /qr editor mech command
The command version can configure all triggers, actions, and flags; it's the most expressive entry point. Subcommands at a glance:
| Subcommand | Effect |
|---|---|
mech new <id> | Create a mechanism builder (switch to mechanism mode, start recording points) |
mech trigger <...> | Set the trigger |
mech action <type> <params...> | Add an action |
mech flag <flag> <value> | Set once / cooldown / require-stage / radius |
mech points | List the recorded points |
mech clearpoints | Clear the recorded points |
mech done | Finish the mechanism and merge into the session |
mech discard | Discard the current build |
(/qr editor mech without a subcommand prints help.)
1. Create: mech new <id>
/qr editor mech new lever_doorSwitches to mechanism mode and creates a builder. Next, hold the marker pen and left-click blocks to record points.
2. Trigger: mech trigger <...>
| Syntax | Trigger | Points used |
|---|---|---|
mech trigger interact | Right-click block (INTERACT) | last 1 point recorded |
mech trigger break | Break block (BLOCK_BREAK) | last 1 point recorded |
mech trigger redstone | Redstone power (REDSTONE) | last 1 point recorded |
mech trigger region | Step into region (REGION_ENTER) | last 2 points recorded (opposite corners) |
mech trigger stage <n> | Reach stage N (STAGE) | no points, give the stage number directly |
mech trigger timer <sec> | Every N seconds (TIMER) | no points, give the seconds directly |
Single-point / region triggers require enough points recorded by left-click first, otherwise it prompts "Please left-click a block to record coordinates first".
3. Action: mech action <type> <params...>
Type = fill / spawn / message / title / sound / effect / command / loot / teleport / particle / give / npc (i.e. the 12 in Mechanism System §3).
Params are written as key=value, and coordinates have three sources:
- Reference recorded points: add the bare word
region(use the last two points as from/to) orpos(use the last point as pos); - Explicit region:
fx=.. fy=.. fz=.. tx=.. ty=.. tz=..(the from/to corners); - Explicit single point:
x=.. y=.. z=...
The other key=values pass through as-is as that action's params (e.g. material, mob, text, command, sound…; meanings in Mechanism System §3).
Examples:
# Fill: use the last two recorded points as the region, fill with air = open door
/qr editor mech action fill material=AIR region
# Spawn: use the last recorded point as the spawn position
/qr editor mech action spawn mob=mm-FireSkeleton count=1 pos
# Spawn: explicit coordinates
/qr editor mech action spawn mob=ZOMBIE count=4 x=6 y=2 z=5
# Text / sound / command
/qr editor mech action message text=&cMechanism triggered! Watch your step!
/qr editor mech action sound sound=BLOCK_PISTON_EXTEND pitch=0.8
/qr editor mech action command command=eco give {player} 100 as=consoleEach action added reports "Added action X (N total)". Actions execute in the order added.
4. Flags: mech flag <flag> <value>
| Flag | Meaning | Example |
|---|---|---|
once | Trigger only once (persistently recorded) | mech flag once true |
cooldown | Trigger cooldown (seconds) | mech flag cooldown 5 |
require-stage | The clear stage required | mech flag require-stage 1 |
radius | Audience / effect radius (blocks) | mech flag radius 16 |
For the meanings, see Mechanism System §1.
5. Finish / discard / inspect points
/qr editor mech points # List the recorded points
/qr editor mech clearpoints # Clear the points (re-record)
/qr editor mech done # Finish: assemble into a mechanism and merge into the session
/qr editor mech discard # Discard the current buildIf done is incomplete it explains why (no trigger set / no action added / trigger block not recorded / region incomplete). Once finished the mechanism enters the session, but you still need /qr editor save to write it to disk.
Tip
At save time, if you still have a builder that hasn't been done, the editor will automatically wrap it up for you (merging it if it can be assembled), and prompt "Auto-finished an incomplete mechanism on save".
5. Complete examples
Example 1: Redstone-powered door (command version)
/qr editor mech new lever_door
(Hold the marker pen, left-click the block where the lever/pressure plate powers it → record 1 point)
/qr editor mech trigger redstone
(Left-click the two opposite-corner blocks of the doorway → record 2 points)
/qr editor mech action fill material=AIR region
/qr editor mech flag once false
/qr editor mech done
/qr editor saveEquivalent to this YAML in Mechanism System:
mechanisms:
- id: lever_door
trigger: { type: REDSTONE, x: 4, y: 1, z: 0 }
actions:
- { type: FILL, from: { x: 3, y: 1, z: 0 }, to: { x: 5, y: 3, z: 0 }, material: AIR }
once: falseExample 2: Break a hidden wall to spawn an ambush (command version)
/qr editor set mob ZOMBIE
/qr editor set count 4
/qr editor mech new ambush
(Left-click the marker block hidden in the wall → record 1 point)
/qr editor mech trigger break
(Left-click the ambush spawn block → record 1 point)
/qr editor mech action spawn mob=ZOMBIE count=4 pos
/qr editor mech action title title=&cAmbush! subtitle=&7You triggered a trap
/qr editor mech flag once true
/qr editor mech flag require-stage 1
/qr editor mech done
/qr editor saveExample 3: Right-click an altar for a reward (command version)
/qr editor mech new altar_reward
(Left-click the altar block → record 1 point)
/qr editor mech trigger interact
/qr editor mech action give item=qi-ancient_relic amount=1
/qr editor mech action command command=eco give {player} 200 as=console
/qr editor mech action message text=&aYou received the altar's blessing!
/qr editor mech flag require-stage 2
/qr editor mech done
/qr editor saveFor more trigger / action combinations (timed poison fog, stage teleport-and-reward, etc.), see Mechanism System §5 — every YAML example there can be clicked / typed out using this page's methods.
6. Troubleshooting quick reference
| Symptom | Cause |
|---|---|
trigger interact/break/redstone prompts to record a block first | No block left-clicked to record a point yet; left-click first, then trigger |
trigger region / action fill says not enough points | A region needs 2 points; left-click one more opposite corner |
done says the mechanism is incomplete | No trigger set / no action added / trigger block not recorded / region incomplete |
| All points recorded wrong | mech clearpoints to clear and re-record |
| Mechanism saved but doesn't trigger | Usually a trigger condition / throttling issue, see Mechanism System §6 |
Next
- The full semantics of mechanism fields / triggers / actions → Mechanism System
- Marking spawn points / chests / cores → Visual Building
- The blueprint as a whole → Blueprints & Objectives
- Command quick reference → Command Reference