From 3a82637ecaa0bc3b9add1f053638a47930b3e716 Mon Sep 17 00:00:00 2001 From: Steveplays28 Date: Sun, 8 Oct 2023 11:59:36 +0200 Subject: [PATCH] fix: Fix nighttime sleeping wake up time --- .../github/steveplays28/realisticsleep/util/SleepMathUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/github/steveplays28/realisticsleep/util/SleepMathUtil.java b/src/main/java/com/github/steveplays28/realisticsleep/util/SleepMathUtil.java index f9ceb7a..27756ed 100644 --- a/src/main/java/com/github/steveplays28/realisticsleep/util/SleepMathUtil.java +++ b/src/main/java/com/github/steveplays28/realisticsleep/util/SleepMathUtil.java @@ -18,7 +18,7 @@ public static int calculateTicksToTimeOfDay(int timeOfDay, int targetTimeOfDay) } public static int calculateTicksUntilAwake(int currentTimeOfDay) { - return calculateTicksToTimeOfDay(currentTimeOfDay, isNightTime(currentTimeOfDay) ? DAY_LENGTH : SUNSET_WAKE_UP); + return calculateTicksToTimeOfDay(currentTimeOfDay, isNightTime(currentTimeOfDay) ? SUNRISE_WAKE_UP : SUNSET_WAKE_UP); } public static int calculateSecondsUntilAwake(int currentTimeOfDay, double timeStepPerTick, double tps) {