How do I spawn a chest filled with command blocks containing a TP command?

How do I spawn a chest filled with command blocks containing a TP command? - Unrecognizable woman holding paw of dog

I want to /setblock a chest filled with command blocks with this command pre-entered in all of them:

"/tp @e[r=2] -92.500 67.00000 242.000".

All I have tried was Google, and I couldn't find it anywhere. How can I make this happen?



Best Answer

I can't seen to be able to find anything on spawning a chest with a command block that already has a command in it.
However I do have a solution for you.

  1. You need to just place a command block and insert the tp command.
  2. Once you have done that you can ctrl + click the middle mouse button, what that does is puts the block in your inventory but with the NBT tag which is the command in the command block.
  3. Get the command block you have in your inventory and put it in a chest.
  4. Once you have done that you can use the clone command to clone the chest and put it somehwere else

If it's too unclear or you don't understand I can make a video on this if you want, it'll make it easier to nderstand this.

Also there might be a better solution but I couldn't find one but there are people that are better at this then me.




Pictures about "How do I spawn a chest filled with command blocks containing a TP command?"

How do I spawn a chest filled with command blocks containing a TP command? - Side view of young woman in hoodie sitting on floor near sofa and playing with obedient brown Labrador while resting during free time
How do I spawn a chest filled with command blocks containing a TP command? - Crop hacker silhouette typing on computer keyboard while hacking system
How do I spawn a chest filled with command blocks containing a TP command? - Women Removing Clothes From the Chest



How do you use command blocks to TP?

Type this command in when having the command block GUI open /teleport @p <x> <y> <z> . Then, activate the command block with redstone (including buttons, levers, and pressure plates), and they will be sent to their destination. The player can set up multiple different teleports.



Auto Refilling Chest Command Block Tutorial




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Ivan Babydov, Ivan Babydov, Anete Lusina, cottonbro