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

random stuff #171

Merged
merged 10 commits into from
Apr 13, 2025
Merged

random stuff #171

merged 10 commits into from
Apr 13, 2025

Conversation

SubAt0m1c
Copy link
Contributor

fail on interactable etherwarps, blood camp move prediction, blood camp spawn timer hud, adjustable ping offset, livid tracer

blood camp move prediction, spawn timer hud, adjustable ping offset, livid tracer
Copy link

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

Hello @SubAt0m1c, 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!

Summary of Changes

This pull request introduces several new features and improvements to the Odin client. It includes changes to the EtherWarpHelper module, BloodCamp module, LeapMenu module, and LividSolver module. The changes range from adding a setting to fail etherwarp guesses on interactable blocks, move prediction for watcher in blood camp, timer hud for blood camp spawns, adjustable ping offset for blood camp, and tracers for Livid solver.

Highlights

  • EtherWarpHelper: Added a new setting 'Fail on Interactable' to the EtherWarpHelper module. This setting allows the user to fail etherwarp guesses if they are looking at an interactable block.
  • BloodCamp: Implemented move prediction for the watcher in the BloodCamp module, including settings for move messages, party move messages, and a kill title. Also added a timer HUD for blood camp spawns and adjustable ping offset.
  • LeapMenu: Updated the description for the 'Sorting' setting in the LeapMenu module to include information about configuring custom sorting with '/od leaporder'.
  • LividSolver: Added tracers to the LividSolver module, allowing users to draw a line to the Livid. Also added a setting to adjust the width of the tracers.

Changelog

Click here to see the changelog
  • odin/src/main/kotlin/me/odin/features/impl/render/EtherWarpHelper.kt
    • Added Blocks import.
    • Added 'Fail on Interactable' setting to fail etherwarp guesses on interactable blocks.
    • Added invalidBlocks set containing interactable blocks.
    • Modified the onRenderWorldLast function to check if the block being looked at is an interactable block and fail the guess if it is.
  • odinclient/src/main/kotlin/me/odinclient/features/impl/render/EtherWarpHelper.kt
    • Added Blocks import.
    • Added 'Fail on Interactable' setting to fail etherwarp guesses on interactable blocks.
    • Added invalidBlocks set containing interactable blocks.
    • Modified the onRenderWorldLast function to check if the block being looked at is an interactable block and fail the guess if it is.
  • src/main/kotlin/me/odinmain/features/impl/dungeon/BloodCamp.kt
    • Added move prediction for watcher, including settings for move messages, party move messages, and kill title.
    • Added a timer HUD for blood camp spawns.
    • Added adjustable ping offset for blood camp.
    • Refactored settings into dropdowns for better organization.
    • Added startTime and finalTime variables for move prediction.
    • Added message handling for watcher move messages.
    • Added a HUD setting for displaying the move timer.
    • Added pingOffset and manualOffset settings for mob box offset.
  • src/main/kotlin/me/odinmain/features/impl/dungeon/LeapMenu.kt
    • Updated the description for the 'Sorting' setting to include information about configuring custom sorting with '/od leaporder'.
  • src/main/kotlin/me/odinmain/features/impl/dungeon/LividSolver.kt
    • Added tracers to the LividSolver module.
    • Added a setting to adjust the width of the tracers.
    • Added isEntitySeen check to tracer rendering.
  • src/main/kotlin/me/odinmain/utils/render/HighlightRenderer.kt
    • Made isEntitySeen function public.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 is currently in preview and 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 to provide feedback.

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.


In dungeons deep, where shadows creep,
Odin's features secrets keep.
From ether warps to livid's trace,
A coder's skill, a helping grace.

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

@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 several new features and improvements, including interactable block detection for etherwarps, blood camp move prediction, a blood camp spawn timer HUD, adjustable ping offset, and a livid tracer. The changes seem well-organized and address the described functionalities. However, there are a few areas that could benefit from further review and refinement.

Summary of Findings

  • Potential Logic Issue in EtherwarpHelper: The logic for determining succeeded in EtherwarpHelper involves a complex condition that might not be immediately clear. Consider simplifying or adding comments to improve readability.
  • Magic Numbers in BloodCamp Move Prediction: The BloodCamp move prediction logic contains several magic numbers (e.g., 36, 33, 30, 27, 24). These should be replaced with named constants or explained with comments to improve maintainability.
  • Inconsistent use of pingOffset in BloodCamp: The BloodCamp module uses pingOffset as a boolean to determine whether to use averagePing or manualOffset, but then assigns the value to a variable also named pingOffset. This is confusing and should be renamed.
  • Missing Javadoc: The ClickType sealed class in PlayerUtils.kt is missing Javadoc.

Merge Readiness

The pull request introduces valuable features, but there are some areas that need further attention before merging. Specifically, the logic in EtherwarpHelper and BloodCamp should be clarified, and magic numbers should be replaced with named constants. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging. Given the medium and high severity issues, I recommend addressing these before merging.

} ?: return@onMessage

if (moveTime) modMessage("Watcher will move in ${(predictionTicks * 0.05).toFixed()}s.")
if (partyMoveTime) partyMessage("Watcher will move in ${(predictionTicks * 0.05).toFixed()}s.")
Copy link
Owner

Choose a reason for hiding this comment

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

Make this run before the previous line (line length)

…c-fixers

# Conflicts:
#	odin/src/main/kotlin/me/odin/features/impl/render/EtherWarpHelper.kt
#	src/main/kotlin/me/odinmain/features/impl/dungeon/BloodCamp.kt
@SubAt0m1c
Copy link
Contributor Author

/gemini review

@SubAt0m1c
Copy link
Contributor Author

SubAt0m1c commented Apr 10, 2025

IT WORKS NO WAY

Copy link

@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 several new features and improvements, including etherwarp helper enhancements, blood camp move prediction, a blood camp spawn timer HUD, adjustable ping offset, and a livid tracer. The changes touch various files, indicating a broad scope of modifications. Overall, the changes seem well-structured, but there are some areas that could benefit from further review and refinement.

Summary of Findings

  • Magic Numbers in BloodCamp.kt: The BloodCamp.kt file contains several magic numbers (e.g., 31.0, 34.0, 36, 33, 30, 27, 24, 20.0, 40.0, 20, 40) used in calculations and conditions. These numbers should be replaced with named constants to improve readability and maintainability.
  • Potential Division by Zero: In BloodCamp.kt, the calculation (ceil((System.currentTimeMillis() - startTime) / 1000.0) - moveTicks) / 2 could potentially lead to division by zero if moveTicks is equal to the result of ceil((System.currentTimeMillis() - startTime) / 1000.0). A check should be added to prevent this.
  • Inconsistent Naming: In PosMsgCommand.kt, the command /posmsg colors displays available colors with Minecraft formatting codes (e.g., §1DARKBLUE). However, the getColorFromString function uses different names (e.g., Colors.MINECRAFT_DARK_BLUE). This inconsistency should be addressed for clarity.

Merge Readiness

The pull request introduces several new features and improvements. However, the presence of magic numbers and a potential division by zero in BloodCamp.kt indicate that further refinement is needed before merging. I recommend addressing these issues before merging. I am unable to approve this pull request, and other reviewers should review this code before merging.

# Conflicts:
#	src/main/kotlin/me/odinmain/commands/impl/PosMsgCommand.kt
# Conflicts:
#	src/main/kotlin/me/odinmain/features/impl/dungeon/BloodCamp.kt
@SubAt0m1c SubAt0m1c requested a review from odtheking April 13, 2025 17:39
@odtheking odtheking merged commit 82d142e into odtheking:main Apr 13, 2025
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.

2 participants