I want to detect multiple of the same dropped items but all the command blocks get triggered instead of just one. How can i do this. :[
Minecraft – Testfor multiple dropped items
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft Java Edition – How to Test for a Dropped Item Using Minecraft Commands
- Minecraft Commands – Using Commandblock to Create a Block Breaker with Dropped Item
- Minecraft Java Edition – How to Detect and Drop a Specific Item from Inventory in Minecraft
- Minecraft Commands – How to Use /give Multiple Items Command in Minecraft?
Best Answer
If you're trying to detect identical items, you could use the selector
/testfor @e[c=1,type=Item] {NBT}
This will only select one item (the closest, I believe). You could then use the scoreboard to tag/mark the item and do another search which excludes that item. If you are detecting the same item, but can differentiate them, such as different custom names, enchants, stacksize, etc. you can get those values via NBT. Refer to the Wiki page on NBT format for more info on the differnt tags you can use, and how to get to them.