Skip to content
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 string based parsing for states #3141

Merged
merged 1 commit into from Nov 16, 2020
Merged

Conversation

dualspiral
Copy link
Contributor

SpongeAPI | SpongeCommon

The initial intention was to remove CatalogType from BlockState and FluidState and use Minecraft's inbuilt BlockStateParser to allow us to rebuild strings that represent block states. FluidState has a toned down version of the parser.

There is a bigger issue in that the schematic system heavily relies on the fact that BlockState is a catalog type. I've not touched this - I'd rather someone else looked at that.

@dualspiral dualspiral force-pushed the api8/state_serialization branch 3 times, most recently from 7f8c3c5 to 0e18aa1 Compare November 15, 2020 16:34
@dualspiral dualspiral marked this pull request as ready for review November 15, 2020 16:36
@dualspiral
Copy link
Contributor Author

I think this is ready to go. The actual matcher logic is at https://github.com/SpongePowered/SpongeCommon/pull/3141/files#diff-23397afc63a4c03b7461df0f8f3db2c0eb3348cc521a89fb16a6728abf817e39R62-R83 - someone please take a look at that and make sure I've got this right before merging.

* Remove DataSerializable from matchers
* Use Mojang BlockState command parser for string block state parsing
* Mimic Mojang BlockState command parser for fluids
@dualspiral dualspiral merged commit 774dc73 into api-8 Nov 16, 2020
@dualspiral dualspiral deleted the api8/state_serialization branch November 16, 2020 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants