get %e:ENTITY_POSSESSIVE% %attr:ATTRIBUTE% default [value] — Expressions

get %e:ENTITY_POSSESSIVE% %attr:ATTRIBUTE% default [value]
Attribute1.0.0

Description

Returns the default value of an attribute on a living entity, or 0 if the entity does not have the attribute.

Examples

set defaultHp to mob's max_health default

All Possible Usages (2)

Every distinct way you can write this pattern, with optional groups and choice groups expanded. Placeholders are shown as <name>.

get <e> <attr> default
get <e> <attr> default value

Related (Attribute)