From b45a5b8f34c79949edd0f4fc21ee35dc837cd8c3 Mon Sep 17 00:00:00 2001 From: Der-Zauberer Date: Thu, 3 Aug 2023 13:55:48 +0200 Subject: [PATCH] fix: forever sleeping sygotchi --- .../java/de/sybit/sygotchi/tamagotchi/TamagotchiService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/sybit/sygotchi/tamagotchi/TamagotchiService.java b/src/main/java/de/sybit/sygotchi/tamagotchi/TamagotchiService.java index b40d0f5..26b1951 100644 --- a/src/main/java/de/sybit/sygotchi/tamagotchi/TamagotchiService.java +++ b/src/main/java/de/sybit/sygotchi/tamagotchi/TamagotchiService.java @@ -319,7 +319,7 @@ public void updateTamagotchi() { tamagotchi.setDirty(Math.max(tamagotchi.getDirty() - 0.05, 0)); if (!tamagotchi.isSleeping()) { tamagotchi.setTired(Math.max(tamagotchi.getTired() - 0.05, 0)); - if (tamagotchi.getTired() >= 0) { + if (tamagotchi.getTired() <= 0) { tamagotchi.setSleeping(true); tamagotchi.setStartedSleeping(new Timestamp(new Date().getTime())); }