hasPlayerInInventory Multiple Item Support

Started by gerbillover on

Topic category: Help with MCreator software

Active 7 years ago
Joined Oct 2016
Points:
763

User statistics:

  • Modifications: 1
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
hasPlayerInInventory Multiple Item Support

I'm trying to make a custom crafting GUI for my new mod. The problem is, I cannot have crafting recipes involving more than one of the same item because hasPlayerInInventory doesn't seem to support multiple of the same item, for example testing if the player has 10 stone. Is there a way around this, or do I have to use different code?

Active 7 years ago
Joined Dec 2016
Points:
732

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
Make a buttom with a stack
Wed, 01/25/2017 - 14:27

Make a buttom with a stack event and add "Consume Item in inventory" so many times you'll need it, and then "Add Item to Inventory". Then add this complete stack event as an event for the button.

Active 7 years ago
Joined Oct 2016
Points:
763

User statistics:

  • Modifications: 1
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 29
RE:Make a buttom with a stack
Wed, 01/25/2017 - 14:41

Don't worry, I just spent a few minutes looking through some other topics on this and have pieced together the code. Thanks for the help though.

Active 7 years ago
Joined Dec 2016
Points:
732

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 30
RE:RE:Make a buttom with a stack
Wed, 01/25/2017 - 15:15

@#2 No problem :)

Active 3 months ago
Joined Mar 2022
Points:
499

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 11
i have the same problem pls…
Sat, 08/13/2022 - 23:32

i have the same problem pls update it