Attribute Modifiers of Item/LivingEntity (Expression) — SkBee

Addon: SkBee · Category: Expression · Since: 3.5.9

Syntax

[default] [transient] %attributetype% [attribute] modifier[s] of %itemtypes/livingentities%

Description

Get/change the attribute modifiers of an item/living entity. `default` = This option will return the vanilla modifiers of an item (only used for GET). `transient` = Non-persisent attribute modifier, will not save to the entity's NBT (only used for ADD) (Requires PaperMC). `modifier` will return a single modifier (will default to the 1st element of modifiers of that attribute type if more than 1 exists). `modifiers` will return a list of modifiers of that attribute type. **CHANGERS:** - `add` = Will add a modifier of an attribute type to an item/living entity. - `remove` = Remove a specific modifier of an attribute type from an item/living entity. - `delete` = Will delete all modifiers of an attribute type from an item/living entity.

Examples

set {_mods::*} to attack damage modifier of player's tool
set {_mod} to first element of attack damage modifier of player's tool
set {_mod} to gravity attribute modifier of player
delete gravity attribute modifier of player
add scale modifier of player's tool to scale modifier of player

View source