aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0521-add-isDeeplySleeping-to-HumanEntity.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0521-add-isDeeplySleeping-to-HumanEntity.patch')
-rw-r--r--patches/server/0521-add-isDeeplySleeping-to-HumanEntity.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/server/0521-add-isDeeplySleeping-to-HumanEntity.patch b/patches/server/0521-add-isDeeplySleeping-to-HumanEntity.patch
new file mode 100644
index 0000000000..26e38b4777
--- /dev/null
+++ b/patches/server/0521-add-isDeeplySleeping-to-HumanEntity.patch
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+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 796945fb1a8b43987ed9f01375113b2c13ff67c0..6c500a2ccc050fc44076e443032b0ef9d87a7de8 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+@@ -132,6 +132,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;