Skip to content

Blueprints & Tooling

DarkBladeDev edited this page Aug 2, 2026 · 3 revisions

🏗️ Blueprints & Tooling

Building complex multiblocks can be challenging. MultiBlockEngine provides a suite of tools and a Blueprint system to guide players and provide interactive previews.

📜 Blueprints

A Blueprint is an item that, when held, allows a player to see a "ghost" version of a multiblock in the world.

Features

  • Visual Previews: Uses BlockDisplay entities (1.19.4+) to render a non-solid preview of the structure.
  • Rotation Support: Preview automatically rotates as the player turns.
  • Validation: Highlights incorrect or missing blocks in real-time (Red/Green overlay).
  • Auto-Build: (Optional) In creative mode or with specific permissions, allows "pasting" the structure.

Obtaining a Blueprint

Admins can give blueprints using: /mbe blueprint give <id>

🔧 Tools

The Wrench

The Wrench is the primary interaction tool for MultiBlockEngine.

  • Assembly: Right-click the controller to assemble a structure.
  • Deconstruction: Shift+Right-click to safely deconstruct and recover items.
  • Configuration: Use on specific ports to change their mode (e.g., Input to Output).
  • Diagnostics: Shift+Left-click to see a debug report of the multiblock.

Wire Cutter

Used specifically for the Wiring System.

  • Disconnect: Right-click on a cable connection to break the link.
  • Split: Break a cable to divide a network into two.

Multimeter Tool

The Multimeter Tool (mbe:multimeter) is used for electrical and network diagnostics.

  • Network Inspection: Right-click any port or cable node to inspect current energy flow, storage capacity, and node connections.
  • Mode Switching: Shift+Right-click to toggle between diagnostic readouts (e.g., Voltage, Throughput, Node Graph Topology).

Tool Session & Mode Framework

Tools execute modular modes managed by ToolSessionService and ToolModeExecutionService:

  • LinkPortsMode: Interactively connects two network ports.
  • DisconnectNodesMode: Safely breaks node connections without destroying blocks.
  • SplitNetworkMode: Splits complex network graphs into isolated sub-networks.

🧱 YAML Integration

You can define how a multiblock reacts to tools:

id: my_machine
assembly:
  trigger: WRENCH_USE # Default

on_interact:
  - type: conditional
    conditions:
      - type: item_in_hand
        material: MBE_WRENCH # Custom item check
    then:
      - type: open_panel
        panel: "config_panel"

💻 Developer API

Tip

The Tool and Tool Mode services have been migrated to the dev.darkblade.mbe.api.tool package. All custom tool logic and preview sessions now strictly adhere to these API contracts.

To trigger previews or handle custom tool logic:

@InjectService
private BlueprintService blueprintService;

public void showPreview(Player player, String typeId, Location loc) {
    blueprintService.startPreviewSession(player, typeId, loc);
}

Clone this wiki locally