Content generated with AI — it may contain mistakes.

ExyliaMines/GuidesUpdated in v1.8.0

Change what blocks drop

Replace the vanilla drop with items, money or commands, and add break effects and potion effects.

Page 8 of 286 min read

A mine's blocks can pay items, money or commands instead of their vanilla drop, play sounds and particles when they break, and give players inside a potion effect such as Haste.

Before you start#

You need a mine with blocks in it: a composition entry in a classic mine or a level in a realistic mine. For money you need an economy ExyliaLib can reach, such as Vault.

Steps#

Open the block's loot table

Run /minesadmin and open your mine. In a classic mine click Mine ▸ Composition and middle-click the block. In a realistic mine click Mine ▸ Regen levels, click the level, then Level ▸ Loot table.

Add what it should pay

Use ExyliaLib's loot editor to add lines. A line is an item (the item as you hold it when you add it, with an amount range), money (an amount range) or a command.

Set each line's chance

Each line has its own chance from 0 to 100. Put 100 on anything that must always drop.

Keep the block itself if you want it

A block with a loot table drops nothing else. Add an item line at 100 for the block itself.

Check that it works#

Break the block as a player. You receive the lines whose chance came up. If a block pays nothing, no line came up on that roll: raise its chance, or add the 100 line from step 4.

Loot tables#

Every block a mine is made of can pay something other than its vanilla drop:

WhereOpened from
A classic mine's composition entryComposition → middle-click the entry
A realistic mine's levelThe level → Level ▸ Loot table
A stage of a degrade chainLevel ▸ Degrade chain → middle-click the stage
Line kindWhat it gives
ItemThe item as you hold it when you add it (name, lore and enchantments included), with an amount range.
MoneyAn amount range, in a currency or the default one. Needs an economy ExyliaLib can reach, such as Vault.
CommandA command line run for the miner.

How a table is rolled#

In a mine, every line is its own chance, written as a percentage from 0 to 100, and every line is rolled on its own each time the block breaks. Several lines can come up together, and a roll where none comes up gives nothing: a table of one diamond at 5 drops a diamond five times in a hundred, not every time. A line at 100 always comes up.

A loot table replaces the vanilla drop entirely

As soon as a material has a loot table, breaking it gives no vanilla drop and no vanilla experience, even on a roll where no line came up. Add an item line at 100 for the block itself if it should still drop. Durability and hunger are still spent, since the player did break the block.

What a line gives then goes through, in order:

  • Fortune, as fortune in config.yml and the mine's own setting say. See Fortune.
  • Boosts running on the mine: drops multiplies items, money multiplies money. See Boosts.
  • Boosters from other plugins and permission modifiers, through ExyliaLib's modifiers: for items, and for money in the default currency. See Integrations.
  • With ExyliaMarket, the miner's autosell for items: what it sells is not given as well. See Integrations.
  • Auto-pickup, when the mine has it on or the miner holds exyliamines.autopickup: items go straight into the inventory and only what does not fit is dropped. Otherwise they drop where the block was.

Commands are never multiplied.

Command lines#

A line with nothing in front of it runs as the console, because a loot line is a reward being paid: eco give %player% 100 run as the player would fail on permissions and pay nothing. %player% is the miner's name.

To choose who runs it, start the line with one of ExyliaLib's prefixes:

PrefixRuns as
console:The console. The same as no prefix.
player:The miner.
console-proxy: / player-proxy:The same, on the proxy.

A command that did not run is reported in the console with the reason. With debug: true in config.yml, every line also logs who it runs as.

Break effects#

Sounds, particles, titles and anything else ExyliaLib's sequences can play, every time a block of the mine breaks.

WhereOpened fromApplies to
The mineMine ▸ Mining → Mining ▸ Break effectsEvery block broken in the mine.
A composition entryComposition → drop key (Q) on the entryThat material only.
A levelThe level → Level ▸ Break effectsThat material only.

A material with effects of its own plays only those; the mine's list is for every material that has none. The editor is ExyliaLib's sequence editor, and each effect keeps its own chance, condition, permission, delay and audience, see the library's sequences page.

The lines may use the mine's own values, filled in before they play:

TokenValue
%mine_id%The mine's id.
%mine_name%Its display name.
%block%The material broken, such as DIAMOND_ORE.
%player%The miner's name.

Effects play at the centre of the broken block, on behalf of the miner, whether or not the block has a loot table.

Potion effects#

Mine ▸ Mining → Mining ▸ Mine effects opens ExyliaLib's potion effect editor, one effect and level per line: Haste, Night Vision, Speed.

Everyone inside the mine with access to it keeps those effects for as long as they stay, with no countdown. They are checked again every second, so a bucket of milk, a death or an edit of the mine's effects is corrected within a second: missing effects are put back and those the mine no longer gives are taken off. Leaving the mine, the mine being disabled or deleted, and the plugin stopping take them off.

Only the endless effects the mine puts on are taken off. An effect with a timer, such as a potion the player drank, is theirs and is left running when they walk out.

Something missing on this page? Tell us on Discord