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

Make every module in the fun category it's own file #53

Merged
merged 3 commits into from
Jul 8, 2024
Merged

Make every module in the fun category it's own file #53

merged 3 commits into from
Jul 8, 2024

Conversation

aazz18
Copy link

@aazz18 aazz18 commented Jul 8, 2024

Why was this not done before??

Summary by CodeRabbit

  • New Features
    • Introduced "Extra Bobbing" module for enhanced view bobbing with customizable settings.
    • Added "Flame Trail" module for a visual flame trail effect following player movements.
    • Implemented "SlyPort" module for teleportation behind enemies with range and targeting options.
    • Created "Spin" module that adjusts player's rotation to create a spinning effect.

Copy link

coderabbitai bot commented Jul 8, 2024

Walkthrough

The recent changes in the codebase involve cleanup and enhancement of the keystrokesmod module. Specifically, the changes streamline the imports for modules, removing redundant Fun prefixes, and introduce new functionalities in the fun package like ExtraBobbing, FlameTrail, SlyPort, and Spin. These additions enhance the gameplay with new visual effects and movement-based modules.

Changes

Files Change Summary
src/main/java/keystrokesmod/module/ModuleManager.java Updated imports to remove redundant Fun prefixes from module instantiation calls.
src/main/java/keystrokesmod/module/impl/fun/ExtraBobbing.java Introduced the ExtraBobbing class, adding functionality to adjust view bobbing behavior with settings for controlling the bob level dynamically.
src/main/java/keystrokesmod/module/impl/fun/FlameTrail.java Added a FlameTrail module creating a flame effect following the player's movement.
src/main/java/keystrokesmod/module/impl/fun/SlyPort.java Introduced SlyPort for player teleportation behind enemies. Includes range, aiming settings, sound effects, and player targeting options.
src/main/java/keystrokesmod/module/impl/fun/Spin.java Implemented Spin module, adding player spinning effect based on rotation and speed settings.

Poem

In code so crisp, the modules dance,
With bobbing views and spins enhance.
A trail of flames, a teleport scheme,
New features bloom, like a coder's dream.
No more prefix clutter in the way,
Just smooth new functions here to stay.


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.

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 f8d752e and b8dded6.

Files selected for processing (5)
  • src/main/java/keystrokesmod/module/ModuleManager.java (2 hunks)
  • src/main/java/keystrokesmod/module/impl/fun/ExtraBobbing.java (1 hunks)
  • src/main/java/keystrokesmod/module/impl/fun/FlameTrail.java (1 hunks)
  • src/main/java/keystrokesmod/module/impl/fun/SlyPort.java (1 hunks)
  • src/main/java/keystrokesmod/module/impl/fun/Spin.java (1 hunks)
Files skipped from review due to trivial changes (1)
  • src/main/java/keystrokesmod/module/ModuleManager.java
Additional comments not posted (18)
src/main/java/keystrokesmod/module/impl/fun/FlameTrail.java (3)

11-13: Constructor looks good.

The constructor correctly initializes the module with the name "Flame Trail", category "fun", and a key binding of 0.


15-21: onUpdate method looks good.

The method correctly calculates the player's position and spawns a flame particle at that position.


8-8: Class definition looks good.

The class FlameTrail is well-defined with a constructor and an onUpdate method.

src/main/java/keystrokesmod/module/impl/fun/ExtraBobbing.java (5)

11-14: Constructor looks good.

The constructor correctly initializes the module with the name "Extra Bobbing", category "fun", key binding of 0, and a slider setting for the bobbing level.


16-22: onEnable method looks good.

The method correctly saves the current view bobbing setting and enables it if not already enabled.


24-26: onDisable method looks good.

The method correctly restores the saved view bobbing setting.


28-37: onUpdate method looks good.

The method correctly ensures view bobbing is enabled and adjusts the camera yaw based on player movement and the slider setting.


7-7: Class definition looks good.

The class ExtraBobbing is well-defined with a constructor and methods for enabling, disabling, and updating the module.

src/main/java/keystrokesmod/module/impl/fun/Spin.java (5)

14-18: Constructor looks good.

The constructor correctly initializes the module with the name "Spin", category "fun", key binding of 0, and slider settings for rotation and speed.


20-22: onEnable method looks good.

The method correctly saves the player's current rotation yaw.


24-26: onDisable method looks good.

The method correctly resets the saved yaw to 0.0F.


28-41: onUpdate method looks good.

The method correctly adjusts the player's rotation yaw based on the rotation and speed settings and disables the module when the rotation is complete.


9-9: Class definition looks good.

The class Spin is well-defined with a constructor and methods for enabling, disabling, and updating the module.

src/main/java/keystrokesmod/module/impl/fun/SlyPort.java (5)

24-31: Constructor looks good.

The constructor correctly initializes the module with the name "SlyPort", category "fun", key binding of 0, description, range, aim, sound, and players-only settings.


33-40: onEnable method looks good.

The method correctly finds an entity to teleport behind and performs the teleportation if an entity is found.


42-55: tp method looks good.

The method correctly performs the teleportation, plays the sound if the sound setting is enabled, and aims at the entity if the aim setting is enabled.


57-87: ge method looks good.

The method correctly finds the closest valid entity within the specified range that is not a bot and meets the players-only setting.


16-16: Class definition looks good.

The class SlyPort is well-defined with a constructor and methods for enabling, teleporting, and finding entities.

@TejasLamba2006
Copy link
Collaborator

Great! I have also included documentation for each module, which can be accessed at https://wiki.client.wtf.

@xia-mc
Copy link
Owner

xia-mc commented Jul 8, 2024

good!

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

3 participants