Explorar o código

观察者限制飞行范围

HerobrineXia %!s(int64=6) %!d(string=hai) anos
pai
achega
237eb26d0b
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      data/mini/functions/tntrun/tick4.mcfunction

+ 4 - 1
data/mini/functions/tntrun/tick4.mcfunction

@@ -1,2 +1,5 @@
 # 玩家死亡判断
 # 玩家死亡判断
-execute as @a[tag=tntrun_pc] at @s if block ~ ~ ~ lava run function mini:tntrun/player_failed
+execute as @a[tag=tntrun_pc] at @s if block ~ ~ ~ lava run function mini:tntrun/player_failed
+
+# 观察者限制飞行范围
+execute as @a[gamemode=spectator] unless entity @s[x=1000,y=10,z=2000,dx=22,dz=22,dy=22] run spectate @r[tag=tntrun_pc]