SPIGOT-4705: Revamp Ageable interface and add Breedable interface

By: Shane Bee <shanebolenback@me.com>
This commit is contained in:
Bukkit/Spigot
2020-08-13 11:18:50 +10:00
parent 319278404d
commit 43a2f06e98
7 changed files with 70 additions and 12 deletions

View File

@@ -1,18 +1,18 @@
package org.bukkit.entity;
/**
* Represents an entity that can age and breed.
* Represents an entity that can age.
*/
public interface Ageable extends Creature {
/**
* Gets the age of this animal.
* Gets the age of this mob.
*
* @return Age
*/
public int getAge();
/**
* Sets the age of this animal.
* Sets the age of this mob.
*
* @param age New age
*/
@@ -23,30 +23,34 @@ public interface Ageable extends Creature {
* maturing or getting ready for mating.
*
* @param lock new lock
* @deprecated see {@link Breedable#setAgeLock(boolean)}
*/
@Deprecated
public void setAgeLock(boolean lock);
/**
* Gets the current agelock.
*
* @return the current agelock
* @deprecated see {@link Breedable#getAgeLock()}
*/
@Deprecated
public boolean getAgeLock();
/**
* Sets the age of the animal to a baby
* Sets the age of the mob to a baby
*/
public void setBaby();
/**
* Sets the age of the animal to an adult
* Sets the age of the mob to an adult
*/
public void setAdult();
/**
* Returns true if the animal is an adult.
* Returns true if the mob is an adult.
*
* @return return true if the animal is an adult
* @return return true if the mob is an adult
*/
public boolean isAdult();
@@ -54,7 +58,9 @@ public interface Ageable extends Creature {
* Return the ability to breed of the animal.
*
* @return the ability to breed of the animal
* @deprecated see {@link Breedable#canBreed()}
*/
@Deprecated
public boolean canBreed();
/**
@@ -62,6 +68,8 @@ public interface Ageable extends Creature {
* breed it will instantly grow up.
*
* @param breed breedability of the animal
* @deprecated see {@link Breedable#setBreed(boolean)}
*/
@Deprecated
public void setBreed(boolean breed);
}