Fix not being able to sleep. Steve is very tired. (#10736)

This commit is contained in:
Matt authored and GitHub committed 2025-12-14 17:33:32 -08:00
1 parent f5d4fbbee5
commit 8b8d3fdef7
8 files changed
+117 -3

No files matched your search

@@ -593,7 +593,7 @@ public final class ForgeEventFactory {
var canContinueSleep = evt.getResult();
if (canContinueSleep == Result.DEFAULT)
return !rule.canSleep(player.level());
return rule.canSleep(player.level());
else
return canContinueSleep == Result.ALLOW;
}
@@ -22,7 +22,7 @@ import java.util.Optional;
* This event has a result. {@link HasResult}<br>
*
* setResult(ALLOW) informs game that player can sleep at this time.<br>
* setResult(DEFAULT) causes game to check !{@link Level#isDay()} instead.
* setResult(DEFAULT) causes game to check {@link net.minecraft.world.attribute.BedRule#canSleep()} instead.
*/
public final class SleepingTimeCheckEvent extends MutableEvent implements PlayerEvent, HasResult {
public static final EventBus<SleepingTimeCheckEvent> BUS = EventBus.create(SleepingTimeCheckEvent.class);