mojira.dev
MC-306036

Text component with nbt:"", interpret:false has syntax highlighting

In 26.1 Snapshot 5 text component with nbt:"", interpret:false has syntax highlighting instead of flattening text.

However, this change extremely influences some datapacks' functions including

[bookshelf dump](https://docs.mcbookshelf.dev/en/latest/modules/dump/), as flattening nbt is considered as a useful function to turn NBT data into string.

  • Expected result

Text component with nbt:"", interpret:false should be flattened as a plain string with no syntax highlighting.

  • Actual result

Text component with nbt:"", interpret:false has syntax highlighting.

  • Potential solution

Consider add a new key named "flattening" (defaulting to false) to control whether enable syntax highlighting or not.

Environment

Windows 11 24H2

Comments 1

Thank you for your report!

Could you please attach a datapack showcasing the issue?

Just a reminder, to make your bug report as effective as possible, please try and include the following steps to reproduce the problem:

Steps to Reproduce:
1.
2.
3.

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

high1145

(Unassigned)

Unconfirmed

(Unassigned)

26.1 Snapshot 5

Retrieved