Check total item count in a players inventory?

Started by Galva_ on

Topic category: Help with MCreator software

Joined Dec 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Check total item count in a players inventory?

I'm making a dimension that can only be entered when the player has an empty inventory. Is there a way I could check to see how many items in total the player has in their inventory to check if it's 0. Even if it requires adding pieces of code.

Joined Jul 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No need for actual pieces of…
Sun, 12/13/2020 - 01:54

No need for actual pieces of code, there is a video to check for a specific item here. If you modify this slightly by checking each slot to not have air instead you could see if the inventory is empty. (Note, you would also have to check armor slots aswell seperatly)

Dunno if this is still a problem but I hope it helps :)