I'm trying to figure out how I setup a loot table json file for a block to drop a different type of block if the player breaks it with any of the swords (stone, diamond, etc) however it seems I'm only limited to testing if 1 type of item for example a stone sword specifically is being used and I've been struggling to figure out how to do it for all the tiers of swords I can tell this is really simple to do but information is hard to find.
Any help or ideas would be much appreciated
Here's the code:
{
"type": "minecraft:block",
"pools": [
{
"name": "pool1",
"rolls": 1,
"entries": [
{
"type": "minecraft:alternatives",
"children": [
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"item": "minecraft:wooden_sword",
"item": "minecraft:stone_sword"
}
}
],
"name": "candyworld:cakegrass_block"
},
{
"type": "minecraft:item",
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"name": "candyworld:cakemud_block"
}
]
}
]
}
]
}