-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
ANSIComponentSerializer #898
Conversation
b4f56a3
to
8d7c3f6
Compare
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.
can't rly words rn but some initial thoughts
...zer-ansi/src/main/java/net/kyori/adventure/text/serializer/ansi/ANSIComponentSerializer.java
Outdated
Show resolved
Hide resolved
...zer-ansi/src/main/java/net/kyori/adventure/text/serializer/ansi/ANSIComponentSerializer.java
Outdated
Show resolved
Hide resolved
...zer-ansi/src/main/java/net/kyori/adventure/text/serializer/ansi/ANSIComponentSerializer.java
Outdated
Show resolved
Hide resolved
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 pretty close, just a few nits here!
We should see about introducing an extra interface for these sorts of serializers that only defines the serialize()
method -- maybe ComponentEncoder
? or something? We've already used up serializer and renderer lol
...zer-ansi/src/main/java/net/kyori/adventure/text/serializer/ansi/ANSIComponentSerializer.java
Outdated
Show resolved
Hide resolved
...zer-ansi/src/main/java/net/kyori/adventure/text/serializer/ansi/ANSIComponentSerializer.java
Outdated
Show resolved
Hide resolved
...ansi/src/main/java/net/kyori/adventure/text/serializer/ansi/ANSIComponentSerializerImpl.java
Outdated
Show resolved
Hide resolved
...ansi/src/main/java/net/kyori/adventure/text/serializer/ansi/ANSIComponentSerializerImpl.java
Outdated
Show resolved
Hide resolved
...zer-ansi/src/main/java/net/kyori/adventure/text/serializer/ansi/ANSIComponentSerializer.java
Outdated
Show resolved
Hide resolved
ComponentEncoder is akin to ComponentSerializer, except it doesn't provide deserialization. This is intended to be used in #898. ComponentSerializer now extends ComponentEncoder, but still overrides the methods with exact copies, to keep the javadocs more clear. These originals also retain their old `@since` tags.
ComponentEncoder is akin to ComponentSerializer, except it doesn't provide deserialization. This is intended to be used in #898. ComponentSerializer now extends ComponentEncoder, but still overrides the methods with exact copies, to keep the javadocs more clear. These originals also retain their old `@since` tags.
268ecd3
to
3f20aaa
Compare
Basically so far it's just a thing which pipes together an ANSIComponentRenderer from net.kyori.ansi and a ComponentFlattener. NEEDS MORE TESTS AAAA
Co-authored-by: zml <[email protected]>
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.
Looks good to merge as soon as you bump the ansi
dependency to the release version :)
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.
ok one last thing sorry :(
Supersedes #140
Fixes KyoriPowered/ansi#7
Fixes #125