mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Add a "should burn in sunlight" API for Phantoms and Skeletons
This commit is contained in:
parent
07e76ccd5b
commit
613ffeaeed
2 changed files with 34 additions and 0 deletions
|
@ -32,4 +32,24 @@ public interface AbstractSkeleton extends Monster, com.destroystokyo.paper.entit
|
|||
@Deprecated(since = "1.17")
|
||||
@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
|
||||
}
|
||||
|
|
|
@ -26,5 +26,19 @@ public interface Phantom extends Flying, Enemy {
|
|||
*/
|
||||
@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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue