Skip to content

Commit

Permalink
Let TickTimer setback
Browse files Browse the repository at this point in the history
  • Loading branch information
SamB440 committed Dec 30, 2024
1 parent f6513b5 commit 3308b4d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ public TickTimer(GrimPlayer player) {
public void onPacketReceive(PacketReceiveEvent event) {
if (!player.supportsEndTick()) return;
if (isFlying(event.getPacketType()) && !player.packetStateData.lastPacketWasTeleport) {
if (!receivedTickEnd) flagAndAlert("type=flying, packets=" + flyingPackets);
if (!receivedTickEnd && flagWithSetback()) {
alert("type=flying, packets=" + flyingPackets);
}
receivedTickEnd = false;
flyingPackets++;
} else if (event.getPacketType() == PacketType.Play.Client.CLIENT_TICK_END) {
receivedTickEnd = true;
if (flyingPackets > 1) flagAndAlert("type=end, packets=" + flyingPackets);
if (flyingPackets > 1 && flagWithSetback()) {
alert("type=end, packets=" + flyingPackets);
}
flyingPackets = 0;
}
}
Expand Down

0 comments on commit 3308b4d

Please sign in to comment.