octa Posted January 27, 2021 Share Posted January 27, 2021 (edited) I'm playing around with making my own mod. It works fine in Singleplayer but when I test it on a server my client gets disconnected with error message Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException (there is no further stack trace) when I place the Portal Base block. I can reconnect just fine, but will get disconnected again when I place another of those blocks. I haven't found much about this specific issue. Any help would be appreciated. Code: https://github.com/eddie1101/PortalTest/ logs: (Though they're not very helpful, is there some way to make the error more verbose? A stack trace would really help) Server: https://pastebin.com/JN6gnQyx Client: https://pastebin.com/AWVavatz Thanks in advance. Edit: Attached .jar if you want to try to reproduce basicportals-0.1.jar Edited January 27, 2021 by octa Quote Link to comment Share on other sites More sharing options...
octa Posted January 27, 2021 Author Share Posted January 27, 2021 Repo is fixed. How do I run my client with system properties? It works on the server but when I add it to JVM arguments in the launcher's installation settings the game crashes. Quote Link to comment Share on other sites More sharing options...
octa Posted January 27, 2021 Author Share Posted January 27, 2021 Woops. Fixed the item names. According to the docs, RegistryEvent.Register is a valid way of registering entries, so I'll stick with that since I know it better. The repo should build now, so back to my original question: Why when placing a Portal Base does the client get disconnected from the server? Quote Link to comment Share on other sites More sharing options...
octa Posted January 27, 2021 Author Share Posted January 27, 2021 (edited) Oh, that makes sense. Do you have a suggested way of initializing that BlockPos? I can't think of anything other than assigning a symbolic value which gets verified before use, but that seems clumsy. Edit: Nvm, I was trying to return some nbt data instead of the tileentity's actual position. Thanks for the help. Edited January 27, 2021 by octa Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.