Interface ItemCustomComponent

Contains a set of events that will be raised for an item. This object must be bound using the ItemComponentRegistry.

Hierarchy

  • ItemCustomComponent

Properties

onBeforeDurabilityDamage?: ((arg) => void)

Type declaration

    • (arg): void
    • Returns void

      Remarks

      This function will be called when an item containing this component is hitting an entity and about to take durability damage.

onCompleteUse?: ((arg) => void)

Type declaration

    • (arg): void
    • Returns void

      Remarks

      This function will be called when an item containing this component's use duration was completed.

onConsume?: ((arg) => void)

Type declaration

    • (arg): void
    • Parameters

      Returns void

      Remarks

      This function will be called when an item containing this component is eaten by an entity.

onHitEntity?: ((arg) => void)

Type declaration

    • (arg): void
    • Returns void

      Remarks

      This function will be called when an item containing this component is used to hit another entity.

onMineBlock?: ((arg) => void)

Type declaration

    • (arg): void
    • Returns void

      Remarks

      This function will be called when an item containing this component is used to mine a block.

onUse?: ((arg) => void)

Type declaration

    • (arg): void
    • Parameters

      Returns void

      Remarks

      This function will be called when an item containing this component is used by a player.

onUseOn?: ((arg) => void)

Type declaration

    • (arg): void
    • Parameters

      Returns void

      Remarks

      This function will be called when an item containing this component is used on a block.