mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 20:21:51 +01:00
f8fd607e04
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: bbfd13dd Hyperlink 'Events' in raid event package documentation b2095bed SPIGOT-5413: Add TrustedPlayer API for foxes 1bf1f3f4 Block trace methods do not require hash sets abf0cfdc Javadoc improvements per checkstyle c4a2b425 Add TimeSkipEvent CraftBukkit Changes:817116de
SPIGOT-5413: Add TrustedPlayer API for foxes062680a8
SPIGOT-5467: Calm down bees that cannot exit hive75fac431
SPIGOT-5472: Spurious warning when using clone command on tile entities85106731
SPIGOT-5471: Allow empty title/author for books2d9db47f
Add TimeSkipEvent384225c2
Add thread name to TerminalConsoleWriterThread Spigot Changes: 05bb8bcf Postpone stopping the watchdog until the server is completely stopped 18e2b9be Add package-info.java for Spigot APIs
55 lines
2 KiB
Diff
55 lines
2 KiB
Diff
From 3ea138c5a2f03731148659ad7268607897929c71 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/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
index 5ca281172..e259c868e 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
@@ -1334,6 +1334,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
|
return flag;
|
|
}
|
|
|
|
+ public boolean isInDaylight() { return this.en(); } // Paper - OBFHELPER
|
|
protected boolean en() {
|
|
if (this.world.isDay() && !this.world.isClientSide) {
|
|
float f = this.aI();
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
index a9258b975..7761af906 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -863,6 +863,13 @@ public class CraftWorld implements World {
|
|
}
|
|
}
|
|
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public boolean isDayTime() {
|
|
+ return getHandle().isDay();
|
|
+ }
|
|
+ // Paper end
|
|
+
|
|
@Override
|
|
public boolean createExplosion(double x, double y, double z, float power) {
|
|
return createExplosion(x, y, z, power, false, true);
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
index 53c2d154e..56c233872 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
@@ -68,4 +68,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
|
public long getSeed() {
|
|
return getHandle().lootTableSeed;
|
|
}
|
|
+
|
|
+ // Paper start
|
|
+ @Override
|
|
+ public boolean isInDaylight() {
|
|
+ return getHandle().isInDaylight();
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
--
|
|
2.24.1
|
|
|