1
I need Help with Command blocks.
So basically, I want to test all players inventorys for 3 coal and 4 iron ore. I tried /testfor@a {Inventory:[ {id:”minecraft:coal”,Count:3b “minecraft:iron_ore” , Count:4b}]} but it didn’t work :/ if you know how to do this or why mine doesn’t work, I would really appriciate it. I have also tried looking it up, but none of the commands worked. I am looking for an exact ammount, and not a minimum. Thank you for your help!
Create an account or sign in to comment.
4
1
/testfor @a {Inventory:[{id:minecraft:coal,Count:3b},{id:minecraft:iron_ore,Count:4b}]}
1
if I have 3 coal and 4 iron, will it still work if I have a diamond as well in my inventory?
1
Yes.
1
/testfor@a {Inventory:[{id:”minecraft:coal”,Count:3b},{id:“minecraft:iron_ore”,Count:4b}]}
Keep in mind that it has to be exact those numbers, so 4 coal and 4 iron_ore doesn't work.
Keep in mind that it has to be exact those numbers, so 4 coal and 4 iron_ore doesn't work.