Add a "should burn in sunlight" API for Phantoms and Skeletons
This commit is contained in:
@@ -32,4 +32,24 @@ public interface AbstractSkeleton extends Monster, com.destroystokyo.paper.entit
|
|||||||
@Deprecated(since = "1.17")
|
@Deprecated(since = "1.17")
|
||||||
@Contract("_ -> fail")
|
@Contract("_ -> fail")
|
||||||
public void setSkeletonType(Skeleton.SkeletonType type);
|
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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,5 +26,19 @@ public interface Phantom extends Flying, Enemy {
|
|||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public java.util.UUID getSpawningEntity();
|
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
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user