2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Sun, 7 Oct 2018 00:54:21 -0500
|
|
|
|
Subject: [PATCH] Add sun related API
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2022-03-01 04:25:13 +01:00
|
|
|
index 440a3cb699939b0b1224a4668f0e221f9c7f3159..5dcb92e37e5f419104bd416eb7b53128c1bfed9f 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
2022-03-01 06:43:03 +01:00
|
|
|
@@ -676,6 +676,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // 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
|
2021-11-24 00:06:05 +01:00
|
|
|
index b0d348061487110993b6c4c8a7dc7208f27361b3..d7bc601f2cb4e22565eeebb2d8ebe051748de92a 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
2021-08-25 09:59:26 +02:00
|
|
|
@@ -80,4 +80,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
2021-06-11 14:02:28 +02:00
|
|
|
public long getSeed() {
|
2021-06-13 08:48:25 +02:00
|
|
|
return this.getHandle().lootTableSeed;
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public boolean isInDaylight() {
|
2021-06-13 08:48:25 +02:00
|
|
|
+ return getHandle().isSunBurnTick();
|
2021-06-11 14:02:28 +02:00
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|