The Lost Worlds [Forge]

The Lost Worlds [Forge]

8.7k Downloads

Mod doesn't work on a Server (Issue with the RecipeSerializer)

Sirs0ri opened this issue ยท 9 comments

commented

Hi,

When adding this mod to a Server, I can no longer connect to that server.
My Client's console shows an EncoderException (full log linked below) that I believe ultimately happens because the process of Serializing/Deserializing recipes isn't symmetric.

Googling the exception lead me to a thread that describes exactly the same problem, with an (apparently) very simple fix (https://forums.minecraftforge.net/topic/90713-1152-javaioutfdataformatexception-malformed-input-around-byte-1/).

It looks like your serializers' toNetwork methods write the ingredients first, then the outputs, while the fromNetwork methods try reading the output, and then the ingredients, which causes the de-serialization to fail.

I'd appreciate it if you could look into this!

tl;dr:

What I expect to happen

  • Add Lost Worlds to a server
  • Be able to play the mod

What happens instead

  • Client can't connect due to a io.netty.handler.codec.EncoderException

My environment

Logs & Errors

  • Error displayed by the client: Connection lost,
    Internal Exception: io.netty.handler.codec.DecoderException: io.netty.handler.codec.EncoderException: java.io.UTFDataFormatException: malformed input around byte 0
  • https://pastebin.com/7pDuznS7
commented

Little bit late, but try this file with Tyrannotitan Library 1.4.0

https://www.mediafire.com/file/g3rvgjkwgpvqjbc/servertest-3.jar/file

commented

Thank you for bringing this too my attention, I don't really play on servers and don't really know how to make them, so it was always a high likely that something would fly under the radar. As I said, don't really know how to make/run servers, so if you could, could you test this new file that should work. If it doesn't, just, say, and I will try to figure it out, though I think what you have shared should've fixed it.

This jar is, of course, still in development and I wouldn't recommend using it on your main server, but, if you do everything should correctly map over to the new things, just alot of things will be missing. Also, please note this file will require Tyrannotitan Lib and not GeckoLib.

Hope this works!
https://www.mediafire.com/file/xdyfgxpl8ppqpn9/server_test.jar/file

commented

Thanks for the very quick response!

Unfortunately, with the file you linked above my (local test-) server won't even start, here's a full log: https://pastebin.com/dHg9QxCQ

What I did to reproduce is, in AT Launcher (https://atlauncher.com/downloads) created a new Server and Instance (via the "Vanilla Packs" tab, selecting MC 1.16.5, and Forge 36.2.0), then at first I added Geckolib and the published version of Lost worlds, to confirm that the original issue still persists (it did).

Then I replaced the mod and Geckolib with the version of the mod you linked and Tyrannotitan Lib, and got the crash linked above when starting the server.

commented

Hmm, strange, think I've got it this time...Finger's crossed anyway. I this works!

https://www.mediafire.com/file/aaxl3ps6t5fgn0y/server_test_2.jar/file

commented

New version - new crash, unfortunantely. Here's the log again: https://pastebin.com/TeVZc6fW

But a different error means progress, right? :D

commented

Okay, I think I've finally fixed the issue! I'll send you the file today

commented

Have you gotten a chance yet? Does it work on a server?

commented

Hi, sorry, I had a busy week and just got around to test it.

Unfortunately, the mod still doesn't work for me on a server. This time around, everything starts correctly, but I'm getting kicked right after connecting due to a java.lang.ClassCastException. Log is here: https://pastebin.com/qqJmhHDS, exception happens right at the end of it.

On the client I'm seeing a lot of Exception loading blockstate definition warnings, as well as a few warnings about Unable to load model, but nothing about why the client's getting kicked, log here: https://pastebin.com/T8dVvYr2

Thanks so much for taking the time to look into this!

commented

Hay, I know it's almost been a month, but I think I've fixed it. Also, Exception loading blockstate definition don't matter, not Unable to load model I hope it works!!

https://www.mediafire.com/file/cygxdrh7yzyscll/server-test-4.jar/file