Skip to content

Conversation

@Soon2BeATaco
Copy link

  • Stuff fixed from suggestions on previous pr
  • Added "Raging Wind" spell compatibility

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Soon2BeATaco, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new 'Hollow Wand' module to enhance gameplay related to 'Ichor Pool' and 'Raging Wind' spells. It provides features such as automatic party chat messaging of spell cast locations and dynamic visual waypoints for these spells, including an expanding radius for 'Raging Wind' and proximity alerts. Additionally, it refines player utility functions for more precise coordinate handling and distance calculations, improving overall user experience for spell management.

Highlights

  • New Hollow Wand Module: Introduced a new HollowWand module that provides utilities for 'Ichor Pool' and 'Raging Wind' spells, including automatic party chat messaging and dynamic visual waypoints.
  • Spell Casting Messages: The module now automatically sends party chat messages with precise coordinates when the player casts 'Ichor Pool' or 'Raging Wind' spells, if enabled.
  • Dynamic Waypoints: Visual waypoints are displayed for 'Ichor Pool' and 'Raging Wind' spells based on incoming party messages, with customizable color and size. 'Raging Wind' waypoints feature an expanding radius and alert the player if they are within range.
  • Player Utility Enhancements: Added new utility functions in PlayerUtils.kt for more precise coordinate string formatting (with decimal places) and a function to calculate the Euclidean distance between the player and a given set of coordinates.
  • Module Registration and Cleanup: The new HollowWand module has been registered in ModuleManager.kt, and .DS_Store has been added to the .gitignore file for repository cleanliness.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new module, HollowWand, which provides message and waypoint functionality for hollow wand casting in the game. It also modifies ModuleManager to include the new module and updates PlayerUtils with helper functions for position formatting and distance calculation. The changes look good, but there are a few areas that could be improved for clarity and efficiency.

Comment on lines +71 to +72
val fps = mc.debug?.split(" ")?.get(0)?.toDoubleOrNull() ?: 60.0
val windIncrement = 25.0 / max(60.0, fps)
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The fps variable is used to calculate windIncrement. If mc.debug is null, split will throw an exception. Add a null check to prevent this.

Suggested change
val fps = mc.debug?.split(" ")?.get(0)?.toDoubleOrNull() ?: 60.0
val windIncrement = 25.0 / max(60.0, fps)
if(!showWaypoint) return
val fps = mc.debug?.split(" ")?.get(0)?.toDoubleOrNull() ?: 60.0

Comment on lines +53 to +56
if(PlayerUtils.getDistanceTo(x, y, z) <= 25) {
PlayerUtils.alert("Raging Winds", color = Colors.MINECRAFT_RED)
modMessage("Raging Winds applied")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The alert and modMessage calls are both triggered when the player is within 25 blocks of a Raging Wind. Consider consolidating these into a single function call or a more descriptive combined message to avoid redundancy and improve clarity.

Suggested change
if(PlayerUtils.getDistanceTo(x, y, z) <= 25) {
PlayerUtils.alert("Raging Winds", color = Colors.MINECRAFT_RED)
modMessage("Raging Winds applied")
}
if(PlayerUtils.getDistanceTo(x, y, z) <= 25) {
PlayerUtils.alert("Raging Winds applied", color = Colors.MINECRAFT_RED)
modMessage("Raging Winds applied")
}

@Soon2BeATaco
Copy link
Author

Just to clarify, .DS_Store was added to gitignore because I use a mac, and those files just spawn in. They're functionally useless and invisible on my end, so this was the simplest solution to not add the files.

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.

1 participant