-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
[WORKING DRAFT] Better dungeon door detection/overlay #879
[WORKING DRAFT] Better dungeon door detection/overlay #879
Conversation
Just did a dozen runs with this, and I haven't really found any issues, doors are rendering where they're expected to |
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.
Looks good, just some small things and formatting.
src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonMapUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonMapUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/Room.java
Outdated
Show resolved
Hide resolved
} | ||
else if (matchingRoomsSize == 1) { |
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.
} | |
else if (matchingRoomsSize == 1) { | |
} else if (matchingRoomsSize == 1) { |
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.
My bad on those, I didn't correctly apply the formatting config listed on the wiki.
While the other changes all apply just like you did, it seems like the formatter really doesn't want to have the else if
on the same line as the closing bracket.
Is it a config I'm missing ? If I apply this, the next person to work on that file might just revert it.
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.
I’m not sure. The intellij default keeps them on the same line.
src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonMapUtils.java
Outdated
Show resolved
Hide resolved
src/main/java/de/hysky/skyblocker/skyblock/dungeon/secrets/DungeonManager.java
Outdated
Show resolved
Hide resolved
Also threw in an extra comment regarding map colors, and fixed `doorPos` being `doorpos`.
I believe this should be it, minus the small nitpick about |
I've just spent the day rewriting the code that detects dungeons doors.
Let me know if I'm doing anything wrong / there are any concerns regarding the proposed code.
Summary of changes compared to current implementation
BetterMap
does on 1.8)Concerns
Code quality ?
Hardcoded values for map colors, as well as position code that might not be easily understood
Currently, the doors are checked for every tick, which might not be a good thing for performance. It could be possible to only check when necessary :
Feel free to test those changes, things have been working pretty smoothly on my end, and I haven't been able to find any bugs / wrong placements for the doors.