Closed SargeRyong closed 1 year ago
Single quotes are (iirc) not valid json syntax to the strict gson parser. You have to use double quotes, and inner quotes have to be escaped: \"
So what you probably want is
"entities": [{
"entity": "minecraft:zombie",
"nbt": "{\"ArmorItems\": [{\"id\": \"minecraft:leather_boots\",\"Count\": 1}]}"
}]
Oh, that was quick, thanks!
Using the string version, double-quoting, and escaping my inner quotes seems to have it working correctly.
Any idea why the object version of the tag isn't getting parsed, though? (the cause of the "UnsupportedOperationException: JsonObject" from the first stack trace)
I updated to gateways 2.3.0 just to make sure I wasn't looking at the wrong version of the schema, but it failed in the same way.
Regardless, I have a way forward now, tyvm!
The object parser was not added until 1.19, in 1.18 and prior only the stringified-nbt parser is present.
Ah, gotcha! Thanks for the info!
In MC 1.18.2, forge 40.2.0, gateways 2.2.1
Possible I'm doing something wildly wrong here, but I'm at my wit's end trying to figure out why Gateways won't parse my gates with custom entity nbt.
If I remove the nbt tags from my entities, it parses just fine, but even a simple one causes it to choke.
For example, this entity in a gate with only a single wave:
results in the following error:
If I instead encapsulate the nbt object in single quotes
I get this error instead:
I've checked and double checked and run the thing through a JSON validator dozens of times just to make sure an it is not malformed, so I have no idea what's going on here. Is this a bug or am I just very confused?