Mojira Archive
MC-94778

Strict JSON (Quoted Names) doesn't work in /summon

Using the command (in a command block):

 summon FallingSand ~0 ~1 ~0 {"Block":"stone","Time":1,"Data":0,"passengers":[{"Block":"redstone_block","Time":1,"Data":0,"passengers":[{"Block":"activator_rail","Time":1,"Data":0,"passengers":[{"Command":"gamerule commandBlockOutput ","id":"MinecartCommandBlock"},{"Command":"fill ~8 ~7 ~5 ~8 ~7 ~5 stained_hardened_clay 13 hollow","id":"MinecartCommandBlock"},{"Command":"say hello world","id":"MinecartCommandBlock"},{"Command":"setblock 2 2 0 chain_command_block 1 replace {\"Command\":\"testfor @e[name=woof]\",\"Auto\":\"1b\"}","id":"MinecartCommandBlock"},{"Command":"kill @e[r=1,type=MinecartCommandBlock]","id":"MinecartCommandBlock"}],"id":"FallingSand"}],"id":"FallingSand"}]}

You notice that it summons a sand block that instantly disappears (not a stone block with a bunch of other things on top).

Trying again with the much simpler `/summon` (by hand):

/summon FallingSand ~0 ~1 ~0 {"Block":"stone","Time":1}

gives the same result although

/summon FallingSand ~0 ~1 ~0 {Block:"stone",Time:1}

works as expected.

This Javascript converts the strict to lenient, if it helps anyone:

text.replace(/\\?"(\w+?)\\?":/g, "$1:");

And it makes the above command work.

Invalid

Ben A

2015-12-24, 10:16 PM

2015-12-25, 12:29 AM

2015-12-25, 12:05 AM

0

5

Unconfirmed

command, json, nbt

Minecraft 15w51b

-