6

I know it's possible to detect when players break certain blocks with the scoreboard criteria stat.mineBlock, but I was wondering how you detect if a player broke a block that has a data value, such as a particular type of wood?

I tried looking through the trusty tab key, but to no avail.

2

stat.mineBlock by itself is a criteria, but you can also use an argument with it. For your example, try stat.mineBlock.sapling. However, these criteria cannot check metadata, so it would not be able to differentiate mining a spruce sapling from an oak one.

| improve this answer | |
1

Assuming SinglePlayer

When breaking a block, its pickUpDelay is 5. Test for items spawning with such pickUpDelay is enough.

testfor @e[type=Item,tag=!old] {Item:[...]}
| improve this answer | |

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.