이전퀴즈 데이터팩
This commit is contained in:
11
music_quiz/data/func/function/shuffle/f1.mcfunction
Normal file
11
music_quiz/data/func/function/shuffle/f1.mcfunction
Normal file
@@ -0,0 +1,11 @@
|
||||
execute store result score length func.temp run data get storage func:temp shuffle.list
|
||||
|
||||
execute if score length func.temp matches 0 run return 1
|
||||
|
||||
execute store result score random func.temp run random value 0..2147483646
|
||||
scoreboard players operation random func.temp %= length func.temp
|
||||
|
||||
execute run function func:shuffle/f2 with storage func:temp {index:0}
|
||||
|
||||
execute store result storage func:temp shuffle.index int 1 run scoreboard players get random func.temp
|
||||
function func:shuffle/f2 with storage func:temp shuffle
|
||||
Reference in New Issue
Block a user