> For the complete documentation index, see [llms.txt](https://guide.elitefantasy.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.elitefantasy.net/components-guide/introduction/components.md).

# Components

## Why can't I use the command?

If the command is too long I recommend you to use command blocks, for better guidance use [this](https://mcstacker.net/?cmd=give)

## attribute\_modifiers

These allow you to modify different properties of the items, and also some are exclusive for entities.

| Atrribute                                                                                                                                                                  | Default Value | Minimum \~ Maximum | Description                                                                                                                                                                                                                                                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `armor`                                                                                                                                                                    | 0             | 0\~30              | Armor defense points.                                                                                                                                                                                                                                                                                                                                                                                 |
| `armor_toughness`                                                                                                                                                          | 0             | 0\~20              | [Armor toughness](https://minecraft.wiki/w/Armor_toughness).                                                                                                                                                                                                                                                                                                                                          |
| `attack_damage`                                                                                                                                                            | 2             | 0\~2048            | Damage dealt by attacks, in half-hearts.                                                                                                                                                                                                                                                                                                                                                              |
| `attack_knockback`                                                                                                                                                         | 0             | 0\~5               | Knockback applied to attacks. Applies only to mobs with physical attacks.                                                                                                                                                                                                                                                                                                                             |
| <p><code>generic.attack\_reach</code></p><p><br>\[<em>upcoming</em> <a href="https://minecraft.wiki/w/Java_Edition_Combat_Tests"><em>JE Edition Combat Tests</em></a>]</p> | 2.5           | 0\~6               | Determines the reach at which players can attack entities. Does not affect interaction range.                                                                                                                                                                                                                                                                                                         |
| `attack_speed`                                                                                                                                                             | 4             | 0\~1024            | Determines recharging rate of attack strength. Value is the number of full-strength attacks per second.                                                                                                                                                                                                                                                                                               |
| `flying_speed`                                                                                                                                                             | 0.4           | 0\~1024            | Flight speed modifier in some unknown metric.                                                                                                                                                                                                                                                                                                                                                         |
| `knockback_resistance`                                                                                                                                                     | 0             | 0\~1               | The scale of horizontal knockback resisted from attacks and projectiles. Vertical knockback is not affected. Does not affect explosions. The resistance functions as a percentage from 0.0 (0% resistance) to 1.0 (100% resistance) (e.g. 0.4 is 40% resistance, meaning the attributed mob takes 60% of usual knockback). Iron golems and wardens suffer zero knockback from attacks or projectiles. |
| `block_interaction_range`                                                                                                                                                  | 4.5           | 0\~64              | The block interaction range for players in blocks.                                                                                                                                                                                                                                                                                                                                                    |
| `block_break_speed`                                                                                                                                                        | 1             | 0\~1024            | The speed the player can break blocks as a multiplier.                                                                                                                                                                                                                                                                                                                                                |
| `mining_efficiency`                                                                                                                                                        | 0             | 0\~1024            | A factor to speed up the mining of blocks when using the right tool.                                                                                                                                                                                                                                                                                                                                  |
| `sneaking_speed`                                                                                                                                                           | 0.3           | 0\~1               | The movement speed factor when sneaking or crawling. A factor of 1 means sneaking or crawling is as fast as walking, a factor of 0 means unable to move while sneaking or crawling.                                                                                                                                                                                                                   |
| `submerged_mining_speed`                                                                                                                                                   | 0.2           | 0\~20              | The mining speed factor when underwater. A factor of 1 means mining as fast as on land, a factor of 0 means unable to mine while submerged. This represents only the submersion factor itself; other factors (such as not touching the ground) also apply                                                                                                                                             |
| `sweeping_damage_ratio`                                                                                                                                                    | 0             | 0\~1               | Determines how much of the base attack damage gets transferred to secondary targets in a sweep attack. This is in addition to the base attack of the sweep damage itself. A value of 1 means that all of the base attack damage is transferred (sweep damage is attack\_damage + 1)                                                                                                                   |
| `oxygen_bonus`                                                                                                                                                             | 0             | 0\~1024            | Determines the chance that an entity's `Air` data tag decreases in any given game tick, while the entity is underwater. The chance is given by `1 / (oxygen_bonus +1)`.                                                                                                                                                                                                                               |
| `movement_efficiency`                                                                                                                                                      | 0             | 0\~1024            | A factor to improve walking on terrain that slows down movement. A value of 1 removes the slowing down.                                                                                                                                                                                                                                                                                               |
| `explosion_knockback_resistance`                                                                                                                                           | 0             | 0\~1               | Defines what percentage of knockback an entity resists. A value of 1 eliminates the knockback.                                                                                                                                                                                                                                                                                                        |
| `burning_time`                                                                                                                                                             | 1             | 0\~1024            | Amount of time how long an entity remains on fire after being ignited as a multiplier. A value of 0 eliminates the burn time. Has no impact on the burning time increase when staying in fire.                                                                                                                                                                                                        |

### `Component Values`

<table><thead><tr><th>Parameters</th><th width="249">Description</th><th>Extras values</th></tr></thead><tbody><tr><td>type</td><td>The name of the attribute this modifier is to act upon</td><td><a href="#attribute_modifiers">attribute_modifiers</a></td></tr><tr><td>slot</td><td>Slot or slot type the item must be in for the modifier to take effect</td><td>Can be <code>any</code>, <code>hand</code>, <code>armor</code>, <code>mainhand</code>, <code>offhand</code>, <code>head</code>, <code>chest</code>, <code>legs</code>, <code>feet</code> or <code>body</code>. Defaults to <code>any</code></td></tr><tr><td>id</td><td>The unique resource location to identify this modifier.</td><td></td></tr><tr><td>amount</td><td>Amount of change from the modifier.</td><td></td></tr><tr><td>operation</td><td><a href="#operations-value">Operations Value</a></td><td></td></tr></tbody></table>

### `Operations Value`

| Operation                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `add_value` (+- `amount`)                                | <p>Adds all of the modifiers' amounts to the base attribute.</p><p></p><p><code>Total</code> = <code>Base</code> + <code>Amount1</code> + <code>Amount2</code> + <code>…</code> + <code>Amount</code>n</p><p></p><p>For example, applying two <code>add\_value</code> modifiers with amounts of <code>2</code> and <code>4</code>, to attribute base of <code>3</code>:</p><p></p><p><code>Total</code> = <code>3</code> + <code>2</code> + <code>4</code> = <code>9</code></p>                                                                                                                                                                                              |
| `add_multiplied_base` (+- `amount`, `additive`)          | <p>Multiplies the base attribute by (1 + sum of modifiers' amounts).</p><p></p><p><code>Total</code> = <code>Base</code> × ( <code>1</code> + <code>Amount1</code> + <code>Amount2</code> + <code>…</code> + <code>Amount</code>n)</p><p></p><p>For example, applying two <code>add\_multiplied\_base</code> modifiers with amounts of <code>2</code> and <code>4</code>, to attribute base of <code>3</code>:</p><p></p><p>Total = <code>3</code> × ( <code>1</code> + <code>2</code> + <code>4</code> ) = <code>3</code> × <code>7</code> = <code>21</code></p>                                                                                                            |
| `add_multiplied_total` ( + - `amount`, `multiplicative`) | <p>Multiplies the base attribute by ( <code>1</code> + <code>modifiers' amounts</code>) for every modifier.</p><p></p><p><code>Total</code> = <code>Base</code> × ( <code>1</code> + <code>Amount1</code> ) × ( <code>1</code> + <code>Amount2</code> ) × <code>…</code> × ( <code>1</code> + <code>Amount</code>n )</p><p>For example, applying two add\_multiplied\_total modifiers with amounts of <code>2</code> and <code>4</code>, to attribute base of <code>3</code>:</p><p><code>Total</code> = <code>3</code> × ( <code>1</code> + <code>2</code> ) × ( <code>1</code> + <code>4</code> ) = <code>3</code> × <code>3</code> × <code>5</code> = <code>45</code></p> |

### Give Command Example

`/give @p paper[attribute_modifiers=[{id:"armor",type:"armor",amount:1,operation:"add_value",slot:"chest"},{id:"armor_toughness",type:"armor_toughness",amount:1,operation:"add_value",slot:"chest"}]] 1`

## can\_break

When present, the player holding the item will be able to break the specified blocks in adventure mode.

### `Component Values`

<table><thead><tr><th>Predicates Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>blocks</td><td>Can be a block ID or a block tag with a <code>#</code>, or a list of block IDs.</td></tr><tr><td>nbt</td><td><a href="https://minecraft.wiki/w/Block_entity">Block entity</a> NBT to match. See <a href="https://minecraft.wiki/w/Block_entity_format">Block entity format</a>.</td></tr><tr><td>state</td><td>The block state properties to match<br><br>A key-value pair, where the key is a block state key and the value is a block state value to match, for example <code>facing: "east"</code>.</td></tr><tr><td>show_in_tooltip</td><td>Show or hide the "Can break" line on this item's tooltip. Defaults to <code>true</code></td></tr></tbody></table>

### Give Command Example

`/give @p paper[can_break={predicates:[{blocks:'black_concrete','coal_ore'},{blocks:'gravel'}],show_in_tooltip:true}]`&#x20;

## can\_place\_on

<table><thead><tr><th>Predicates Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>blocks</td><td>Can be a block ID or a block tag with a <code>#</code>, or a list of block IDs.</td></tr><tr><td>nbt</td><td><a href="https://minecraft.wiki/w/Block_entity">Block entity</a> NBT to match. See <a href="https://minecraft.wiki/w/Block_entity_format">Block entity format</a>.</td></tr><tr><td>state</td><td>The block state properties to match<br><br>A key-value pair, where the key is a block state key and the value is a block state value to match, for example <code>facing: "east"</code>.</td></tr><tr><td>show_in_tooltip</td><td>Show or hide the "Can break" line on this item's tooltip. Defaults to <code>true</code></td></tr></tbody></table>

### Give Command Example

`/give @p paper[can_place_on={predicates:[{blocks:'black_concrete','coal_ore'},{blocks:'bell'}],show_in_tooltip:true}] 1`

## consumable

If present, the item can be consumed. Its options can also be modified.

<table><thead><tr><th>Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>consume_seconds</td><td>The amount of seconds it takes for a player to consume the item. Defaults to <code>1.6</code>.</td></tr><tr><td>animation</td><td>The animation used during consumption of the item. Must be one of <code>none</code>, <code>eat</code>, <code>drink</code>, <code>block</code>, <code>bow</code>, <code>spear</code>, <code>crossbow</code>, <code>spyglass</code>, <code>toot_horn</code> or <code>brush</code>. Defaults to <code>eat</code></td></tr><tr><td>sound</td><td>One sound event (an [String] ID, or a new [NBT Compound / JSON Object] sound event definition) used during and on completion of the item's consumption. Defaults to <code>entity.generic.eat</code></td></tr><tr><td>has_consume_particles</td><td>Whether consumption particles are emitted while consuming this item. Defaults to <code>true</code>.</td></tr><tr><td>on_consume_effects</td><td>A list of effects which take place as a result of consuming this item. Optional.</td></tr><tr><td>teleport_randomly</td><td>Value in Floats to teleport the player like a Chorus Fruit</td></tr></tbody></table>

### on\_consume\_effects

| Type Parameters                                                                 | Description                                                                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`                                                                          | <p>The kind of consume effect. Must be one of <code>apply\_effects</code>, <code>remove\_effects</code>, <code>clear\_all\_effects</code>, <code>teleport\_randomly</code> or <code>play\_sound</code></p><p><br>If type is <code>apply\_effects</code>Applies effects on the consumer.</p> |
| `probability`                                                                   | The chance for the above effects to be applied once consumed. Must be a positive float between 0.0 and 1.0. Defaults to 1.0.                                                                                                                                                                |
| <p>(If type is <code>teleport\_randomly)</code></p><p><code>diameter</code></p> | The diameter that the consumer is teleported within. Defaults to 16.0.                                                                                                                                                                                                                      |
|                                                                                 |                                                                                                                                                                                                                                                                                             |

<table><thead><tr><th>Effects Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>id</td><td>The ID of the effect.</td></tr><tr><td>amplifier</td><td>The amplifier of the effect, with level I having value 0. Optional, defaults to 0</td></tr><tr><td>duration</td><td>The duration of the effect in ticks. Value -1 is treated as infinity. Values 0 or less than -2 are treated as 1. Optional, defaults to 1 tick.</td></tr><tr><td>ambient</td><td>Whether or not this is an effect provided by a beacon and therefore should be less intrusive on the screen. Optional, defaults to <code>false</code>.</td></tr><tr><td>show_particles</td><td>Whether or not this effect produces particles. Optional, defaults to <code>true</code></td></tr><tr><td>show_icon</td><td>Whether or not an icon should be shown for this effect. Optional, defaults to <code>true</code></td></tr></tbody></table>

### Give Command Example

`/give @p paper[consumable={consume_seconds:1.6,animation:"brush",sound:"entity.egg.throw",has_consume_particles:true}] 1`

### Give Command Example with Effects

`/give @p paper[consumable={consume_seconds:1.6,animation:"brush",sound:"entity.egg.throw",has_consume_particles:true,on_consume_effects:[{type:"minecraft:remove_effects",effects:["minecraft:instant_damage"]},{type:"minecraft:apply_effects",effects:[{id:"minecraft:luck",amplifier:1,duration:20,show_particles:1b,show_icon:1b,ambient:1b}],probability:0.5},{type:"minecraft:teleport_randomly",diameter:0},{type:"minecraft:play_sound",sound:"block.azalea.break"}]}] 1`

## custom\_data

Contains key-value pairs of any custom data not used by the game, either as an object or a SNBT string.

| Parameters | Descriptio                                                                           |
| ---------- | ------------------------------------------------------------------------------------ |
| *\<key>*   | A key-value pair, where the value can have any data type, including another compound |

### Give Command Example

`/give @p paper[custom_data={elitefantasy:idontknow}] 1`

## custom\_model\_data

Specifies the custom model data, which can be read by a resource pack's model by [items model definition.](/resourcepack-guide/beginning/models/understanding-the-item-model-system.md)

<table><thead><tr><th>Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>floats</td><td>A list of f<code>loats</code> for the <code>range_dispatch</code> model type. Missing values return the <code>fallback</code> model.</td></tr><tr><td>flags</td><td>A list of <code>booleans</code> for the <code>condition</code> model type. Missing value returns the <code>is_false</code> model.</td></tr><tr><td>strings</td><td>A list of <code>strings</code> for the <code>select</code> model type. Missing value returns the <code>fallback</code> model.</td></tr><tr><td>colors</td><td>A list of RGB values or number providers for the <code>model</code> model type's <code>tints</code>. Missing value returns the <code>default</code> value provided by the item model definition. Can either be a list of lists, or an int array. When provided as a list, it will automatically convert to an int array.</td></tr></tbody></table>

{% hint style="success" %}
To convert RGB values to int use [this](https://argb-int-calculator.netlify.app/)
{% endhint %}

### Give Command Example

`/give @p paper[custom_model_data={floats:[100],flags:[condition123],strings:["hi1234"],colors:[I;8270847]}] 1`

## custom\_name

Text component to use as this item's name. See [Text component format](https://minecraft.wiki/w/Text_component_format).

Used to specify the item's custom name, like you can in an anvil. This component:

{% hint style="warning" %}
has a higher priority over the `item_name` component

can be renamed or removed using an anvil

if unspecified otherwise, the item's name will default to being italic.
{% endhint %}

### Give Command Example

`/give @p paper[custom_name='{"bold":true,"color":"dark_gray","font":"minecraft:default","italic":false,"obfuscated":false,"strikethrough":false,"text":"HIIIIIIIIIIIIII","underlined":false}'] 1`

## damage

Specifies the amount of durability lost (not remaining) from the item

The number of uses *consumed* (not remaining) of the item's durability. Must be a non-negative integer, defaults to 0.

### Give Command Example

`/give @p diamond_axe[damage=500]`

## damage\_resistant

Items with this component, when thrown on the ground, will be resistant to the damage types included in the component's damage tag.

This component also affects whether the equipped item will be damaged when the wearer is hurt by the given damage type.

{% hint style="info" %}
If specified, this item is invulnerable to the specified damage types when in [entity form](https://minecraft.wiki/w/Item_\(entity\)) or equipped.\
\
`types`  A [damage type tag](https://minecraft.wiki/w/Tag#Damage_type_tags) prefixed with `#`.
{% endhint %}

### Give Command Example

`/give @p paper[damage_resistant={types:"#minecraft:is_explosion"}] 1`

## death\_protection

If present, this item acts like a totem of undying, by reviving the holder of this item.

{% hint style="info" %}
`death_effects`: A list of consume effects that are applied when the item protects the holder. Optional.
{% endhint %}

### Give Command Example

`/give @p paper[death_protection={death_effects:[{type:"minecraft:clear_all_effects"},{type:"minecraft:teleport_randomly",diameter:0},{type:"minecraft:play_sound",sound:"block.azalea.break"}]}] 1`

## equippable

If present, this item can be equipped in the specified slot

<table><thead><tr><th>Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>slot <code>(1.21.5)</code></td><td>The slot to put the item on. Can be one of <code>head</code>, <code>chest</code>, <code>legs</code>, <code>feet</code>, <code>body</code>, <code>mainhand</code>, <code>offhand</code> or <code>saddle</code></td></tr><tr><td>equip_sound</td><td>One sound event or a new [NBT Compound / JSON Object] sound event definition) to play when the item is equipped. Defaults to <code>item.armor.equip_generic</code></td></tr><tr><td>asset_id</td><td>The resource location of the equipment model to use when equipped. The directory this refers to is <code>assets/&#x3C;namespace>/equipment/&#x3C;id>.json</code>. If not specified, falls back to rendering as the item itself when in the head slot (if not applicable, the item does not render).</td></tr><tr><td>allowed_entities</td><td>Entity ID, Entity Tag, or list of Entity IDs to limit which entities can equip this item. Defaults to all entities</td></tr><tr><td>dispensable</td><td>Whether the item can be dispensed by using a dispenser.  Defaults to <code>true</code></td></tr><tr><td>swappable</td><td>Whether the item can be equipped into the relevant slot by right-clicking. Defaults to <code>true</code></td></tr><tr><td>damage_on_hurt</td><td>Whether this item is damaged when the wearing entity is damaged. Defaults to <code>true</code></td></tr><tr><td>equip_on_interact​ <code>(1.21.5)</code></td><td>Whether this item can be equipped onto a target mob by pressing use on it (as long as this item can be equipped on the target at all). Defaults to <code>true</code></td></tr><tr><td>camera_overlay</td><td>The resource location of the overlay texture to use when equipped. The directory this refers to is <code>assets/&#x3C;namespace>/textures/&#x3C;id></code></td></tr></tbody></table>

### Give Command Example

`/give @p paper[equippable={slot:"chest",equip_sound:"block.anvil.break",asset_id:"minecraft:elitefantasy_cactus",allowed_entities:"minecraft:zombie",dispensable:true,swappable:true,damage_on_hurt:true}] 1`

## item\_model

Defines the item model of this item.

The resource location of the item, which references the item model definition `/assets/<namespace>/items/<id>` without the .json suffix.

### Give Command Example

`/give @p paper[item_model="minecraft:paper"] 1`&#x20;

## blocks\_attacks (+1.21.5)

Makes the item like a shield, blocking attacks when used

<table><thead><tr><th>Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>block_delay_seconds</td><td>The amount of time (in seconds) that use must be held before successfully blocking attacks. Defaults to <code>0</code>.</td></tr><tr><td>disable_cooldown_scale</td><td>The multiplier applied to the number of seconds that the item will be on cooldown for when attacked by a disabling attack (The multiplier for [Float] disable_blocking_for_seconds on the <code>minecraft:weapon</code> component). If set to <code>0</code>, this item can never be disabled by attacks. Defaults to <code>1</code>.</td></tr><tr><td>block_sound</td><td>One sound event, or a new [NBT Compound / JSON Object] sound event definition) to play when an attack is successfully blocked. Defaults to none.</td></tr><tr><td>disabled_sound</td><td>One sound event, or a new [NBT Compound / JSON Object] sound event definition) to play when the item goes on its disabled cooldown due to an attack. Defaults to none.</td></tr><tr><td>bypassed_by</td><td>a damage type tag with <code>#</code> of damage types that bypass the blocking. Defaults to none.</td></tr></tbody></table>

### damage\_reductions options

Controls how much damage should be blocked in a given attack.

<table><thead><tr><th>Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>type</td><td>Any number of <a href="https://minecraft.wiki/w/Damage_type">damage type</a>(s) (an [String] ID, or a [String] tag with <code>#</code>, or an [NBT List / JSON Array] array containing [String] IDs) to block. Defaults to all damage types.</td></tr><tr><td>base</td><td>The constant amount of damage to be blocked.</td></tr><tr><td>factor</td><td>The fraction of the dealt damage to be blocked.</td></tr><tr><td>horizontal_blocking_angle</td><td>strictly positive float — The maximum angle between the users facing direction and the direction of the incoming attack to be blocked. Defaults to <code>90</code></td></tr></tbody></table>

### item\_damage options

<table><thead><tr><th>Parameters</th><th width="249">Description</th></tr></thead><tbody><tr><td>threshold</td><td>The minimum amount of damage dealt by the attack before item damage is applied to the item.</td></tr><tr><td>base</td><td>The constant amount of damage applied to the item, if threshold is passed.</td></tr><tr><td>factor</td><td>The fraction of the dealt damage that should be applied to the item, if threshold is passed.</td></tr><tr><td>horizontal_blocking_angle</td><td>strictly positive float — The maximum angle between the users facing direction and the direction of the incoming attack to be blocked. Defaults to <code>90</code></td></tr></tbody></table>

### Give Command Example

`/give @p paper[blocks_attacks={block_delay_seconds:1,disable_cooldown_scale:1,bypassed_by:"#is_explosion",damage_reductions:[{base:5,factor:5,horizontal_blocking_angle:180}],item_damage:{threshold:1,base:1,factor:1},block_sound:"block.calcite.hit",disable_sound:"block.amethyst_cluster.break"}] 1`
