
Loot Modifier
This modification provides the ability to customize existing loot tables using datapacks. You can now flexibly change chest contents, mob drop rates, and resource drops without being limited by Minecraft's standard settings.
Configuration Format
Loot table modifiers are created in JSON format files at the path: /data/<namespace>/lootmodifier/loot_table_modifier/<name>.json
Main Parameters:
- Target: Specifies which specific loot tables will be modified. You can specify a single table or list multiple in an array.
- Pools: Additional item sets added to the original loot pool. Uses the standard vanilla Minecraft loot pool format.
Practical Example
Let's say we want to add a small chance for diamonds to drop when mining dirt and grass blocks:
{
"target": [
"minecraft:blocks/dirt",
"minecraft:blocks/grass_block"
],
"pools": [
{
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.1
}
],
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:diamond"
}
],
"rolls": 1.0
}
]
}
In this example, a 10% chance of obtaining diamonds when breaking dirt and grass blocks is established, making routine work slightly more interesting.