So I’ve been conceptualizing a datapack, and I’ve figured out how to do everything but one: Random numbers.
I found this Reddit page, which would work, except I can’t figure out what I would change on it to change the range (e.g. 0.36-2.08).
So my question is a) how do I easily generate a random number using a function, or b) how do I specify the range on the implementation mentioned above.
I found this Reddit page, which would work, except I can’t figure out what I would change on it to change the range (e.g. 0.36-2.08).
So my question is a) how do I easily generate a random number using a function, or b) how do I specify the range on the implementation mentioned above.
Create an account or sign in to comment.
4
depends on what version, if you have access to the /random roll command then this is the easiest way to do it.
just do
/execute as @a at @s store result score @s SCORE_HERE run random roll 1..100
but this reddit post was talking about a loooong ago random numb generator
just do
/execute as @a at @s store result score @s SCORE_HERE run random roll 1..100
but this reddit post was talking about a loooong ago random numb generator
I would help but reddit is blocked on my home network :P