5

I'm trying to make a chain of command blocks that would change a player's gamemode and then teleport them somewhere from the press of 1 button. I tried connecting them with redstone and also tried using a repeater and nothing has worked. Any suggestions?

2
  • 1
    Can you give us some screenshots on how you connect them? – 54D Jun 4 '15 at 3:37
  • Do you want them running on after another or all at once? – Universal Electricity Jun 6 '15 at 14:56
4

1.9+ Answer

For your first command, place an impulse command block. Then, for all subsequent commands, use a chain block on 'always active'.

A demonstration of the method above


1.8 and below answer

This is possible with the use of repeaters.

Simply string your command blocks together like so:

How to string together command blocks

This will execute the commands left to right with a 4 tick delay between each when the button is pressed.

The delay on the repeaters can be changed or more repeaters can be added to make the delay between executions quicker or slower.

1
  • 1
    thanks for this guys, I'm literally just getting started with Minecraft (with my daughter) .. and this really helped - I was a bit confused at first why the first solution didn't give me the result I wanted until I made sure I placed the blocks with the 'direction arrow' pointing in the direction of the chain ... just thought this might help other noobs like me :) – DaddyHawk12 Jul 17 '19 at 19:27
2

In 1.9 just use an IMPULSE command with

/gamemode @p 0

then use a CHAIN command block with

/tp @p x y z

(x,y,z should be map coords. use ~ to make them relative coords.)

Make sure the chain block is set to "always active".

Also make sure the arrow of the impulse block points toward the chain block. Slap a button on the impulse or adjoining solid block and you are ready.

1

If you only need two commands, just plop both command blocks right next to each other:

Two command blocks

If you need more commands, line them up with repeaters:

Four command blocks

Make sure that the repeaters are facing the right direction. If they're not in the correct orientation, they aren't going to relay the redstone signal to subsequent blocks.

0

I just learned how to use /execute command on entity. Type /execute @e [type=arrow/snowball/armor_stand/egg e.t.c.] ~~~ then tp/fill (coordinates). I use this to make fast bridges or clear huge places and it's fun. Just remember to set command block on repeating and always active. Fast bridge -

  • 1st command block- /execute @e [type=armor_stand] ~~~ tp ~~1 - speed and direction

  • 2nd command block- /execute @e [type=armor_stand] ~~~ fill ~1~~1 ~-1~~-1. You can operate with numbers to see changes.

I hope this will help you to know command blocks better. Good luck. ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.