Loot Tables
Loot Tables are complex objects that determine how loot is handled in Minecraft.
Categories
There are 5 major categories of Loot Tables in Mine Mine no Mi:
blocks
, loot obtained when breaking or mining blocks, usually the block itselfchests
, loot contained within chests or other containers when opening them- Every structure has their own subcategory here, for example
pirate_small_ship
. Each json file stored under these categories corresponds to a physical chest found in that structure, meaning that ifpirate_small_ship
has 2 files it has 2 physical chests where loot can spawn.
- Every structure has their own subcategory here, for example
dfboxes
, fruits found within akuma no mi boxes when opening thementities
, loot dropped when killing an entitytrader
, is a subcategory where loot tables for items sold by traders are located, these are not the drops of the traders themselves which are found in the parent folder ofentities
instead.
rewards
, loot obtained when finishing a challenge
dfboxes
loot tables can contain any item besides a devil fruit. It is left to the datapack creator's discression if
adding non devil fruit items as part of the loot is intended or not. By default they will always only contain devil
fruits.
All 5 loot table categories work the same exact way and have the same exact format, however they might have unique
functions or conditions that only apply to those specific cases, for example rewards
makes heavy use of the
mineminenomi:first_completion
condition for loot to only be given when the challenge is completed for the first time.
For more advanced Loot Tables consider adding Functions and Conditions to make your loot more customized or dynamic.
Modifying a Loot Table
To put it simply, by using datapacks you cannot append new pools to a loot table, instead the whole file is replaced.
If you are looking into appending new pools into an already existing loot table, be it from Minecraft or Mine Mine no Mi look into the LootTableLoadEvent
event from Forge.
Loot Context
Certain functions or conditions require parameters passed when the loot gets constructed, some examples of these parameters might be "the player who opened the chest", "the challenge for which this loot is generated", "the entity who killed this entity" and more.
These parameters are passed via code, so they have nothing to do with datapacks and cannot be added via datapacks, however it is worth being aware of them as functions and conditions cannot work without these parameters being passed correctly. Using a function or condition randomly outside the context it was intended to be used can lead to either non-functional loot tables or (at worst) a crash.
Mine Mine no Mi adds only one context parameter for mineminenomi:completed_challenge
, used for challenge rewards and
is passed as the challenge that just got finished and for which the loot gets generated.
For more info check on each individual function or condition you wish to make use of outside its intended context.
For vanilla contexts you can check Minecraft Wiki's page on it.
Tree structure
Below you can find the entire tree of the /data/mineminenomi
folder, showcasing all the available loot tables in the
mod which datapacks might replace.
.
├── blocks
│ ├── axe_dial.json
│ ├── breath_dial.json
│ ├── cannon.json
│ ├── den_den_mushi.json
│ ├── design_barrel.json
│ ├── eisen_dial.json
│ ├── flag.json
│ ├── flame_dial.json
│ ├── flash_dial.json
│ ├── impact_dial.json
│ ├── inject
│ │ └── brain_coral_block.json
│ ├── kairoseki_bars.json
│ ├── kairoseki_block.json
│ ├── kairoseki_ore.json
│ ├── milky_dial.json
│ ├── reject_dial.json
│ ├── sky_block.json
│ └── wanted_poster.json
├── chests
│ ├── bandit_camp
│ │ ├── large_tent.json
│ │ └── small_tent.json
│ ├── bandit_large_base
│ │ ├── dorm.json
│ │ ├── food.json
│ │ ├── secret_stash.json
│ │ ├── tent.json
│ │ └── tower.json
│ ├── bandit_small_base
│ │ ├── gold.json
│ │ ├── lab.json
│ │ ├── mine.json
│ │ └── ores.json
│ ├── ghost_ship
│ │ ├── captain.json
│ │ └── supplies.json
│ ├── marine_battleship
│ │ ├── captain.json
│ │ └── supplies.json
│ ├── marine_camp
│ │ ├── large_tent.json
│ │ └── small_tent.json
│ ├── marine_large_base
│ │ ├── captain.json
│ │ ├── food.json
│ │ ├── generic.json
│ │ └── lab.json
│ ├── marine_small_base
│ │ ├── captain.json
│ │ ├── dorm.json
│ │ └── supplies.json
│ ├── pirate_large_ship
│ │ ├── captain.json
│ │ ├── supplies.json
│ │ ├── treasure.json
│ │ └── weapons.json
│ ├── pirate_medium_ship
│ │ ├── captain.json
│ │ ├── food.json
│ │ └── supplies.json
│ └── pirate_small_ship
│ └── supplies.json
├── dfboxes
│ ├── golden_box.json
│ ├── iron_box.json
│ └── wooden_box.json
├── entities
│ ├── bandit_brute.json
│ ├── bandit_captain.json
│ ├── bandit_grunt.json
│ ├── bandit_sniper.json
│ ├── big_duck.json
│ ├── blagori.json
│ ├── blugori.json
│ ├── boxing_dugong.json
│ ├── den_den_mushi.json
│ ├── kung_fu_dugong.json
│ ├── lapahn.json
│ ├── marine_brute.json
│ ├── marine_captain.json
│ ├── marine_grunt.json
│ ├── marine_sniper.json
│ ├── marine_trader.json
│ ├── pirate_bomber.json
│ ├── pirate_brute.json
│ ├── pirate_captain.json
│ ├── pirate_grunt.json
│ ├── pirate_sniper.json
│ ├── pirate_trader.json
│ ├── sea_cow.json
│ ├── trader
│ │ ├── marine_trader.json
│ │ ├── pirate_trader.json
│ │ └── skypiean_trader.json
│ ├── white_walkie.json
│ ├── wrestling_dugong.json
│ └── yagara_bull.json
└── rewards
├── arlong_hard.json
└── arlong.json