-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add of new minecraft colours #5838
Conversation
Related to #2988 - due to this change we'll no longer be able to use underline or strikethrough codes on the terminal |
Labelling this as blocked, since it causes breakages to other features. The discussion what to do about that hasn't been resolved yet. |
Is it possible to reopen this now since #2988 is closed now? Or it wasn't the reason why this got blocked? |
No, the issue of being unable to use certain formatting codes on the server still exists, as well as changes in behaviour for any existing code |
Well, then, why don't just add new codes and do not remove deprecated ones? They are counted as deprecated in MC ecosystem for a very long time already, so as for my opinion, adding new codes will:
Cons:
So there is no 100% need to remove/deprecate them, and they will exist for unknown period of time, just as they are now, but the devs will get the ability to use new codes in api. That's how I see the issue. I accept the fact that I may have missed something, that's alright, you may point me directly to the problems that I'm not aware of |
We can't have them conflicting with strikethrough and underline because the console won't be able to use them. That's the whole problem. |
For completeness, a collection of proposed solutions for this problem: 1) Don't add the new constantsDoesn't seem like a good option - these new things aren't going to go away, and we still have problems without them, as people already use the new codes just by using their 2) Add the constants, but allow them to conflictUsers of the underline & strikethrough constants will get unexpected formatting on clients, & console wouldn't know whether to use formatting or new colours 3) Custom formatting codes to support underline & strikethrough on the consolePresents the possibility for any custom codes to conflict with new Minecraft codes in the future 4) Drop underline & strikethrough support via
|
this allows a quick fix for strings pulled from Java containing these formatting codes.
@@ -191,12 +221,10 @@ public static function isInit() : bool{ | |||
public static function toANSI(string $string) : string{ | |||
$newString = ""; | |||
foreach(TextFormat::tokenize($string) as $token){ | |||
$newString .= match($token){ | |||
$newString .= match ($token) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably was done by accident
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but the PhpStorm formatter does this and there doesn't seem to be a way to stop it. I've stopped trying to fight with it at this point.
I guess this is the price we pay for maintaining a non-standard code style...
Introduction
Minecraft has just added the colours that are linked to the materials
Tests