Some backstory. I wanted to make a command block that had a simple command when placed: Kill all users and set block to air to stop the trigger.
However, I had no idea how to make it so a command block had commands already input on place.
Is this possible? (Version 1.16.5)
Minecraft – Would it be possible to make a command block that has commands set when placed
minecraft-java-edition
Best Answer
You can do this from scratch with
/setblock
:Your command goes inside those quotation marks right there.
If you are looking to get this command block as an inventory item, use
BlockEntityTag
like so:Beware as you will need to escape quotation marks in your inner command, which can lead to messes like these!