-
Notifications
You must be signed in to change notification settings - Fork 470
Slayer and miniboss detection #584
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
base: 2.x
Are you sure you want to change the base?
Conversation
Changes from nameStart to nameContains so even if Hypixel changes mobtypes again it won't break
Just adds an optional §r at the start of the regex (works for revs might want to check the others)
entity.displayName?.string doesn't have color codes
Summary of ChangesHello @The-Deerman, 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 focuses on enhancing the reliability of slayer and miniboss detection within the application. It resolves inconsistencies arising from Minecraft's text formatting by stripping color codes from entity names used in detection logic and updates the matching mechanism to be more adaptable to potential future game updates, ensuring smoother gameplay integration. Highlights
Using Gemini Code AssistThe 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
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 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
|
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 introduces several fixes to improve the detection of slayer bosses and minibosses, making the logic more robust against future game updates. Key changes include removing color codes for miniboss detection on unformatted names, switching to contains from startsWith for more flexible slayer boss detection, and updating various string-based checks to be more resilient. The changes are consistent and well-implemented, and I found no issues of medium or higher severity.
Sychic
left a comment
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.
Overall looks fine, just one question
| if (!entity.hasCustomName()) return | ||
| val name = entity.displayName?.string ?: return | ||
| if (Skytils.config.slayerBossHitbox && name.endsWith("§c❤") && !name.endsWith("§e0§c❤") && !mc.entityRenderDispatcher.shouldRenderHitboxes()) { | ||
| if (Skytils.config.slayerBossHitbox && name.endsWith("❤") && !name.endsWith(" 0❤") && !mc.entityRenderDispatcher.shouldRenderHitboxes()) { |
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.
Are you sure this works? Assuming that name is still formatted, this will fail due to having no formatting codes
Fix: Detection for minibosses by removing the color codes which aren't present in entity.displayName?.string
Fix: Slayer detection by using contains instead of startsWith so that even if hypixel changes their mobtypes again it won't instantly break
Doesn't fix any of the rendering issues