How to test for Multiple Items in Player's Inventory

Started by LordWise on Sat, 05/16/2020 - 01:00

Topic category: Help with MCreator software

Last seen on 17:14, 19. Dec 2020
Joined Oct 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to test for Multiple Items in Player's Inventory
Sat, 05/16/2020 - 01:00

Hello Everyone!

So I am creating a test model for a Villager Trading GUI
I do not need help with creating this model

However, I came to a predicament.

When doing the procedure for testing if an item is in player'ss inventory, I was like well.. there has to be a way to see if I can find the total number of an item in the player's inventory. Or even the total number of an item in the current player's slot. However I came to a problem, I cannot for the life of me find the procedure get item stack count of ITEM or get total item count of ITEM.

Example: 100 Diamond = 1 Nether Star (Not the actual trade, but the concept of so)

 

Now I don't know if I am dumb or anything, because I saw a Developer talking about the feature being added back in Mid 2019. And I'm currently using the Mcreator version 2020.2

If you could help me find the procedure, or by providing me the EXACT code for looking for said thing. that would be amazing.

Last seen on 20:24, 25. Aug 2020
Joined Jul 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You might be able to get…
Sun, 05/17/2020 - 14:44

You might be able to get somewhere with this itemstack plugin. But me too. I could swear I saw an 'Amount of x item in inventory' block at some point.

Last seen on 17:14, 19. Dec 2020
Joined Oct 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yeah I eventually saw that…
Mon, 05/18/2020 - 10:54

Yeah I eventually saw that plgin,
I'm creating it, because I've been seeing a lot of people trying to find out how to make villager GUIs and I found out how to do it...

The only problem I have know... is how to test if the player has a specif amount. it looks easy to make, cause we already test if the player has a specific item in their item in inventory. We can call a procedure if the player obtains said item into their inventory... soo why dont we have a test item amount in player inventory? you know?