-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add unbreakable carpet highlighter #1034
Conversation
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.
seems like good code to me.
src/main/java/de/hysky/skyblocker/skyblock/dwarven/MithrilCarpetHighlighter.java
Outdated
Show resolved
Hide resolved
ebb8bfa
to
d2c5240
Compare
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.
It seems that this pr just continually adds to the list of carpets without checking if it was already in the list? The list should be changed to a set, (AVLTreeSet should be better in this case as this is look-up intensive.) Also set contains should be checked before calling checkForCarpet
.
src/main/java/de/hysky/skyblocker/skyblock/dwarven/CarpetHighlighter.java
Outdated
Show resolved
Hide resolved
|
Oh, sorry. I read it as |
Oops too late xd |
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.
LGTM.
On the bright side, we can handle millions of carpets now... |
I'm not sure how well an AVLTreeSet will handle iteration over millions of carpets per frame, though. And I just noticed that light gray carpet is used for sneaky lighting in various places outside of tungsten ore veins. Idk what we should do for these false positives. It probably doesn't matter since they are indeed unbreakable carpets, but still. |
src/main/java/de/hysky/skyblocker/skyblock/dwarven/CarpetHighlighter.java
Outdated
Show resolved
Hide resolved
Because apparently it's not limited to mithril
fffa5bc
to
bd6ff29
Compare
Renders a colored box around nearby carpets within mithril ore veins in dwarven mines.
It can be toggled on and off, and the color is configurable.
Uses up about 0.30% of tick time for scanning & rendering while in dwarven mines. Didn't test outside but it should be much less, probably not even worth mentioning as it's just a boolean if check on each tick.