2
0
LTCatt 5 жил өмнө
parent
commit
72a6c31b04

+ 0 - 2
data/ltw/functions/clock/tick100.mcfunction

@@ -4,5 +4,3 @@ schedule function ltw:clock/tick100 100t replace
 # 掐死原版 BGM
 stopsound @a music music.game
 stopsound @a music music.creative
-
-say test

+ 8 - 14
data/ltw/functions/init/all.mcfunction

@@ -46,16 +46,6 @@ team add debug "调试者"
 team modify debug color dark_gray
 team add watch "旁观者"
 team modify watch color gray
-# 确保若玩家并非调试者、旁观者,则一定在下述队伍之一
-team remove white
-team add white "白队"
-team modify white color white
-team remove green
-team add green "绿队"
-team modify green color green
-team remove aqua
-team add aqua "蓝队"
-team modify aqua color aqua
 
 # ---------------------------------------------
 #  非玩家队伍
@@ -77,7 +67,7 @@ team add npc_gold "橙色"
 team modify npc_gold color gold
 
 # ---------------------------------------------
-#  游戏规则
+#  不常修改的游戏规则
 # ---------------------------------------------
 difficulty normal
 time set day
@@ -115,7 +105,14 @@ gamerule spawnRadius 0
 gamerule spectatorsGenerateChunks false
 gamerule universalAnger true
 worldborder warning distance 0
+
+# ---------------------------------------------
+#  其他模块
+# ---------------------------------------------
 function ltw:init/gamerule
+function ltw:init/entity
+function ltw:state/0/state_enter
+
 
 # # 主寄存区块:将所有需要不卸载的都放里面
 # #   已占用:(0,0,0) (0,0,1) (0,1,0) (0,1,1)
@@ -200,9 +197,6 @@ function ltw:init/gamerule
 # function item:init
 # function lib:bossbar/init
 
-# # 状态
-# function ltw:state/0/state_enter
-
 # # 重置随机数组
 # data modify storage ltw:mini types set value []
 # data modify storage ltw:mini qualities set value []

+ 3 - 0
data/ltw/functions/init/entity.mcfunction

@@ -0,0 +1,3 @@
+# 清理残余实体
+
+kill @e[type=item]

+ 1 - 1
data/ltw/functions/init/gamerule.mcfunction

@@ -1,5 +1,5 @@
 # 重置会被小游戏等修改的常用信息
 # 如果一个小游戏修改了不在下列列表中的规则,则应该将它从 init/all 中移动到这里
 
-worldborder center 0 0
 worldborder set 1000000
+worldborder center 0 0

+ 26 - 0
data/ltw/functions/state/0/sp/refresh_entity.mcfunction

