How to change item to a multitude of other possible items when right clicked?

Started by spectronben on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to change item to a multitude of other possible items when right clicked?
Sat, 04/13/2024 - 21:22 (edited)

I am trying to have an item that when right clicked has a chance of turning into one of five other items. I want each possible resulting item to have different chances of occurring, with some being very likely and others being rare. Is this possible?

Edited by spectronben on Sat, 04/13/2024 - 21:22
Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yes it is possible, get a…
Tue, 06/18/2024 - 19:56

yes it is possible, get a random integer block and have it set random integer between 1 and 100

if you wanted each one to have a 20 percent chance, do if number is between 0 and 21 do that. If its between 20 and 41 do item 2 and so on.

-PixelKid