aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0159-Add-sun-related-API.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2021-12-31 19:05:42 -0800
committerGitHub <[email protected]>2021-12-31 19:05:42 -0800
commit3a43821c382ed99b3e64892381c263a23e9cc56a (patch)
treee888155bfa82cf00ed387b933141aebc5abe6add /patches/api/0159-Add-sun-related-API.patch
parent8b1734123e9de38fa939481fbc7e4417ca176633 (diff)
downloadPaper-3a43821c382ed99b3e64892381c263a23e9cc56a.tar.gz
Paper-3a43821c382ed99b3e64892381c263a23e9cc56a.zip
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Diffstat (limited to 'patches/api/0159-Add-sun-related-API.patch')
-rw-r--r--patches/api/0159-Add-sun-related-API.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/patches/api/0159-Add-sun-related-API.patch b/patches/api/0159-Add-sun-related-API.patch
new file mode 100644
index 0000000000..2cb44c5d04
--- /dev/null
+++ b/patches/api/0159-Add-sun-related-API.patch
@@ -0,0 +1,45 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: BillyGalbreath <[email protected]>
+Date: Sun, 7 Oct 2018 00:54:15 -0500
+Subject: [PATCH] Add sun related API
+
+
+diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
+index df90ff43657e6d5f776df95e55fa30538e5c2998..c0e7e96735c8c544b8b80908613bc97117a71703 100644
+--- a/src/main/java/org/bukkit/World.java
++++ b/src/main/java/org/bukkit/World.java
+@@ -1789,6 +1789,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
+ */
+ public void setFullTime(long time);
+
++ // Paper start
++
++ /**
++ * Check if it is currently daytime in this world
++ *
++ * @return True if it is daytime
++ */
++ public boolean isDayTime();
++ // Paper end
++
+ /**
+ * Gets the full in-game time on this world since the world generation
+ *
+diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java
+index cc30b4e22ee238de13f031398fc566f4123694ff..55c5227a340e34621160afc9fae3ea843492881d 100644
+--- a/src/main/java/org/bukkit/entity/Mob.java
++++ b/src/main/java/org/bukkit/entity/Mob.java
+@@ -19,6 +19,13 @@ public interface Mob extends LivingEntity, Lootable {
+ */
+ @NotNull
+ com.destroystokyo.paper.entity.Pathfinder getPathfinder();
++
++ /**
++ * Check if this mob is exposed to daylight
++ *
++ * @return True if mob is exposed to daylight
++ */
++ boolean isInDaylight();
+ // Paper end
+ /**
+ * Instructs this Mob to set the specified LivingEntity as its target.