Jump to content

Recommended Posts

Posted

Hey guys, I'm new to Forge modding so bare with me.

 

Is it as simple as doing:

 

public void onPacketData(INetworkManager manager, Packet10Flying packet, Player player) {

for example?

 

Thanks in advance, Big.

Posted

If you are referring to intercepting vanilla packets to handle them yourself -- I don't believe this functionality is currently included in Forge (there was a PR/talk about it a few weeks/month ago, but I haven't seen it in the repo yet).

 

If you are referring to sending/receiving those packets yourself (to/from your mod)-- again, not really possible (you can send the packets, but vanilla packet handler will pick them up).  However, you should be able to use the Packet250 to hold any of the datas sent through the other packets, you would just need to make your own subclass of Packet250, override the necessary read/write methods, and of course handle it in your own packet handler.

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.