While poking around in the code I noticed that the Quaternion data serializer was registered to Minecraft, but not Forge. My guess as to the reason it works for ~1/2 of my server clients as-is (without this patch) involves some sort of race condition with multiple mods being loaded at once, fighting for DataSerializer IDs. (based off the 'Unknown Serializer Type' error that sometimes shows when a player disconnects)
Please let me know if there is anything more I should change (I tried to match the existing structure and coding style), and if not, please give me a shout when this patch lands on Curseforge :) Until then my server will be running a custom compiled version so all can play with planes!
fixes some netty DecoderExceptions, particularly the "connection lost" messages some of my clients have been getting:
Internal Exception: io.netty.handler.codec.DecoderException: Unknown serializer type 25
andInternal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(108) + length(8) exceeds writerIndex(114): PooledUnsafeDirectByteIndex(ridx: 108, widx: 114, cap: 114)
This fixes the issues I described in #16
While poking around in the code I noticed that the Quaternion data serializer was registered to Minecraft, but not Forge. My guess as to the reason it works for ~1/2 of my server clients as-is (without this patch) involves some sort of race condition with multiple mods being loaded at once, fighting for DataSerializer IDs. (based off the 'Unknown Serializer Type' error that sometimes shows when a player disconnects)
I haven't done much modding in a while. I made this patch based off of info from https://mcforge.readthedocs.io/en/latest/concepts/registries/ and the warning in https://mcforge.readthedocs.io/en/latest/networking/entities/#data-parameters was particularly helpful in diagnosing the issue.
Please let me know if there is anything more I should change (I tried to match the existing structure and coding style), and if not, please give me a shout when this patch lands on Curseforge :) Until then my server will be running a custom compiled version so all can play with planes!