1

/execute detect troubles

hokage3211's Avatar hokage321112/18/14 11:09 pm
1 emeralds 374 3
12/22/2014 2:02 pm
hokage3211's Avatar hokage3211
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's Avatar
hokage3211
Level 49 : Master Engineer
39

Create an account or sign in to comment.

3

1
12/22/2014 2:02 pm
Level 49 : Master Engineer
hokage3211
hokage3211's Avatar
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
12/22/2014 10:51 am
Level 55 : Grandmaster Dragon
Skitto493
Skitto493's Avatar
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
12/22/2014 9:36 am
Level 30 : Artisan Crafter
elyisgreat
elyisgreat's Avatar
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"}
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome