-
Notifications
You must be signed in to change notification settings - Fork 0
Ensure Uniqueness Problem
Due to internal implementation issues, using either LONG or STATIC scoreboards can lead to problems with lines. This consists in lines which randomly disappear.
This happens because both LONG and STATIC scoreboard's lines are made up of three elements:
- A prefix
- A central part
- A suffix
This structure is due to how minecraft scoreboards internally works.
In a scoreboard there are only central parts that cannot be duplicated. Separately, prefixes and suffixes are linked to the central parts and the scoreboard is ready to be seen by the user. But what if there are two or more lines with identical central parts? Minecraft adds to the scoreboard only one central part, so that when some prefixes or suffixes are linked to that central part only the last linked ones show up. Here the bugged lines show up.
To avoid this problem, most of the times the code is made so that this bug never comes up until a line is longer than 56 characters. However, it happens very often that lines exceed that limit. This is why the ensure-uniqueness
option is here. It will add from 2 up to 4 characters per line to ensure that no central part is equal to another. It reduces the maximum line length, but is better than having some pesky bugged lines.