我的世界門禁系統(tǒng)

門禁卡系統(tǒng)
[三個(gè)記分板,聊天框輸入]?
①
/scoreboard objectives add 門 dummy
②
/scoreboard objectives add 門a dummy
③
/scoreboard objectives add 門b dummy
[第一個(gè)循環(huán) 其它全部連鎖無條件0延遲]?
①
scoreboard players set @a 門a 0
②
execute @a[hasitem={item=candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ copper_block 0 scoreboard players set @s 門a 1
③
execute @a[hasitem={item=white_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ iron_block 0 scoreboard players set @s 門a 1
④
execute @a[hasitem={item=yellow_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ gold_block 0 scoreboard players set @s 門a 1
⑤
execute @a[hasitem={item=light_blue_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ diamond_block 0 scoreboard players set @s 門a 1
⑥
execute @a[hasitem={item=lime_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ emerald_block 0 scoreboard players set @s 門a 1
⑦
execute @a[hasitem={item=black_candle,location=slot.weapon.mainhand}] ~ ~ ~ detect ~ ~-0.5 ~ netherite_block 0 scoreboard players set @s 門a 1
⑧
scoreboard players add @a[scores={門a=1}] 門 1
⑨
scoreboard players set @a[scores={門a=0}] 門 0
⑩
execute @a[scores={門=120..}] ~~~ fill ~-1 ~-1 ~-1 ~1 ~1 ~1 air 0 replace iron_door
?
execute @a[scores={門=120..}] ~~~ scoreboard players set @s 門b 120
?
execute @a[hasitem={item=candle,location=slot.weapon.mainhand},scores={門=120..}] ~ ~ ~ clear @s candle 0 1
?
execute @a[hasitem={item=white_candle,location=slot.weapon.mainhand},scores={門=120..}] ~ ~ ~ clear @s white_candle 0 1
?
execute @a[hasitem={item=yellow_candle,location=slot.weapon.mainhand},scores={門=120..}] ~ ~ ~ clear @s yellow_candle 0 1
?
execute @a[hasitem={item=light_blue_candle,location=slot.weapon.mainhand},scores={門=120..}] ~ ~ ~ clear @s light_blue_candle 0 1
?
execute @a[hasitem={item=lime_candle,location=slot.weapon.mainhand},scores={門=120..}] ~ ~ ~ clear @s lime_candle 0 1
?
execute @a[hasitem={item=black_candle,location=slot.weapon.mainhand},scores={門=120..}] ~ ~ ~ clear @s black_candle 0 1
?
execute @a[scores={門=1..,門b=1..}] ~~~ scoreboard players set @s 門 0
?
scoreboard players remove @a[scores={門b=1..}] 門b 1
?
execute @a[scores={門=1..}] ~ ~ ~ titleraw @s actionbar {"rawtext":[{"translate":"%%7","with":{"rawtext":[{"selector":"@s[scores={門=..110}]"},{"selector":"@s[scores={門=..90}]"},{"selector":"@s[scores={門=..70}]"},{"selector":"@s[scores={門=..50}]"},{"selector":"@s[scores={門=..30}]"},{"selector":"@s[scores={門=..10}]"},{"text":"§l§o§f ▅▅▅▅▅▅§r"},{"text":"§l§o§d ▅§f▅▅▅▅▅§r"},{"text":"§l§o§d ▅▅§f▅▅▅▅§r"},{"text":"§l§o§d ▅▅▅§f▅▅▅§r"},{"text":"§l§o§d ▅▅▅▅§f▅▅§r"},{"text":"§l§o§d ▅▅▅▅▅§f▅§r"},{"text":"§l§o§d ▅▅▅▅▅▅§r"}]}},{"text":"\n§c[§b正在開門請稍候..§c]§r"}]}