Jump to content

Recommended Posts

Posted

Sorry to be a little off topic, but I was wondering about how to correctly set up my packet handling.

Is it ok to just have:

 

 

@NetworkMod(

    clientSideRequired = true,

    serverSideRequired = false,

    clientPacketHandlerSpec = @SidedPacketHandler(channels={"EntangleCraft"}, packetHandler=ClientPacketHandler.class),

    serverPacketHandlerSpec = @SidedPacketHandler(channels={"EntangleCraft"}, packetHandler=ServerPacketHandler.class),

    connectionHandler = EntangleCraft.class,

    versionBounds = "[1]"

    )

 

 

,given that both of those packetHandler classes implement IPacketHandler?

I assume something else needs to be done as my packets aren't sending :P

Posted

Is support/bug reports really the place? I always thought this was for installation issues and stuff.

 

Anyhow, my server packet handler sends packets to all clients like this

MinecraftServer server = ModLoader.getMinecraftServerInstance();
server.getConfigurationManager().sendPacketToAllPlayers(packet);

Feel like I'm gonna get raged at for using something from ModLoader, especially since I use it again for sending from client to server:

ModLoader.sendPacket(packet);

 

Just to clarify, the title of this thread isn't my problem; I just want to know how to set up packets correctly. This was Kinniken's thread title, sorry about the hi-jack.

Posted

Are you specifying the correct channel in your packet?

Kinda need to see the full construction and how things are set.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.