DuoScoreboard
In leaf v4.3+, DuoScoreboard is a feature that allows scoreboards to store numbers OVER 2,147,483,647 (or the Signed 32-bit Integer Limit)
How to create one
DuoScoreboards can be created by just creating an objective called "DUO_<original objective>" the original objective must also exist in the world, for example:
- money
- DUO_money
How to edit values
(coming soon)
Technical Information
DuoScoreboard is relatively simple in concept. It works by 2 scoreboards storing different parts of a binary number in unison. For this explanation, 1 will be the lower half (original objective) and 2 will be the upper half (the duo scoreboard)
Both scoreboards are treated as UNSIGNED 32-bit integers (to convert scoreboard values like this, add 4294967296 to the number ONLY if it is under zero)
This means scoreboard 1 will be treated as a regular score, as long as it doesn't go over 2,147,483,647 and scoreboard 2 remains at zero.
[ 00000000000000000000000000000000 00000000000000000000000000000000 ]
The left half of this binary number, is represented by scoreboard 2, and the right half is represented by scoreboard 1. This system allows for a full, unsigned 64-bit range allowing around 18.4 QUINTILLION values, at the cost of not having negative values but who cares about that