hasPlayerInInventory Multiple Item Support

Started by gerbillover on Wed, 01/25/2017 - 14:22

Topic category: Help with MCreator's application

Last seen on 20:14, 7. Dec 2017
Joined Oct 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
hasPlayerInInventory Multiple Item Support
Wed, 01/25/2017 - 14:22

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?

Last seen on 18:52, 24. Aug 2018
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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.

Last seen on 20:14, 7. Dec 2017
Joined Oct 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
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.

Last seen on 18:52, 24. Aug 2018
Joined Dec 2016
User points:

Statistics:

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

@#2 No problem :)