(SOLVED) Random loot table not returning items

Started by KnickKnack on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(SOLVED) Random loot table not returning items
Wed, 02/12/2025 - 18:32 (edited)

So I made a mod where if you put in a material (leather, iron, diamonds, ect.) based off the material it will give you another item relating to that material (eg. iron = iron chestplate), but when I click the button, it removes the item, but it does not return anything. EDIT: I found that my code was the numbers were the issue, my code would look for, example: a 1, but the random number generator would give a number such as: 1.69382. so I used a round function on the variable and it worked!

Edited by KnickKnack on Wed, 02/12/2025 - 18:32
Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The GUI has 2 slots, 1 Input…
Wed, 02/12/2025 - 18:23

The GUI has 2 slots, 1 Input, and 1 output, then a button to start the procedures. I also do not know entirely how to tie an image with this post, the ones I tried are not showing, just an image symbol.