Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Update AutoHeal.java and Commands.java #816

Closed
wants to merge 22 commits into from
Closed

Update AutoHeal.java and Commands.java #816

wants to merge 22 commits into from

Conversation

qloha
Copy link

@qloha qloha commented Oct 7, 2024

Description

Recoded AutoHeal
Removed having to capitalize characters in .bind command

Testing

AutoHeal: Removes the modes, but adds checkboxes. Allows for multiple, and has golden head and soup options. If you enable golden head, it allows you to check for the golden head item name, and if you enable soup it has an option for autodrop.
Commands: Read description.

References

AutoHeal: Works perfectly, tested soup on 3 servers, tested golden head on 2.
Commands: Also works perfectly.

Summary by CodeRabbit

  • New Features

    • Enhanced the AutoHeal module for improved healing item selection with new settings for goldenHead, soup, and goldenHeadName.
    • Introduced a new command silenceirc for setting a qqId in the SilenceIRC module.
  • Bug Fixes

    • Improved case-insensitivity for module name matching in command handling.

These updates streamline healing item management and enhance command functionality for a better user experience.

xia-mc and others added 22 commits October 1, 2024 21:03
Improve Hypixel mode of Step
Add 'Fix hypixel switch (beta)' to KillAura
Add "Store","Timer" mode to rapid fire of RageBot
Add No spread to RageBot
Add ignoreTeammatesCSGO to RageBot
Fix RageBot select hit pos wrongly
Add Snap mode to AntiAim
Add onlyWhileSneaking to AntiAim
Fix freeze issue of HypixelMotionDisabler
Fix Post issue of RageBot
Fix WatchdogAutoPhase
Fix bad packet send/receive
Fix LegitNoSpread keep switching
Add 'Legit switch' to rapid fire
Fix SnapAntiAim rotate wrongly
Fix StoreRapidFire always store
Add window title
Add 'reflection' to Script API.
Example:
```java
reflection.set(
    modules.getModule("TimerRange"),
    "hasLag", 0
);
```
In this case, we reset the 'hasLag' variable of TimerRange module to 0. reflection allows to change the module itself.
See ```keystrokesmod.utility.Reflection``` to know more about the reflection API.
Co-authored-by: xia__mc <2052472631@qq.com>
Stop using deprecation feature (event bus)
Remove SilenceIRC
Add AutoClickA check
Copy link

coderabbitai bot commented Oct 7, 2024

📝 Walkthrough

Walkthrough

The changes made in this pull request involve significant updates to the AutoHeal class within the keystrokesmod.module.impl.player package, including the removal of the ModeSetting for item selection and the introduction of multiple ButtonSetting instances for better control over healing items. Additionally, a new command, silenceirc, has been added to the Commands class in the keystrokesmod.utility package, allowing users to set a qqId for the SilenceIRC module, alongside enhancements to existing command handling.

Changes

File Path Change Summary
src/main/java/keystrokesmod/module/impl/player/AutoHeal.java Removed ModeSetting for item selection; added ButtonSetting for goldenHead, soup, and goldenHeadName; renamed autoThrow to autoDrop; updated constructor and event handling logic for item selection and dropping.
src/main/java/keystrokesmod/utility/Commands.java Added silenceirc command for setting qqId in SilenceIRC module; modified bind command for case-insensitive module name matching.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AutoHeal
    participant Inventory
    participant Commands

    User->>AutoHeal: Activate AutoHeal
    AutoHeal->>Inventory: Check for goldenHead
    alt goldenHead toggled
        Inventory->>AutoHeal: Found ItemSkull
    else goldenHeadName toggled
        Inventory->>AutoHeal: Check item display name
    else soup toggled
        Inventory->>AutoHeal: Use ItemSoup
    end
    AutoHeal->>User: Healing item used

    User->>Commands: Execute silenceirc qqId
    Commands->>Commands: Validate command
    Commands->>Commands: Update SilenceIRC.qqId
    Commands->>User: Confirm qqId set
Loading

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or auto anywhere in the PR title to generate the title automatically.

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.

Actionable comments posted: 2

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between 3c7e128 and 0e533c4.

