Using a variable as a number in a smelting recipe

Started by ItsyaboyRenzo on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Using a variable as a number in a smelting recipe

Ok, so I tried making a smelting recipe with a random output number of 1-3.
At first I tried putting a random number from 1-3 in place of the number in the code using Math.random, this did not work and it would give me a static number.
I figured that if I would manually replaced the output number in the code to a variable it would work.
The variable I could later give a value of 1-3 with a procedure or again Math.random, whatever works.
Only I could not get the variable to work in place of the static number. This seems simple enough to be something easily implemented, I just haven't got enough knowledge about how the system works. If anyone has any ideas on how to get this to work, I would love to hear them!

​​​​​​​Kind regards,
Itsyaboyrenzo

PS. I am using mcreator version 2021.1 with the 1.12.2 plugin
 

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1.12.2 plugin is buggy and…
Fri, 12/17/2021 - 19:52

1.12.2 plugin is buggy and deprecated, you're better off making 1.16.5 mods.

 

Although there is a simple plugin that adds a procedure block with chooses a random number between two integer values.

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if you would try to you…
Fri, 12/17/2021 - 20:43

if you would try to you should use a loottable as the output