mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-02 11:22:01 +01:00
Add love mode API to Animals
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
eba047f8db
commit
71b6e8e6c6
@ -22,4 +22,30 @@ public interface Animals extends Ageable {
|
|||||||
* @param uuid new uuid, or null
|
* @param uuid new uuid, or null
|
||||||
*/
|
*/
|
||||||
void setBreedCause(UUID uuid);
|
void setBreedCause(UUID uuid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get whether or not this entity is in love mode and will produce
|
||||||
|
* offspring with another entity in love mode. Will return true if
|
||||||
|
* and only if {@link #getLoveModeTicks()} is greater than 0.
|
||||||
|
*
|
||||||
|
* @return true if in love mode, false otherwise
|
||||||
|
*/
|
||||||
|
boolean isLoveMode();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the amount of ticks remaining for this entity in love mode.
|
||||||
|
* If the entity is not in love mode, 0 will be returned.
|
||||||
|
*
|
||||||
|
* @return the remaining love mode ticks
|
||||||
|
*/
|
||||||
|
int getLoveModeTicks();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the amount of ticks for which this entity should be in love mode.
|
||||||
|
* Setting the love mode ticks to 600 is the equivalent of a player
|
||||||
|
* feeding the entity their breeding item of choice.
|
||||||
|
*
|
||||||
|
* @param ticks the love mode ticks. Must be positive
|
||||||
|
*/
|
||||||
|
void setLoveModeTicks(int ticks);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user