Skip to content
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

feat(legacy): improved anticheat detector #5576

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import net.minecraft.network.play.server.S32PacketConfirmTransaction

object AnticheatDetector : Module("AnticheatDetector", Category.MISC) {
private val debug by boolean("Debug", true)

private val actionNumbers = mutableListOf<Int>()
private var check = false
private var ticksPassed = 0
Expand Down Expand Up @@ -87,9 +86,10 @@ object AnticheatDetector : Module("AnticheatDetector", Category.MISC) {
}

-1 -> when {
first in -8287..-8280 -> "Errata"
first < -3000 -> "Intave"
first in -5..0 -> "Grim"
first in -3005..-2995 -> "Karhu"
first in -3000..-2995 -> "Karhu"
else -> "Polar"
}

Expand Down Expand Up @@ -124,6 +124,14 @@ object AnticheatDetector : Module("AnticheatDetector", Category.MISC) {
return
}

// Old Vulcan
if (actionNumbers.take(3) == listOf(-30767, -30766, -25767) &&
actionNumbers.drop(3).zipWithNext().all { (prev, curr) -> curr - prev == 1 }) {
hud.addNotification(Notification.informative(this, "§3Anticheat detected: §aOld Vulcan", 3000L))
actionNumbers.clear()
return
}

hud.addNotification(Notification.informative(this, "§3Anticheat detected: §aUnknown", 3000L))
if (debug) {
chat("§3Action Numbers: ${actionNumbers.joinToString()}")
Expand Down