mojira.dev
MC-261036

Summoning an text_display entity writes an error to console but summons the entity correctly

When summoning a text_display entity via

/summon minecraft:text_display ~ ~ ~ {text:'{"text":"test"}'}

summons the entity fine but writes the following to the server console

[18:15:48] [Server thread/ERROR]: Display entityNot a string
[18:15:48] [Server thread/INFO]: [hugo5000: Summoned new Text Display]
[18:15:50] [Server thread/ERROR]: Display entityNot a string
[18:15:50] [Server thread/INFO]: [hugo5000: Summoned new Text Display]
[18:15:51] [Server thread/ERROR]: Display entityNot a string
[18:15:51] [Server thread/INFO]: [hugo5000: Summoned new Text Display]
[18:16:07] [Server thread/ERROR]: Display entityNot a string
[18:16:07] [Server thread/INFO]: [hugo5000: Summoned new Text Display]
[18:16:11] [Server thread/ERROR]: Display entityNot a string
[18:16:11] [Server thread/INFO]: [hugo5000: Summoned new Text Display]
[18:16:13] [Server thread/ERROR]: Display entityNot a string
[18:16:13] [Server thread/INFO]: [hugo5000: Summoned new Text Display]

Linked issues

Comments 7

That message was send 6 seconds before the actual summon command, so it is not caused by this one, but another display entity.

Duplicate of MC-259887.

It is caused by the command and can be replicated easily, it was just that my server was lagging; which is unrelated to the message

And as far as I know it is only the text that is required, the others have a default value

I'll just do it again and execute the command a few more times so one cant say "its not related to the command"

 

When executing with the console one can see it clearer because it is printed directly between command and summoned message

summon minecraft:text_display 1 1 1 {text:'{"text":"test"}'}
[18:26:57] [Server thread/ERROR]: Display entityNot a string
[18:26:57] [Server thread/INFO]: Summoned new Text Display

 

Confirmed in 1.20.2

The cause for this bug is that the game tries to read the alignment field without checking if it exists and without defaulting to left. The logged error doesn't show when using:

/summon text_display ~ ~ ~ {alignment:"left"}

can confirm for 1.21.4

 

Unfortunately in my case it's more difficult to work around this issue, as I'm using `execute summon` instead of a normal summon and thus cannot add the alignment data to it until i'm inside the called function.

It appears this is fixed in 1.21.5.

Hugo5000

(Unassigned)

Confirmed

Platform

Normal

Commands

1.19.4, 1.20 Pre-release 4, 1.20.2, 1.20.4, 1.21.3, 24w45a, 1.21.4

Retrieved