Paper/patches/server/0562-add-isDeeplySleeping-to-HumanEntity.patch
2024-01-16 19:27:39 +01:00

25 lines
978 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 8 Apr 2021 17:36:10 -0700
Subject: [PATCH] add isDeeplySleeping to HumanEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index cdbd8d7d1c23809a7345f0c3b0c7f9356be47900..fd8d8b1e3583fe61b966f3550bd8e846b536b4e5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -133,6 +133,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
// Paper end
+ // Paper start
+ @Override
+ public boolean isDeeplySleeping() {
+ return getHandle().isSleepingLongEnough();
+ }
+ // Paper end
+
@Override
public int getSleepTicks() {
return this.getHandle().sleepCounter;