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

Fixed people not able to join Hypixel #59

Merged
merged 3 commits into from
Jul 9, 2024
Merged

Conversation

TejasLamba2006
Copy link
Collaborator

@TejasLamba2006 TejasLamba2006 commented Jul 9, 2024

  • Issue: Resolves the problem that prevented users from joining Hypixel while using Spoofing as Lunar. Hypixel has access to the Lunar API and disables certain modules like FreeLook from Lunar to comply with server rules. However, since we are not on Lunar and server thinks we are on Lunar, they encounter an error on their backend, leading to disconnections.
  • Proposed Changes:
    • Set the default brand to be Forge to avoid conflicts with Lunar modules on Hypixel.
  • Impact: This fix ensures that users can join Hypixel without encountering disconnections due to conflicts between the Forge brand and Lunar modules.

Summary by CodeRabbit

  • New Features

    • Introduced an onDisable() method to reset spoofing mode to Forge.
  • Bug Fixes

    • Adjusted "Forge" spoofing mode to recognize both "FML" and "Forge".
  • Refactor

    • Cleaned up unused imports and removed redundant method calls in the ClientSpoofer module.

Refactors the ClientSpoofer module to enhance its spoofing functionality and adaptability. Introduces more comprehensive spoofing methods for different clients and removes the redundant Forge packet cancellation. The update aims to improve the module's effectiveness in bypassing client checks.
Copy link

coderabbitai bot commented Jul 9, 2024

Walkthrough

The recent changes to the project involve updates to the .gitignore and modifications to the ClientSpoofer class. Specifically, the .gitignore is adjusted to include the bin directory instead of -.bin. In ClientSpoofer.java, there are several key updates including changes to the SpoofMode enum, addition of an onDisable method, removal of unused imports, and cleanup of some methods and their functionalities.

Changes

File Change Summary
.gitignore Changed exclusion rule from -.bin to bin.
.../keystrokesmod/module/impl/other/ClientSpoofer.java Updated SpoofMode.FORGE value, added onDisable() method, removed createPacketBuffer() method and unnecessary imports, and cleaned up onUpdate() and constructor methods.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ClientSpoofer
    User ->> ClientSpoofer: onDisable()
    ClientSpoofer ->> ClientSpoofer: Set currentSpoof to SpoofMode.FORGE

    User ->> ClientSpoofer: onUpdate()
    ClientSpoofer -->> ClientSpoofer: Perform operations
Loading

Poem

Amidst the code, adjustments shine bright,
.gitignore simplifies with might.
ClientSpoofer’s tricks are now refined,
Enum values and methods redefined.
A rabbit's joy jumps in the breeze,
With code like this, we're all at ease. 🐇✨


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.
    • @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 as 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.

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.

@TejasLamba2006
Copy link
Collaborator Author

To enable users to join Hypixel, this update allows you to disable ClientSpoofer and join the server. However, it currently prevents users from spoofing as Lunar.

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: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 52d35ac and c43bb43.

Files selected for processing (2)
  • .gitignore (1 hunks)
  • src/main/java/keystrokesmod/module/impl/other/ClientSpoofer.java (4 hunks)
Files skipped from review due to trivial changes (1)
  • .gitignore
Additional comments not posted (5)
src/main/java/keystrokesmod/module/impl/other/ClientSpoofer.java (5)

Line range hint 2-8:
Verify removal of associated functionality.

The import statements for C17PacketCustomPayloadAccessor and C17PacketCustomPayload have been removed. Ensure that the functionality related to these imports is no longer required in the codebase.


25-27: LGTM!

The onDisable method correctly resets the currentSpoof to SpoofMode.FORGE, aligning with the PR objective.


62-62: LGTM!

The enum value for SpoofMode.FORGE has been correctly updated to include both FML and Forge, which should help in avoiding conflicts with Lunar modules on Hypixel.


Line range hint 2-8:
Verify the impact of removing createPacketBuffer method.

Ensure that the removal of the createPacketBuffer method does not negatively impact the functionality. Verify that all previous usages of this method have been appropriately refactored.


Line range hint 2-8:
Verify changes to cancelForgePacket.disable().

Ensure that the removal of cancelForgePacket.disable() from the constructor and onUpdate method does not introduce any unintended side effects. Verify that the Forge packet cancellation is now appropriately managed.

@xia-mc xia-mc merged commit a8bf3a6 into xia-mc:master Jul 9, 2024
1 check passed
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.

2 participants