<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[Kotlin] HackerDetector]]></title><description><![CDATA[<p dir="auto">DETECT SIGMA HATARS</p>
<p dir="auto">code below...</p>
<pre><code>package net.ccbluex.liquidbounce.features.module.modules.player

import net.ccbluex.liquidbounce.event.EventTarget
import net.ccbluex.liquidbounce.event.PacketEvent
import net.ccbluex.liquidbounce.event.WorldEvent
import net.ccbluex.liquidbounce.features.module.Module
import net.ccbluex.liquidbounce.features.module.ModuleCategory
import net.ccbluex.liquidbounce.features.module.ModuleInfo
import net.ccbluex.liquidbounce.utils.EntityUtils
import net.ccbluex.liquidbounce.utils.timer.MSTimer
import net.ccbluex.liquidbounce.value.BoolValue
import net.ccbluex.liquidbounce.value.IntegerValue
import net.minecraft.client.Minecraft
import net.minecraft.entity.Entity
import net.minecraft.entity.EntityLivingBase
import net.minecraft.entity.player.EntityPlayer
import net.minecraft.network.play.server.S0BPacketAnimation
import net.minecraft.network.play.server.S14PacketEntity
import net.minecraft.network.play.server.S18PacketEntityTeleport
import net.minecraft.network.play.server.S19PacketEntityStatus
import net.minecraft.potion.Potion
import net.minecraft.util.AxisAlignedBB
import kotlin.math.abs
import kotlin.math.atan2
import kotlin.math.pow
import kotlin.math.sqrt


@ModuleInfo(name = "HackerDetector", description = "Detect SIGMA Hackers.", category = ModuleCategory.PLAYER)
class HackerDetector : Module() {
    private val GRAVITY_FRICTION = 0.9800000190734863

    private val combatCheck=BoolValue("Combat",true)
    private val movementCheck=BoolValue("Movement",true)
    private val debugMode=BoolValue("Debug",false)
    private val report=BoolValue("AutoReport",true)
    private val vlValue=IntegerValue("VL",300,100,500)

    private val datas=HashMap&lt;EntityPlayer,HackerData&gt;()
    private val hackers=ArrayList&lt;String&gt;()

//    @EventTarget
//    fun onUpdate(event: UpdateEvent){
//        //this takes a bit time so we do it async
//        if(movementCheck.get()) {
//            Thread { checkMove() }.start()
//        }
//    }

    @EventTarget
    fun onPacket(event: PacketEvent){
        if(event.packet is S19PacketEntityStatus){
            val packet=event.packet
            if(combatCheck.get()&amp;&amp;packet.opCode.toInt()==2){
                Thread { checkCombatHurt(packet.getEntity(mc.theWorld)) }.start()
            }
        }else if(event.packet is S0BPacketAnimation){
            val packet=event.packet
            val entity=mc.theWorld.getEntityByID(packet.entityID)
            if(entity !is EntityPlayer||packet.animationType!=0) return
            val data=datas[entity] ?: return
            data.tempAps++
        }else if(movementCheck.get()){
            if(event.packet is S18PacketEntityTeleport){
                val packet=event.packet
                val entity=mc.theWorld.getEntityByID(packet.entityId)
                if(entity !is EntityPlayer) return
                Thread{ checkPlayer(entity) }.start()
            }else if(event.packet is S14PacketEntity){
                val packet=event.packet
                val entity=packet.getEntity(mc.theWorld)
                if(entity !is EntityPlayer) return
                Thread{ checkPlayer(entity) }.start()
            }
        }
    }

    override fun onEnable() {
        datas.clear()
        hackers.clear()
    }

    @EventTarget
    fun onWorld(event: WorldEvent){
        datas.clear()
    }

    fun isHacker(entity: EntityLivingBase):Boolean{
        if(entity !is EntityPlayer) return false
        return hackers.contains(entity.name)
    }

    //onupdate
//    private fun checkMove(){
//        for(entity in mc.theWorld.loadedEntityList){
//            if(entity !is EntityPlayer) continue
//            checkPlayer(entity)
//        }
//    }

    private fun checkPlayer(player: EntityPlayer){
        if(player.equals(mc.thePlayer)||EntityUtils.isFriend(player)) return
        if(datas[player]==null) datas[player] = HackerData(player)
        val data=datas[player] ?: return
        data.update()
        if(data.aliveTicks&lt;20) return

        //settings
        var minAirTicks = 10
        if(player.isPotionActive(Potion.jump)){
            minAirTicks+=player.getActivePotionEffect(Potion.jump).amplifier*3
        }
        val maxMotionY = 0.47 //for strict check u can change this to 0.42
        val maxOffset = 0.07
        var passed=true
        
        if(player.hurtTime&gt;0){
            //velocity
            if (player.hurtResistantTime in 7..11
                &amp;&amp; player.prevPosX == player.posX &amp;&amp; player.posZ == player.lastTickPosZ
                &amp;&amp; !mc.theWorld.checkBlockCollision(player.entityBoundingBox.expand(0.05, 0.0, 0.05))) {
                flag("velocity",50,data,"NO KNOCKBACK")
            }
            if (player.hurtResistantTime in 7..11
                &amp;&amp; player.lastTickPosY == player.posY) {
                flag("velocity",50,data,"NO KNOCKBACK")
            }
            return
        }

        //phase
//        if(mc.theWorld.checkBlockCollision(player.entityBoundingBox)){
//            flag("phase",50,data,"COLLIDE")
//            passed=false
//        }

        //killaura from jigsaw
        if (data.aps &gt;= 10) {
            flag("killaura",30,data,"HIGH APS(aps=${data.aps})")
            passed=false
        }
        if (data.aps &gt; 2 &amp;&amp; data.aps == data.preAps &amp;&amp; data.aps != 0) {
            flag("killaura",30,data,"STRANGE APS(aps=${data.aps})")
            passed=false
        }
        if (abs(player.rotationYaw - player.prevRotationYaw) &gt; 50 &amp;&amp; player.swingProgress != 0F
            &amp;&amp; data.aps &gt;= 3) {
            flag("killaura",30,data,"YAW RATE(aps=${data.aps},yawRot=${abs(player.rotationYaw - player.prevRotationYaw)})")
            passed=false
        }

        //flight
        if(player.ridingEntity==null&amp;&amp;data.airTicks&gt;(minAirTicks/2)){
            if (abs(data.motionY - data.lastMotionY) &lt; (if(data.airTicks &gt;= 115){1E-3}else{5E-3})){
                flag("fly",20,data,"GLIDE(diff=${abs(data.motionY - data.lastMotionY)})")
                passed=false
            }
            if(data.motionY &gt; maxMotionY){
                flag("fly",20,data,"YAXIS(motY=${data.motionY})")
                passed=false
            }
            if(data.airTicks &gt; minAirTicks&amp;&amp;data.motionY&gt;0){
                flag("fly",30,data,"YAXIS(motY=${data.motionY})")
                passed=false
            }
            //gravity check from ACR
//            val gravitatedY = (data.lastMotionY - 0.08) * GRAVITY_FRICTION
//            val offset = abs(gravitatedY - data.motionY)
//            if (offset &gt; maxOffset) {
//                flag("fly",15,data,"GRAVITY(offset=$offset)")
//                passed=false
//            }
        }

        //speed
        val distanceXZ=abs(data.motionXZ)
        if(data.airTicks==0){ //onGround
            var limit = 0.37
            if(data.groundTicks &lt; 5) limit += 0.1
            if(player.isBlocking) limit *= 0.45
            if(player.isSneaking) limit *= 0.68
            if(player.isPotionActive(Potion.moveSpeed)){ //server will send real player potionData?i hope that
                limit += player.getActivePotionEffect(Potion.moveSpeed).amplifier
                limit *= 1.5
            }
            if (distanceXZ &gt; limit) {
                flag("speed",20,data,"GROUND SPEED(speed=$distanceXZ,limit=$limit)")
            }
        }else{
            val multiplier = 0.985
            var predict = 0.36 * multiplier.pow(data.airTicks + 1)
            if (data.airTicks &gt;= 115)
                predict = 0.08.coerceAtLeast(predict);
            var limit=0.05
            if(player.isPotionActive(Potion.moveSpeed)){
                predict += player.getActivePotionEffect(Potion.moveSpeed).amplifier * 0.05
                limit *= 1.2
            }
            if(player.isPotionActive(Potion.jump)) {
                predict += player.getActivePotionEffect(Potion.jump).amplifier * 0.05
            }
            if(player.isBlocking)
                predict *= 0.7

            if (distanceXZ - predict &gt; limit) {
                flag("speed",20,data,"AIR SPEED(speed=$distanceXZ,limit=$limit,predict=$predict)")
            }
        }
//        if (abs(data.motionX) &gt; 0.42
//            || abs(data.motionZ) &gt; 0.42){
//            flag("speed",30,data,"HIGH SPEED")
//            passed=false
//        }
//        if (player.isBlocking &amp;&amp; (abs(data.motionX) &gt; 0.2 || abs(data.motionZ) &gt; 0.2)) {
//            flag("speed",30,data,"HIGH SPEED(BLOCKING)") //blocking is just noslow lol
//            passed=false
//        }

        //reduce vl
        if(passed){
            data.vl-=1
        }
    }

    private fun flag(type: String,vl: Int,data: HackerData,msg: String){
        if(!data.useHacks.contains(type)) data.useHacks.add(type)
        //display debug message
        if(debugMode.get()){
            chat("§f${data.player.name} §euse §2$type §7$msg §c${data.vl}+${vl}")
        }
        data.vl+=vl

        if(data.vl&gt;vlValue.get()){
            var use=""
            for(typ in data.useHacks){
                use+="§a$typ§2,"
            }
            use=use.substring(0,use.length-3)
            chat("§f${data.player.name} §eusing hack $use")
            data.vl=-vlValue.get()

            //autoreport only redesky
            val name=data.player.name
            if(report.get()&amp;&amp;!hackers.contains(name)){
                mc.thePlayer.sendChatMessage("/reportar $name")
                hackers.add(name)
            }
        }
    }

    private fun checkCombatHurt(entity: Entity){
        if(entity !is EntityLivingBase) return
        var attacker:EntityPlayer?=null
        var attackerCount=0

        for(worldEntity in mc.theWorld.loadedEntityList){
            if(worldEntity !is EntityPlayer||worldEntity.getDistanceToEntity(entity)&gt;7||worldEntity.equals(entity)) continue
            attackerCount++
            attacker=worldEntity
        }

        //multi attacker may cause false result
        if(attackerCount!=1) return
        if(attacker!! == entity||EntityUtils.isFriend(attacker)) return //i and my friend is hacker lol
        val data=datas[attacker] ?: return

        //reach check
        val reach=attacker.getDistanceToEntity(entity)
        if(reach&gt;3.7){
            flag("killaura",70,data,"(reach=$reach)")
        }

        //aim check
        val yawDiff=calculateYawDifference(attacker,entity)
        if(yawDiff&gt;50){
            flag("killaura",100,data,"(yawDiff=$yawDiff)")
        }
    }

    private fun calculateYawDifference(from: EntityLivingBase, to: EntityLivingBase): Double {
        val x = to.posX - from.posX
        val z = to.posZ - from.posZ
        return if (x == 0.0 &amp;&amp; z == 0.0) {
            from.rotationYaw.toDouble()
        } else {
            val theta = atan2(-x, z)
            val yaw=Math.toDegrees((theta + 6.283185307179586) % 6.283185307179586)
            abs(180 - abs(abs(yaw - from.rotationYaw) - 180));
        }
    }
}

class HackerData(val player:EntityPlayer){
    var aliveTicks=0
    // Ticks in air
    var airTicks = 0

    // Ticks on ground
    var groundTicks = 0

    // motion of the movement
    var motionX = 0.0
    var motionY = 0.0
    var motionZ = 0.0
    var motionXZ = 0.0

    // Previous motion of the movement
    var lastMotionX = 0.0
    var lastMotionY = 0.0
    var lastMotionZ = 0.0
    var lastMotionXZ = 0.0

    // combat check
    var aps = 0
    var preAps = 0
    var tempAps = 0
    private val apsTimer=MSTimer()

    var vl=0
    var useHacks=ArrayList&lt;String&gt;()

    fun update(){
        aliveTicks++
        if (apsTimer.hasTimePassed(1000)) {
            preAps = aps;
            aps = tempAps;
            tempAps = 0;
        }

        if(calculateGround()){
            groundTicks++
            airTicks=0
        }else{
            airTicks++
            groundTicks=0
        }

        this.lastMotionX = this.motionX
        this.lastMotionY = this.motionY
        this.lastMotionZ = this.motionZ
        this.lastMotionXZ = this.motionXZ
        this.motionX = player.posX-player.prevPosX
        this.motionY = player.posY-player.prevPosY
        this.motionZ = player.posZ-player.prevPosZ
        this.motionXZ = sqrt(motionX*motionX + motionZ*motionZ)
    }

    private fun calculateGround(): Boolean {
        val playerBoundingBox = player.entityBoundingBox
        val blockHeight = 1
        val customBox = AxisAlignedBB(playerBoundingBox.maxX, player.posY-blockHeight, playerBoundingBox.maxZ, playerBoundingBox.minX, player.posY, playerBoundingBox.minZ)
        return Minecraft.getMinecraft().theWorld.checkBlockCollision(customBox)
    }
}

</code></pre>
]]></description><link>https://forum.liquidbounce.net/topic/2095/kotlin-hackerdetector</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 16:39:19 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/topic/2095.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 02 May 2021 14:59:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Thu, 07 Oct 2021 15:15:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ender1355" aria-label="Profile: ender1355">@<bdi>ender1355</bdi></a> no</p>
]]></description><link>https://forum.liquidbounce.net/post/25888</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/25888</guid><dc:creator><![CDATA[END3R1355]]></dc:creator><pubDate>Thu, 07 Oct 2021 15:15:12 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Sun, 01 Aug 2021 14:23:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/qwq-liulihaocai" aria-label="Profile: qwq-liulihaocai">@<bdi>qwq-liulihaocai</bdi></a> YES ANTIHATAR RELEASED OMG</p>
]]></description><link>https://forum.liquidbounce.net/post/22551</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/22551</guid><dc:creator><![CDATA[ENDER1355]]></dc:creator><pubDate>Sun, 01 Aug 2021 14:23:00 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Fri, 25 Jun 2021 14:40:35 GMT]]></title><description><![CDATA[<p dir="auto">HATAR DETECTOR EZ</p>
]]></description><link>https://forum.liquidbounce.net/post/19705</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/19705</guid><dc:creator><![CDATA[BobikHatar]]></dc:creator><pubDate>Fri, 25 Jun 2021 14:40:35 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Thu, 20 May 2021 14:58:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/hackerman" aria-label="Profile: hackerman">@<bdi>hackerman</bdi></a> POG</p>
]]></description><link>https://forum.liquidbounce.net/post/17753</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/17753</guid><dc:creator><![CDATA[Advanced Skidder]]></dc:creator><pubDate>Thu, 20 May 2021 14:58:36 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Sat, 08 May 2021 00:01:27 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/advanced-skidder" aria-label="Profile: advanced-skidder">@<bdi>advanced-skidder</bdi></a> yes thats definitely me</p>
]]></description><link>https://forum.liquidbounce.net/post/16898</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/16898</guid><dc:creator><![CDATA[Hackerman]]></dc:creator><pubDate>Sat, 08 May 2021 00:01:27 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Mon, 03 May 2021 13:50:49 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/advanced-skidder" aria-label="Profile: advanced-skidder">@<bdi>advanced-skidder</bdi></a> said in <a href="/post/16379">[Kotlin] HackerDetector</a>:</p>
<blockquote>
<p dir="auto">@chocopiexd <img src="/assets/uploads/files/1620049204066-capture.png" alt="Capture.PNG" class=" img-fluid img-markdown" /><br />
sure?</p>
</blockquote>
<p dir="auto">liulihaocai 100% isn't hackerman</p>
]]></description><link>https://forum.liquidbounce.net/post/16380</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/16380</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Mon, 03 May 2021 13:50:49 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Mon, 03 May 2021 13:40:11 GMT]]></title><description><![CDATA[<p dir="auto">@chocopiexd <img src="/assets/uploads/files/1620049204066-capture.png" alt="Capture.PNG" class=" img-fluid img-markdown" /><br />
sure?</p>
]]></description><link>https://forum.liquidbounce.net/post/16379</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/16379</guid><dc:creator><![CDATA[Advanced Skidder]]></dc:creator><pubDate>Mon, 03 May 2021 13:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Sun, 02 May 2021 15:54:25 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/advanced-skidder" aria-label="Profile: advanced-skidder">@<bdi>advanced-skidder</bdi></a> said in <a href="/post/16295">[Kotlin] HackerDetector</a>:</p>
<blockquote>
<p dir="auto">Hi hackerman <img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=866ab33d74c" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":D" alt="😄" /> (i know you are hackerman feat: an fdp user)</p>
</blockquote>
<p dir="auto">you are mega retarded hackerman is dumb asf</p>
]]></description><link>https://forum.liquidbounce.net/post/16296</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/16296</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Sun, 02 May 2021 15:54:25 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Sun, 02 May 2021 15:51:36 GMT]]></title><description><![CDATA[<p dir="auto">Hi hackerman <img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=866ab33d74c" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":D" alt="😄" /> (i know you are hackerman feat: an fdp user)</p>
]]></description><link>https://forum.liquidbounce.net/post/16295</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/16295</guid><dc:creator><![CDATA[Advanced Skidder]]></dc:creator><pubDate>Sun, 02 May 2021 15:51:36 GMT</pubDate></item><item><title><![CDATA[Reply to [Kotlin] HackerDetector on Sun, 02 May 2021 15:06:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/qwq-liulihaocai" aria-label="Profile: qwq-liulihaocai">@<bdi>qwq-liulihaocai</bdi></a> YEEES SIGMA ANTICHEET NO MORA SIGMA HATARS!!</p>
]]></description><link>https://forum.liquidbounce.net/post/16292</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/16292</guid><dc:creator><![CDATA[DreamWasFucked]]></dc:creator><pubDate>Sun, 02 May 2021 15:06:03 GMT</pubDate></item></channel></rss>