minecraft-expanded-datapack/data/undeadm-random/functions/rand10.mcfunction

18 lines
1.3 KiB
Mcfunction
Raw Normal View History

scoreboard players set $value rnd_random 0
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:0,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:1,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:2,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:3,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:4,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:5,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:6,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:7,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:8,Tags:["Random"]}
summon armor_stand ~ ~ ~ {Invisible:1b,Invulnerable:1b,NoGravity:1b,DisabledSlots:9,Tags:["Random"]}
execute store result score $value rnd_gen as @e[tag=Random,limit=1,sort=random] run data get entity @s DisabledSlots
scoreboard players operation $value rnd_random += $value rnd_gen
kill @e[tag=Random]
scoreboard players add $value rnd_random 1