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

Using /setblock to place a repeating command block doesn't work with commands that have quotations in them

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.19.2
    • None
    • Unconfirmed
    • (Unassigned)

      I'm trying to make a book full of commands for quick use and it seems there is a problem with using setblock to place repeating command blocks.

      Basically, when there are quotation marks in the command while trying to use setblock to place the command block, the quotations mess up the entire thing.

      Here's the command:

      /setblock 0 -64 0 minecraft:repeating_command_block{auto:1b,Command:"execute as @p[nbt={Inventory:[

      {id:"minecraft:written_book",Count:1b}

      ]}] at @s run fill ~-2 ~-2 ~-2 ~2 ~2 ~2 air replace stone"} destroy

      What the command is supposed to do is create a command block that mines stone automatically for players that have written books in their inventory.

      However, the quotations in the id:"minecraft:written_book" part mess up the command.

      I know it's a bug, because if you take out the command and put it in a repeating command block normally, it will work.

            Unassigned Unassigned
            Phobose801 Phobose801
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: