loot table data packs 1.13 Please HELP
On my 1.13 server I am trying to do a (what I'm calling) Mansion Run, with a special Loot Table prize. I set the data pack up as dictated by this site and used this site to generate the loot table, and it didn't work, so I looked at the table and realized that since the names of (just about EVERY block has changed that wouldn't work off the generator so I edited where I seen needed to be, and it sill isn't working. I'm not one to ask for help on this but, I'm at my ends wit here. I hope I format this correctly as its my first time
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:dark_oak_planks",
"weight": 10,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 12
}
}
]
},
{
"type": "item",
"name": "minecraft:dark_oak_log",
"weight": 9,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 5
}
}
]
},
{
"type": "item",
"name": "minecraft:melon_seeds",
"weight": 10,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 4
}
}
]
},
{
"type": "item",
"name": "minecraft:diamond_sword",
"weight": 5
},
{
"type": "item",
"name": "minecraft:diamond_sword",
"weight": 1,
"functions": [
{
"function": "set_nbt",
"tag": "{display:{Name:\"Bane of Illigers\",Lore:[\"Created by the Greatest Weapon-Smith\", \"the Villighers could Muster\"]}},Enchantments:[{id:\"minecraft:sweeping\",lvl:3},{id:\"minecraft:unbreaking\",lvl:3},{id:\"minecraft:sharpness\",lvl:3},{id:\"minecraft:knockback\",lvl:2}]}"
}
]
},
{
"type": "item",
"name": "minecraft:name_tag",
"weight": 6
},
{
"type": "item",
"name": "minecraft:ender_chest",
"weight": 2
},
{
"type": "item",
"name": "minecraft:glass",
"weight": 8,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 12
}
}
]
},
{
"type": "item",
"name": "minecraft:red_wool",
"weight": 8,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 8
}
}
]
},
{
"type": "item",
"name": "minecraft:stone_stairs",
"weight": 8,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 8
}
}
]
},
{
"type": "item",
"name": "minecraft:emerald_ore",
"weight": 4,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
}
]
},
{
"type": "item",
"name": "minecraft:cauldron",
"weight": 5
},
{
"type": "item",
"name": "minecraft:white_carpet",
"weight": 8,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 10
}
}
]
}
]
}
]
}
Not sure if you were able to ever figure this out, but I was finally able to do it myself by escaping each key in the tag, and any place a double quote was used inside of the tag's string value. I was even able to change the color of the Lore text.
I do not know for certain, but it appears that you do not need to use set_count for all items. If I just want one item dropped, then set_count does not appear to be necessary.
I was able to trouble shoot the issue by looking at the console output for the server.
{
"type": "item",
"name": "minecraft:diamond_sword",
"weight": 1,
"functions": [
{
"function": "set_name",
"name": {
"text": "Bane of Illagers",
"color": "green",
"italic": "false"
}
},
{
"function": "set_nbt",
"tag": "{\"display\":{\"Lore\": [\"§fCreated by the Greatest Weapon-Smith\",\"§fthe Villagers could Muster.\"]},\"Enchantments\":[{\"id\":\"minecraft:sweeping\",\"lvl\":3},{\"id\":\"minecraft:unbreaking\",\"lvl\":3},{\"id\":\"minecraft:sharpness\",\"lvl\":3},{\"id\":\"minecraft:knockback\",\"lvl\":2}]}"
}
]
}