mojira.dev
MC-95560

Wrong command message: Last character of NBT parsing error message is missing

If you write:

/summon area_effect_cloud ~ ~ ~ {Particle:flame,Radius:3f,Duration:10} force

the fail message is only:

{Particle:flame,Radius:3f,Duration:10} forc

the word 'force' is only writen 'forc', missing the last character.


Code analysis by @unknown in this comment.

Comments 3

Confirmed for

  • 16w02a

But this is the wrong project

This is not a duplicate. This happens in the chat as well

Please link to this comment in the description

The following is based on a decompiled version of Minecraft 1.10 using MCP 9.30.

The reason for this is that the method net.minecraft.nbt.JsonToNBT.nameValueToNBT(String, String) only tests if the NBT data starts with a curly bracket and then assumes the last character is a curly bracket as well, removing the first and the last character. This is also the reason why you get the rather strange error message "Unbalanced curly brackets {}" even though it contained a pair of curly brackets, because it assumes it already removed the curly bracket at the end.

Fabian9799

Erik Broes

Confirmed

Minecraft 16w02a, Minecraft 1.10.2, Minecraft 16w32a, Minecraft 16w32b, Minecraft 1.11.2

Minecraft 17w16a

Retrieved