Skip to content

Commit

Permalink
Add end hockey check
Browse files Browse the repository at this point in the history
  • Loading branch information
UnRealDinnerbone committed Oct 27, 2024
1 parent d288a09 commit cb938bd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions data/lt/function/main/on_load.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,6 @@ team modify dropper seeFriendlyInvisibles true

# Hockey
scoreboard objectives add game.hockey dummy "Hockey"
scoreboard players set WinScore game.hockey 10
team add hockey
team modify hockey collisionRule never
2 changes: 2 additions & 0 deletions data/lt/function/world_games/hockey/end.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$execute at @e[tag=world_game.hockey.crab_spawn] as @s run title @a[distance=0..75] title [{"text":"$(team)","color":"$(team)"},{"text":" has won hockey","color":"gray"}]
execute as @a[team=hockey] at @s run function lt:world_games/hockey/on_exit
4 changes: 3 additions & 1 deletion data/lt/function/world_games/hockey/score.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ $scoreboard players add $(team) game.hockey 1
function lt:world_games/hockey/spawn_crab
kill @s
execute as @a[team=hockey] at @s run playsound minecraft:item.goat_horn.sound.0 voice @s ~ ~ ~ 5 1 1
$function lt:world_games/hockey/team/firework/$(team)
$function lt:world_games/hockey/team/firework/$(team)
function lt:world_games/hockey/util/update_score
$execute if score $(team) game.hockey >= WinScore game.hockey run function lt:world_games/hockey/end {"team":"$(team)"}

0 comments on commit cb938bd

Please sign in to comment.