tick5.mcfunction 1.1 KB

123456789101112131415161718192021
  1. # 触发单个模块
  2. execute if score $mini_type mem matches 1 run function mini:parkour/tick5
  3. execute if score $mini_type mem matches 2 run function mini:tntrun/tick5
  4. execute if score $mini_type mem matches 3 run function mini:hotpm/tick5
  5. execute if score $mini_type mem matches 5 run function mini:phantom/tick5
  6. execute if score $mini_type mem matches 101 run function mini:diamond/tick5
  7. execute if score $mini_type mem matches 202 run function mini:rgb/tick5
  8. # 同步生命值
  9. scoreboard players reset * temp
  10. scoreboard players set @a[gamemode=!spectator] temp 20
  11. execute as @a[gamemode=!spectator,scores={health=1..}] run scoreboard players operation @s temp = @s health
  12. execute as @a run scoreboard players operation @s health_disp = @s temp
  13. execute as @a run scoreboard players operation @s mini_heart_disp = @s mini_heart
  14. execute as @a run scoreboard players operation @s mini_heart_disp += @s mini_heart
  15. # 删除奇怪的物品
  16. kill @e[type=item,nbt={Item:{tag:{game_item:1b}}},tag=!persist]
  17. kill @e[type=item,nbt={Item:{tag:{lobby_item:1b}}},tag=!persist]
  18. kill @e[type=item,nbt={Item:{tag:{LockItem:1b}}},tag=!persist]