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

[1.20.2] Endec - Simplier Codec Alternative #194

Merged
merged 50 commits into from
Dec 6, 2023

Conversation

Dragon-Seeker
Copy link
Member

Endec is an implementation based on a previous attempt and Codec by @gliscowo. Such is an attempt at being a similar but different alternative Minecraft DFU system Codec.

Features:

  • Support for Networking by default (ByteBuf implementations like PacketByteBuf)
  • Less Functional Programming
  • Interop with Minecraft Codec

Such still requires refinement as such still lacks some of the various DFU implementations like MapCodec and possibly changes to general implementations.

Dragon-Seeker and others added 30 commits October 10, 2023 18:23
- Adjust "any" methods to better reflect where they are located
- Fix error within writeAny for json and nbt
- Implement readAny NBT
- Add AW for forwarding Dyn Ops
- Fix errors within testing command
…lization using Attributes

- Add Variable Length Ints
- Adjust networking test
- Fix improper encode and decode for String
- Use VAR_INT codeck for enum
- Fix list method for changing the list constructor

Co-Authored-By: BasiqueEvangelist <[email protected]>
…ed method call on StructDeserializer

Co-Authored-By: BasiqueEvangelist <[email protected]>
- Add KeyField
- Adjust StructField to be a extenstion of KeyField
- Add various helper method ontop of KeyField and StructField
- Adjust Nbt and Json Serializers for Prefix support
 - remove compressed and binary attributes as they both serve little purpose
 - update SelfDescribedDeserializer#readAny to accept a Serializer as a visitor to construct data instead of converting to intermediate types
 - reimplement JsonEndec and NbtEndec on top of updated readAny(...) specification
 - experimental implementation for Endec.ofCodec
…-serializer method ordering, remove binary nbt format
This is for the few that have been left behind with Mojang's implementation of Codec and lack the ability to handle any of their 17 field objects.
Also add support for nested generic calls with Map, List and Set on the getGeneric method
 - separate non-primitive endecs into BuiltInEndecs
 - use wildcard generics on (De)Serializer parameters
 - implement Endec.dispatchedStruct for DFU parity
…e (always require a default value), refactor StructField to be independent of now-different KeyedEndec
gliscowo and others added 20 commits November 21, 2023 01:29
…pCarrier#get with default implementation delegating to new MapCarrier#getWithErrors
…ip serializing empty optional fields in json and nbt serializer
- Switch Nbt implementations of MapCarrier to use human readable forwarding (De)-Serializer
@gliscowo gliscowo changed the base branch from 1.20.2 to 1.20.3 December 6, 2023 21:55
@gliscowo gliscowo merged commit 89fcc07 into wisp-forest:1.20.3 Dec 6, 2023
1 check passed
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