mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 00:47:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@307778f Collision API (#6736) PaperMC/Paper@fcb7b73 [ci skip] remove stale PaperMC/Paper@1f0d707 Fix issues with CreeperIgniteEvent (#7507) PaperMC/Paper@fd557b7 Undeprecate Bed's tile entity interface (#7330) Pufferfish Changes: pufferfish-gg/Pufferfish@002f541 Updated Upstream (Paper) pufferfish-gg/Pufferfish@9c5fcfd Add option to disable out-of-order chat pufferfish-gg/Pufferfish@b21931d Fix memory leak in async pathfinder (#42)
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 dd7df647f98fe72694fb7615e5cd1192724b7812..1f116f33e6dbce8d8d67d799beeedecf792cd728 100644
|
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
|
@@ -949,5 +949,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
|
|
}
|