prismarine-chat
prismarine-chat copied to clipboard
`toMotd` uses non-standard (well, not supported by the notchian client) hex notation
The toMotd
method of ChatMessage
uses §#rrggbb
notation for hex colors, which is non-standard. When §#123456a
is rendered by the notchian client, it appears as 123456a
(because the character after a section sign always gets hidden, regardless of whether it is a valid color code). Please consider using the color code of the nearest color instead. Also, for toAnsi
you should consider not wrapping toMotd
if you want it to support hex colors. A problem caused by toAnsi
wrapping toMotd
and handling §#rrggbb
hex colors is that it causes messages such as {"text":"§#123456a"}
to get colored (such messages are uncommon, but they can exist).
Things that would be interesting (but maybe this should happen in a pworld exporter and not here):
- Export as 3d numpy matrix of 0/1
- same but with state id
- Same but with colors
- Obj/stl/gltf files (doable with pviewer)
- point cloud ?
(This should probably be done in another package)
https://numpy.org/doc/stable/reference/generated/numpy.lib.format.html
there is https://github.com/ludwigschubert/js-numpy-parser but somehow there is no npm package to write numpy files ?!
ah maybe https://github.com/propelml/tfjs-npy
https://github.com/propelml/tfjs-npy/blob/master/npy.ts#L20