@@ -0,0 +1,26 @@
+# 如果老板不存在,则重新召唤老板
+
+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},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_2,tag=lobby_entity] run summon piglin 0 22 -60 {Tags:["lobby_entity","shop_piglin_2"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"music_disc_pigstep",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_3,tag=lobby_entity] run summon piglin 1 8 -37 {Tags:["lobby_entity","shop_piglin_3"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"golden_shovel",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+# execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_5,tag=lobby_entity] run summon piglin 19 11 -39 {Tags:["lobby_entity","shop_piglin_5"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,ArmorItems:[{id:"golden_boots",Count:1b},{id:"golden_leggings",Count:1b},{id:"golden_chestplate",Count:1b},{id:"golden_helmet",Count:1b}],ArmorDropChances:[0.0f,0.0f,0.0f,0.0f],HandItems:[{id:"golden_chestplate",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_6,tag=lobby_entity] run summon piglin 23 9 -48 {Tags:["lobby_entity","shop_piglin_6"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"tipped_arrow",Count:1b,tag:{Potion:"minecraft:slowness"}},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_7,tag=lobby_entity] run summon piglin 22 11 -59 {Tags:["lobby_entity","shop_piglin_7"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"potion",Count:1b,tag:{CustomPotionColor:8039610}},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_8,tag=lobby_entity] run summon piglin 11 9 -62 {Tags:["lobby_entity","shop_piglin_8"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"enchanted_golden_apple",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_9,tag=lobby_entity] run summon piglin 5 9 -58 {Tags:["lobby_entity","shop_piglin_9"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"potion",Count:1b,tag:{CustomPotionColor:9913400}},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=piglin,tag=shop_piglin_10,tag=lobby_entity] run summon piglin 0 8 -55 {Tags:["lobby_entity","shop_piglin_10"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"bow",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+execute unless entity @e[type=villager,tag=shop_particle_1,tag=lobby_entity] run summon minecraft:villager -23 20 -73 {Tags:["lobby_entity","shop_particle_1"],CustomName:'{"text":"使用生物雷达是作弊行为哦!","color":"red"}'}
+execute unless entity @e[type=villager,tag=shop_particle_2,tag=lobby_entity] run summon minecraft:villager -17 20 -76 {Tags:["lobby_entity","shop_particle_2"],CustomName:'{"text":"使用生物雷达是作弊行为哦!","color":"red"}'}
+execute unless entity @e[type=armor_stand,tag=shop_particle_3,tag=lobby_entity] run summon minecraft:armor_stand -19 20.1 -75 {Small:1b,Invisible:1b,Invulnerable:1b,Marker:1b,Tags:["shop_particle_3","show_particle_1","lobby_entity"]}
+execute unless entity @e[type=armor_stand,tag=shop_particle_4,tag=lobby_entity] run summon minecraft:armor_stand -18 20.1 -75 {Small:1b,Invisible:1b,Invulnerable:1b,Marker:1b,Tags:["shop_particle_4","show_particle_2","lobby_entity"]}
+execute unless entity @e[type=armor_stand,tag=shop_particle_5,tag=lobby_entity] run summon minecraft:armor_stand -17 20.1 -75 {Small:1b,Invisible:1b,Invulnerable:1b,Marker:1b,Tags:["shop_particle_5","show_particle_3","lobby_entity"]}
+execute unless entity @e[type=armor_stand,tag=shop_particle_6,tag=lobby_entity] run summon minecraft:armor_stand -16 20.1 -75 {Small:1b,Invisible:1b,Invulnerable:1b,Marker:1b,Tags:["shop_particle_6","show_particle_4","lobby_entity"]}
+execute unless entity @e[type=armor_stand,tag=shop_particle_7,tag=lobby_entity] run summon minecraft:armor_stand -15 20.1 -75 {Small:1b,Invisible:1b,Invulnerable:1b,Marker:1b,Tags:["shop_particle_7","show_particle_5","lobby_entity"]}
+execute unless entity @e[type=armor_stand,tag=shop_particle_8,tag=lobby_entity] run summon minecraft:armor_stand -14 20.1 -75 {Small:1b,Invisible:1b,Invulnerable:1b,Marker:1b,Tags:["shop_particle_8","show_particle_6","lobby_entity"]}
+execute unless entity @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] run kill @e[type=minecart,tag=lobby_entity]
+execute unless entity @e[type=minecart,tag=lobby_entity] run kill @e[type=piglin,tag=lobby_entity,tag=shop_piglin_11]
+execute unless entity @e[type=piglin,tag=shop_piglin_11,tag=lobby_entity] run summon minecart 4 28 -47 {Rotation:[0.0f,0.0f],Tags:["lobby_entity"],Passengers:[{id:"minecraft:piglin",Rotation:[90.0f,0.0f],Tags:["lobby_entity","shop_piglin_11"],CustomName:'{"text":"老板"}',ArmorDropChances:[0.0f,0.0f,0.0f,0.0f],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"gold_block",Count:1b},{}],HandDropChances:[0.0f,0.0f]}]}
+# execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+# execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}
+# execute unless entity @e[type=piglin,tag=shop_piglin_4,tag=lobby_entity] run summon piglin 9 10 -36 {Tags:["lobby_entity","shop_piglin_4"],PersistenceRequired:1b,IsImmuneToZombification:1b,CannotHunt:1b,HandItems:[{id:"orange_dye",Count:1b},{}],HandDropChances:[0.0f,0.0f]}

+ 49 - 0
data/ltw/functions/state/0/state_enter.mcfunction

@@ -0,0 +1,49 @@
+# 要求系统进入状态 0(等待大厅)
+scoreboard players set $state mem 0
+
+# HUD
+scoreboard objectives setdisplay belowName
+scoreboard objectives setdisplay sidebar
+scoreboard objectives setdisplay list
+
+# 区域
+forceload remove all
+forceload add 0 0
+forceload add 31 -17 -31 -80
+
+# 规则
+function ltw:init/gamerule
+
+# 队伍
+team remove hub_watch
+team add hub_watch "旁观"
+team modify hub_watch collisionRule never
+team modify hub_watch friendlyFire false
+team modify hub_watch prefix {"text":" ◇ ","color":"white"}
+team modify hub_watch suffix " "
+team remove hub_play
+team add hub_play "准备"
+team modify hub_play collisionRule never
+team modify hub_play friendlyFire false
+team modify hub_play prefix {"text":" ◆ ","color":"green"}
+team modify hub_play suffix " "
+
+# 实体
+function ltw:init/entity
+function ltw:state/0/sp/refresh_entity
+
+# 重置开始倒计时
+#scoreboard players set #start_countdown mem 9999999
+
+#execute as @a[team=!debugging] run function ltw:state/0/player_enter
+
+
+
+
+
+# 启用节奏跑酷
+#scoreboard players set $tempo_enable mem 1
+#function ltw:state/0/parkour/tempo_block/marker_spawn
+# bossbar
+#scoreboard players set $bossbar_type mem 0
+#function lib:bossbar/show