-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Feature: Powder Chest Timer #2204
base: beta
Are you sure you want to change the base?
Conversation
src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderTrackerConfig.java
Outdated
Show resolved
Hide resolved
…owder-chest-timer
…owder-chest-timer
This pull request has conflicts with the base branch "beta". Please resolve those so we can test out your changes. |
src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderChestTimerConfig.java
Outdated
Show resolved
Hide resolved
src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderChestTimerConfig.java
Outdated
Show resolved
Hide resolved
src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderChestTimerConfig.java
Outdated
Show resolved
Hide resolved
…derChestTimerConfig.java Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com>
…derChestTimerConfig.java Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com>
…derChestTimerConfig.java Co-authored-by: CalMWolfs <94038482+CalMWolfs@users.noreply.github.com>
Conflicts have been resolved! 🎉 |
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.
src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderChestTimerConfig.java
Outdated
Show resolved
Hide resolved
src/main/java/at/hannibal2/skyhanni/config/features/mining/PowderChestTimerConfig.java
Outdated
Show resolved
Hide resolved
|
||
@SubscribeEvent | ||
fun onWorldChange(event: LorenzWorldChangeEvent) { | ||
if (!isEnabled()) return |
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.
dont add a config check inside the world change event
else -> continue | ||
} | ||
|
||
if (sorted.isNotEmpty()) { |
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.
make this be an early return with if (sorted.isEmpty()) continue
if (sorted.isNotEmpty()) { | ||
val chestToConnect = sorted.take(config.drawLineToChestAmount) | ||
if (chestToConnect.isNotEmpty()) { | ||
val (firstPos, firstTime) = chestToConnect.first() |
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.
instead of checking isNotEmpty and then doing .first(), you can just do .firstOrNull() ?: continue
…derChestTimerConfig.java Co-authored-by: Empa <42304516+ItsEmpa@users.noreply.github.com>
…derChestTimerConfig.java Co-authored-by: Empa <42304516+ItsEmpa@users.noreply.github.com>
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.
empas suggestions
This pull request has conflicts with the base branch "beta". Please resolve those so we can test out your changes. |
Conflicts have been resolved! 🎉 |
What
Add a timer in the style of the Barn Fishing timer that show you when the first chest you uncovered is gonna despawn.
Images
Changelog New Features