How can I specify the data value of an item in a /testfor command? [duplicate]
//ads -- adsterra.com -- native banner
?>
I have used the /testfor
command a lot but I ran into a problem I thought you could help with.
This is my command:
/testfor @p[r=3] {Inventory:[{id:"minecraft:log",Count:64b}]}
In this command I want it to test for log number 2, which is birch wood, but the thing is I don't know how to insert that.
I want it so it detects if the player has a 64 stack of birch wood.
Pictures about "How can I specify the data value of an item in a /testfor command? [duplicate]"
How do I use the Testfor player command?
How to Enter the CommandWhat replaced the Testfor command?
The /testfor command became obsolete in Minecraft 1.13, and has been replaced by the /execute command*. It will do the same as typing /testfor @e {SelectedItem:{id:"<item>"}} and then putting a comparator to the command block with the command, and then running the command which you wanna run.Minecraft Redstone Tutorial | How to use testfor commands in MCPE!
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ivan Babydov, Alesia Kozik, Rachel Claire, Katerina Holmes