How would I detect how much of a specific Item is in the players inventory?

Started by eilrahcrrod on

Topic category: Help with MCreator software

Joined Sep 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I detect how much of a specific Item is in the players inventory?

I want to detect how many iron ingots are in the inventory. If it's 3 or over, it would replace it with another item and if it's 2 or less, it would not. The problem is, I don't know how to check how many the player has. Can someone tell me how I would go about this?