From 0000000000000000000000000000000000000000 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 6e806ede0d94cb3cdb7e772ba56a010ad241590c..238669816f082704b62a7bef8b78058dceef8be2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -692,6 +692,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } + // Paper start + @Override + public boolean isDayTime() { + return getHandle().isDay(); + } + // Paper end + @Override public long getGameTime() { return world.levelData.getGameTime(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java index ce244e96f674f7886179baced3d1e9b67fedfe73..522b7cb1db22b02279b004916ad2a14447a6bbed 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java @@ -93,4 +93,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 }