Arqade Asked on January 31, 2021
Does someone know how to set a command block with a command inside using the setblock command?
I have created this code /setblock <x> <y> <z> command_block {TileEntityData:{Command:"testfor @p[_=1]"}}
but it doesn’t works.
Do someone know how to do that?
You will need to do two things:
/setblock
command that need to be present; the datavalue, and the method of handling the existing block, if any.{Command: "testfor @p[_=1]"}
, without the TileEntityData bit.Thus, the resulting command should be along the lines of
/setblock <x> <y> <z> command_block 0 replace {Command:"testfor @p[_=1]"}
As proof, here's a shot of me using that command:
And here's the result:
Answered by Billy Mailman on January 31, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP