mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 09:23:42 +01:00
9946cef8c5
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: f52c70ab Fix incorrect nullability in MultipleFacing 6af4c0b2 SPIGOT-5311: Add API to get/set item associated with throwable projectiles 97aeae56 Add set/isAware to disable Vanilla AI components of a Mob CraftBukkit Changes:fba9f487
Improve legacy conversion of some materials that changed post flatteningb1ba8749
Move Bukkit.Aware loading/saving to correct locationf7cdb53c
SPIGOT-5311: Add API to get/set item associated with throwable projectiles689f429c
#634: Cross platform patch scriptsab85433d
Add set/isAware to disable Vanilla AI components of a Mob Spigot Changes: 8faa8b45 Rebuild patches
55 lines
2 KiB
Diff
55 lines
2 KiB
Diff
From acbf444d827b68afd4c0b3a95289fa3abc00523b 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 ce1ac730cb..323d78b22f 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
|
@@ -852,6 +852,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.25.0
|
|
|