Skip to main content

Vein-miner + auto-smelt

A pickaxe enchant that breaks an entire connected ore vein and smelts the results — ore becomes ingots, sand becomes glass. This recipe shows the MINE trigger and block-shape selectors.

# content/enchants/vein-miner.yml
tier: legendary
display: "&6Vein Miner"
description: "Break a whole ore vein and smelt the drops."
trigger: MINE
applies-to: [PICKAXE]
group: mining
levels:
1:
chance: 100
cooldown: 20
effects:
- { BREAK_BLOCK: { drops: true, who: "@Vein{limit=16}" } }
- { SMELT: {} }
- { PARTICLE: { particle: FLAME, count: 6 } }
2:
chance: 100
cooldown: 10
effects:
- { BREAK_BLOCK: { drops: true, who: "@Vein{limit=32}" } }
- { SMELT: {} }
- { PARTICLE: { particle: FLAME, count: 8 } }
3:
chance: 100
effects:
- { BREAK_BLOCK: { drops: true, who: "@Vein{limit=64}" } }
- { SMELT: {} }
- { TELEPORT_DROPS: {} }
- { PARTICLE: { particle: FLAME, count: 10 } }

How it works

  • trigger: MINE fires when you break a block.
  • BREAK_BLOCK with who: "@Vein{limit=N}" breaks up to N blocks contiguous with — and matching — the one you broke (a vein miner). drops: true makes them drop normally.
  • SMELT auto-smelts what this MINE activation broke (ore → ingot, sand → glass, …).
  • TELEPORT_DROPS (level 3) sends the drops straight to your inventory instead of the ground.

:::note Block effects respect protection BREAK_BLOCK carries a REGION affinity. If you run a region/claim plugin (WorldGuard, Towny, …), the break is gated to places the player could build — see integrations. :::

:::warning Player-placed blocks award nothing mining.placed-block-guard: true in config.yml (the default) suppresses the whole MINE dispatch on a block a player placed since the last server start, so a place/break loop can't farm mining rewards — no XP, no money, no auto-smelt, no teleported drops. Placement memory is boot-lifetime only: a restart forgets prior placements. Set it to false to reward every break, the old behaviour. :::

Variations

  • Tunnel ahead instead of following a vein, with @Tunnel{depth=N}, or carve a face with @Trench{radius=N}.
  • Drop-free clear (no drops, just remove blocks) with drops: false.

See BREAK_BLOCK, SMELT, and the @Vein / @Tunnel / @Trench selectors.