aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt3
2 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt
index 8b352578a..76ed7c684 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoAPI.kt
@@ -9,11 +9,10 @@ import at.hannibal2.skyhanni.features.bingo.card.goals.BingoGoal
import at.hannibal2.skyhanni.features.bingo.card.goals.GoalType
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.SimpleTimeMark
+import at.hannibal2.skyhanni.utils.TimeUtils
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import java.time.LocalDate
import java.time.LocalTime
import java.time.OffsetDateTime
-import java.time.ZoneId
import java.time.ZoneOffset
object BingoAPI {
@@ -51,7 +50,7 @@ object BingoAPI {
}
private fun getStartOfMonthInMillis() = OffsetDateTime.of(
- LocalDate.now(ZoneId.of("UTC")).plusDays(5).withDayOfMonth(1),
+ TimeUtils.getCurrentLocalDate().plusDays(5).withDayOfMonth(1),
LocalTime.MIDNIGHT, ZoneOffset.UTC
).toEpochSecond()
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt
index 4298edf21..021dd0ef6 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/TimeFeatures.kt
@@ -9,10 +9,12 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.RecalculatingValue
import at.hannibal2.skyhanni.utils.RenderUtils.renderString
import at.hannibal2.skyhanni.utils.SimpleTimeMark.Companion.asTimeMark
+import at.hannibal2.skyhanni.utils.TimeUtils
import at.hannibal2.skyhanni.utils.TimeUtils.format
import io.github.moulberry.notenoughupdates.util.SkyBlockTime
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
import java.text.SimpleDateFormat
+import java.time.Month
import kotlin.time.Duration.Companion.days
import kotlin.time.Duration.Companion.seconds
@@ -38,6 +40,7 @@ class TimeFeatures {
}
if (winterConfig.islandCloseTime && IslandType.WINTER.isInIsland()) {
+ if (TimeUtils.getCurrentLocalDate().month == Month.DECEMBER) return
val timeTillNextYear = startOfNextYear.getValue().timeUntil()
val alreadyInNextYear = timeTillNextYear > 5.days
val text = if (alreadyInNextYear) {