mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@ef0e5a6 Updated Upstream (Bukkit/CraftBukkit/Spigot)
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ben Kerllenevich <ben@omega24.dev>
|
|
Date: Tue, 25 May 2021 16:30:30 -0400
|
|
Subject: [PATCH] API for any mob to burn daylight
|
|
|
|
Co-authored by: Encode42 <me@encode42.dev>
|
|
|
|
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
|
index 20b00b0c12b848c171fa43d53ce53428e0f424a6..be7ad89699619aba9df4699403c9a70fd2bc9da1 100644
|
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
|
@@ -976,5 +976,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
|
* @return True if ridable in water
|
|
*/
|
|
boolean isRidableInWater();
|
|
+
|
|
+ /**
|
|
+ * Checks if the entity is in daylight
|
|
+ *
|
|
+ * @return True if in daylight
|
|
+ */
|
|
+ boolean isInDaylight();
|
|
// Purpur end
|
|
}
|
|
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
index 193901442dd6d5e0c85269b42083f63759120d06..4a4606f2598b868e43c270cd3056d44549bc914e 100644
|
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
@@ -1008,5 +1008,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
|
* @param slot Equipment slot to play break animation for
|
|
*/
|
|
void broadcastItemBreak(@NotNull org.bukkit.inventory.EquipmentSlot slot);
|
|
+
|
|
+ /**
|
|
+ * If this mob will burn in the sunlight
|
|
+ *
|
|
+ * @return True if mob will burn in sunlight
|
|
+ */
|
|
+ boolean shouldBurnInDay();
|
|
+
|
|
+ /**
|
|
+ * Set if this mob should burn in the sunlight
|
|
+ *
|
|
+ * @param shouldBurnInDay True to burn in sunlight
|
|
+ */
|
|
+ void setShouldBurnInDay(boolean shouldBurnInDay);
|
|
// Purpur end
|
|
}
|