Allows you to sync up the existing stats in a world to a newly created scoreboard.
You should only run this once and only for scoreboards that aren't in sync with their actual stats values, as it loads the current stats file into a function file. If you've set up the objectives with the correct stats, it should stay in sync automatically from there.
Enter into the "stat" field the complete identifier of the stat you want turn into a scoreboard (e.g. minecraft:dropped.minecraft:stone
).
Enter into the "objective" field the scoreboard objective that you want it to be saved into (e.g. sb.dropped.stone
).
Use the file selection to select all relevant stats files to be included.
Click either the "create function" button to get a function file or "create datapack" button to create an entire datapack with this function for ease of use (run as /function sb:sync_scores
).