-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Various changes to packetfly, moved to separate module * Move to Flight module and use PacketManager * Cleanup * Forgot this check * Fix double antikick and made sure settings are not displayed when they shouldnt be Co-authored-by: Constructor <fractalminds@protonmail.com>
- Loading branch information
1 parent
56fbee8
commit 45885c2
Showing
2 changed files
with
91 additions
and
27 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/main/kotlin/com/lambda/client/manager/managers/PacketManager.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.lambda.client.manager.managers | ||
|
||
import com.lambda.client.event.events.ConnectionEvent | ||
import com.lambda.client.event.events.PacketEvent | ||
import com.lambda.client.event.listener.listener | ||
import com.lambda.client.manager.Manager | ||
import com.lambda.client.util.threads.safeListener | ||
import net.minecraft.network.play.server.SPacketPlayerPosLook | ||
|
||
object PacketManager : Manager { | ||
var lastTeleportId = -1 | ||
|
||
init { | ||
listener<PacketEvent.Receive> { | ||
when (it.packet) { | ||
is SPacketPlayerPosLook -> { | ||
lastTeleportId = it.packet.teleportId | ||
} | ||
} | ||
} | ||
|
||
safeListener<ConnectionEvent> { | ||
lastTeleportId = -1 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters