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

add attackWhileBlocking and attackWhileBreaking to AimAssist | attackWhileBreaking to TriggerBot #947

Merged
merged 12 commits into from
Apr 26, 2024

Conversation

TejasLamba2006
Copy link
Contributor

@TejasLamba2006 TejasLamba2006 commented Feb 6, 2024

Description

Click here

Testing

Yes, they work perfectly fine as expected!

References

None till now

Summary by CodeRabbit

  • New Features
    • Enhanced Aim Assist functionality with options for attacking while blocking with a shield or breaking blocks, improving combat and mining activities.
    • Expanded Trigger Bot capabilities to include attacking enemies while breaking blocks, offering increased flexibility during gameplay.

Copy link

coderabbitai bot commented Feb 6, 2024

Important

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The recent updates introduce enhancements to the game's hacking tools, providing more flexibility and customization options. Notably, the changes in the AimAssistHack and TriggerBotHack classes offer players the ability to attack while blocking with a shield or using items, along with refining the behavior related to attacking and aiming at entities in different scenarios.

Changes

File Path Change Summary
.../hacks/AimAssistHack.java
.../hacks/TriggerBotHack.java
Enhanced AimAssistHack with new settings for attacking and aiming while blocking with a shield or using items.
Updated TriggerBotHack to allow attacks while blocking with a shield or using items, along with modifying the setting description for clarity.

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 your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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: 3

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 57cdc85 and 1a31f98.
Files selected for processing (2)
  • src/main/java/net/wurstclient/hacks/AimAssistHack.java (6 hunks)
  • src/main/java/net/wurstclient/hacks/TriggerBotHack.java (3 hunks)
Additional comments: 5
src/main/java/net/wurstclient/hacks/TriggerBotHack.java (2)
  • 55-55: Correctly added attackWhileBreaking to the hack's settings in the constructor.
  • 98-100: Logic to check attackWhileBreaking before attacking while breaking blocks is correctly implemented.
src/main/java/net/wurstclient/hacks/AimAssistHack.java (3)
  • 103-104: Correctly added attackWhileBlocking and attackWhileBreaking to the hack's settings in the constructor.
  • 142-149: Logic to check attackWhileBlocking and attackWhileBreaking before aiming or attacking is correctly implemented in onUpdate.
  • 205-211: Logic to check attackWhileBlocking and attackWhileBreaking before rotating the player's view is correctly implemented in onRender.

src/main/java/net/wurstclient/hacks/TriggerBotHack.java Outdated Show resolved Hide resolved
src/main/java/net/wurstclient/hacks/AimAssistHack.java Outdated Show resolved Hide resolved
src/main/java/net/wurstclient/hacks/AimAssistHack.java Outdated Show resolved Hide resolved
@TejasLamba2006
Copy link
Contributor Author

@coderabbitai generate a summary with the changes

Copy link

coderabbitai bot commented Feb 6, 2024

@TejasLamba2006, based on the changes in TriggerBotHack.java, here's a summary of the modifications:

  • New Settings Added: Two new settings, attackWhileBlocking and attackWhileBreaking, have been introduced to the TriggerBotHack class. These settings allow users to configure the hack to attack while either blocking with a shield/using items or breaking blocks, enhancing the flexibility and customization of the hack.

    • attackWhileBlocking: Allows attacking while blocking with a shield or using items, with a default value of false.
    • attackWhileBreaking: Enables attacking while breaking blocks, also defaulting to false.
  • Functionality Enhancements: The onUpdate method has been updated to respect these new settings. It now includes checks to ensure that attacks only occur under the conditions specified by the user through the attackWhileBlocking and attackWhileBreaking settings.

  • Code Structure: The addition of these settings follows the existing structure of the class, with each setting being instantiated and added to the hack's settings list. This maintains the consistency and readability of the code.

  • User Control and Customization: These changes provide users with greater control over the behavior of the TriggerBotHack, allowing for more tailored gameplay experiences. Users can now decide whether they want the hack to automatically attack entities while engaged in other actions like blocking or breaking blocks.

This update aligns with the PR's objectives to enhance the functionality and customization options of the hacks within the project, specifically targeting the TriggerBotHack in this instance.

Analysis chain
Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# List the modified files in the PR.
git diff --name-only HEAD~1

Length of output: 85



Script:

#!/bin/bash
# Display the contents of TriggerBotHack.java to analyze the changes.
cat src/main/java/net/wurstclient/hacks/TriggerBotHack.java

Length of output: 3933

Copy link

@coderabbitai coderabbitai bot left a 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

Commits Files that changed from the base of the PR and between 1a31f98 and fafea3f.
Files selected for processing (1)
  • src/main/java/net/wurstclient/hacks/AimAssistHack.java (6 hunks)
Files skipped from review as they are similar to previous changes (1)
  • src/main/java/net/wurstclient/hacks/AimAssistHack.java

Copy link

github-actions bot commented Apr 8, 2024

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:

  • They have been superseded by another pull request
  • They are out of scope or don't align with the project
  • They have become obsolete due to other changes
  • They have bugs or conflicts that won't be resolved

Copy link
Member

@Alexander01998 Alexander01998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @TejasLamba2006, thanks for the PR!
Seems like a useful addition and the code looks good overall. 👍
I found a few minor issues though. Do you have time to address those?

src/main/java/net/wurstclient/hacks/AimAssistHack.java Outdated Show resolved Hide resolved
src/main/java/net/wurstclient/hacks/AimAssistHack.java Outdated Show resolved Hide resolved
@Alexander01998 Alexander01998 added type:enhancement New feature or request area:settings Improves the settings of existing features. category:combat status:never-stale Prevents stalebot from marking this item as stale. and removed status:stale labels Apr 9, 2024
@TejasLamba2006
Copy link
Contributor Author

Hey @Alexander01998, did what you asked.

@Alexander01998 Alexander01998 added this to the v7.42 milestone Apr 10, 2024
They don't work when using Nuker.
@Alexander01998
Copy link
Member

Alexander01998 commented Apr 26, 2024

Upon further testing, unfortunately the "attack/aim while breaking" settings don't work when using other hacks like Nuker to break the blocks. I will only be merging the "aim while blocking" checkbox for now.

@Alexander01998 Alexander01998 changed the base branch from master to v7.42 April 26, 2024 13:40
@Alexander01998 Alexander01998 merged commit 1d0e2b0 into Wurst-Imperium:v7.42 Apr 26, 2024
2 checks passed
@Alexander01998 Alexander01998 added the status:merged This pull request has been merged, even if GitHub says otherwise. label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:settings Improves the settings of existing features. category:combat status:merged This pull request has been merged, even if GitHub says otherwise. status:never-stale Prevents stalebot from marking this item as stale. type:enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants