Remove Netty from the API
Problem Description
Due to the fact that the current API depends on Netty, there's no easy way of integrating it with a server that uses anything other than Netty, for example Minestom that uses java.nio
Solution Description
Remove the use of Netty classes in the API. One way of doing this could be by creating a new interface that replaces the Netty channel. Same with the Netty ByteBuf.
Alternatives
No response
Additional Info
The only issue I can see with this is the fact that its a breaking change.
If you're okay with it, I can create a draft PR and start working on it.
This is something we probably have to do anyways given netty 5, but this will have to wait for a major version bump given it'd be fairly disruptive - at the moment none is planned for the near future, and as of now we don't have much reason to already do the break.
A workaround for the minestom case until then is to use ViaProxy, or to put ViaVersion on Velocity/Bungee
Are there other dependencies that may be deprecated in case this breaking change does occur?
A workaround for the minestom case until then is to use ViaProxy, or to put ViaVersion on Velocity/Bungee
I'm aware that you can put Minestom behind a proxy, but in my opinion that's a pretty hacky workaround since you have to spin up a proxy just for that one server.
Are there other dependencies that may be deprecated in case this breaking change does occur?
I don't think there's anything else.
ViaVersion on the proxy unfortunately isn't a real option for us due to anti-cheat even though the versions we would allow to be translated would be very small, the changes between 1.19.x and 1.20.x or even 1.20.1 and 1.20.4 are significant enough to cause issues with anti-cheats. We did some work for this at some point of ripping netty-buffers outside of netty and wrapping NIO: https://netty.io/wiki/using-as-a-generic-library.html
Removing Netty from the API would not only break ViaVersion but also all other projects depending on it such as ViaFabricPlus or ViaLegacy, it's something for an major version bump and this definitely won't happen just because someone wants Minestorm support.