Преглед изворни кода

更改大厅掉落物检测时间

HerobrineXia пре 5 година
родитељ
комит
09cce22d92

+ 1 - 0
data/ltw/functions/clock/tick2.mcfunction

@@ -7,6 +7,7 @@ execute as @a[x=-12,y=7,z=-102,distance=..5] run tp @s -13 9 -42
 
 # 调用其他模块
 function lib:bossbar/tick2
+execute if score $state mem matches 0 run function ltw:state/0/tick2
 execute if score $state mem matches 3 run function ltw:state/3/tick2
 execute if score $state mem matches 4 run function ltw:state/4/tick2
 execute if score $state mem matches 5 run function ltw:state/5/tick2

+ 6 - 0
data/ltw/functions/state/0/tick2.mcfunction

@@ -0,0 +1,6 @@
+# 处理乱扔物品的玩家
+execute as @e[type=item,nbt={Item:{tag:{stats_item:1b}}},tag=!new_stats] at @s run tag @a[distance=..2] add refresh
+execute as @e[type=item,nbt={Item:{tag:{stats_item:1b}}},tag=!new_stats] run kill @s
+execute as @a[tag=refresh] run function item:shop/refresh_gold
+execute as @a[tag=refresh] run function item:shop/refresh_green
+tag @a[tag=refresh] remove refresh

+ 0 - 7
data/ltw/functions/state/0/tick5.mcfunction

@@ -48,10 +48,3 @@ execute if score #start_countdown mem matches 0 run function ltw:state/0/start_g
 # 显示信息
 execute if score #start_countdown mem matches 1..199 run title @a actionbar [{"text":"","color":"green"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | ","将在 ",{"score":{"name":"#start_sec","objective":"mem"}}," 秒后开始游戏"]
 execute if score #start_countdown mem matches 200.. run title @a actionbar [{"text":"","color":"red"},{"score":{"name":"$count","objective":"mem"}},"/",{"score":{"name":"#total_count","objective":"mem"}}," 人已准备 | 需要 3 人以开始游戏"]
-
-# 处理乱扔物品的玩家
-execute as @e[type=item,nbt={Item:{tag:{stats_item:1b}}},tag=!new_stats] at @s run tag @a[distance=..2] add refresh
-execute as @e[type=item,nbt={Item:{tag:{stats_item:1b}}},tag=!new_stats] run kill @s
-execute as @a[tag=refresh] run function item:shop/refresh_gold
-execute as @a[tag=refresh] run function item:shop/refresh_green
-tag @a[tag=refresh] remove refresh