程序包 cn.nukkit.entity
类 Attribute
java.lang.Object
cn.nukkit.entity.Attribute
- 所有已实现的接口:
Cloneable
-
字段概要
修饰符和类型字段说明static final int
static final int
protected float
protected float
static final Attribute[]
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
protected float
protected float
static final int
protected String
static final int
protected boolean
-
方法概要
修饰符和类型方法说明static Attribute
addAttribute
(int id, String name, float minValue, float maxValue, float defaultValue) static Attribute
addAttribute
(int id, String name, float minValue, float maxValue, float defaultValue, boolean shouldSend) clone()
static Attribute
getAttribute
(int id) static Attribute
getAttributeByName
(String name) float
int
getId()
float
float
getName()
float
getValue()
static void
init()
boolean
setDefaultValue
(float defaultValue) setMaxValue
(float maxValue) setMinValue
(float minValue) setValue
(float value) setValue
(float value, boolean fit) toString()
-
字段详细资料
-
EMPTY_ARRAY
-
ABSORPTION
public static final int ABSORPTION- 另请参阅:
-
SATURATION
public static final int SATURATION- 另请参阅:
-
EXHAUSTION
public static final int EXHAUSTION- 另请参阅:
-
KNOCKBACK_RESISTANCE
public static final int KNOCKBACK_RESISTANCE- 另请参阅:
-
MAX_HEALTH
public static final int MAX_HEALTH- 另请参阅:
-
MOVEMENT_SPEED
public static final int MOVEMENT_SPEED- 另请参阅:
-
FOLLOW_RANGE
public static final int FOLLOW_RANGE- 另请参阅:
-
MAX_HUNGER
public static final int MAX_HUNGER- 另请参阅:
-
FOOD
public static final int FOOD- 另请参阅:
-
ATTACK_DAMAGE
public static final int ATTACK_DAMAGE- 另请参阅:
-
EXPERIENCE_LEVEL
public static final int EXPERIENCE_LEVEL- 另请参阅:
-
EXPERIENCE
public static final int EXPERIENCE- 另请参阅:
-
LUCK
public static final int LUCK- 另请参阅:
-
attributes
-
minValue
protected float minValue -
maxValue
protected float maxValue -
defaultValue
protected float defaultValue -
currentValue
protected float currentValue -
name
-
shouldSend
protected boolean shouldSend
-
-
方法详细资料
-
init
public static void init() -
addAttribute
-
addAttribute
-
getAttribute
-
getAttributeByName
- 参数:
name
- name- 返回:
- null|Attribute
-
getMinValue
public float getMinValue() -
setMinValue
-
getMaxValue
public float getMaxValue() -
setMaxValue
-
getDefaultValue
public float getDefaultValue() -
setDefaultValue
-
getValue
public float getValue() -
setValue
-
setValue
-
getName
-
getId
public int getId() -
isSyncable
public boolean isSyncable() -
clone
-
toString
-