I'm making a command block trading system, and the first command block to set off a chain tests if the player has the the minimum number of required items.
This command worked a few times I tried it, then it simply just stopped reading my inventory correctly. I have way more than 16 logs, and it says I did not meet the required data structure.
Oh yeah, sorry about that. The original design had it. It now only detects if I have 16 when I only have 16. Nothing more or less. I'm trying to use command stats but they don't work either.
Hello,
I'm making a command block trading system, and the first command block to set off a chain tests if the player has the the minimum number of required items.
/testfor @p {Inventory:[{id:"minecraft:log",Count16b}]}
This command worked a few times I tried it, then it simply just stopped reading my inventory correctly. I have way more than 16 logs, and it says I did not meet the required data structure.
Please help, thanks.
You forgot to put a colon between Count and 16b
Oh yeah, sorry about that. The original design had it. It now only detects if I have 16 when I only have 16. Nothing more or less. I'm trying to use command stats but they don't work either.
Take a look at this comment from Skylinerw:
http://www.minecraftforum.net/forums/minecraft-java-edition/redstone-discussion-and/commands-command-blocks-and/2395386-how-can-i-detect-if-player-have-a-minimum-amount?comment=3
Haha I actually saw a similar post by him after researching the topic a bit more. It helped a lot and I got my system to work.
Thank you for responding
By the way, you've probably got it to work now, but I just want to mention that you can also use advancements to achieve this.