How to check for at least one or more than one item in your inventory

Started by Blockyheadman on

Topic category: User side tutorials

Last seen on 05:34, 24. Dec 2022
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to check for at least one or more than one item in your inventory

Okay so after a little bit of messing around and trying to get something to work, I have a little thong to share. There is a way to check for having one or greater than one specific item at once in a players inventory. I haven't tested out if the mod has works in multiplayer so if somebody does before me, please let me know. Anyways here is how to do it.


     Event trigger - triggered by external call or when (global trigger): On player tick update

     if | Has Event/target entity in inventory [ITEM/BLOCK]

          (Your reaction code here)


This can be done in procedure form and doesn't need to be a custom element. Hopefully this helps anyone who needs it! :)

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes indeed and if you want…
Wed, 01/05/2022 - 20:46

yes indeed

and if you want to know the number of items in a players inventory you can use the counting part of the procedure from my tutorial

Custom Store (Tutorial) | MCreator