Started by
sn4p
on
Topic category: Help with Minecraft modding (Java Edition)
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.
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