Fix Hitbox and KABot false positives on 1.8.8 PandaSpigot - #15
Conversation
Co-authored-by: funkemunky <30784509+funkemunky@users.noreply.github.com>
funkemunky
left a comment
There was a problem hiding this comment.
Read my comments and follow the request
|
@copilot I have allowed you to access vimeo.com. Please review the video posted in the original issue report and check to see if there are any other potential causes and if your changes would resolve what was seen in the video. |
There was a problem hiding this comment.
Pull request overview
This pull request fixes false positives in the Hitbox and KillAura (Bot) checks that were affecting innocent players on 1.8.8 PandaSpigot servers during normal PvP. The fixes address three distinct root causes: incorrect ray-trace direction calculation in Hitbox, missing buffer decrement in KABot, and entity ID collisions in FakeMob.
Changes:
- Fixed Hitbox check false positives by correcting the second ray-trace direction to use consistent yaw/pitch from the same packet
- Fixed KABot check false positives by adding buffer decrement on arm swings to match vanilla 1.8.8 behavior where attacks are paired with swings
- Fixed FakeMob entity ID collisions by moving the ID range from [15,000-20,000) to [1.5B-2B) to avoid conflicts with real server entity IDs
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Anticheat/src/main/java/dev/brighten/ac/handler/entity/FakeMob.java | Moves entity ID range to avoid collisions with real server entities on long-running servers |
| Anticheat/src/main/java/dev/brighten/ac/check/impl/combat/killaura/KABot.java | Adds buffer decrement on arm swings to match buffer2 logic and prevent false positives for legitimate 1.8.8 players |
| Anticheat/src/main/java/dev/brighten/ac/check/impl/combat/Hitbox.java | Fixes ray-trace direction calculation by using pitch from the same packet as yaw to avoid phantom directions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: funkemunky <30784509+funkemunky@users.noreply.github.com>
Done — the
I attempted to load the video but Vimeo's CDN is blocking automated access from this environment (bot challenge + |
|
XD |
|
💀 |
Legitimate players on a 1.8.8 PandaSpigot server were being falsely flagged by the Hitbox and KillAura (Bot) checks during normal PvP.
Root causes
Hitbox — phantom ray-trace direction
Attacks are queued at flying-packet N and processed at N+1. The second candidate direction used
(from.yaw, to.pitch)— a direction that never existed — causing the ray trace to miss the hitbox whenever pitch changed between packets (routine in PvP).KABot —
bufferhad no decayOnce
clientHasEntity = true, every attack on any tracked entity incrementedbufferwith no reduction path, making a false flag inevitable after 4 hits. In vanilla 1.8.8 every attack is paired with a swing animation; addedbuffer -= 0.05fper swing (matching existing treatment ofbuffer2).FakeMob — entity ID collision with real entities
Fake mob IDs were drawn from
[15 000, 20 000). On a long-running server, real entity IDs routinely exceed 15 000, causing "Player attacked bot" flags when attacking real entities whose IDs collided. Range moved to[1_500_000_000, 2_000_000_000).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
player.vimeo.com/usr/bin/python3 python3 -c import socket try: ip = socket.gethostbyname('player.vimeo.com') print('player.vimeo.com resolves to:', ip) except Exception as e: print('DNS FAIL:', e)(dns block)/usr/bin/curl curl -sv REDACTED -A Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36(dns block)/usr/bin/nslookup nslookup player.vimeo.com(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.