-
-
Notifications
You must be signed in to change notification settings - Fork 615
feat(Velocity): Lag mode #7591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: nextgen
Are you sure you want to change the base?
feat(Velocity): Lag mode #7591
Conversation
|
why close? |
2026-01-13.13-58-15.mp4 |
|
Thank you. I will look into it soon. |
|
Finally I found the reason of the grim post vl problem: the client tick isn't synchronized with the packet tick(the packet tick is slower than the client tick) |
| private val packetHandler = handler<PacketEvent> { event -> | ||
| val packet = event.packet | ||
|
|
||
| if (packet is ClientboundSetEntityMotionPacket && packet.id == player.id){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (packet is ClientboundSetEntityMotionPacket && packet.id == player.id){ | |
| if (packet is ClientboundSetEntityMotionPacket && packet.id == player.id) { |
|
|
||
| @Suppress("unused") | ||
| private val queuePacketHandler = handler<QueuePacketEvent>{ event -> | ||
| if (!isLagging || event.origin != TransferOrigin.INCOMING || event.packet is ClientboundKeepAlivePacket){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (!isLagging || event.origin != TransferOrigin.INCOMING || event.packet is ClientboundKeepAlivePacket){ | |
| if (!isLagging || event.origin != TransferOrigin.INCOMING || event.packet is ClientboundKeepAlivePacket) { |
|
|
||
| @Suppress("unused") | ||
| private val tickPacketProcessHandler = handler<TickPacketProcessEvent> { | ||
| if (isLagging){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (isLagging){ | |
| if (isLagging) { |
| private val tickPacketProcessHandler = handler<TickPacketProcessEvent> { | ||
| if (isLagging){ | ||
| lagTicks-- | ||
| if (lagTicks == 0){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (lagTicks == 0){ | |
| if (lagTicks == 0) { |
Lag mode
It has some bugs
@1zun4 required me to use PacketQueueManager, but after I used it, my lag mode caused post vl on grimac