LTCatt 6 年之前
父节点
当前提交
caa733a6d7
共有 2 个文件被更改,包括 19 次插入 和 12 次删除
  1. 18 11
      data/lib/functions/effect/special_block.mcfunction
  2. 1 1
      data/mini/functions/tntrun/player_enter.mcfunction

+ 18 - 11
data/lib/functions/effect/special_block.mcfunction

@@ -1,14 +1,21 @@
 # 5tick运行一次 计分板单位5tick
+
 # 钻石:起飞
-execute as @a[gamemode=!spectator] if score @s effect_floating matches 1.. run scoreboard players add @s effect_floating 1
-execute as @a[gamemode=!spectator] if score @s effect_floating matches 3.. run effect clear @s levitation
-execute as @a[gamemode=!spectator] if score @s effect_floating matches 3.. run scoreboard players set @s effect_floating 0
-execute as @a[gamemode=!spectator] unless score @s effect_floating matches 1.. at @s if block ~ ~-1 ~ diamond_block run effect give @s levitation 1 12 true
-execute as @a[gamemode=!spectator] unless score @s effect_floating matches 1.. at @s if block ~ ~-1 ~ diamond_block run effect give @s slow_falling 2 0 true
-execute as @a[gamemode=!spectator] unless score @s effect_floating matches 1.. at @s if block ~ ~-1 ~ diamond_block run scoreboard players set @s effect_floating 1
+effect clear @a[scores={effect_floating=0}] levitation
+scoreboard players remove @a[scores={effect_floating=0..}] effect_floating 1
+execute as @a[gamemode=!spectator] at @s if block ~ ~-0.01 ~ diamond_block run effect give @s levitation 1 12
+execute as @a[gamemode=!spectator] at @s if block ~ ~-0.01 ~ diamond_block run effect give @s slow_falling 2 0 true
+execute as @a[gamemode=!spectator] at @s if block ~ ~-0.01 ~ diamond_block run scoreboard players set @s effect_floating 2
+execute as @a[gamemode=!spectator] at @s if block ~ ~-0.01 ~ diamond_block run function lib:sounds/teleport
+
 # 绿宝石:回血
-execute as @a[gamemode=!spectator] if score @s effect_regen matches 1.. run scoreboard players add @s effect_regen 1
-execute as @a[gamemode=!spectator] if score @s effect_regen matches 5.. run effect clear @s regeneration
-execute as @a[gamemode=!spectator] if score @s effect_regen matches 5.. run scoreboard players set @s effect_regen 0
-execute as @a[gamemode=!spectator] unless score @s effect_regen matches 1.. at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 2 true
-execute as @a[gamemode=!spectator] unless score @s effect_regen matches 1.. at @s if block ~ ~-1 ~ emerald_block run scoreboard players set @s effect_regen 1
+effect clear @a[scores={effect_regen=0}] levitation
+scoreboard players remove @a[scores={effect_regen=0..}] effect_regen 1
+execute as @a[gamemode=!spectator] at @s if block ~ ~-0.01 ~ emerald_block run effect give @s regeneration 2 2
+execute as @a[gamemode=!spectator] at @s if block ~ ~-0.01 ~ emerald_block run scoreboard players set @s effect_regen 4
+
+# execute as @a[gamemode=!spectator] if score @s effect_regen matches 1.. run scoreboard players add @s effect_regen 1
+# execute as @a[gamemode=!spectator] if score @s effect_regen matches 5.. run effect clear @s regeneration
+# execute as @a[gamemode=!spectator] if score @s effect_regen matches 5.. run scoreboard players set @s effect_regen 0
+# execute as @a[gamemode=!spectator] unless score @s effect_regen matches 1.. at @s if block ~ ~-1 ~ emerald_block run effect give @s regeneration 2 2 true
+# execute as @a[gamemode=!spectator] unless score @s effect_regen matches 1.. at @s if block ~ ~-1 ~ emerald_block run scoreboard players set @s effect_regen 1

+ 1 - 1
data/mini/functions/tntrun/player_enter.mcfunction

@@ -13,7 +13,7 @@ effect give @s resistance 1000000 4 true
 attribute @s generic.max_health base set 20
 
 # 传送玩家
-spreadplayers 1019.5 2020.5 4 4 false @s[tag=!watcher,tag=!rejoining,tag=!debug]
+spreadplayers 1019.5 2020.5 2 2 false @s[tag=!watcher,tag=!rejoining,tag=!debug]
 # schedule: tp @a ~ ~-3 ~
 
 # 两秒后才开始 TNT 掉落