Neat feature for checking -1 for block data!

๐ŸŽ™๏ธ tryashtar ยท 74 points ยท Posted at 03:46:37 on July 20, 2014 ยท (Permalink)*


A nifty thing I discovered with /execute detect and /testforblock is that you can specify a block data value of -1.

This makes it return true for all data values of that block, so instead of making a new command for each data value, just use -1 to have it work for all!

Quick link in case you want to see what I mean: http://imgur.com/a/LlvOE[1]

EDIT: this also works for /clearing 0 items to check if a player has that item. To check if they have any type of dirt, /clear @a dirt -1 0 will do the trick! :D


[1]

Test for block data -1

MC_Labs15 ยท 3 points ยท Posted at 18:13:05 on July 20, 2014 ยท (Permalink)

Please don't be a bug... Please don't be a bug...

[deleted] ยท 3 points ยท Posted at 09:04:09 on July 20, 2014 ยท (Permalink)*

[deleted]

_MRZ ยท 4 points ยท Posted at 12:04:39 on July 20, 2014 ยท (Permalink)

No, because a command should be after that, and it interferes.

wizardXZDYT ยท 1 points ยท Posted at 01:23:15 on July 21, 2014 ยท (Permalink)

Nice!