Affects Version/s: Minecraft 14w26c, Minecraft 14w28a, Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, Minecraft 1.8-pre2, Minecraft 1.8.4, Minecraft 15w47c, Minecraft 16w07a, Minecraft 1.10.2, Minecraft 16w42a, Minecraft 16w43a, Minecraft 16w44a, Minecraft 1.11 Pre-Release 1, Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.1, Minecraft 1.11.2, Minecraft 17w06a, Minecraft 17w13b, Minecraft 17w15a, Minecraft 17w16b, Minecraft 17w17b, Minecraft 17w18b, Minecraft 1.12 Pre-Release 2, Minecraft 1.12.2
When no key determining the text to display is present, the game shows an error message, however this error message is incomplete.
Perform this command:
The error message is:
The correct error message would be:
The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.
The reason for this bug is that the public void processCommand(ICommandSender sender, String args) throws CommandException method of the net.minecraft.command.server.CommandMessageRaw (command /tellraw) and the net.minecraft.command.CommandTitle (command /title) class display any exception that occurs when the Json string is parsed using Throwable org.apache.commons.lang3.exception.ExceptionUtils.getRootCause(Throwable throwable). As there are however exceptions that are not thrown by the Json parser but by the net.minecraft.util.IChatComponent.Serializer class itself. The root cause is null. Instead it should just print the message of the exception.
The following shows how this could by done for the net.minecraft.command.server.CommandMessageRaw class.