PaperMC/patches/api/0300-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch

56 lines
1.9 KiB
Diff
Raw Normal View History

2021-06-11 14:02:28 +02:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MeFisto94 <MeFisto94@users.noreply.github.com>
Date: Tue, 11 May 2021 00:48:51 +0200
Subject: [PATCH] Add a "should burn in sunlight" API for Phantoms and
Skeletons
diff --git a/src/main/java/org/bukkit/entity/Phantom.java b/src/main/java/org/bukkit/entity/Phantom.java
index ed4d417c2deefb78807cb61b01df5afcd334d754..a40b045f08b85e22e75459b547e7e7c0b95103ed 100644
--- a/src/main/java/org/bukkit/entity/Phantom.java
+++ b/src/main/java/org/bukkit/entity/Phantom.java
@@ -26,5 +26,19 @@ public interface Phantom extends Flying {
*/
@Nullable
public java.util.UUID getSpawningEntity();
+
+ /**
+ * Check if this phantom will burn in the sunlight
+ *
+ * @return True if phantom will burn in sunlight
+ */
+ public boolean shouldBurnInDay();
+
+ /**
+ * Set if this phantom should burn in the sunlight
+ *
+ * @param shouldBurnInDay True to burn in sunlight
+ */
+ public void setShouldBurnInDay(boolean shouldBurnInDay);
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
2021-06-15 04:59:31 +02:00
index b7e424ea8a282f45fb8b91c919e4e4526c00be8b..2ca7c040270fa1b0fe623a0a779879783201a2f1 100644
2021-06-11 14:02:28 +02:00
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
2021-06-15 04:59:31 +02:00
@@ -64,4 +64,19 @@ public interface Skeleton extends AbstractSkeleton, com.destroystokyo.paper.enti
2021-06-11 14:02:28 +02:00
*/
STRAY;
}
+ // Paper start
+ /**
+ * Check if this skeleton will burn in the sunlight
+ *
+ * @return True if skeleton will burn in sunlight
+ */
+ boolean shouldBurnInDay();
+
+ /**
+ * Set if this skeleton should burn in the sunlight
+ *
+ * @param shouldBurnInDay True to burn in sunlight
+ */
+ void setShouldBurnInDay(boolean shouldBurnInDay);
+ // Paper end
}