Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-94778

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 15w51b
    • Mac OS X El Capitan, Java 8 (with JDK)
    • Unconfirmed
    • Creative

      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.

            Unassigned Unassigned
            penne12 Ben A
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: