AlmuraDev / Almura

The official mod of the Almura Client and Server.
http://www.almuramc.com
Other
16 stars 10 forks source link

[Bug] - Editing a sign - colors get removed #518

Closed Dockter closed 5 years ago

Dockter commented 6 years ago

If you edit a sign LINE that contains color, the color is removed when editing and can't be put back.

Dockter commented 5 years ago

This is not worth fixing. After debugging this in detail what is happening is that signs are now made up of TextComponent, none of which from what I can see can be reverse engineered to generate the actual original input codes used to create the component. Example, whatn &cRed is created, the &c is converted into a component type with the string encoded into the component as well. We cheat the system by loading the lines back into the client packet but the keyTyped method in GuiEditSign, when keys are pressed it returns getUnformattedText() of the component. I have not found a way to return a string that contains the color codes. Thus not worth fixing.