mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 16:12:18 -07:00
Added new entity.get/setTicksLived for identifying an entity's age
By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
@@ -173,4 +173,23 @@ public interface Entity {
|
|||||||
* @return unique id
|
* @return unique id
|
||||||
*/
|
*/
|
||||||
public UUID getUniqueId();
|
public UUID getUniqueId();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the amount of ticks this entity has lived for.
|
||||||
|
* <p>
|
||||||
|
* This is the equivalent to "age" in entities.
|
||||||
|
*
|
||||||
|
* @return Age of entity
|
||||||
|
*/
|
||||||
|
public int getTicksLived();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the amount of ticks this entity has lived for.
|
||||||
|
* <p>
|
||||||
|
* This is the equivalent to "age" in entities. May not be
|
||||||
|
* less than one tick.
|
||||||
|
*
|
||||||
|
* @param value Age of entity
|
||||||
|
*/
|
||||||
|
public void setTicksLived(int value);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user