Minecraft / Data Packs

Random Number Generator (RNG) [1.13+]

  • 2
  • 1
  • comment5
  • playlist_add
  • share
  • more_horiz
avatar Zero_4793
Level 31 : Artisan Modder
7
Functional Datapack for Datapack or adventure map creators.
Easy to use, Efficient. Random Number Generator

Give any entity a score of RNG
/scoreboard players give [entity] RNG [value]
And it will within a single tick return a value of NUM
To test its value:
/scoreboard players get [entity] NUM

I do not wish to take credit for this as, although i coded this by my self, it is not an original idea and probably neither an original execution. And it is a necessary function that everyone should have access to.

Regards - Zero#4793
Progress100% complete
Game VersionMinecraft 1.14
Tags

5 replies

2
07/12/2019 3:05 pm
Level 32 : Artisan Robot
binary1024
This is just what I was looking for!
1
07/13/2019 2:02 am
Level 31 : Artisan Modder
Zero_4793
What do you mean, you can only randomise between 0 and 1
2
07/11/2019 9:57 am
Level 8 : Apprentice Modder
TomatoCake
Thanks, I will use it in my new data pack! ;)
2
07/11/2019 6:04 am
Level 1 : New Explorer
MythicalMew
Pretty cool, I can think of a few uses for it but not sure how people are actually going to use it.
1
07/11/2019 6:17 am
Level 31 : Artisan Modder
Zero_4793
/scoreboard players set @e[tag=test] RNG 100
/execute as @e[tag=test,scores={NUM=10}] at @s run something
etc

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome