[RESOLVED] Need help with math using the inequality symbols

Started by GalaxyYT on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[RESOLVED] Need help with math using the inequality symbols
Mon, 04/24/2023 - 01:51 (edited)

Hello,

 

I'm making a new mod that lets you customize arrows. There are 3 input slots for each component of the arrow. I'm trying to make it where it will craft 16 or less every time you craft a type of arrow. I have a vague idea on how to do this, but i want to get the lowest number of items in the given 3 slots which will tell the procedure to output that amount of items. 

For example:

 

There are 15 iron nuggets in slot 0, but there are 16 sticks and 16 feathers in slots 1 and 2 respectively. Currently, i base the craft after how much of an item is in slot 0. I want to cycle through the slots and check each one for the lowest number of items, consume that amount, and craft the lowest amount. 

 

If this didn't quite make sense, please ask. Thank you

Edited by GalaxyYT on Mon, 04/24/2023 - 01:51
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Create a costum number…
Wed, 03/22/2023 - 10:38

Create a costum number variable and give it the value of the first slot, after that compare with the sencond and the third