Skip to content

Commit

Permalink
Move player count scoreboard check from once per 100 ticks to once pe…
Browse files Browse the repository at this point in the history
…r datapack tick (0.14.27)
  • Loading branch information
Bavadin authored Jan 25, 2025
1 parent 9bc2a65 commit 68b7c71
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ execute if score $dungeon do2.config.ec.controlSummons matches 0 if score $dunge
execute if score $dungeon do2.config.ec.controlSummons matches 0 if score $dungeon do2.run.active matches 0 run function do2:dungeon_setup/legacy/test_for_other_killers
execute if score $dungeon do2.run.active matches 0 run function do2:entity_controller/generate_entities/markers/test_for_markers

# Count players on the server.
scoreboard players set $dungeon do2.utility.playerCount 0
execute as @a[tag=!do2.fakePlayer] run scoreboard players add $dungeon do2.utility.playerCount 1
execute if score $dungeon do2.utility.playerCount matches 1.. run tag TangoCam add do2.afterPlayerJoin
execute if score $dungeon do2.utility.playerCount matches 1.. run tag tangocam add do2.afterPlayerJoin

# Enable/Disable certain triggers
execute as @a run function do2:scoreboard/triggers/on_player_join

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,9 @@ function do2:entity_controller/config_interface/run_per_tick

# Statistics
function do2:statistics_room/on_tick

# Count players on the server.
scoreboard players set $dungeon do2.utility.playerCount 0
execute as @a[tag=!do2.fakePlayer] run scoreboard players add $dungeon do2.utility.playerCount 1
execute if score $dungeon do2.utility.playerCount matches 1.. run tag TangoCam add do2.afterPlayerJoin
execute if score $dungeon do2.utility.playerCount matches 1.. run tag tangocam add do2.afterPlayerJoin
4 changes: 2 additions & 2 deletions Brilliance Datapack/data/do2/functions/version.mcfunction
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# DATAPACK VERSION NUMBER: 0.14.26
# DATAPACK VERSION NUMBER: 0.14.27

tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.14.26§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}]
tellraw @s ["",{"text":"The §o§n§aBrilliance Datapack§r's version is: [§b0.14.27§r] Check latest version "},{"text":"§o§b§nhere§r","clickEvent":{"action":"open_url","value":"https://github.com/trackedout/Brilliance/blob/main/Brilliance%20Datapack/data/do2/functions/version.mcfunction"}},{"text":"."}]

0 comments on commit 68b7c71

Please sign in to comment.