Getting the amount of items in the player's inventory?

Started by bananarang_mods on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Getting the amount of items in the player's inventory?

I need to find the amount of items currently in the player's inventory for the mod I'm working on, is there a way to do this with procedures? 

Please tell me what you know about this in the comments below!

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What I did was make a loop…
Mon, 10/04/2021 - 10:23

What I did was make a loop that checks every slot one by one, and adds the item count to a variable. 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what he said, but if you…
Mon, 10/04/2021 - 16:11

what he said, but if you want even more compatibility also use Curious Slot

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Curious Apis Slot
Wed, 10/06/2021 - 14:55

Curious Apis Slot