prismarine-chat icon indicating copy to clipboard operation
prismarine-chat copied to clipboard

`toMotd` uses non-standard (well, not supported by the notchian client) hex notation

Open ChipmunkMC opened this issue 2 years ago • 1 comments

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).

ChipmunkMC avatar Oct 17 '22 16:10 ChipmunkMC

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)

rom1504 avatar Jan 03 '21 15:01 rom1504

https://numpy.org/doc/stable/reference/generated/numpy.lib.format.html

rom1504 avatar Jan 15 '21 22:01 rom1504

there is https://github.com/ludwigschubert/js-numpy-parser but somehow there is no npm package to write numpy files ?!

rom1504 avatar Jan 15 '21 22:01 rom1504

ah maybe https://github.com/propelml/tfjs-npy

rom1504 avatar Jan 15 '21 22:01 rom1504

https://github.com/propelml/tfjs-npy/blob/master/npy.ts#L20

rom1504 avatar Jan 15 '21 22:01 rom1504