anybody help me?

Started by sn4p on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
anybody help me?

Hi,
I want to create a system where opening a pack gives the player 6 random items from a pool of 20 available ones. Duplicates should sometimes occur, but not always I want the randomness to feel balanced.

Joined Dec 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I suggest you use a local…
Fri, 01/31/2025 - 14:14

I suggest you use a local variable and have it when you open the pack it randomizes it 6 times. Then use 20 if statements for each item. Example would be: when player opens pack, set local variable to (random integer 1-20 included). Then "if variable1 = 1, give event/target entity diamond 1"

                                                         " variable1 = 2, give event/target entity coal 1" etc...

here is an example with 6 items in a pool of 5:

https://imgur.com/a/wQZAdE6