0

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

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}]}
| improve this answer | |
  • Thank you very much, but how can I remove 1 item like the sapling from a chest? – JP2K Mar 20 '16 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. – rustphoenix Mar 21 '16 at 8:13

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.