mojira.dev
MC-299930

Commands which return multiple lines when run only show the final line in a command block's LastOutput

Commands such as /datapack list, /help, and /version usually return multiple lines to the user. When these commands are run in a command block (or command block minecart) only the final line of output is stored in the block’s LastOutput nbt data (This can also be seen in the command block gui in the “Previous output section”)

Steps to reproduce:
1. open a world
2. run the command /version, note the multiple lines of output
3. place a command block with the command /version
4. activate the command block using a redstone power source
5. run /data get block <x> <y> <z> LastOutput, note the single text component entry
6. open the command block’s gui and look at the “Previous Output” section, note the single line of output

Expected result:
The LastOutput nbt data of the command block should contain all lines of output, exactly as what’s shown by running the command in chat

Actual result:
Only the final output line is shown in the command block’s LastOutput nbt data

Linked issues

Comments 2

Can confirm, but this may be intended; since newlines can’t be rendered in the output field so there is not much of a reason to store the data in the block, especially for the three commands mentioned in the description. If Mojang wished to make this field show all lines of output, it should be done as part of a broader overhaul to the command block UI which allows the player to see the full command they are inputting (unless it is extraordinarily long)– although even then, I would not regard the storing of all output lines as an essential feature.

That being said, Mojang could also fix this issue by having all commands with a multi-line output display an easter egg message (fixing MC-124295 in the process), or simply changing the output text for these commands to “This command has X lines of output” or something similar.

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Xoliks

(Unassigned)

Confirmed

(Unassigned)

1.21.8

Retrieved