Mojira Archive
MC-112202

Command feedback of command blocks is not escaped or indented in server-side log

In 1.11.2 this affects only the server-side log:

[14:46:35] [Server thread/INFO]: [@] Some text
[20:39:35] [Server thread/INFO]: [CHAT] <--- This fakes a log
[14:46:35] [Client thread/INFO]: [CHAT] [@] Some text\r\n[20:39:35] [Server thread/INFO]: [CHAT] <--- This fakes a log

How to reproduce

  1. Use the following in a command block
    /setblock ~ ~1 ~ oak_sign{Text1:"{\"text\":\"Click\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/setblock ~ ~1 ~ command_block{Command:\\\"/say Some text\\u000D\\u000A[20:39:35] [Server thread/INFO]: [CHAT] <--- This fakes a log\\\"}\"}}",Text2:"[\"\"]",Text3:"[\"\"]",Text4:"[\"\"]"}
    
  2. Click the sign
  3. Activate the placed command block
  4. Look in the log file
    The fake log line is written without indentation

When you use the tellraw command and line breaks, the launcher won't indent the next line:
/tellraw @p {"text":"Test\n\rNew line"}

Game Output
[20:45:05] [Client thread/INFO]: [CHAT] Test
New line

This can cause problems, when you use for example:
/tellraw @p {"text":"Test\n\r[20:39:35] [Client thread/INFO]: [CHAT] <--- This fakes a log"}

Game Output
[20:40:16] [Client thread/INFO]: [CHAT] Test
[20:39:35] [Client thread/INFO]: [CHAT] <--- This fakes a log

What I would expect instead is, that it does this:

Game Output
[20:40:16] [Client thread/INFO]: [CHAT] Test
                                        [20:39:35] [Client thread/INFO]: [CHAT] <--- This fakes a log

So that every new line starts at the position of the first line in the log

Unresolved

Marcono1234

2015-03-27, 09:47 PM

2023-08-22, 05:56 PM

1

6

Confirmed

Normal

Platform

Commands

command-feedback, game-output, linebreak, tellraw

Minecraft 1.11.2, 20w07a, 1.19.1 Pre-release 5

Minecraft 1.11.2