ProtocolLib

3M Downloads

PacketAdapter only triggers every other tick

Alex1607 opened this issue · 6 comments

commented

Describe the bug
I was testing something with ProtocolLib when I saw this "weird" behavior. When I register an PacketAdapter to print me every packet in the console and also register a new SyncScheduler to run every tick and just print a line in the chat + the tick it only prints the packets messages every other tick.

To Reproduce

  1. Create a new PacketAdapter to capture all packets and print them into the console.
  2. Create a new Scheduler to run every tick and let it print a line into the console

Expected behavior
I would expect to see packets in every tick and not only in every other tick.

Screenshots
Console output

Version Info
https://pastebin.com/raw/NtV5BAiK

Additional context
And yes I was moving the all the time.

commented

Also happens to me

commented

This is a bug in minecraft version 1.8. Packets in this version are sent like this. If I remember correctly, the bug is in the algorithm in the main loop responsible for catching up for lost ticks (while one tick took longer than 50ms).

commented

Huh that's interesting. I wonder if it's a limitation of netty/nms or something we're doing. Can you provide the code you used (or email me at [email protected] if you don't want to share it publicly) so I can look in to it more?

commented

Huh that's interesting. I wonder if it's a limitation of netty/nms or something we're doing. Can you provide the code you used (or email me at [email protected] if you don't want to share it publicly) so I can look in to it more?

I could kinda reproduce it with this code: https://github.com/Alex1607/ProtoTest However it seems like with that code some packets manage to get through in one tick but then a lot of other packets group together in another tick. And some ticks are completely empty.

I have also added you to one private repository which has the "original" code in it. I will also add something in the readme of that project so you know what to look for.

commented

I got the same issue on my server, is this issue already resolved?
If yes, when will the update come out?

commented

Any Update on this? It now nearly two month. 😅