Open misode opened 4 months ago
Shouldn't this error, not warn?
Duplicate keys show a warning in other places
That probably shouldn't be the case
It is the case with the default json vscode language features, why should we change that?
Because it's incredibly silly, and there's probably some JSON deserializers that don't even support it
Hmm, I am also reporting duplicate keys as errors. How does minecraft react to it? I would have assumed it doesn't want to parse it.
It depends on the exact case.
/summon zombie ~ ~ ~ {HandItems:[{id:"golden_sword",components:{"enchantments":{sharpness:4,"minecraft:sharpness":5}}}]}
/give @s minecraft:golden_sword[enchantments={sharpness:4,"minecraft:sharpness":5}]
But there's no need for us to match the game exactly. We can decide ourselves whether something should be a warning or error.
In the following item modifier, a warning should be reported because
attribute_modifiers
andminecraft:attribute_modifiers
are essentially duplicate keys.