mirror of
https://github.com/PurpurMC/Purpur.git
synced 2025-02-17 13:00:04 +08:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@c1ea550 Remove more outdated config settings (#9358) PaperMC/Paper@3a03739 Add method to get ungenerated chunk from long key (#9254) PaperMC/Paper@072b78a Add trail ruins structure set seed in spigot config (#9327) PaperMC/Paper@faf9a65 Disable BukkitMirrorTest PaperMC/Paper@873533b Add method to remove all active potion effects (#9361) PaperMC/Paper@275173e Updated Upstream (Bukkit/CraftBukkit) PaperMC/Paper@976b95c Temp: Pre-init PlayerChunkLoaderData in order to prepopulate the BFS lookup cache because potatos (Closes #9338) PaperMC/Paper@d6d4c78 Move some Folia API to Paper for easy compat (#9360) PaperMC/Paper@b1fe756 Revert "Move some Folia API to Paper for easy compat (#9360)" PaperMC/Paper@1f5bec7 Pull Folia API take two PaperMC/Paper@3756f5b Properly Cancel Usable Items (#9225)
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 84000002d89c0fb692d1c44f449ad3dcdd2b7576..964ec7bd70fcdfcffd51b310cdea84c7c5db6c95 100644
|
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
|
@@ -995,5 +995,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 deb92fd00f9cce906158c2dc9569620ba0eda411..0e6024430fde305a9cc4294037b2bd820676e096 100644
|
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
@@ -1181,5 +1181,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
|
|
}
|