فهرست منبع

商店老板测试1

HerobrineXia 6 سال پیش
والد
کامیت
0bcd0f1fae

+ 1 - 0
data/ltw/functions/state/0/check_entity.mcfunction

@@ -0,0 +1 @@
+execute unless entity @e[type=piglin,tag=shop_piglin_1,tag=lobby_entity] run summon piglin 0 22 -60 {Tags:["lobby_entity","shop_piglin_1"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"firework_rocket",Count:1b},{id:"firework_star",Count:1b,tag:{}}],HandDropChances:[0.0f,0.0f]}

+ 4 - 1
data/ltw/functions/state/0/state_enter.mcfunction

@@ -1,3 +1,6 @@
+# 加载地图
+forceload add -32 -17 31 -80
+
 # 要求系统进入状态 0(等待大厅)
 scoreboard players set $state mem 0
 execute as @a run function ltw:state/0/player_enter
@@ -26,4 +29,4 @@ function ltw:state/0/parkour/tempo_block/marker_spawn
 scoreboard players set $countdown mem 0
 
 # 重置当前状态
-function ltw:state/0/refresh_game_type
+function ltw:state/0/refresh_game_type

+ 4 - 1
data/ltw/functions/state/0/tick20.mcfunction

@@ -8,4 +8,7 @@ scoreboard players operation #time mem = $countdown mem
 scoreboard players remove #time mem 1
 execute if score $countdown mem matches 1.. run title @a subtitle {"score":{"name":"#time","objective":"mem"}}
 execute if score $countdown mem matches 1.. run title @a title [""]
-execute if score $countdown mem matches 1..10 run execute as @a at @s run function lib:sounds/hit2
+execute if score $countdown mem matches 1..10 run execute as @a at @s run function lib:sounds/hit2
+
+# 检测主大厅实体是否存在
+function ltw:state/0/check_entity