Loot Injection
Loot configs drop custom items from vanilla gameplay: breaking blocks, killing mobs, and fishing, without touching datapacks. Each config in the loots/ folder is one loot entry with its own chance, items, and filters. This page covers making a loot entry and how each type behaves.
Quick start
Open
/plugins/EcoItems/loots/.Copy
_example_loot.ymland rename it to your loot's ID, e.g.ruby_from_stone.yml.Set the
typeand, for block or mob loot, thetargets.Set the
chanceand theitemsit drops.Run
/ecoitems reload.Temporarily set
chance: 1.0, then break a target block (or kill a target mob) in survival to confirm it drops.
Naming and IDs
The file name without .yml is the loot entry's ID.
The structure of a loot entry
| Part | What it controls |
|---|---|
| Type | Whether it rolls on blocks, mobs, or fishing |
| Targets | Which blocks or mobs it rolls on |
| Rolls | The chance to roll, the items, and bonus XP |
| Filters | Biomes, worlds, and conditions it applies in |
# === Type: what triggers the roll ===
type: block # block, mob, or fishing
# === Targets: which blocks or mobs ===
targets: # Not used by fishing
- stone
- deepslate
# === Rolls: what it drops ===
chance: 0.02 # Chance for the loot to roll at all, 0-1
fortune: true # Fortune on the tool multiplies amounts (block only)
items:
- item: ecoitems:ruby # Any eco item lookup
chance: 1.0 # Per-item chance within a successful roll
amount: 1 # Or a range like 1-3
xp: 1-3 # Bonus XP
# === Filters: where and for whom ===
biomes: [] # Optional; empty = everywhere
worlds: [] # Optional; empty = everywhere
conditions: [] # Optional; libreforge conditions checked on the player
Type
blockrolls when a player breaks a matching block in survival, unless another plugin already cancelled the drops. It works on custom blocks too, on top of their owndrops:.mobrolls when a player kills a matching entity; items join the death drops at the mob's location.fishingrolls on a successful catch, and the first rolled item replaces the vanilla catch.targetsis ignored.
Targets
Block loot takes any eco block lookup: materials, #tags, ecoitems:my_block, or another plugin's custom blocks. Mob loot takes any eco entity lookup: entity types, #tags, or custom entities.
Rolls
chance is the chance for the whole entry to roll. When it does, each item in items rolls its own chance, with an amount that can be a number or a range. fortune multiplies amounts for block loot, and xp drops bonus experience.
For example, a rare fishing catch limited to oceans:
type: fishing
chance: 0.05
items:
- item: ecoitems:enchanted_boot
biomes:
- ocean
- deep_ocean
Filters
biomes: and worlds: limit where the loot applies, using biome keys like deep_dark and lowercase world names. A conditions: block accepts libreforge conditions checked on the player, such as permissions or skill levels.
Where to go next
Make an item: How to Make an Item to create the items your loot drops.
Conditions: libreforge conditions to gate loot on the player.