misode.github.io
misode.github.io copied to clipboard
You can't import JSON with newlines in strings, even though Minecraft can parse it without issue.
For example, Minecraft reads and parses this just fine (in 1.20.4):
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:splash_potion",
"functions": [
{
"function": "minecraft:set_nbt",
"tag": "
{
Potion: \"minecraft:water\",
custom_potion_effects: [{id: \"minecraft:blindness\", duration: 400}],
CustomPotionColor: 2039587,
display: {
Name: '{\"italic\":false,\"text\":\"Splash Potion of Blindness\"}'
},
RepairCost: 2147483647,
pandamium: {
id: \"blindness_splash_potion\"
}
}
"
}
]
}
]
}
]
}
But the generator doesn't seem to like it very much
A weird edge-case, I know, but I found formatting the SNBT like that when writing the loot table helpful, and I noticed that I couldn't import it to make edits 😅
This looks extremely cursed. I don't know if I want to support "malformatted" JSON like this. I already somewhat support comments in JSON, but this is next level 😅