Jump to content

On Vanilla Packet Send / Receive Event


doej134567

Recommended Posts

Hi, I was looking around for a way to do stuff after Packets are sent / received.

With "do stuff" I mean things like display packet info on the screen or in the Minecraft game output. I found a lot of posts about this, but the unhelpful standard answers were always something like "There are no events fired for vanilla packets" or questions like "Why you need to interact with Vanilla packets?". The most helpful forum post I found was the following one, but the presented solution is to work with mixins, which is a bit much for just a little debug info.

So here it goes:

Why I want to do this

Originally I just want to find out why Hypixel kicks me from time to time and if I can do someting about it, but then my investigation got a little out of hand. I did get quite far using Wireshark and the Minecraft game output (for crossreferencing IOException timestamps), but as the TCP packets are encrypted, compressed and in encoded, I hit a dead end with my diagnostics.

Now the idea was to do a simple System.out.println(); each time a KeepAlive packet gets sent or received (which should be about ever 15 to 120 seconds or so depending on server and client settings), as a missing KeepAlive packet can be one of the reasons why a server would kick a client using a TCP RST packet. This way I would know which of the packets are the KeepAlive ones and when they are sent and received.

Thanks

Link to comment
Share on other sites

As I have no Idea how that remote debugging feature works and how I attatch it with eclipse and also that I might want a solution for a universal network analyzer for minecraft one day, my seach went on and I might have almost found what I was looking for: https://blog.techno.fish/intercepting-vanilla-minecraft-network-packets/

Just a few things like packets sent by the client to the server are mentioned with "If you wish to capture outbound packets as well, you can implement a ChannelDuplexHandler" but sadly not further explained.

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.