1

Command Block help, please

Outcasts_Anonymous's Avatar Outcasts_Anonymous8/25/17 8:32 am
1 emeralds 309 4
8/26/2017 5:18 pm
Outcasts_Anonymous's Avatar Outcasts_Anonymous
Hello fellow forum people, I am having some trouble with my command block-ing an I was wondering if any of you could help. Also, I'm in version 1.11.2 to help.

The project I am working on has a system in place in which three plates can be activated in any order, causing three green squares to appear above the main door. My question is, how can I use command blocks to trigger another event by detecting once the squares are in place since they can appear in a random order?
Posted by Outcasts_Anonymous's Avatar
Outcasts_Anonymous
Level 1 : New Miner
0

Create an account or sign in to comment.

4

2
08/26/2017 3:45 pmhistory
Level 1 : New Engineer
FL4W
FL4W's Avatar
use testforblock
testforblock <x> <y> <z> <TileName> [dataValue] [dataTag]

For example:
to test for a stone block at x= 1, y=50, z=10 do this:
testforblock 1 50 10 stone

1. In your case you'd want to set up a scoreboard dummy objective.
2. You'll need a command block with the testforblock that has a conditional chain that adds one to the score and a third command block that deletes the command block before it so that the chain won't infinitely add a point the the score.
3. Repeat step 2 so that there are 3 of them. for each one change the testforblock coords to the position of where you would spawn in the green blocks
4. Have a repeating command block that has this as a condition "score_YOURSCOREBOARD_min=3"
And with that another conditional chain following it with your command you want to trigger.

If you didn't understand this you got lots of googling to do. this is basic command block stuff

EDIT:

I just thought of an easier way. If you are using one command block to summon in the green squares for each of the three squares this will work.

1. Set up a dummy scoreboard objective. Name it whatever you want
2. Have a conditional chain following the command block you've already setup that spawns in the green square.
3. Inside the conditional chain command block add 1 to the dummy scoreboard that you custom named.
4. Have a repeating command block that has this as a condition "score_YOURSCOREBOARD_min=3"
And with that another conditional chain following it with your command you want to trigger.
1
08/26/2017 5:18 pm
Level 1 : New Miner
Outcasts_Anonymous
Outcasts_Anonymous's Avatar
Thank you so much, this is a really big help! It worked just like you described. :)
1
08/26/2017 3:44 am
Level 1 : New Network
Amaith
Amaith's Avatar
Hey, I'd have to see exactly what you are talking about. If you want shoot me a PM.
1
08/26/2017 12:27 am
Level 10 : Journeyman Engineer
benmc
benmc's Avatar
hey is this on a server and i don't really get it can i have some more info?
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome