I have a squid with a custom name of "Create_Pig_Alter", and whenever it is "standing" on stone, I want to set a scoreboard objective for the squid. I've tried the following command, but it isn't working:

/execute @e[name=Create_Pig_Alter] ~ ~ ~ detect ~ ~-1 ~ stone /scoreboard players set @e PigAlterProgress 1

What am I doing wrong?

  • Is that command running on a clock? – Jacques Marais Jul 6 '15 at 12:12

"detect" syntax for /execute:

/execute <target> X Y Z detect X Y Z <block> <Damage> <command>

You are missing the Damage value of the block. You can set the value to -1 to signify any value. Fixed command using a value of 0 for regular smooth stone:

/execute @e[name=Create_Pig_Alter] ~ ~ ~ detect ~ ~-1 ~ stone 0 /scoreboard players set @e PigAlterProgress 1

scoreboard can't have more than 15 chars so "PigAlterProgress" is too long. And indeed you must use a fill/setblock clock in those cases.

  • The character limit is 16, which "PigAlterProgress" falls within range of. – Skylinerw Mar 30 '16 at 23:33

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.