i need help with variables

Started by MooSheeRoo on Tue, 08/29/2017 - 22:59

Topic category: Help with modding (Java Edition)

Last seen on 02:53, 10. Apr 2018
Joined Aug 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
i need help with variables
Tue, 08/29/2017 - 22:59

can someone esplain variables to me? im trying to make a mod for equivelent exchange and i have gui that has a button that when you click it its spose to take 1 mutton, 1 steak, and 1 pork and give you a food i made back but when i click the button even without the item in my inventory it still give me my modded food. if someone could help me with this it would be greatly aprieceated 

Last seen on 02:53, 10. Apr 2018
Joined Aug 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
also i really think the wiki
Tue, 08/29/2017 - 23:00

also i really think the wiki page should esplain how to use variables

Last seen on 12:58, 23. Sep 2019
Joined Aug 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
RE:also i really think the wiki
Wed, 08/30/2017 - 09:12

@#1 You don't need variables for this, but conditions.

You need to create a stack event with the condition "if player has in inventory mutton", then add another stack event in the previoous one and here add the condition "if player has in inventory steak", then repeat the process for the pork steak and in that last stack event add 3 "consumes item in inventory" 1 for steak, 1 for mutton, 1 for pork and then, add the event "add item to inventory" with your food.