testserver/patches/server/0631-add-isDeeplySleeping-t...

25 lines
971 B
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
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 45fe3d2d728b984651c478ff050a7c69b1eebef3..eb0ce87bc8eac723b73c2ee6da41db5da3fab401 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
2021-06-15 02:59:31 +00:00
@@ -121,6 +121,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
2021-06-11 12:02:28 +00:00
}
}
+ // Paper start
+ @Override
+ public boolean isDeeplySleeping() {
+ return getHandle().isSleepingLongEnough();
+ }
+ // Paper end
+
@Override
public int getSleepTicks() {
2021-06-15 02:59:31 +00:00
return this.getHandle().sleepCounter;