How do I find the smallest number in a list?

Started by PikaDabs on

Topic category: Help with MCreator software

Last seen on 03:28, 4. Mar 2021
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I find the smallest number in a list?

So I want to make a crafting system that uses the vanilla system (when recipe matches up, put items in output, when taking out of output, remove inputs)
but my problem is I can't find the amount of output to set there, if I just detect the number of items from slot 1, then you could just increase that slot and craft more items than you're supposed to.
So I need to find the smallest number in the list of inputs, please help!

Yes, I do know that java has min() and max() methods but I just really don't want to use custom elements, I don't know how to use them.

I also know that you an just compare every input to every other input but that's just really inefficient (9^2 comparisons I think).