check_slot.mcfunction 478 B

12345678
  1. # 第八格
  2. # execute unless data entity @s Inventory[{Slot:7b,tag:{game_item:1b}}] unless data entity @s Inventory[{Slot:7b,tag:{LockItem:1b,LockSlot:7b},Count:1b}] run function item:disable_slot/disable_slot_7
  3. # 第九格
  4. execute unless data entity @s Inventory[{Slot:8b,tag:{game_item:1b}}] unless data entity @s Inventory[{Slot:8b,tag:{LockItem:1b,LockSlot:8b},Count:1b}] run function item:disable_slot/disable_slot_8
  5. # 清除临时物品
  6. clear @a red_dye{LockTempItem:1b}