程序包 cn.nukkit.entity

类 Attribute

java.lang.Object
cn.nukkit.entity.Attribute
所有已实现的接口:
Cloneable

public class Attribute extends Object implements Cloneable
  • 字段详细资料

    • EMPTY_ARRAY

      @PowerNukkitOnly @Since("1.4.0.0-PN") public static final Attribute[] 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

      protected static Map<Integer,Attribute> attributes
    • minValue

      protected float minValue
    • maxValue

      protected float maxValue
    • defaultValue

      protected float defaultValue
    • currentValue

      protected float currentValue
    • name

      protected String name
    • shouldSend

      protected boolean shouldSend
  • 方法详细资料

    • init

      public static void init()
    • addAttribute

      public static Attribute addAttribute(int id, String name, float minValue, float maxValue, float defaultValue)
    • addAttribute

      public static Attribute addAttribute(int id, String name, float minValue, float maxValue, float defaultValue, boolean shouldSend)
    • getAttribute

      public static Attribute getAttribute(int id)
    • getAttributeByName

      public static Attribute getAttributeByName(String name)
      参数:
      name - name
      返回:
      null|Attribute
    • getMinValue

      public float getMinValue()
    • setMinValue

      public Attribute setMinValue(float minValue)
    • getMaxValue

      public float getMaxValue()
    • setMaxValue

      public Attribute setMaxValue(float maxValue)
    • getDefaultValue

      public float getDefaultValue()
    • setDefaultValue

      public Attribute setDefaultValue(float defaultValue)
    • getValue

      public float getValue()
    • setValue

      public Attribute setValue(float value)
    • setValue

      public Attribute setValue(float value, boolean fit)
    • getName

      public String getName()
    • getId

      public int getId()
    • isSyncable

      public boolean isSyncable()
    • clone

      public Attribute clone()
      覆盖:
      clone 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object