quilt-standard-libraries
quilt-standard-libraries copied to clipboard
NetworkChannels.
This PR adds:
- NetworkChannels to the networking API. They started as a test for NetworkCodecs but ended up making me like them enough to make them public API. They are a wrapper around Server/ClientPlayerNetworking that makes it so the user never has to interact with a PacketByteBuf. They contain a NetworkCodec and they use that as well as a supplied handler in order to handle messages. The user just needs to create the channel and specify a way to handle it.
More tests coming soon(TM). This depends on #180 since it uses NetworkCodecs.
With Patbox we were thinking of making so you could extend Packet in a way so you could use Vanilla's methods but internally they would turn back into CustomPayload packets. So I'm not sure I am a fan of the network channel stuff. Also it kinda looks complicated? I'm not sure what to think of it.
Also it kinda looks complicated? I'm not sure what to think of it.
What is the complicated part? NetworkCodecs or the channels?
The channels.
The codec stuff looks straightforward, I mean, it's codecs.
The channels.
Do you mean in terms of implementation or in terms of user experience?
Both.