SPIGOT-4526: Add conversion time API for Zombie & subclasses
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -48,4 +48,35 @@ public interface Zombie extends Monster {
|
||||
*/
|
||||
@Deprecated
|
||||
public Villager.Profession getVillagerProfession();
|
||||
|
||||
/**
|
||||
* Get if this entity is in the process of converting to a Drowned as a
|
||||
* result of being underwater.
|
||||
*
|
||||
* @return conversion status
|
||||
*/
|
||||
boolean isConverting();
|
||||
|
||||
/**
|
||||
* Gets the amount of ticks until this entity will be converted to a Drowned
|
||||
* as a result of being underwater.
|
||||
*
|
||||
* When this reaches 0, the entity will be converted.
|
||||
*
|
||||
* @return conversion time
|
||||
* @throws IllegalStateException if {@link #isConverting()} is false.
|
||||
*/
|
||||
int getConversionTime();
|
||||
|
||||
/**
|
||||
* Sets the amount of ticks until this entity will be converted to a Drowned
|
||||
* as a result of being underwater.
|
||||
*
|
||||
* When this reaches 0, the entity will be converted. A value of less than 0
|
||||
* will stop the current conversion process without converting the current
|
||||
* entity.
|
||||
*
|
||||
* @param time new conversion time
|
||||
*/
|
||||
void setConversionTime(int time);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user