[MCBE] 二次點(diǎn)擊式快捷欄菜單教程??!!

前置指令
1.scoreboard objectives add 物品欄菜單 dummy
2.scoreboard players add @a 物品欄菜單 0
命令方塊循環(huán)保持無(wú)條件開啟
主要部分
1.execute @a[tag=登錄主城,scores={物品欄菜單=0}]
2.execute @a[tag=登錄主城,hasitem={item=cake,location=slot.weapon.mainhand,data=0,quantity=1,slot=0},scores={物品欄菜單=!1}] ~~~ title @s actionbar §6§l單機(jī)§d游戲 §r?點(diǎn)擊空格后再次點(diǎn)擊執(zhí)行
§7Click Excute again
循環(huán)無(wú)條件保持開啟
3.execute @a[tag=登錄主城,hasitem={item=cake,location=slot.weapon.mainhand,data=0,quantity=1,slot=0}] ~~~ scoreboard players set @s 物品欄菜單 1
連鎖無(wú)條件保持開啟
4.execute @a[tag=登錄主持,hasitem={item=cake,location=slot.weapon.mainhand,data=0,quantity=0,slot=0},scores={物品欄菜單=1}] ~~~ scoreboard players set @s 物品欄菜單 2
5.execute @a[tag=登錄主城,scores={物品欄菜單=2}] replaceitem entity @s slot.hotbar 1 cake 1 1 {"minecraft:item_lock":{"mode":"lock_in_slot"}]
循環(huán)無(wú)條件
6.execute @a[tag=登錄主城,hasitem={item=cake,location=slot.weapon.mainhand,data=1,quantity=1,slot=0},scores={物品欄菜單=2}] ~~~ scoreboard players set @s 物品欄菜單 3
連鎖無(wú)條件
7.execute @a[scores={物品欄菜單=3}] ~~~ scoreboard players set @s 物品欄菜單 0
連鎖無(wú)條件
8.execute @a[scores={物品欄菜單=3}] ~~~ 任意指令
提示:tag可以去掉,物品id自改,命令方塊擺放請(qǐng)按照視頻擺放