Skip to content

Workstations and Multiblocks

Workstations are the physical locations in the Minecraft world where crafting processes occur. Defined as YAML files in plugins/CraftingEngine/stations/, workstations bind blocks to capabilities, recipe menus, and multiblock patterns.


1. Station Architectures

CraftingEngine supports three distinct workstation architectures:

  1. SINGLE_BLOCK: Standard blocks (e.g. ANVIL, SMITHING_TABLE, BREWING_STAND, or custom ExecutableBlocks eb:<id>).
  2. MULTIBLOCK: Complex 3D voxel structures requiring precise arrangement of blocks around an interactive core block.
  3. FLUID_BASIN: Cauldron-based alchemical workstations holding fluids and responding to environmental heat (see Fluid Basins).

2. Single-Block Workstation Configuration

id: "blacksmith_anvil"
name: "<gradient:#b0bec5:#78909c>Master Blacksmith Anvil</gradient>"
type: "SINGLE_BLOCK"
# Matching block materials
blocks:
- "ANVIL"
- "CHIPPED_ANVIL"
- "DAMAGED_ANVIL"
# Capabilities provided to recipes at this station
capabilities:
- "forging"
- high_temperature:
drain:
variable: "temperature"
drain_per_second: 5.0
drain_per_use: 10.0
min_threshold: 200.0
# Interaction behaviors
open_gui_on_click: true
fallback_to_vanilla: true
close_gui_on_craft: false
cancel_on_gui_close: false

Key Properties

  • blocks: List of Bukkit block material names that act as this workstation.
  • capabilities: Capabilities granted to recipes initiated at this station. Supports:
    • Flat String: Permanent capability (e.g. - "forging").
    • Structured Consumable Capability (drain:): Governed by CapabilityDrainPolicy, tracking a state variable, continuous per-second/per-tick drain, per-use deduction on craft start, and a minimum operational threshold (see Modular Capabilities).
  • fallback_to_vanilla: When true, if a player interacts without matching a custom recipe or opening a menu, vanilla anvil interaction proceeds. When false, vanilla interaction is completely intercepted.
  • pdc_key: (Optional) Enforces that the block state contains a specific Persistent Data Container tag.

3. 3D Multiblock Workstations

Multiblock workstations allow building expansive industrial furnaces, runic altars, or arcane shrines:

Layer 2 (Y = +1) Layer 1 (Y = 0) Core
+---+---+---+ +---+---+---+
| B | L | B | | S | M | S |
+---+---+---+ +---+---+---+
| . | . | . | | M | C | M | <-- (C = Core Anvil)
+---+---+---+ +---+---+---+
| B | L | B | | S | M | S |
+---+---+---+ +---+---+---+

Multiblock YAML Definition

id: "example_runic_forge"
name: "<gradient:#ff4500:#ff8c00>Ancestral Runic Forge</gradient>"
type: "MULTIBLOCK"
capabilities:
- "forging"
- "high_temperature"
- "runic_infusion"
multiblock:
core_symbol: "C"
allowed_rotations:
- "NORTH"
- "SOUTH"
- "EAST"
- "WEST"
palette:
"C": "ANVIL"
"S": "STONE_BRICKS"
"M": "MAGMA_BLOCK"
"B": "IRON_BARS"
"L": "SOUL_LANTERN"
".": "AIR"
layers:
- name: "base"
pattern:
- "S M S"
- "M C M"
- "S M S"
- name: "upper_pillars"
pattern:
- "B . B"
- "L . L"
- "B . B"

Rotation Solver & Validation

  • Cardinal Rotations: When allowed_rotations includes NORTH, SOUTH, EAST, WEST, CraftingEngine uses matrix 2D rotational transformations (0∘,90∘,180∘,270∘0^\circ, 90^\circ, 180^\circ, 270^\circ) to validate the structure regardless of player facing orientation.
  • In-Game Inspection: Players with permission craftingengine.command.multiblock.check can look at any block and execute /cfe multiblock check to test structure validity.

4. Virtual Ghost Block Previews

When a player right-clicks an incomplete multiblock core, CraftingEngine streams client-side PacketEvents ghost block packets to highlight missing or misaligned blocks.

  • Zero World Modification: Ghost blocks exist solely in client memory. No physical world blocks are altered.
  • Auto-Cleanup: Ghost previews fade or despawn automatically when the player walks away or completes the structure.

Next Steps