From a75d433b3e6841f5482b8d10fe271b962936d0a1 Mon Sep 17 00:00:00 2001 From: BillyGalbreath Date: Sun, 7 Oct 2018 00:54:21 -0500 Subject: [PATCH] Add sun related API == AT == public net.minecraft.world.entity.Mob isSunBurnTick()Z --- .../src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 7 +++++++ .../main/java/org/bukkit/craftbukkit/entity/CraftMob.java | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index b01bbddb86..c310a8bae8 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -755,6 +755,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } + // Paper start + @Override + public boolean isDayTime() { + return getHandle().isDay(); + } + // Paper end + @Override public long getGameTime() { return this.world.levelData.getGameTime(); diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java index 26c9bc53fe..c67673772c 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java @@ -91,4 +91,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { public long getSeed() { return this.getHandle().lootTableSeed; } + + // Paper start + @Override + public boolean isInDaylight() { + return getHandle().isSunBurnTick(); + } + // Paper end }