mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
9a7ca3dbc5
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: 564ed152 #482: Add a DragonBattle API to manipulate respawn phases etc 9f2fd967 #474: Add ability to set other plugin names as provided API so others can still depend on it CraftBukkit Changes:fc318cc1
#642: Add a DragonBattle API to manipulate respawn phases etc796eb15a
#644: Fix ChunkMapDistance#removeAllTicketsFor not propagating ticket level updatesa6f80937
SPIGOT-5606: call BlockRedstoneEvent for fence gates Spigot Changes: a03b1fdb Rebuild patches
56 lines
2.0 KiB
Diff
56 lines
2.0 KiB
Diff
From 3e5915a5ebe9224483503e023e4fb220b46a34b6 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 b5816dc89e..bed15873b6 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
|
@@ -1341,6 +1341,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 6e1ae94cea..06b2e8b910 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -856,6 +856,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 c89bc7024b..eaad222fd3 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
|
@@ -78,4 +78,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.26.0
|
|
|