-
-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Pretty NBT #142
Comments
That is a good idea. Will add this in the next update. |
Uhhhhhh I need more time to do this one, especially in regards to older versions(down to 1.7.10). So it won't be in the next release. |
That's totally fine. Just a heads up, MC introduced this in MC 1.13, so I would assume you could skip it for lower versions, or just print a string. |
The "simplest" way probably is to implement my own formatter. Then it bypasses the issue of older versions in general. |
I was looking for it. Would be a great feature |
I wanted to suggest the addition of pretty NBT printing.
This is basically what Minecraft uses when you run the
/data
command, and its prints the colourful NBT stringsHere is an example showing printing an NBT compound, pretty printing a compound, and pretty printing a compound with a split (split creates new lines, with a string option for how it spaces):
If it helps at all, I will include my class I use in my plugin for this:
https://github.com/ShaneBeee/SkBee/blob/master/src/main/java/com/shanebeestudios/skbee/api/reflection/ChatReflection.java
(pardon my messy code)
Just a heads up also, Minecraft changed the way it worked in 1.17 with a new "tag visitor" system, hence the 2 sets of reflection for 1.16 and 1.17
Hope this helps
The text was updated successfully, but these errors were encountered: