1

/execute detect troubles

hokage3211 12/18/14 11:09 pm
394
12/22/2014 2:02 pm
I need to detect when any player is above a dropper, facing up (block value: 1) but also detect that every slot in the dropper has a single block of ice in it, when I tried this the formatting of the command seems to keep thinking the data value is part of the next command even though I was using "detect ~ ~ ~ dropper 1"

This is the command I have tried;

/execute @a ~ ~ ~ detect ~ ~-1 ~ dropper 1 {Items:[0:{id:"minecraft:ice",Count:1b},1:{id:"minecraft:ice",Count:1b},2:{id:"minecraft:ice",Count:1b},3:{id:"minecraft:ice",Count:1b},4:{id:"minecraft:ice",Count:1b},5:{id:"minecraft:ice",Count:1b},6:{id:"minecraft:ice",Count:1b},7:{id:"minecraft:ice",Count:1b},8:{id:"minecraft:ice",Count:1b}]} say hi

I apologize if this is like a easy problem to fix and I'm being lazy somehow, tutorials never seem to give full examples of this thing.
Posted by
hokage3211
Level 53 : Grandmaster Nerd Programmer
52

  Have something to say?

JoinSign in

3

hokage3211
12/22/2014 2:02 pm
Level 53 : Grandmaster Nerd Programmer
Yeah, thank you to both of you for telling me, I think there probably should be a sub-command to test for data of a block, that would make detect even more usefull.
1
Skitto493
12/22/2014 10:51 am
Level 55 : Grandmaster Dragon
Sorry, like what the guys said above, you can't use data tags in /execute. There's a work-around for this with entities, but I don't think there is any way for blocks.
1
elyisgreat
12/22/2014 9:36 am
Level 30 : Artisan Crafter
Unfortunately, you cannot use [dataTag] in execute detect. I tried to make a similar concept with detecting the tuning of a noteblock (although I can tell by ear I thought it would be nice for non-AP redstoners). You might be able to do something with CommandStats, although it's much more complicated. I think it would be nice if /execute detect had a data subcommand, such as /execute @a ~ ~ ~ detect ~ ~-1 ~ note_block -1 data {note:6} /tellraw @p {text:"C"}
1

Welcome