There should be an item id called random, which would give any random item when run. There is a command /random, but a command newbie like me would not understand. This would be good for minigames that require random items, so you wouldn't have to place a lot of command blocks. The only problem I see is you can't add custom/enchanted items, so there should be another command called /randomid, which could add certain items to the random id. The command could also remove items from random id, and adjust chances. If you choose more than one in the random id, it would give you that amount of the same random item. Here are some examples:
/give @s random 34 (will give 34 of a random item)
/randomid add potion[potion_contents:{custom_color:65280}] (adds a green Uncraftable Potion in the random id)
/randomid remove birch_sapling (Birch Sapling is no longer in the random id)
/randomid chance set prismarine_crystals 10 (Prismarine Crystals become 10 times for likely to be a selected item than all other items unless others are adjusted)
/clear @s random (clears a random item from the player's inventory)
/randomid chance reset music_disc_creator_music_box (Creator Music Box Disc chances of being selected are reset to normal)
/randomid next horn_coral_fan (Horn Coral Fan will become the next random item)
/summon item ~ ~ ~ (will now summon a random item instead of Air)
/item replace entity @n[type=zombie] weapon.mainhand random (will replace the weapon of the nearest Zombie with a random item)
Please sign in to leave a comment.
1 Comments