Files
Purpur/patches/api/0034-API-for-any-mob-to-burn-daylight.patch
Ben Kerllenevich ccbf80d813 Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@4c9317c Use non-deprecated super ctor in PaperServerListPingEventImpl (#8029)
PaperMC/Paper@147a2b7 Parse MOTD as legacy sectioned string (Fixes #8036)
PaperMC/Paper@e52499e Fix Player#loadData and Player#saveData javadocs (#8039)
PaperMC/Paper@bdb6816 Update Alternate Current to v1.4.0 (#8028)
PaperMC/Paper@5593f4e Cleanup LivingEntity Hand Raised/Item Use API (#7995)
PaperMC/Paper@04d080e [ci skip] Fix tiny mistake in adventure javadocs (#8046)
2022-06-24 13:13:38 -04:00

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 db83f87af0cb75b275bba306dea38b66907bbb56..3fa4f583c8d38c8cb62065f7f18986c985e4c92f 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -860,5 +860,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 dc62e8498fa7a18605bc5e6844746c1c66ea9e96..6c46107e13a5fd648d64844ffa5b326d4909d702 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -931,5 +931,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
}