1

Player block detection

Coolakillen_'s Avatar Coolakillen_2/4/16 2:23 pm
1 emeralds 224 4
2/6/2016 4:13 pm
Coolakillen_'s Avatar Coolakillen_
I know this has probably been answered sooo many times but I was wondering how I could make with commandblocks so when I stand on for example stone it gives an output. I have seen many videos and things but can never get it to work
Posted by Coolakillen_'s Avatar
Coolakillen_
Level 1 : New Crafter
0

Create an account or sign in to comment.

4

1
02/04/2016 2:34 pm
Level 28 : Expert Pig
Dark_Alpha_
Dark_Alpha_'s Avatar
try this:

/execute @a ~ ~ ~ detect ~ ~-1 ~ stone 0 <command>

this is for 1.8 and what this command does is testing for every player in the world and execute the command on all of them if they are 1 block above stone (so they are standing on a stone block). then you will have to type the command you want to be executed instead of the <command> thingies.

exemple

/execute @a ~ ~ ~ detect ~ ~-1 ~ stone 0 give @p[c=1] dirt 1 0

this gives every player standing on stone a dirt block
1
02/06/2016 10:57 am
Level 1 : New Crafter
Coolakillen_
Coolakillen_'s Avatar
what does the ~ ~ ~ at the start stand for? and do i need to hook it up to a clock?
1
02/06/2016 11:04 am
Level 50 : Grandmaster Pixel Painter
Sardonyx
Sardonyx's Avatar
The ~ ~ ~ is relative coordinates. It's just saying to make the detect command happen at the same block as the player, instead of above them or at a set location. Yes, it will have to be put on a clock ^^
1
02/06/2016 4:13 pm
Level 1 : New Crafter
Coolakillen_
Coolakillen_'s Avatar
hmm thanks but its still not working, can u put the EXACT command for when I stand on dirt it sets a redstoneblock 5 blocks under the commandblock. Maybe im just being annoying i just want it to work


edit: nevermind Stupid me forgot to put in "redstoneblock" after the coordinates... thanks so much for the detailed explanation
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome