mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 20:07:41 +01:00
parent
f59a848387
commit
bcc7b10e0c
@ -1,6 +1,8 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* A Warden.
|
||||
@ -13,7 +15,17 @@ public interface Warden extends Monster {
|
||||
* Anger is an integer from 0 to 150. Once a Warden reaches 80 anger at a
|
||||
* target it will actively pursue it.
|
||||
*
|
||||
* @param entity target
|
||||
* @return anger level
|
||||
*/
|
||||
int getAnger();
|
||||
|
||||
/**
|
||||
* Gets the anger level of this warden.
|
||||
*
|
||||
* Anger is an integer from 0 to 150. Once a Warden reaches 80 anger at a
|
||||
* target it will actively pursue it.
|
||||
*
|
||||
* @param entity target entity
|
||||
* @return anger level
|
||||
*/
|
||||
int getAnger(@NotNull Entity entity);
|
||||
@ -21,7 +33,10 @@ public interface Warden extends Monster {
|
||||
/**
|
||||
* Increases the anger level of this warden.
|
||||
*
|
||||
* @param entity target
|
||||
* Anger is an integer from 0 to 150. Once a Warden reaches 80 anger at a
|
||||
* target it will actively pursue it.
|
||||
*
|
||||
* @param entity target entity
|
||||
* @param increase number to increase by
|
||||
* @see #getAnger(org.bukkit.entity.Entity)
|
||||
*/
|
||||
@ -30,9 +45,58 @@ public interface Warden extends Monster {
|
||||
/**
|
||||
* Sets the anger level of this warden.
|
||||
*
|
||||
* @param entity target
|
||||
* Anger is an integer from 0 to 150. Once a Warden reaches 80 anger at a
|
||||
* target it will actively pursue it.
|
||||
*
|
||||
* @param entity target entity
|
||||
* @param anger new anger level
|
||||
* @see #getAnger(org.bukkit.entity.Entity)
|
||||
*/
|
||||
void setAnger(@NotNull Entity entity, int anger);
|
||||
|
||||
/**
|
||||
* Clears the anger level of this warden.
|
||||
*
|
||||
* @param entity target entity
|
||||
*/
|
||||
void clearAnger(@NotNull Entity entity);
|
||||
|
||||
/**
|
||||
* Gets the {@link LivingEntity} at which this warden is most angry.
|
||||
*
|
||||
* @return The target {@link LivingEntity} or null
|
||||
*/
|
||||
@Nullable
|
||||
LivingEntity getEntityAngryAt();
|
||||
|
||||
/**
|
||||
* Make the warden sense a disturbance in the force at the location given.
|
||||
*
|
||||
* @param location location of the disturbance
|
||||
*/
|
||||
void setDisturbanceLocation(@NotNull Location location);
|
||||
|
||||
/**
|
||||
* Get the level of anger of this warden.
|
||||
*
|
||||
* @return The level of anger
|
||||
*/
|
||||
@NotNull
|
||||
AngerLevel getAngerLevel();
|
||||
|
||||
public enum AngerLevel {
|
||||
|
||||
/**
|
||||
* Anger level 0-39.
|
||||
*/
|
||||
CALM,
|
||||
/**
|
||||
* Anger level 40-79.
|
||||
*/
|
||||
AGITATED,
|
||||
/**
|
||||
* Anger level 80 or above.
|
||||
*/
|
||||
ANGRY;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user