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

Paper Changes:
PaperMC/Paper@812701d Do not crash when an exp orb attempts to mend an unrepairable item
PaperMC/Paper@19eefe9 Fix SoundEffects only to players diff  (#10966)
PaperMC/Paper@95aa440 Add missing effect cause and deprecate PATROL_CAPTAIN cause (#10958)
PaperMC/Paper@b2e5587 Expose LivingEntity#canUseSlot (#10930)
PaperMC/Paper@97afc9a Fix StackOverflowError for new dispenser interaction (#10949)
PaperMC/Paper@5ae4758 Fix speed for launched trident using api (#10936)
PaperMC/Paper@897ece4 Call EntityPortalEnterEvent on endgateways and make cancellable (#10892)
PaperMC/Paper@1d3fc0e Bump reflection-rewriter to 0.0.2 (#10927)
PaperMC/Paper@b99d071 Swap some nullable annotations (#10960)
PaperMC/Paper@dd31654 bump reflection-rewriter to 0.0.3 (#10969)
PaperMC/Paper@dd49fba Fix NPE when retrieving an entity with a null UUID
2024-06-23 19:37:56 -07:00

50 lines
1.9 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 514611cf71cafc8e7e07ef901c2ccad03cd5f31b..8c9c4183785a47b64f084f4b8cdac53d2d4402aa 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -1189,5 +1189,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 a1e54e9d14393a6c0ea57cca854071c5396d9717..e492d3707e948cd3936f0f9c5eea4668fb1fe249 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1458,4 +1458,20 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
boolean canUseEquipmentSlot(org.bukkit.inventory.@NotNull EquipmentSlot slot);
// Paper end - Expose canUseSlot
+
+ // Purpur start - API for any mob to burn daylight
+ /**
+ * 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 - API for any mob to burn daylight
}