r/MinecraftCommands • u/WarriorOfTheInfinity • 5h ago
Help | Java 1.21.11 Loot Table not working
{
"type": "vault",
"pools": [
{
"rolls": 2,
"entries": [
{
"type": "item",
"weight": 1,
"name": "minecraft:crossbow",
"functions": [
{
"function": "set_count",
"count": 1
},
{
"function": "set_components",
"components": {
"minecraft:enchantments": {
"multishot": 1,
"piercing": 4
}
}
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:tipped_arrow",
"functions": [
{
"function": "set_count",
"count": 8
},
{
"function": "set_components",
"components": {
"minecraft:potion_contents": {
"potion": "minecraft:infested"
}
}
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:tipped_arrow",
"functions": [
{
"function": "set_count",
"count": 8
},
{
"function": "set_components",
"components": {
"minecraft:potion_contents": {
"potion": "minecraft:weakness"
}
}
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:spectral_arrow",
"functions": [
{
"function": "set_count",
"count": 32
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:enchanted_golden_apple",
"functions": [
{
"function": "set_count",
"count": 1
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:golden_spear",
"functions": [
{
"function": "set_count",
"count": 1
},
{
"function": "set_components",
"components": {
"minecraft:enchantments": {
"lunge": 3
}
}
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:golden_carrot",
"functions": [
{
"function": "set_count",
"count": 8
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:trident",
"functions": [
{
"function": "set_count",
"count": 1
},
{
"function": "set_components",
"components": {
"minecraft:enchantments": {
"loyalty": 3
}
}
},
{
"function": "set_damage",
"damage": 150
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:totem_of_undying",
"functions": [
{
"function": "set_count",
"count": 1
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:cobweb",
"functions": [
{
"function": "set_count",
"count": 8
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:wind_charge",
"functions": [
{
"function": "set_count",
"count": 16
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:water_bucket",
"functions": [
{
"function": "set_count",
"count": 1
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:ender_pearl",
"functions": [
{
"function": "set_count",
"count": 2
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:goat_horn",
"functions": [
{
"function": "set_count",
"count": 1
},
{
"function": "set_components",
"components": {
"minecraft:instrument": "minecraft:dream_goat_horn"
}
}
]
},
{
"type": "item",
"weight": 1,
"name": "minecraft:blaze_rod",
"functions": [
{
"function": "set_count",
"count": 1
},
{
"function": "set_components",
"components": {
"minecraft:enchantments": {
"fire_aspect": 2
}
}
}
]
}
]
}
]
}
2
Upvotes
1
u/GalSergey Datapack Experienced 2h ago
Try using your loot table with a command similar to this one in a command block.
If specifying the resource name doesn't work, try using the loot table itself defined inline instead. If there is an error in the loot table, you will see it reported in the command block.
If there are no errors and the loot table works, please provide more details about exactly what you are trying to achieve.