📒 Files selected for processing (2)
  • src/main/java/keystrokesmod/module/impl/player/AutoHeal.java (5 hunks)
  • src/main/java/keystrokesmod/utility/Commands.java (6 hunks)
🧰 Additional context used
📓 Learnings (2)
📓 Common learnings
Learnt from: qloha
PR: xia-mc/Raven-XD#814
File: src/main/java/keystrokesmod/module/impl/player/AutoHeal.java:32-34
Timestamp: 2024-10-06T23:23:36.721Z
Learning: In the `AutoHeal` module (`src/main/java/keystrokesmod/module/impl/player/AutoHeal.java`), the inconsistent capitalization in setting names like "Golden head", "Check golden Head name", and "Soup" is intentional and should not be flagged in future reviews.
src/main/java/keystrokesmod/module/impl/player/AutoHeal.java (1)
Learnt from: qloha
PR: xia-mc/Raven-XD#814
File: src/main/java/keystrokesmod/module/impl/player/AutoHeal.java:32-34
Timestamp: 2024-10-06T23:23:36.721Z
Learning: In the `AutoHeal` module (`src/main/java/keystrokesmod/module/impl/player/AutoHeal.java`), the inconsistent capitalization in setting names like "Golden head", "Check golden Head name", and "Soup" is intentional and should not be flagged in future reviews.
🔇 Additional comments (6)
src/main/java/keystrokesmod/utility/Commands.java (3)

16-16: Import statement added for SilenceIRC

The addition of the import statement for SilenceIRC is consistent with the introduction of new functionality related to SilenceIRC in this file.


297-299: Improved case-insensitive module name matching for bind command

The introduction of moduleNameInput and the use of equalsIgnoreCase() for module name comparison enhances the user experience by making the bind command case-insensitive. This change aligns well with the PR objectives and improves the overall usability of the command system.


539-539: Added silenceirc command to help menu

The silenceirc command has been appropriately added to the help menu, ensuring that users can discover and learn about this new functionality.

src/main/java/keystrokesmod/module/impl/player/AutoHeal.java (3)

17-23: Settings are correctly declared

The settings goldenHead, goldenHeadName, soup, and autoDrop are properly declared as ButtonSetting instances, enhancing the module's configurability.


31-35: Settings are registered with appropriate dependencies

The settings are registered correctly with dependencies managed using method references, ensuring that settings like goldenHeadName and autoDrop are only active when their respective parent settings are toggled.


70-71: Verify that ContainerUtils.getSlot(ItemSoup.class) searches the entire inventory

Ensure that the getSlot method in ContainerUtils searches the entire inventory for ItemSoup items when soup is toggled. This will maintain consistency with the suggested change for goldenHead.

You can run the following script to confirm the implementation:

Copy link
Owner

@xia-mc xia-mc left a comment

Choose a reason for hiding this comment

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

Don't add 'SilenceFix' command to commands

@@ -497,6 +500,19 @@ public static void rCMD(@NotNull String c) {
}
print("&cInvalid profile.", 1);
}
} else if (firstArg.equals("silenceirc")) {
Copy link
Owner

Choose a reason for hiding this comment

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

I have remove this module, so don't add it back

Copy link
Author

Choose a reason for hiding this comment

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

👍

@xia-mc xia-mc deleted the branch xia-mc:dev October 12, 2024 17:10
@xia-mc xia-mc closed this Oct 12, 2024
@xia-mc xia-mc reopened this Oct 12, 2024
xia-mc added a commit that referenced this pull request Oct 13, 2024
Fix HypixelMotionDisabler
Add PredictEngine for anticheat (test)
Fix AutoBlockA and AutoClickerA falses
@xia-mc
Copy link
Owner

xia-mc commented Oct 13, 2024

Manual merged

@xia-mc xia-mc closed this Oct 13, 2024
@qloha
Copy link
Author

qloha commented Oct 13, 2024

<3

Ravvvii pushed a commit to Ravvvii/Raven-XD that referenced this pull request Oct 19, 2024
Fix HypixelMotionDisabler
Add PredictEngine for anticheat (test)
Fix AutoBlockA and AutoClickerA falses
@qloha qloha deleted the dev branch October 26, 2024 20:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants