misode.github.io
misode.github.io copied to clipboard
SNBT output type can generate invalid SNBT arrays (containing more than 1 data type)
For example, this item modifer outputs:
{
function: "minecraft:set_name",
name: [
{
text: "Hello"
},
" World"
]
}
Which is invalid SNBT because arrays can only contain elements of the same type, but this contains a compound and a string.
In this specific case, the plain string, " World", should be changed to the compound {text:" World"} as that's how the game naturally would handle it.
This seems like something that would need case-by-case solving. You could always just have a little warning sign if it does happen somewhere that isn't solved saying "Warning this isn't actually valid SNBT!".