I recently began working on a new map, and figured that I wanted to use custom loot tables, so I headed over to minecraft tools, to make a loot table. No problems in that. But, now I cannot for the life of me figure out how I get the loot table to work ingame. I followed the wiki's guide to datapacks and set up a datapack with correct pack.mcmeta and all (I can see that the pack is working by using /datapack list).
But I can't get it in chests. I used this command here:
setblock ~ ~ ~ minecraft:chest{LootTable:"minecraft:chests/abandoned_mineshaft"}
to get a chest with mineshaft loot, which worked just fine. Then I changed it to fit my directory like this
setblock ~ ~ ~ minecraft:chest{LootTable:"(namespace:chests/(loottable name)"}
The chest I get is empty, any ideas why?
Edit: As requested, the datapack folder structure
world > datapacks > mazedatapack (pack.mcmeta in here) > data > namespace > loot_tables > loot_table.json
And the specific contents of the loot table (Made it simple for testing)
{"pools":[{"rolls":1,"entries":[{"type":"item","name":"minecraft:stone","weight":1,"functions":[{"function":"set_data","data":0}]}]}]}
And the command I use to get a chest which should have the loot
/setblock ~ ~ ~ minecraft:chest{LootTable:"namespace:loot_table"}