mojira.dev
MC-107659

Scoreboard Maximum Bug

Hello Mojang,

Almost every time there is a major release I test for specific things that might be interesting. For example, In the scoreboard.dat file, There is a “Prefix” and a “Suffix” when you create a team.

In this example, I’ve created a team called [Owner].

Using a program called NBTExplorer, I’m able to modify the “Prefix” and “Suffix” of a team, and this is where this string comes in.

Example A:
This string is 65 characters long according to the Minecraft Client and Server.
[§4Owner§f] [§4Owner§f] [§4Owner§f] [§4Owner§f] [§4Owner
Config: http://i.imgur.com/NpzDHLq.png
Result: http://i.imgur.com/TsAAZX3.png (attached as 64.png)

Example B:
Now we’re going to take the same string as above and remove one character ‘r’.
[§4Owner§f] [§4Owner§f] [§4Owner§f] [§4Owner§f] [§4Owne
Config: http://i.imgur.com/lJVLcu9.png
Result: http://i.imgur.com/S96EFiF.png (attached as 65.png)

From Minecraft 1.5.x to 1.10.x - All scoreboard limitations are 16 characters and based on from what I’m gathering this increased to 64 characters. Currently, in these versions, it would show Character Count > Maximum Account.

In Figure A. it’s showing 64 characters is the maximum amount allowed in a Prefix or Suffix. However, something is not being updated, and it’s likely client-side.

In Figure B. we just removed one character, and it’s showing the maximum amount characters is 16 which is the current standard.

In the image below it shows us connecting to the server ~64 characters. Therefore, it seems like it’s server-side accepted. However, the client could be rejecting it.
http://i.imgur.com/Vw6NtCx.png (attached as server.png

Lastly, the character count system is a bit off. If you noticed the string I mentioned: “This string is 65 characters long according to the Minecraft Client and Server.” Well, that’s because that’s what Minecraft is detecting it as, however, if you count the characters it’s 56, this includes the 2 for color codes and spaces.

Kind Regards,
Cory

Attachments

Comments 4

I suggest choosing a more descriptive summary.

Intended, unless the code really changed. And you probably interchanged the results from example A and example B. A should show "encoded ... > 64" and B should show "... > 16".

The reason why this happens is because the string is encoded using UTF-8, which means example A becomes:

[§4Owner§f] [§4Owner§f] [§4Owner§f] [§4Owner§f] [§4Owner

The length of it is 65 which is longer than 64 bytes / characters, which is why the exception says "... encoded ...".

In example B the encoded string would have 64 byte so the encoded length would be fine, but the decoded length is too long.

The first exception for the encoded string is kind of optional because the second exception would be thrown anyways, but they probably added it to make sure the client / server is not decoding a string just to notice that is too large anyways.

Anything over 16 characters would say:

Character count > Maximum count

Originally in 1.10.x and lower it would say:
65 > 16
128 > 16

Here it's showing:
65 > 64
64 > 16

Clearly, something may have changed.

Originally in 1.10.x and lower it would say:
65 > 16
128 > 16

What I wrote was based on 1.10 so what you are saying is not true for 1.10. Anyways, the exception is correct and this is Works as Intended.

Cory

(Unassigned)

Unconfirmed

Minecraft 16w39a, Minecraft 16w39b, Minecraft 16w39c

Retrieved