floating.mcfunction 1.6 KB

12345678910111213141516171819
  1. # 5tick运行一次 计分板单位5tick
  2. # 钻石:起飞
  3. scoreboard players remove @a effect_floating 1
  4. scoreboard players remove @e[type=creeper] effect_floating 1
  5. execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 13
  6. execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run effect give @s speed 1 0 true
  7. execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 1 0 true
  8. execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run function lib:sounds/teleport
  9. execute as @a[gamemode=!spectator,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run scoreboard players set @s effect_floating 5
  10. execute as @e[type=creeper,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 13
  11. execute as @e[type=creeper,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run effect give @s speed 1 0 true
  12. execute as @e[type=creeper,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 1 0 true
  13. execute as @e[type=creeper,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run function lib:sounds/teleport
  14. execute as @e[type=creeper,scores={effect_floating=..-2}] at @s if block ~ ~-1 ~ diamond_block run scoreboard players set @s effect_floating 5
  15. effect clear @e[scores={effect_floating=0}] levitation