1

What's Wrong?

blahajay 8/23/20 1:26 am history
134
8/25/2020 4:07 pm
I think I've got it now, but I'll post it anyways.
{
"pools": [{
"rolls": 1,
"entries": [{
"type": "minecraft:item",
"name": "minecraft:rotten_flesh",
"weight": 1,
"functions": [{
"function": "minecraft:furnace_smelt",
"conditions": [{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"flags": {
"is_on_fire": true
}
}
}]
},
{
"function": "minecraft:set_count",
"count": {
"min": 1,
"max": 3
}
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:bone",
"weight": 1,
"functions": [{
"function": "minecraft:set_count",
"count": {
"min": 1,
"max": 2
}
}]
},
{
"type": "minecraft:item",
"name": "minecraft:paper",
"weight": 2,
"functions": [{
"function": "minecraft:set_count",
"count": {
"min": 1,
"max": 3
}
},
{
"function": "minecraft:set_name",
"name": {
"text": "Bloodied Paper",
"italic": false
},
"entity": "this"
},
{
"function": "minecraft:set_lore",
"lore": [{
"text": "It could have been a letter or money. One may never know.",
"italic": false
}],
"entity": "this"
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:potato",
"weight": 5,
"conditions": [{
"condition": "minecraft:random_chance_with_looting",
"chance": 0.1,
"looting_multiplier": 0.01
}]
},
{
"type": "minecraft:item",
"name": "minecraft:zombie_head",
"weight": 3,
"functions": [{
"function": "minecraft:set_name",
"name": {
"text": "Decaying Head",
"italic": false
},
"entity": "this"
},
{
"function": "minecraft:set_lore",
"lore": [{
"text": "You hope this",
"italic": false
},
{
"text": "head of",
"italic": false
},
{
"text": "rotten flesh",
"italic": false
},
{
"text": "will help you",
"italic": false
},
{
"text": "sneak by your",
"italic": false
},
{
"text": "undead",
"italic": false
},
{
"text": "adversaries.",
"italic": false
}
],
"entity": "this"
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:iron_sword",
"weight": 3,
"functions": [{
"function": "minecraft:set_damage",
"damage": {
"min": 0.5,
"max": 0.75
}
},
{
"function": "minecraft:set_name",
"name": {
"text": "Blunt Sword",
"italic": false
},
"entity": "this"
},
{
"function": "minecraft:set_lore",
"lore": [{
"text": "This sword has",
"italic": false
},
{
"text": "obviously seen",
"italic": false
},
{
"text": "better days.",
"italic": false
}
],
"entity": "this"
},
{
"function": "minecraft:set_attributes",
"modifiers": [{
"attribute": "generic.attack_damage",
"amount": {
"min": 4,
"max": 5
},
"operation": "addition",
"slots": [
"mainhand"
]
}]
}
]
},
{
"type": "minecraft:item",
"name": "minecraft:iron_sword",
"weight": 2,
"functions": [{
"function": "minecraft:set_damage",
"damage": {
"min": 0.25,
"max": 0.5
}
},
{
"function": "minecraft:set_name",
"name": {
"text": "Broken Sword",
"italic": false
},
"entity": "this"
},
{
"function": "minecraft:set_lore",
"lore": [{
"text": "The blade",
"italic": false
},
{
"text": "is missing.",
"italic": false
}
],
"entity": "this"
},
{
"function": "minecraft:set_attributes",
"modifiers": [{
"attribute": "generic.attack_damage",
"amount": {
"min": 2,
"max": 4
},
"operation": "addition"
}]
}
]
}
]
}]
}
Posted by
blahajay
Level 43 : Master System
27

  Have something to say?

JoinSign in

4

One_Nose
08/23/2020 1:53 am
He/Him • Level 59 : Grandmaster Dragonborn Hero
It's not valid. What's the point of having two pools? You've forgotten some commas. JSON can be confusing for starters. You can use an online JSON validator to check if your code is even readable, like this one. They tell you if it's not valid and what's not valid without the needs of checking the commas by yourself. You can also use JSON editors to write the code. If it's valid but still not working, than you wrote something which a normal validator cannot validate, after your code is valid, if it still doesn't work reply with it so I can help you with the minecraft issues.
1
blahajay
08/23/2020 10:34 pm
Level 43 : Master System
history
Wait, I did the thing and validated it, but it still won't work. I'm using pathname thecitieslore/data/thecities/loot_tables/entities/zombie.json, but still it won't work. Even when it's valid JSON. Why?
2
One_Nose
08/25/2020 4:07 pm
He/Him • Level 59 : Grandmaster Dragonborn Hero
Because maybe it's valid Json, but not a valid loot table. Try pasting it again, PMC does have some bugs.
2
blahajay
08/23/2020 10:37 pm
Level 43 : Master System
Also it was perfectly vaild when I copy and pasted it into JSONLint. I might have had an error pasting it into the thread.
1

Welcome