So I'm wanting to detect a certain amount of a named entity, I have the majority of the command, but I cant figure out how to add the amount. Here's my current command.
/testfor @a {Inventory:[{id:"minecraft:gold_nugget",tag:{display:{Name:"Enchanting Token"}}}]}
Best Answer
You can use
testfor
to find players with an exact count in a single slot like so:If you want to detect items across multiple slots, or detect a minimum amount of items, you'll need to use command stats. Create a scoreboard objective
numItems
, then use