Skip to content

Commit

Permalink
fix: recalculate would not reset the scores
Browse files Browse the repository at this point in the history
  • Loading branch information
2mal3 committed Aug 12, 2024
1 parent c443507 commit 7c109e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/data/adco/functions/recalculate.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ advancement adco:first_join {
}
}

scoreboard players reset * adco.score

execute as @a run function adco:recalculate_player:
scoreboard players reset @s adco.score

vanilla = ctx.inject(Vanilla)
vanilla_advancements = vanilla.releases["1.21"].data.advancements
for name, advancement in vanilla_advancements.items():
Expand Down
5 changes: 1 addition & 4 deletions src/data/adco/functions/reset.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@

advancement revoke @a everything

scoreboard objectives remove adco.score
scoreboard objectives add adco.score dummy
scoreboard objectives setdisplay list adco.score
scoreboard objectives modify adco.score rendertype integer
scoreboard players reset * adco.score

tellraw @s:
text: "Reset all Advancements for all online players"
Expand Down

0 comments on commit 7c109e7

Please sign in to comment.