[RESOLVED] Need help with math using the inequality symbols

Started by GalaxyGamingYT on

Topic category: Help with modding (Java Edition)

Last seen on 15:20, 16. Feb 2024
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 GalaxyGamingYT on Mon, 04/24/2023 - 01:51
Last seen on 23:29, 5. Apr 2023
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

Last seen on 23:29, 5. Apr 2023
Joined Mar 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(No subject)
Wed, 03/22/2023 - 10:40