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
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAn attribute sentiment describes the intent behind the attribute, meaning whether it is supposed to be a positive, neutral, or negative attribute. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AttributeThe air friction an entity receives when moving.static final AttributeArmor bonus of an Entity.static final AttributeArmor durability bonus of an Entity.static final AttributeAttack damage of an Entity.static final AttributeAttack knockback of an Entity.static final AttributeAttack speed of an Entity.static final AttributeThe minimum distance the scoreboard objective in the below_name display slot become visible for others.static final AttributeBlock break speed of a Player.static final AttributeThe block reach distance of a Player.static final AttributeThe received motion when landing on the ground.static final AttributeHow long an entity remains burning after ignition.static final AttributeThe camera distance of a player to their own entity.static final AttributeThe entity reach distance of a Player.static final AttributeResistance to knockback from explosions.static final AttributeThe fall damage multiplier of an Entity.static final AttributeFlying speed of an Entity.static final AttributeRange at which an Entity will follow others.static final AttributeThe ground friction an entity receives when moving.static final AttributeThe gravity applied to an Entity.static final AttributeStrength with which an Entity will jump.static final AttributeResistance of an Entity to knockback.static final AttributeLuck bonus of an Entity.static final AttributeMaximum absorption of an Entity.static final AttributeMaximum health of an Entity.static final AttributeMining speed for correct tools.static final AttributeMovement speed through difficult terrain.static final AttributeMovement speed of an Entity.static final AttributeThe minimum distance the display name become visible for others.static final AttributeOxygen use underwater.static final AttributeThe distance which an Entity can fall without damage.static final AttributeThe relative scale of an Entity.static final AttributeSneaking speed.static final AttributeChance of a zombie to spawn reinforcements.static final AttributeThe height which an Entity can walk over.static final AttributeUnderwater mining speed.static final AttributeSweeping damage.static final AttributeRange at which mobs will be tempted by items.static final AttributeMovement speed through water.static final AttributeAttribute controlling the range an entity receives other waypoints from.static final AttributeAttribute controlling the range an entity transmits itself as a waypoint. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the default value of this attribute.@NotNull Attribute.SentimentReturns the sentiment of this attribute.static @NotNull AttributeDeprecated, for removal: This API element is subject to removal in a future version.static @NotNull Attribute[]values()Deprecated, for removal: This API element is subject to removal in a future version.useRegistry.stream().Methods inherited from interface net.kyori.adventure.translation.Translatable
translationKeyMethods inherited from interface Translatable
getTranslationKey
-
Field Details
-
MAX_HEALTH
-
FOLLOW_RANGE
-
KNOCKBACK_RESISTANCE
-
MOVEMENT_SPEED
-
FLYING_SPEED
-
ATTACK_DAMAGE
-
ATTACK_KNOCKBACK
-
ATTACK_SPEED
-
ARMOR
-
ARMOR_TOUGHNESS
-
FALL_DAMAGE_MULTIPLIER
The fall damage multiplier of an Entity.- Since:
- 1.21.3
-
LUCK
-
MAX_ABSORPTION
-
SAFE_FALL_DISTANCE
The distance which an Entity can fall without damage.- Since:
- 1.21.3
-
SCALE
-
STEP_HEIGHT
-
GRAVITY
-
JUMP_STRENGTH
-
BURNING_TIME
How long an entity remains burning after ignition.- Since:
- 1.21.3
-
CAMERA_DISTANCE
The camera distance of a player to their own entity.- Since:
- 1.21.6
-
EXPLOSION_KNOCKBACK_RESISTANCE
Resistance to knockback from explosions.- Since:
- 1.21.3
-
MOVEMENT_EFFICIENCY
-
OXYGEN_BONUS
-
WATER_MOVEMENT_EFFICIENCY
-
TEMPT_RANGE
-
BLOCK_INTERACTION_RANGE
-
ENTITY_INTERACTION_RANGE
The entity reach distance of a Player.- Since:
- 1.21.3
-
BLOCK_BREAK_SPEED
-
MINING_EFFICIENCY
-
SNEAKING_SPEED
-
SUBMERGED_MINING_SPEED
-
SWEEPING_DAMAGE_RATIO
-
SPAWN_REINFORCEMENTS
Chance of a zombie to spawn reinforcements.- Since:
- 1.21.3
-
WAYPOINT_TRANSMIT_RANGE
Attribute controlling the range an entity transmits itself as a waypoint.- Since:
- 1.21.6
-
WAYPOINT_RECEIVE_RANGE
Attribute controlling the range an entity receives other waypoints from.- Since:
- 1.21.6
-
AIR_DRAG_MODIFIER
The air friction an entity receives when moving.- Since:
- 26.2
-
FRICTION_MODIFIER
The ground friction an entity receives when moving.- Since:
- 26.2
-
BOUNCINESS
-
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
The minimum distance the display name become visible for others.- Since:
- 26.2
-
-
Method Details
-
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, useRegistry.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.useRegistry.stream().- Returns:
- an array of all known attributes.
-
Registry.get(NamespacedKey)instead.