수정
This commit is contained in:
9
music_quiz/data/mq/function/videos/cache/add.mcfunction
vendored
Normal file
9
music_quiz/data/mq/function/videos/cache/add.mcfunction
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
data modify storage mq:tmp video set from storage mq:main video
|
||||
|
||||
scoreboard players operation cache_idx func.temp = index main
|
||||
scoreboard players add cache_idx func.temp 1
|
||||
execute store result storage mq:tmp video.cache_num int 1 run scoreboard players get cache_idx func.temp
|
||||
|
||||
execute store result storage mq:tmp video.num int 1 run scoreboard players get index main
|
||||
data modify storage mq:tmp video.cmd set value "cache"
|
||||
function mq:videos/macro/cmd with storage mq:tmp video
|
||||
1
music_quiz/data/mq/function/videos/cache/clear.mcfunction
vendored
Normal file
1
music_quiz/data/mq/function/videos/cache/clear.mcfunction
vendored
Normal file
@@ -0,0 +1 @@
|
||||
function mq:videos/macro/custom {cmd: "videoCache clear"}
|
||||
4
music_quiz/data/mq/function/videos/clear.mcfunction
Normal file
4
music_quiz/data/mq/function/videos/clear.mcfunction
Normal file
@@ -0,0 +1,4 @@
|
||||
data modify storage mq:tmp video set from storage mq:main video
|
||||
execute store result storage mq:tmp video.num int 1 run scoreboard players get index main
|
||||
data modify storage mq:tmp video.cmd set value "delete"
|
||||
function mq:videos/macro/cmd with storage mq:tmp video
|
||||
18
music_quiz/data/mq/function/videos/macro/cmd.mcfunction
Normal file
18
music_quiz/data/mq/function/videos/macro/cmd.mcfunction
Normal file
@@ -0,0 +1,18 @@
|
||||
$execute if data storage mq:tmp {video:{cmd:"delete"}} run setblock $(cmd_x) $(cmd_y) $(cmd_z) minecraft:command_block[conditional=false,facing=up]{ \
|
||||
Command:"videoDelete $(x) $(y) $(z)", \
|
||||
auto:0b \
|
||||
}
|
||||
$execute if data storage mq:tmp {video:{cmd:"num"}} run setblock $(cmd_x) $(cmd_y) $(cmd_z) minecraft:command_block[conditional=false,facing=up]{ \
|
||||
Command:"videoPlace $(x) $(y) $(z) $(facing) $(w) $(h) $(sound) video_$(num)", \
|
||||
auto:0b \
|
||||
}
|
||||
$execute if data storage mq:tmp {video:{cmd:"cache"}} run setblock $(cmd_x) $(cmd_y) $(cmd_z) minecraft:command_block[conditional=false,facing=up]{ \
|
||||
Command:"videoCache add video_$(num) $(namespace)/$(cache_num)", \
|
||||
auto:0b \
|
||||
}
|
||||
$execute if data storage mq:tmp {video:{cmd:"cmd"}} run setblock $(cmd_x) $(cmd_y) $(cmd_z) minecraft:command_block[conditional=false,facing=up]{ \
|
||||
Command:"$(cmd_value)", \
|
||||
auto:0b \
|
||||
}
|
||||
|
||||
$data modify block $(cmd_x) $(cmd_y) $(cmd_z) auto set value 1b
|
||||
@@ -0,0 +1,6 @@
|
||||
function mq:videos/clear
|
||||
data modify storage mq:tmp video set from storage mq:main video
|
||||
execute store result storage mq:tmp video.num int 1 run scoreboard players get index main
|
||||
data modify storage mq:tmp video.cmd set value "custom"
|
||||
$data modify storage mq:tmp video.cmd_value set value "$(cmd)"
|
||||
function mq:videos/macro/cmd with storage mq:tmp video
|
||||
5
music_quiz/data/mq/function/videos/show.mcfunction
Normal file
5
music_quiz/data/mq/function/videos/show.mcfunction
Normal file
@@ -0,0 +1,5 @@
|
||||
function mq:videos/clear
|
||||
data modify storage mq:tmp video set from storage mq:main video
|
||||
execute store result storage mq:tmp video.num int 1 run scoreboard players get index main
|
||||
data modify storage mq:tmp video.cmd set value "num"
|
||||
function mq:videos/macro/cmd with storage mq:tmp video
|
||||
Reference in New Issue
Block a user