LTCatt 6 лет назад
Родитель
Сommit
b132349b7e

+ 4 - 4
data/mini/functions/parkour/game/tempo_block.mcfunction

@@ -29,7 +29,7 @@ execute if score $parkour_block mem matches 1 run setblock 1009 16 1051 minecraf
 execute if score $parkour_block mem matches 1 run setblock 1004 17 1050 minecraft:crimson_hyphae
 
 # 音效
-execute if score $parkour_block mem matches 0 run playsound block.note_block.pling block @a 1005 15 1051 0.6 0.6
-execute if score $parkour_block mem matches 1 run playsound block.note_block.pling block @a 1005 15 1051 0.6 1.1
-execute if score $parkour_block mem matches 0 run playsound block.note_block.pling block @a 1008 10 1033 0.6 0.6
-execute if score $parkour_block mem matches 1 run playsound block.note_block.pling block @a 1008 10 1033 0.6 1.1
+execute if score $parkour_block mem matches 0 run playsound block.note_block.pling block @a[tag=parkour_portal] 1007 15 1051 1 0.6
+execute if score $parkour_block mem matches 1 run playsound block.note_block.pling block @a[tag=parkour_portal] 1007 15 1051 1 1.1
+execute if score $parkour_block mem matches 0 run playsound block.note_block.pling block @a[tag=parkour_portal] 1010 10 1033 1 0.6
+execute if score $parkour_block mem matches 1 run playsound block.note_block.pling block @a[tag=parkour_portal] 1010 10 1033 1 1.1

+ 0 - 3
data/mini/functions/parkour/game_end.mcfunction

@@ -1,5 +1,2 @@
 # 结束跑酷
 forceload remove 1000 1000 1064 1064
-
-# 删掉掉落方块
-kill @e[type=falling_block,tag=parkour_block]

+ 1 - 0
data/mini/functions/parkour/game_init.mcfunction

@@ -12,6 +12,7 @@ setblock 1000 5 1032 minecraft:redstone_block
 # 清理残余实体
 kill @e[type=arrow]
 kill @e[type=item]
+kill @e[type=falling_block,tag=parkour_block]
 
 # 生成奖励物品
 execute positioned 1004.5 18.5 1043.5 run function item:bonus_item/rank/white

+ 5 - 1
data/mini/functions/parkour/player_enter.mcfunction

@@ -14,4 +14,8 @@ tp @s[tag=!watcher,tag=!rejoining] 1008.5 8.00 1008.5
 
 # 调整模式
 gamemode spectator @s
-gamemode adventure @s[tag=!watcher,tag=!rejoining]
+gamemode adventure @s[tag=!watcher,tag=!rejoining]
+
+# 修改 Tag
+tag @s add parkour_portal
+tag @s[tag=!watcher,tag=!rejoining] remove parkour_portal

+ 4 - 4
data/mini/functions/parkour/tick2.mcfunction

@@ -3,7 +3,7 @@ execute if score $countdown_fast mem matches 0 run function mini:parkour/game/te
 execute unless score $countdown_fast mem matches 1.. run scoreboard players set $countdown_fast mem 15
 
 # 音效
-execute if score $countdown_fast mem matches 5 run playsound block.note_block.snare block @a 1005 15 1051 0.6 2
-execute if score $countdown_fast mem matches 5 run playsound block.note_block.snare block @a 1008 10 1033 0.6 2
-execute if score $countdown_fast mem matches 10 run playsound block.note_block.snare block @a 1005 15 1051 0.6 2
-execute if score $countdown_fast mem matches 10 run playsound block.note_block.snare block @a 1008 10 1033 0.6 2
+execute if score $countdown_fast mem matches 5 run playsound block.note_block.snare block @a[tag=parkour_portal] 1007 15 1051 1 2
+execute if score $countdown_fast mem matches 5 run playsound block.note_block.snare block @a[tag=parkour_portal] 1010 10 1033 1 2
+execute if score $countdown_fast mem matches 10 run playsound block.note_block.snare block @a[tag=parkour_portal] 1007 15 1051 1 2
+execute if score $countdown_fast mem matches 10 run playsound block.note_block.snare block @a[tag=parkour_portal] 1010 10 1033 1 2

+ 2 - 2
data/mini/functions/parkour/tick20.mcfunction

@@ -1,3 +1,3 @@
 # 地狱门音效
-execute unless score $countdown mem matches 1.. run scoreboard players set $countdown mem 3
-execute if score $countdown mem matches 0 if score $parkour_door mem matches 1 run playsound block.portal.ambient ambient @a 1014.5 22 1057.5 0.7
+execute if score $countdown mem matches 0 if score $parkour_door mem matches 1 run playsound block.portal.ambient ambient @a 1014.5 22 1057.5 0.7
+execute unless score $countdown mem matches 1.. run scoreboard players set $countdown mem 3

+ 7 - 0
data/mini/functions/parkour/tick5.mcfunction

@@ -3,3 +3,10 @@ execute as @a[tag=mini_running,x=1005,y=11,z=1018,dx=2,dy=3,dz=2] run function m
 
 # 掉落方块保持
 execute as @e[type=falling_block,tag=parkour_block] run data modify entity @s Time set value 1
+
+# 传送门粒子
+execute if score $parkour_door mem matches 1 run particle minecraft:portal 1014.5 21.5 1057.0 0 1.5 1 1 30
+
+# 标记是否通过传送门
+tag @a[x=1015.0,y=20.0,z=1055.0,dx=2,dy=4,dz=4,gamemode=!spectator] remove parkour_portal
+tag @a[x=1012.0,y=20.0,z=1055.0,dx=2,dy=4,dz=4,gamemode=!spectator] add parkour_portal