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: 12dec20 Bump paerweight to 1.1.7 e33ed89 Get short commit ref using a more proper method 7d6147d Remove now unneeded patch due to paperweight 1.1.7 e72fa41 Update task dependency for includeMappings so the new task isn't skipped 0ad5526 Trim whitspace off of git hash (oops) Tuinity Changes: e878ba9 Update paper 2bd2849 Bring back fix codec spam patch
49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Ben Kerllenevich <me@notom3ga.me>
|
|
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 0b8357f012e3bafcd3b5fb4043392b42cf5cfc2a..c9d64da90a05f252d91dd10d2d5f62ba66afb944 100644
|
|
--- a/src/main/java/org/bukkit/entity/Entity.java
|
|
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
|
@@ -819,5 +819,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
|
* @return Whether the entity was successfully spawned.
|
|
*/
|
|
boolean spawnAt(@NotNull Location location, @NotNull org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason);
|
|
+
|
|
+ /**
|
|
+ * 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 86dd7fbbd98f32f164a15b5b2e9cf6f4664fbef1..90e8c4bc68d1563061b6c6efc5e9040735c67dcd 100644
|
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
@@ -902,5 +902,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
|
|
}
|