Skip to main content

Extractioncraft Loot System

Extractioncraft has a layered loot system built on three concepts: content packages reference loot tables, loot tables reference loot pools, and loot pools define the actual items that can drop.

Overview

Content Package
-> chestLootTables / barrelLootTables (weighted selection)
-> Loot Table
-> lootTable entries (each has a chance to roll)
-> Loot Pool
-> eliteMobsLoot / vanillaLoot (weighted selection of one item)

Loot Tables

Loot table configs live in the loot_tables/ folder. Each file defines a list of loot pool entries, where each entry has an independent chance to produce an item.

KeyTypeDefaultDescription
isEnabledBooleantrueWritten to the file, but not enforced: loot tables are registered and usable whether or not this is true. To stop a table from being used, remove it from the content package's chestLootTables / barrelLootTables and clear its spawnPools.
spawnPoolsString list[]BetterStructures spawn pool names. When an EliteMob associated with a matching spawn pool is killed, this loot table is used for its drops. The comparison is case-insensitive and ignores a trailing .yml, so kobold_miner_pool and Kobold_Miner_Pool.yml both match.
lootTableList of objects[]Each entry references a loot pool filename and a chance (0.0 to 1.0)

Loot Table Entry Format

lootTable:
- filename: my_loot_pool.yml
chance: 0.5
- filename: another_pool.yml
chance: 0.2

Each entry rolls independently. A chance of 0.5 means a 50% probability that this pool produces a drop.

Loot Pools

Loot pool configs live in the loot_pools/ folder. Each pool defines a set of possible items. When a pool is rolled, one item is selected based on weighted probability.

KeyTypeDefaultDescription
isEnabledBooleantrueWritten to the file, but not enforced: loot pools are registered and usable whether or not this is true. To stop a pool from being used, remove its entry from the loot tables that reference it.
eliteMobsLootList of objects[]EliteMobs custom items that can drop
vanillaLootList of objects[]Vanilla Minecraft items that can drop

EliteMobs Loot Entry

eliteMobsLoot:
- filename: my_elite_item.yml
weight: 1.0
- filename: another_item.yml
weight: 0.5

The filename references an EliteMobs custom item config. The weight determines relative drop probability among all entries in the pool.

Vanilla Loot Entry

vanillaLoot:
- material: DIAMOND
weight: 1.0
- material: GOLD_INGOT
weight: 2.0

The material is a Bukkit Material enum name. The weight works the same as for elite loot entries. All elite and vanilla entries in a pool compete in a single weighted selection, so a pool always produces at most one item per roll. Vanilla items always drop as a single item. An unrecognised material is skipped with a warning at startup, and an eliteMobsLoot filename that does not match an EliteMobs custom item logs a warning at drop time and produces nothing.

Weights may be written as decimals (0.5), whole numbers (2) or quoted strings ("1.5"); all three parse. A missing or non-numeric weight is treated as 0 and logs a warning.

Container Loot (Chests and Barrels)

During a match, chests and barrels are spawned by BetterStructures when the match starts. When a player right-clicks a chest or barrel:

  1. The vanilla container never opens — the interaction is cancelled and replaced with the Extractioncraft looting flow.
  2. The player must stand perfectly still for 3 seconds. A countdown is shown as a subtitle.
  3. Any movement at all cancels the interaction ("Don't move while opening a container!"). A player can only be opening one container at a time.
  4. On success, one loot table is selected from the content package's chestLootTables or barrelLootTables list (weighted selection).
  5. The selected loot table's entries each roll independently, and resulting items drop on the ground at the container's location.
  6. The container is destroyed after looting (replaced with air), so each container can only be looted once.

Containers display portal particles every 10 ticks while active in a match, making them visible to players.

Container loot is always generated at level 10

Container drops pass a fixed level of 10 to EliteMobs, regardless of which content package the match uses. The level range advertised by the Kobold Mines packages comes from the mobs in the map, not from chest and barrel loot.

Mob Kill Loot

When an EliteMob dies during a match, the plugin reads the betterstructures:spawnpool custom data on the mob. Mobs without that data (anything not spawned by the BetterStructures module generator) never generate Extractioncraft loot.

Every loot table whose spawnPools list matches the mob's spawn pool generates drops at the death location — this is not a weighted pick, so listing the same spawn pool in three loot tables gives you three independent sets of rolls. The mob's own level is passed to EliteMobs for level-appropriate item generation.

Mob level itself is decided by BetterStructures when the map is generated: bosses closer to the centre of the map spawn near their spawn pool's maximum level, and bosses out toward the edges spawn near its minimum. The world border shrinking toward the centre therefore pushes players into progressively harder — and more rewarding — territory.

Item Behavior on Exit

  • Every player leaving a match, successfully or not, has their inventory soulbound first (using the EliteMobs soulbind enchantment), so anything they walk out with is bound to them.
  • Players who successfully extract keep all items.
  • Players who fail to extract lose all inventory items when deleteItemsOnFailToExtract is true in config.yml (the default). This covers leaving with /exc leave, disconnecting, and taking lethal damage.
  • Nothing is wiped while the match is still waiting or counting down; the rule only applies once the match is live.