-
-
Notifications
You must be signed in to change notification settings - Fork 421
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
More Options for Sprinting #772
More Options for Sprinting #772
Conversation
This pull request has been open for a while with no recent activity. If you're still working on this or waiting for a review, please add a comment or commit within the next 7 days to keep it open. Otherwise, the pull request will be automatically closed to free up time for other tasks. Pull requests should be closed if:
|
WalkthroughWalkthroughThe AutoSprint feature in WurstClient has been enhanced with new settings to provide more control over when the player automatically sprints. These settings include options to sprint in all directions, while attacking, and even when hungry. The logic for sprinting has been updated to respect these new settings, and the sprinting mechanism now factors in these conditions before enabling sprint. Additionally, attack-related sprinting conditions are now managed within the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ? TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files ignored due to filter (1)
- src/main/resources/wurst.mixins.json
Files selected for processing (3)
- src/main/java/net/wurstclient/hacks/AutoSprintHack.java (2 hunks)
- src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java (1 hunks)
- src/main/java/net/wurstclient/mixin/PlayerEntityMixin.java (1 hunks)
Additional comments: 8
src/main/java/net/wurstclient/hacks/AutoSprintHack.java (5)
20-25: The addition of new
CheckboxSetting
instances for sprint behaviors is consistent with the PR objectives and enhances the mod's functionality.31-33: Properly adding the new settings to the
AutoSprintHack
using theaddSetting
method.59-62: The
onUpdate
method correctly checks theallDirections
setting to determine if sprinting should be activated, aligning with the PR's intent to allow omnidirectional sprinting.65-67: The
shouldSprintAttack
method is correctly implemented to check if the hack is enabled and theattack
setting is checked.70-72: The
shouldSprintHungry
method is correctly implemented to check if the hack is enabled and thehungry
setting is checked.src/main/java/net/wurstclient/mixin/PlayerEntityMixin.java (3)
22-42: The implementation of the
@Redirect
annotations appears to correctly conditionally modify the behavior of theattack
method based on theshouldSprintAttack
method. However, it is important to ensure that theshouldSprintAttack
method is robust and handles all necessary conditions, as it now plays a critical role in the attack mechanics.29-30: Verify that the
shouldSprintAttack
method properly accounts for all game states and server conditions, especially since sprinting while attacking could potentially trigger anti-cheat systems in multiplayer environments.19-42: Ensure that the changes in this mixin are compatible with all supported versions of the game, particularly if the mod is intended to be used with version 1.19.2, as mentioned in the PR. Testing across versions or implementing version-specific logic may be necessary.
src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java
Outdated
Show resolved
Hide resolved
It doesn't seem to work right now. Using this option would give you the sprinting particles but no actual speed increase.
Unfortunately this setting only works in singleplayer as the PlayerEntityMixin code runs on the server side.
Hey @ThisTestUser, Thanks for the pull request! While testing your changes, I've noticed that some of the new AutoSprint settings don't seem to be working as intended:
I'm removing these settings for now and merging the PR only the working "Hungry Sprint" setting. If you're up for the task of troubleshooting and resolving the issues with the other options, feel free to submit another PR in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- src/main/java/net/wurstclient/hacks/AutoSprintHack.java (2 hunks)
- src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java (1 hunks)
Files skipped from review as they are similar to previous changes (2)
- src/main/java/net/wurstclient/hacks/AutoSprintHack.java
- src/main/java/net/wurstclient/mixin/ClientPlayerEntityMixin.java
Adds a few more options in AutoSprint to allow for some non-vanilla behaviors:
Note: This PR must be patched if downgrading to 1.19.2. See ClientPlayerEntityMixin.java at ThisTestUser@54ae5fb for more information.