From ba6b9800cdac750cbcf988f84890704c06690227 Mon Sep 17 00:00:00 2001 From: Sollace Date: Mon, 16 Sep 2024 17:17:21 +0100 Subject: [PATCH] Fixed bat ponies unable to sleep at night when there is a thunderstorm. Fixes #436 --- .../java/com/minelittlepony/unicopia/entity/player/Pony.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java index cfe236a9..4cc2b251 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/Pony.java @@ -807,7 +807,7 @@ public class Pony extends Living implements Copyable, Update public ActionResult canSleepNow() { if (asWorld().getGameRules().getBoolean(UGameRules.DO_NOCTURNAL_BAT_PONIES) && getSpecies().isNocturnal()) { - return asWorld().isDay() ? ActionResult.SUCCESS : ActionResult.FAIL; + return asWorld().isDay() || asWorld().getAmbientDarkness() >= 4 ? ActionResult.SUCCESS : ActionResult.FAIL; } return ActionResult.PASS;