Jump to content

@SidedPacketHandler Dedicated Server bug


Davidee

Recommended Posts

While testing my Legendary Beasts mod by running a "dedicated" server from my computer, I noticed the following issue:

 

Conditions:

Only have a "clientPacketHandlerSpec" defined ->

----client does not receive packets when playing on a dedicated server

---- client does receive packets on an integrated server

 

Have both a "clientPacketHandlerSpec" and "serverPacketHandlerSpec" ->

----client does receive packets on a dedicated server

----client does receive packets on an integrated server

 

 

 

Link to comment
Share on other sites

@NetworkMod
(clientSideRequired = true, serverSideRequired = false, clientPacketHandlerSpec = @SidedPacketHandler(channels = CHANNEL,packetHandler = ClientPacketHandler.class),
connectionHandler = ConnectionHandler.class)

That's the Annotation. Like I said, it works fine in SinglePlayer (Integrated Server). Just doesn't work when connecting to a dedicated server, the onPacketData method isn't being called.

Link to comment
Share on other sites

You only have a client side packet handler. In a dedicated server, it will never get called. Also update forge for proper behaviour of these..

It doesn't get called on the client when connecting to a dedicated server. However, to fix it I just made a dummy ServerPacketHandler, so it's okay.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.