java.lang.Object
org.cloudburstmc.api.entity.Attribute
- All Implemented Interfaces:
Cloneable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intstatic intprotected floatprotected floatstatic intstatic intstatic intstatic intstatic intstatic intstatic intstatic intstatic intprotected floatprotected floatstatic intprotected Stringstatic intprotected boolean -
Method Summary
Modifier and TypeMethodDescriptionstatic AttributeaddAttribute(int id, String name, float minValue, float maxValue, float defaultValue)static AttributeaddAttribute(int id, String name, float minValue, float maxValue, float defaultValue, boolean shouldSend)clone()static AttributegetAttribute(int id)static AttributegetAttributeByName(String name)floatintgetId()floatfloatgetName()floatgetValue()static voidinit()booleansetDefaultValue(float defaultValue)setMaxValue(float maxValue)setMinValue(float minValue)setValue(float value)setValue(float value, boolean fit)
-
Field Details
-
ABSORPTION
public static final int ABSORPTION- See Also:
- Constant Field Values
-
SATURATION
public static final int SATURATION- See Also:
- Constant Field Values
-
EXHAUSTION
public static final int EXHAUSTION- See Also:
- Constant Field Values
-
KNOCKBACK_RESISTANCE
public static final int KNOCKBACK_RESISTANCE- See Also:
- Constant Field Values
-
MAX_HEALTH
public static final int MAX_HEALTH- See Also:
- Constant Field Values
-
MOVEMENT_SPEED
public static final int MOVEMENT_SPEED- See Also:
- Constant Field Values
-
FOLLOW_RANGE
public static final int FOLLOW_RANGE- See Also:
- Constant Field Values
-
MAX_HUNGER
public static final int MAX_HUNGER- See Also:
- Constant Field Values
-
FOOD
public static final int FOOD- See Also:
- Constant Field Values
-
ATTACK_DAMAGE
public static final int ATTACK_DAMAGE- See Also:
- Constant Field Values
-
EXPERIENCE_LEVEL
public static final int EXPERIENCE_LEVEL- See Also:
- Constant Field Values
-
EXPERIENCE
public static final int EXPERIENCE- See Also:
- Constant Field Values
-
LUCK
public static final int LUCK- See Also:
- Constant Field Values
-
attributes
-
minValue
protected float minValue -
maxValue
protected float maxValue -
defaultValue
protected float defaultValue -
currentValue
protected float currentValue -
name
-
shouldSend
protected boolean shouldSend
-
-
Method Details
-
init
public static void init() -
addAttribute
-
addAttribute
-
getAttribute
-
getAttributeByName
- Parameters:
name- name- Returns:
- 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
-