Interface Attribute

All Superinterfaces:
Comparable<Attribute>, net.kyori.adventure.key.Keyed, Keyed, OldEnum<Attribute>, net.kyori.adventure.translation.Translatable, Translatable

public interface Attribute extends OldEnum<Attribute>, Keyed, Translatable, net.kyori.adventure.translation.Translatable
Types of attributes which may be present on an Attributable.
Since:
1.9.4
  • Field Details

    • MAX_HEALTH

      static final Attribute MAX_HEALTH
      Maximum health of an Entity.
      Since:
      1.21.3
    • FOLLOW_RANGE

      static final Attribute FOLLOW_RANGE
      Range at which an Entity will follow others.
      Since:
      1.21.3
    • KNOCKBACK_RESISTANCE

      static final Attribute KNOCKBACK_RESISTANCE
      Resistance of an Entity to knockback.
      Since:
      1.21.3
    • MOVEMENT_SPEED

      static final Attribute MOVEMENT_SPEED
      Movement speed of an Entity.
      Since:
      1.21.3
    • FLYING_SPEED

      static final Attribute FLYING_SPEED
      Flying speed of an Entity.
      Since:
      1.21.3
    • ATTACK_DAMAGE

      static final Attribute ATTACK_DAMAGE
      Attack damage of an Entity.
      Since:
      1.21.3
    • ATTACK_KNOCKBACK

      static final Attribute ATTACK_KNOCKBACK
      Attack knockback of an Entity.
      Since:
      1.21.3
    • ATTACK_SPEED

      static final Attribute ATTACK_SPEED
      Attack speed of an Entity.
      Since:
      1.21.3
    • ARMOR

      static final Attribute ARMOR
      Armor bonus of an Entity.
      Since:
      1.21.3
    • ARMOR_TOUGHNESS

      static final Attribute ARMOR_TOUGHNESS
      Armor durability bonus of an Entity.
      Since:
      1.21.3
    • FALL_DAMAGE_MULTIPLIER

      static final Attribute FALL_DAMAGE_MULTIPLIER
      The fall damage multiplier of an Entity.
      Since:
      1.21.3
    • LUCK

      static final Attribute LUCK
      Luck bonus of an Entity.
      Since:
      1.21.3
    • MAX_ABSORPTION

      static final Attribute MAX_ABSORPTION
      Maximum absorption of an Entity.
      Since:
      1.21.3
    • SAFE_FALL_DISTANCE

      static final Attribute SAFE_FALL_DISTANCE
      The distance which an Entity can fall without damage.
      Since:
      1.21.3
    • SCALE

      static final Attribute SCALE
      The relative scale of an Entity.
      Since:
      1.21.3
    • STEP_HEIGHT

      static final Attribute STEP_HEIGHT
      The height which an Entity can walk over.
      Since:
      1.21.3
    • GRAVITY

      static final Attribute GRAVITY
      The gravity applied to an Entity.
      Since:
      1.21.3
    • JUMP_STRENGTH

      static final Attribute JUMP_STRENGTH
      Strength with which an Entity will jump.
      Since:
      1.21.3
    • BURNING_TIME

      static final Attribute BURNING_TIME
      How long an entity remains burning after ignition.
      Since:
      1.21.3
    • CAMERA_DISTANCE

      static final Attribute CAMERA_DISTANCE
      The camera distance of a player to their own entity.
      Since:
      1.21.6
    • EXPLOSION_KNOCKBACK_RESISTANCE

      static final Attribute EXPLOSION_KNOCKBACK_RESISTANCE
      Resistance to knockback from explosions.
      Since:
      1.21.3
    • MOVEMENT_EFFICIENCY

      static final Attribute MOVEMENT_EFFICIENCY
      Movement speed through difficult terrain.
      Since:
      1.21.3
    • OXYGEN_BONUS

      static final Attribute OXYGEN_BONUS
      Oxygen use underwater.
      Since:
      1.21.3
    • WATER_MOVEMENT_EFFICIENCY

      static final Attribute WATER_MOVEMENT_EFFICIENCY
      Movement speed through water.
      Since:
      1.21.3
    • TEMPT_RANGE

      static final Attribute TEMPT_RANGE
      Range at which mobs will be tempted by items.
      Since:
      1.21.3
    • BLOCK_INTERACTION_RANGE

      static final Attribute BLOCK_INTERACTION_RANGE
      The block reach distance of a Player.
      Since:
      1.21.3
    • ENTITY_INTERACTION_RANGE

      static final Attribute ENTITY_INTERACTION_RANGE
      The entity reach distance of a Player.
      Since:
      1.21.3
    • BLOCK_BREAK_SPEED

      static final Attribute BLOCK_BREAK_SPEED
      Block break speed of a Player.
      Since:
      1.21.3
    • MINING_EFFICIENCY

      static final Attribute MINING_EFFICIENCY
      Mining speed for correct tools.
      Since:
      1.21.3
    • SNEAKING_SPEED

      static final Attribute SNEAKING_SPEED
      Sneaking speed.
      Since:
      1.21.3
    • SUBMERGED_MINING_SPEED

      static final Attribute SUBMERGED_MINING_SPEED
      Underwater mining speed.
      Since:
      1.21.3
    • SWEEPING_DAMAGE_RATIO

      static final Attribute SWEEPING_DAMAGE_RATIO
      Sweeping damage.
      Since:
      1.21.3
    • SPAWN_REINFORCEMENTS

      static final Attribute SPAWN_REINFORCEMENTS
      Chance of a zombie to spawn reinforcements.
      Since:
      1.21.3
    • WAYPOINT_TRANSMIT_RANGE

      static final Attribute WAYPOINT_TRANSMIT_RANGE
      Attribute controlling the range an entity transmits itself as a waypoint.
      Since:
      1.21.6
    • WAYPOINT_RECEIVE_RANGE

      static final Attribute WAYPOINT_RECEIVE_RANGE
      Attribute controlling the range an entity receives other waypoints from.
      Since:
      1.21.6
    • AIR_DRAG_MODIFIER

      static final Attribute AIR_DRAG_MODIFIER
      The air friction an entity receives when moving.
      Since:
      26.2
    • FRICTION_MODIFIER

      static final Attribute FRICTION_MODIFIER
      The ground friction an entity receives when moving.
      Since:
      26.2
    • BOUNCINESS

      static final Attribute BOUNCINESS
      The received motion when landing on the ground.
      Since:
      26.2
    • BELOW_NAME_DISTANCE

      static final Attribute BELOW_NAME_DISTANCE
      The minimum distance the scoreboard objective in the below_name display slot become visible for others.
      Since:
      26.2
    • NAME_TAG_DISTANCE

      static final Attribute NAME_TAG_DISTANCE
      The minimum distance the display name become visible for others.
      Since:
      26.2
  • Method Details

    • getSentiment

      @NotNull @NotNull Attribute.Sentiment getSentiment()
      Returns the sentiment of this attribute.
      Returns:
      the sentiment of this attribute
      Since:
      1.21.8
    • getDefaultValue

      double getDefaultValue()
      Returns the default value of this attribute.

      Default attribute values may differ between entity types, use EntityType.getDefaultAttributes() to get default attribute values for a specific entity type.

      Returns:
      the default value of this attribute
      Since:
      26.1.2
    • valueOf

      @NotNull @Deprecated(since="1.21.3", forRemoval=true) @ScheduledForRemoval(inVersion="1.22") static @NotNull Attribute valueOf(@NotNull @NotNull String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      only for backwards compatibility, use Registry.get(NamespacedKey) instead.
      Parameters:
      name - of the attribute.
      Returns:
      the attribute with the given name.
    • values

      @NotNull @Deprecated(since="1.21.3", forRemoval=true) @ScheduledForRemoval(inVersion="1.22") static @NotNull Attribute[] values()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      an array of all known attributes.