Skip to content

Conversation

@Machine-Maker
Copy link
Contributor

@Machine-Maker Machine-Maker commented Mar 23, 2024

Adds a parser for adventure components using a provided ComponentDecoder. ~~Requries an adventure version bump to 4.16 for the ComponentDecoder interface.~~reverted

Currently I have the default StringMode to QUOTED for the static factory methods that don't take a StringMode parameter. Unsure if that's the best, but I don't think SINGLE is the best option as these can regularly be expected to contain spaces.

Remade from Incendo/cloud#447

Adds a parser for adventure components using a provided ComponentDecoder.
Requries an adventure version bump to 4.16 for the ComponentDecoder
interface.
@Machine-Maker Machine-Maker marked this pull request as draft March 23, 2024 00:20
@Machine-Maker
Copy link
Contributor Author

Implemented the brig mapping contributor mapping the ComponentParser to the brig string type based on the StringMode provided.

Also reverted the adventure version bump to not break compat.

@jpenilla
Copy link
Member

Still needs a ParserContributor, not sure how we want to handle selecting a serializer from annotations though. It should also check the string greedy/quoted annotations.

@Machine-Maker
Copy link
Contributor Author

Ok, add a ParserContributor and annotations to configure the ComponentParser

@Machine-Maker Machine-Maker marked this pull request as ready for review March 24, 2024 00:55
@jpenilla jpenilla changed the title feat: ComponentParser feat(minecraft-extras): ComponentParser Mar 25, 2024
@jpenilla jpenilla merged commit df947f2 into Incendo:master Mar 25, 2024
@Machine-Maker Machine-Maker deleted the feat/ComponentParser branch March 25, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants