1
Loot Tables
I was messing with loot tables and I'm wondering how to get them to work. I've got in data/minecraft/loot_tables/blocks
.json file:
{ "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:spawner", "functions": [ { "function": "minecraft:set_count", "count": 1, "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "items": [ "minecraft:diamond_pickaxe", "minecraft:iron_pickaxe", "minecraft:golden_pickaxe", "minecraft:netherite_pickaxe" ], "enchantments": [ { "enchantment": "minecraft:silk_touch" } ] } } ] } ] } ] } ] }
.json file:
{ "type": "minecraft:block", "pools": [ { "rolls": 1, "entries": [ { "type": "minecraft:item", "name": "minecraft:spawner", "functions": [ { "function": "minecraft:set_count", "count": 1, "conditions": [ { "condition": "minecraft:match_tool", "predicate": { "items": [ "minecraft:diamond_pickaxe", "minecraft:iron_pickaxe", "minecraft:golden_pickaxe", "minecraft:netherite_pickaxe" ], "enchantments": [ { "enchantment": "minecraft:silk_touch" } ] } } ] } ] } ] } ] }
Create an account or sign in to comment.
6
The pathing is correct, so the problem must lie within the json file itself.
If I do the command /loot give @s loot craftablespawners:silkspawner it gives me the spawner, but when I mine it, it won't drop anything.
.json file
{ "type": "block", "pools": [ { "rolls": 1, "entries": [ { "type": "item", "weight": 1, "name": "minecraft:spawner", "functions": [ { "function": "set_count", "count": 1 }, { "function": "set_nbt", "tag": "{BlockEntityTag:{SpawnData:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:diamond_pickaxe\",Count:1b,tag:{Enchantments:[{id:\"minecraft:silk_touch\",lvl:1s}]}}}},SpawnPotentials:[{weight:1,data:{entity:{id:\"minecraft:item\",Item:{id:\"minecraft:diamond_pickaxe\",Count:1b,tag:{Enchantments:[{id:\"minecraft:silk_touch\",lvl:1s}]}}}}}]}}" } ] } ] } ]}
I'll try a different program to make the json file.
sorry Im late, but I use https://misode.github.io/loot-table/ for loottables
I work with Mcreator for 1.17.1 version. If you tell me what do you want them to have, I can try to make them myself and send the .json archive then.
I don't think its the .json. It might be where I put the file. If you can, try and make a loot table with Mcreator, open the file, and tell me where the loot table is. It doesn't have to be what I put.