Stats to Scoreboards

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.

How to

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).

There seem to be issues with setting the scoreboard to a UUID directly instead of the name, hence this option is enabled by default. It will take longer to generate the first time you do this.
Creates the objective inside the function. Useful when you don't want to create the objective manually.