-1

I might be the only one who hates this new 1.13 update because Mojang messed with the commands waaay too much. Anyways, I want to set down a command block with a command I've written inside of it using the /setblock command. However, Mojang has either removed or completely changed how this worked like it did in 1.12. It used to worked like this: "/setblock command_block 0 replace {Command:"INSERT COMMAND HERE"}". However, this no longer works. How do you do this in 1.13. Thanks!

1
  • A new version of minecraft making minor tweaks to an existing answer does not merit posting a new question asking the same thing. That answer should be updated, or a new one with the updated syntax should be posted, instead of asking an entirely new question.
    – pppery
    Jul 11, 2019 at 20:20

1 Answer 1

0

NBT now goes in the <block> argument directly after the block ID, like so:

setblock <x> <y> <z> command_block{Command:"say foo"}

If you want to add blockstates, you can also do so like:

setblock ~ ~ ~ command_block[facing=west]{Command:"say foo"}

I might be the only one who hates this new 1.13 update because Mojang messed with the commands waaay too much

Don't immediately react to new changes with hate before even learning them.

For example, this change means that the <block> argument is consistent across multiple commands. You can use the same syntax to specify NBT and blockstates in places like execute if block <block> and fill <x> <y> <z> <x> <y> <z> <block> replace <block>, whereas it was previously not possible to specify NBT there in 1.12.

1
  • Thank you this is exactly what I was looking for! :) Dec 29, 2018 at 23:39

Not the answer you're looking for? Browse other questions tagged .