I can't understand how to void the vanilla loot tables, I've been in this for hours and can't find anything online. Only very outdated tutorials.
I added custom crops and seeds to my mod, now I need those seeds to fall from the grass of the world.
The loot tables for my custom blocks are in data.modId.loot_tables.blocks and they work fine.
Now, when I try to cancel the grass to drop an item of my choice, for example, coal, I do this:
1] Make grass.json
2] Fill it out:
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"item": "minecraft:shears"
}
}
],
"name": "minecraft:grass"
},
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:random_chance",
"chance": 0.125
}
],
"functions": [
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:uniform_bonus_count",
"parameters": {
"bonusMultiplier": 2
}
},
{
"function": "minecraft:explosion_decay"
}
],
"name": "minecraft:coal"
}
]
}
]
}
]
}
3] Place it in my project in data.minecraft.loot_tables.blocks
When I try it in the game, the grass still drops wheat seeds and not coal. Why?