Skip to content

Conversation

@wyattfr
Copy link

@wyattfr wyattfr commented Jan 20, 2026

🎯 Pathfinding Improvements & Anti-Cheat Enhancements

This PR introduces critical fixes to the pathfinding system and movement logic to improve reliability and prevent anti-cheat detection.

📝 Changes

1. Enhanced PathExecutor Movement Logic (Anti-Cheat Prevention)

Refactored movement system to use client-side WASD key presses based on current player rotation instead of forced server-side rotation
Disabled StrafeUtil during pathfinding to make movement appear more natural and human-like
Implemented realistic key press calculation using KeyBindUtil.getNeededKeyPresses() to determine which WASD keys to press based on the player's current facing direction
Preserved attack/use item states during navigation to prevent interruptions
Improved jump detection by checking if jumps are needed based on the current player rotation, not target rotation
This makes the bot's movement purely client-side and indistinguishable from legitimate player input, significantly reducing anti-cheat detection risk

2. Extended Pathfinding Timer
Added timeout extension logic in RouteNavigator to prevent premature pathfinding failures
Automatic timer extension of 5 seconds when pathfinding is still in progress but approaching timeout
Better error logging to distinguish between legitimate failures and timeouts
Fixes issues where complex paths would timeout before completion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant