PaperMC/patches/unapplied/server/0619-add-isDeeplySleeping-to-HumanEntity.patch
2022-07-27 20:52:03 +02:00

24 lines
971 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 acf609e8d880156ba980b701816c475166c27bdb..6149e74262ca6c4c00686a89c273c59bfaac3e05 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -122,6 +122,13 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
}
}
+ // Paper start
+ @Override
+ public boolean isDeeplySleeping() {
+ return getHandle().isSleepingLongEnough();
+ }
+ // Paper end
+
@Override
public int getSleepTicks() {
return this.getHandle().sleepCounter;