I need help specifying a command! Right now I have the following command:

/testforblock -565 18 -1357 chest 3 {Items:[{id:sapling}]} 

How can I specify the sapling to a dark oak sapling? Also once it found the sapling how can I remove only 1 sapling from the chest?

1 Answer 1


Saplings use the Damage tag to store their type. Dark Oak's value is 5 and Damage is a short type, hence the s.

This command should test for a dark oak sapling in the chest.

/testforblock -565 18 -1357 chest 3 {Items:[{id:"sapling", Damage:5s}]}
  • Thank you very much, but how can I remove 1 item like the sapling from a chest?
    – JP2K
    Mar 20, 2016 at 16:46
  • 1
    Unless you want to make 64 commands for every different amount of f items you can have in a stack, you can only remove stacks at a time. You could use the Count tag to get/set the amount, but no easy way to decrease the item count by 1. Mar 21, 2016 at 8:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .