-
-
Notifications
You must be signed in to change notification settings - Fork 91
Fix the starred mob and blaze solver #210
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
Conversation
…ame check in CustomHighlight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @Xmarmalade, 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 primarily focuses on bug fixes related to entity detection and data parsing within the application. It addresses issues with correctly identifying 'starred' mobs for highlighting and optimization purposes, and updates the Blaze solver to accurately read mob health, adapting to potential changes in the game's display of entity names.
Highlights
- Blaze Solver Fix: I've updated the regular expression used by the Blaze Solver in
BlazeSolver.ktto correctly parse the health of Blaze mobs. The change accounts for a new '♨' character that now appears in the Blaze's name tag, ensuring the solver can accurately read health values. - Starred Mob Detection Improvement: I've refined the logic for detecting 'starred' mobs in both
CustomHighlight.ktandRenderOptimizer.kt. Previously, the detection relied on the mob's name strictly starting with the '§6✯ ' prefix. This has been changed to use acontainscheck, making the detection more robust and less prone to issues if other formatting codes or prefixes appear before the star symbol in the entity's name.
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 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 or fill out our survey 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.
Footnotes
-
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. ↩
There was a problem hiding this 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 aims to fix the blaze solver and starred mob detection. The change to the blaze solver's regex correctly adapts to a new in-game symbol. However, I've identified a potential logic error where it captures the maximum health instead of the current health, which could make the solver ineffective. I've provided a suggestion to correct this.
The changes for identifying starred mobs, which switch from startsWith to contains, are a good improvement for robustness and correctly handle different mob name formats. These changes look solid.
| private var roomType = 0 | ||
| private var lastBlazeCount = 10 | ||
| private val blazeHealthRegex = Regex("^\\[Lv15] Blaze [\\d,]+/([\\d,]+)❤$") | ||
| private val blazeHealthRegex = Regex("^\\[Lv15] ♨ Blaze [\\d,]+/([\\d,]+)❤$") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current regular expression captures the blaze's maximum health instead of its current health. If all blazes in the puzzle share the same maximum health, sorting them based on this value won't provide the correct order to solve the puzzle.
The puzzle's solution likely depends on the blazes' current health. To fix this, the capturing group in the regex should be moved to capture the current health (the first number in the current/max health display).
This change will ensure the blazes are sorted correctly based on their dynamic health values, making the solver accurate.
| private val blazeHealthRegex = Regex("^\\[Lv15] ♨ Blaze [\\d,]+/([\\d,]+)❤$") | |
| private val blazeHealthRegex = Regex("^\[Lv15] ♨ Blaze ([\\d,]+)/[\\d,]+❤$") |
|
Swapping startsWith to contains isnt a good solution here due to other armor stands having that star in their name should use a regex ideally |
Signed-off-by: SubAt0mic <118155259+SubAt0m1c@users.noreply.github.com>
Signed-off-by: SubAt0mic <118155259+SubAt0m1c@users.noreply.github.com>
|
Ive pushed regexes which fix the dungeon starred mob stuff (probably) render optimizer has hide blaze stuff that needs to be updated as well |
No description provided.