mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 16:42:03 -07:00
SPIGOT-6992: Add LimitedLife/LifeTicks/Bound APIs to Vex
By: Doc <nachito94@msn.com>
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
package org.bukkit.entity;
|
package org.bukkit.entity;
|
||||||
|
|
||||||
|
import org.bukkit.Location;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a Vex.
|
* Represents a Vex.
|
||||||
*/
|
*/
|
||||||
@@ -22,4 +25,52 @@ public interface Vex extends Monster {
|
|||||||
* @param charging new state
|
* @param charging new state
|
||||||
*/
|
*/
|
||||||
void setCharging(boolean charging);
|
void setCharging(boolean charging);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the bound of this entity.
|
||||||
|
*
|
||||||
|
* An idle vex will navigate a 15x11x15 area centered around its bound
|
||||||
|
* location.
|
||||||
|
*
|
||||||
|
* When summoned by an Evoker, this location will be set to that of the
|
||||||
|
* summoner.
|
||||||
|
*
|
||||||
|
* @return {@link Location} of the bound or null if not set
|
||||||
|
*/
|
||||||
|
@Nullable
|
||||||
|
Location getBound();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the bound of this entity.
|
||||||
|
*
|
||||||
|
* An idle vex will navigate a 15x11x15 area centered around its bound
|
||||||
|
* location.
|
||||||
|
*
|
||||||
|
* When summoned by an Evoker, this location will be set to that of the
|
||||||
|
* summoner.
|
||||||
|
*
|
||||||
|
* @param location {@link Location} of the bound or null to clear
|
||||||
|
*/
|
||||||
|
void setBound(@Nullable Location location);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the remaining lifespan of this entity.
|
||||||
|
*
|
||||||
|
* @return life in ticks
|
||||||
|
*/
|
||||||
|
int getLifeTicks();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the remaining lifespan of this entity.
|
||||||
|
*
|
||||||
|
* @param lifeTicks life in ticks, or negative for unlimited lifepan
|
||||||
|
*/
|
||||||
|
void setLifeTicks(int lifeTicks);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets if the entity has a limited life.
|
||||||
|
*
|
||||||
|
* @return true if the entity has limited life
|
||||||
|
*/
|
||||||
|
boolean hasLimitedLife();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user