Skip to main content

Item component reference (11/11)

This page excerpts the reference from MS Learn (MicrosoftDocs/minecraft-creator a9fd1c0, CC BY 4.0). Relative links in the original are removed.

(Source: ms-learn, creator/Reference/Content/ItemReference/Examples/ItemComponents/minecraft_use_duration.md)

Items Documentation - minecraft:use_duration​

[!IMPORTANT] This type is now deprecated, and no longer in use in the latest versions of Minecraft.

This component determines how long the item takes to use when used in combination with components like "shooter", "throwable", or "food".

Alternate Simple Representations​

This item can also be represented as a Decimal number.

Use Duration Properties​

NameDefault ValueTypeDescription
valuenot setDecimal numberHow long the item takes to use in seconds.

Samples​

AppleEnchanted​

"minecraft:use_duration": 32

Camera​

"minecraft:use_duration": 100000

Dried Kelp​

"minecraft:use_duration": 16

Honey Bottle​

"minecraft:use_duration": 40

(Source: ms-learn, creator/Reference/Content/ItemReference/Examples/ItemComponents/minecraft_use_modifiers.md)

Items Documentation - minecraft:use_modifiers​

Determines how long an item takes to use in combination with components such as Shooter, Throwable, or Food.

[!Note] Renamed from chargeable in 1.20.50 and available without an experimental toggle.

[!Note] This item requires a format version of at least 1.20.50.

Item Use Modifiers Properties​

NameDefault ValueTypeDescriptionExample Values
emit_vibrationstrueBoolean true/falseWhether vibrations are emitted when the item starts or stops being used.
movement_modifiernot setDecimal numberMultiplier applied to the player's movement speed while the item is in use. Value must be <= 1.Apple: 0.35
start_soundnot setStringSound played when the item starts being used. Accepts the name of any sound event defined in sound_definitions.json, including the built-in vanilla sound events.
start_usingalwaysStart Using choicesWhen the player begins using the item.Apple: "always"
use_duration0Decimal numberTime, in seconds, that the item takes to use.Apple: 1.6
start_using​

When the player begins using the item. Use always to start as soon as the use action is triggered (default), or on_attack to start using only when an attack input is received while the item is selected. This item requires a format version of at least 1.26.30.

Start Using choices​
ValueTitleDescription
alwaysAlways
if_firstIf first

Samples​

Apple​

"minecraft:use_modifiers": {
"start_using": "always",
"use_duration": 1.6,
"movement_modifier": 0.35
}

(Source: ms-learn, creator/Reference/Content/ItemReference/Examples/ItemComponents/minecraft_weapon.md)

Items Documentation - minecraft:weapon​

[!IMPORTANT] This type is now deprecated, and no longer in use in the latest versions of Minecraft.

Deprecated weapon item component. This component is automatically added to vanilla weapon items like swords, axes, and bows.

[!Note] This component is deprecated. For custom weapons, use minecraft:damage to set attack damage, minecraft:cooldown for attack speed, and minecraft:durability for durability.

Weapon Properties​

NameDefault ValueTypeDescription
on_hit_blocknot setObjectAn event trigger that fires when this item is used to strike a block.
on_hurt_entitynot setObjectAn event trigger that fires when this item successfully damages another entity.
on_not_hurt_entitynot setObjectAn event trigger that fires when this item hits an entity but deals no damage (e.g., due to invincibility frames or immunity).

(Source: ms-learn, creator/Reference/Content/ItemReference/Examples/ItemComponents/minecraft_wearable.md)

Items Documentation - minecraft:wearable​

Sets the wearable item component, which allows an item to be worn by a player in a specified equipment slot.

[!Note] Valid equipment slots are: slot.armor.head, slot.armor.chest, slot.armor.legs, slot.armor.feet, slot.armor.body, and slot.weapon.offhand. When a non-hand armor slot is used, the max stack size is automatically set to 1.

[!Note] Fixed in format version 1.26.30: when a non-hand slot is selected, minecraft:wearable no longer silently overrides an explicit minecraft:max_stack_size of 1. Custom items can again declare their own stack size alongside an armor slot without producing inconsistent behavior.

[!Note] This item requires a format version of at least 1.20.30.

Item Wearable Properties​

NameDefault ValueTypeDescription
hides_player_locationfalseBoolean true/falseDetermines whether the Player's location is hidden on Locator Maps and the Locator Bar when the wearable item is worn. Default is false.
protection0Integer numberHow much protection the wearable item provides. Default is set to 0.
slotnot setSlot choicesSpecifies where the item can be worn. If any non-hand slot is chosen, the max stack size is set to 1.
dispensablenot setBoolean true/false
Slot choices​
ValueTitleDescription
slot.armor.bodySlot.armor.body
slot.armor.chestSlot.armor.chest
slot.armor.feetSlot.armor.feet
slot.armor.headSlot.armor.head
slot.armor.legsSlot.armor.legs
slot.weapon.mainhandSlot.weapon.mainhand
slot.weapon.offhandSlot.weapon.offhand

Samples​

Sources
idSourceLicenseCommitAccessed
ms-learnMinecraft Creator documentation (Microsoft Learn)CC BY 4.0 (documentation), MIT (code)a9fd1c02026-11-13