Class ItemEnchantsComponentBeta

When present on an item, this item has applied enchantment effects. Note that this component only applies to data-driven items.

Hierarchy

Constructors

Properties

enchantments: EnchantmentList

Remarks

Returns a collection of the enchantments applied to this item stack.

This property can't be edited in read-only mode.

typeId: string
componentId: "minecraft:enchantments" = 'minecraft:enchantments'

Remarks

Identifier of this component.

Methods

  • Returns void

    Remarks

    Removes all enchantments applied to this item stack.

    This function can't be called in read-only mode.

    Throws

    This function can throw errors.