Jump to content

Recommended Posts

Posted (edited)

I am hosting a server with my mod on it. I have the exact same built version of that mod on my client. Both the server and the client are using Forge version 27.0.17. My mod specifies that it is made for Forge version 27.

 

Channels [luckyblock:main] rejected their server side version number

is the error I get on the client whenever I try to join the server. Forge tells me that I have a mismatched mod channel list.

 

Information:

  Reveal hidden contents

I'm wondering if my dependencies in my mods.toml might be the cause of this:

  Reveal hidden contents

 

Edited by jasonhaxstuff
Solved
Posted
  On 7/2/2019 at 1:22 AM, PhilipChonacky said:

 

Logs?

Expand  

 

Client:

  Reveal hidden contents

Server:

  Reveal hidden contents

 

Posted (edited)
  On 7/2/2019 at 6:34 PM, diesieben07 said:

Where you register your network channels. I don't know your code, you wrote it so I would assume you know.

Expand  

Ohhhh, that kind of code, I thought you meant code.

 

private static final String PROTOCOL_VERSION = "490";

public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel(
        new ResourceLocation(MyMod.MODID, "main"),
        () -> PROTOCOL_VERSION,
        PROTOCOL_VERSION::equals,
        PROTOCOL_VERSION::equals
);

 

I looked up the protocol versions and found that 490 is for 1.14.3. I also tried version 1 (from the example code).

I have a feeling that I shouldn't be comparing the protocol versions directly and should actually be checking if the version is one of many versions. I just don't know what those versions would be.

Edited by jasonhaxstuff
Posted (edited)
  On 7/3/2019 at 7:50 AM, diesieben07 said:

This is for your own version. So that you can check if certain versions of your mod are compatible when used together on server / client.

So really, this should work, unless you are starting a vanilla server.

Expand  

 

From the docs: "Here, we simply compare with the PROTOCOL_VERSION field directly, meaning that the client and server  PROTOCOL_VERSIONs must always match or FML will deny login."

 

No, I'm not starting a vanilla server.

Edited by jasonhaxstuff
Posted
  On 7/3/2019 at 3:21 PM, diesieben07 said:

First thing I noticed is that all your packets use the same packet ID ("index").

Then, you are registering your SimpleChannel in a static intializer. Do not do this, you have no control over when this code runs. It should happen during FMLCommonSetupEvent.

You then register your packets only on the client (FMLClientSetupEvent). This must also happen on both sides.

Expand  

This fixed my problem, but do you also know why none of my server commands are being registered?

Posted (edited)
  On 7/3/2019 at 3:43 PM, diesieben07 said:

For a start, do not use @OnlyIn on your commands. In fact, do not use @OnlyIn at all.

You register your FMLServerStartingEvent event handler to the mod event bus, but that event is fired on the forge event bus.

Expand  

My new code (in the repo) throws this error on the server whenever I try to send a packet to a player

Received invalid message me.jasonhaxstuff.luckyblock.packets.JumpScarePKT

 

Edited by jasonhaxstuff
Posted (edited)
  On 7/3/2019 at 4:00 PM, jasonhaxstuff said:

My new code (in the repo) throws this error on the server whenever I try to send a packet to a player

Received invalid message me.jasonhaxstuff.luckyblock.packets.JumpScarePKT

 

Expand  

Nevermind. I had to register the packets on the `FMLServerStartingEvent` event. That fixed it.

Edited by jasonhaxstuff
Posted
  On 7/3/2019 at 4:19 PM, diesieben07 said:

The current code in your repo still shows you registering packets in FMLClientSetupEvent. It must happen on both sides, in FMLCommonSetupEvent.

Expand  

Ohhhhhh! Whenever you said "You then register your packets only on the client (FMLClientSetupEvent)." I though you meant that I should do that.

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.