-
-
Notifications
You must be signed in to change notification settings - Fork 115
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 FormattedComponentArgument for /cwe #464
base: fabric
Are you sure you want to change the base?
Conversation
Hmm, could we leave in some of the old syntax as an alternative to the new syntax, so that those of us who haven't memorized formatting codes can still use it? |
I think that will get a bit confusing. What about making this into a separate class? Something like |
…gument-rewrite # Conflicts: # src/main/resources/assets/clientcommands/lang/en_us.json
…gument-rewrite # Conflicts: # src/main/java/net/earthcomputer/clientcommands/command/NoteCommand.java # src/main/java/net/earthcomputer/clientcommands/command/arguments/FormattedTextArgumentType.java # src/main/resources/assets/clientcommands/lang/en_us.json
I rewrote
FormattedTextArgumentType
. The previous implementation was too verbose and moreover not working as one might have expected it to. This new syntax is less error prone and probably more intuitive to work with. The availability of some text styles have been dropped, as firstly the previous implementation was incomplete and secondly because this argument type is meant to provideFormatting
ed text, notStyle
d text. Aside from what's available in theFormatting
class, I did decide to add hex colour support through the#
prefix with lenient hex parsing. Do note thatStyle
d text is still available using the/ctellraw
command.