Loot and effects
Loot tables of items, money and commands in place of the vanilla drop, break effects per mine or per block, and potion effects kept on players inside.
Loot tables
Every block a mine is made of can pay something other than its vanilla drop:
| Where | Opened from |
|---|---|
| A classic mine's composition entry | Block composition → middle-click the entry |
| A realistic mine's level | The level → Loot table |
| A stage of a degrade chain | Degrade chain → middle-click the stage |
The editor is ExyliaLib's loot editor, and a line is one of three kinds:
| Kind | What it gives |
|---|---|
| Item | The item as you hold it when you add it — name, lore and enchantments included — with an amount range. |
| Money | An amount range, in a currency or the default one. Needs an economy ExyliaLib can reach, such as Vault. |
| Command | A 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.
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
fortuneinconfig.ymland the mine's own setting say. See Fortune. - Boosts running on the mine:
dropsmultiplies items,moneymultiplies money. See Boosts. - With ExyliaSurvivalCore, the miner's drop boosters and auto-sell for items, and its money boosters for money in the default currency. See Integrations.
- Auto-pickup, when the mine has it on: 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:
| Prefix | Runs 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, so a reward that silently failed
does not go unnoticed. With debug: true, 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.
| Where | Opened from | Applies to |
|---|---|---|
| The mine | Mining → Break effects | Every block broken in the mine. |
| A composition entry | Block composition → drop key (Q) on the entry | That material only. |
| A level | The level → Break effects | That 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 the sequence editor of ExyliaLib, 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:
| Token | Value |
|---|---|
%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
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 — a potion the player drank — is theirs, and is left running when they walk out.
Something missing on this page? Tell us on Discord