aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2021-12-21 16:31:33 -0800
committerGitHub <[email protected]>2021-12-21 16:31:33 -0800
commit75f4cb074adb357cd1474c6f65c3734abd3562ee (patch)
treec1181daee39211d1bffc398ec0d18547cd0d4aa6
parent3d9385e665896c524d969e04d4f8659f76ee7e24 (diff)
downloadPaper-75f4cb074adb357cd1474c6f65c3734abd3562ee.tar.gz
Paper-75f4cb074adb357cd1474c6f65c3734abd3562ee.zip
Move setShouldBurnInDay to AbstractSkeleton (#7120)
-rw-r--r--patches/api/0296-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch53
-rw-r--r--patches/server/0655-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch35
2 files changed, 46 insertions, 42 deletions
diff --git a/patches/api/0296-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/api/0296-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
index fd69383d96..16cdba8016 100644
--- a/patches/api/0296-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
+++ b/patches/api/0296-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
@@ -5,6 +5,35 @@ Subject: [PATCH] Add a "should burn in sunlight" API for Phantoms and
Skeletons
+diff --git a/src/main/java/org/bukkit/entity/AbstractSkeleton.java b/src/main/java/org/bukkit/entity/AbstractSkeleton.java
+index 4f4f1e48cdaee0d845f60666569e48731be3fbb9..504fd761e5863c09fe785300a5c3e68e00baf2b0 100644
+--- a/src/main/java/org/bukkit/entity/AbstractSkeleton.java
++++ b/src/main/java/org/bukkit/entity/AbstractSkeleton.java
+@@ -32,4 +32,24 @@ public interface AbstractSkeleton extends Monster, com.destroystokyo.paper.entit
+ @Deprecated
+ @Contract("_ -> fail")
+ public void setSkeletonType(Skeleton.SkeletonType type);
++
++ // Paper start
++ /**
++ * Check if this skeleton will burn in the sunlight. This
++ * does not take into account an entity's natural fire
++ * immunity.
++ *
++ * @return True if skeleton will burn in sunlight
++ */
++ boolean shouldBurnInDay();
++
++ /**
++ * Set if this skeleton should burn in the sunlight. This
++ * will not override an entity's natural fire
++ * immunity.
++ *
++ * @param shouldBurnInDay True to burn in sunlight
++ */
++ void setShouldBurnInDay(boolean shouldBurnInDay);
++ // Paper end
+ }
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
@@ -29,27 +58,3 @@ index ed4d417c2deefb78807cb61b01df5afcd334d754..a40b045f08b85e22e75459b547e7e7c0
+ 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
-index 01d838a60d056bf4b4a8ef9d0ac18c6f91f412e6..6d515726532ad7417fba9d3e01bcb1167539b23c 100644
---- a/src/main/java/org/bukkit/entity/Skeleton.java
-+++ b/src/main/java/org/bukkit/entity/Skeleton.java
-@@ -64,4 +64,19 @@ public interface Skeleton extends AbstractSkeleton {
- */
- 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
- }
diff --git a/patches/server/0655-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/server/0655-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
index 73dba9db51..db9414e188 100644
--- a/patches/server/0655-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
+++ b/patches/server/0655-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
@@ -89,15 +89,15 @@ index 573107f1281e68c7ba00d4dea8fac02f2d18504d..5c35b73c13c3826be9705e0515407681
// Paper end
private static enum AttackPhase {
-diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
-index c9dab70b0b284fe1c1daafd3c1f5bd08b14fa35d..dce23f3878b1588c26b6116d80e597d08070edbc 100644
---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
-+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
-@@ -40,5 +40,15 @@ public class CraftPhantom extends CraftFlying implements Phantom {
- public java.util.UUID getSpawningEntity() {
- return getHandle().getSpawningEntity();
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
+index 5ff566186431440c25a26900aba14e4adb642031..5beaa2bb0d58fe477ce8d2de8b77600d3b416d8c 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
+@@ -20,4 +20,15 @@ public abstract class CraftAbstractSkeleton extends CraftMonster implements Abst
+ return (net.minecraft.world.entity.monster.AbstractSkeleton) super.getHandle();
}
-+
+ // Paper end
++ // Paper start
+ @Override
+ public boolean shouldBurnInDay() {
+ return getHandle().shouldBurnInDay();
@@ -107,18 +107,17 @@ index c9dab70b0b284fe1c1daafd3c1f5bd08b14fa35d..dce23f3878b1588c26b6116d80e597d0
+ public void setShouldBurnInDay(boolean shouldBurnInDay) {
+ getHandle().setShouldBurnInDay(shouldBurnInDay);
+ }
- // Paper end
++ // Paper end
}
-diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
-index 90f34d75f99f31f5c98c499df209979a03e23191..0e8e1a85697bbe9ca92466ca0a39e4e9478f31bf 100644
---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
-+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
-@@ -51,4 +51,16 @@ public class CraftSkeleton extends CraftAbstractSkeleton implements Skeleton {
- public SkeletonType getSkeletonType() {
- return SkeletonType.NORMAL;
+diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
+index c9dab70b0b284fe1c1daafd3c1f5bd08b14fa35d..dce23f3878b1588c26b6116d80e597d08070edbc 100644
+--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
+@@ -40,5 +40,15 @@ public class CraftPhantom extends CraftFlying implements Phantom {
+ public java.util.UUID getSpawningEntity() {
+ return getHandle().getSpawningEntity();
}
+
-+ // Paper start
+ @Override
+ public boolean shouldBurnInDay() {
+ return getHandle().shouldBurnInDay();
@@ -128,5 +127,5 @@ index 90f34d75f99f31f5c98c499df209979a03e23191..0e8e1a85697bbe9ca92466ca0a39e4e9
+ public void setShouldBurnInDay(boolean shouldBurnInDay) {
+ getHandle().setShouldBurnInDay(shouldBurnInDay);
+ }
-+ // Paper end
+ // Paper end
}