The ItemCustomComponent interface in @minecraft/server.
Interface in @minecraft/server
import type { ItemCustomComponent } from '@minecraft/server';Properties
Section titled “Properties”onBeforeDurabilityDamage
Section titled “onBeforeDurabilityDamage”optional
onBeforeDurabilityDamage?: ( arg0: ItemComponentBeforeDurabilityDamageEvent, arg1: CustomComponentParameters,) => void;onCompleteUse
Section titled “onCompleteUse”optional
onCompleteUse?: (arg0: ItemComponentCompleteUseEvent, arg1: CustomComponentParameters) => void;onConsume
Section titled “onConsume”optional
onConsume?: (arg0: ItemComponentConsumeEvent, arg1: CustomComponentParameters) => void;onHitEntity
Section titled “onHitEntity”optional
onHitEntity?: (arg0: ItemComponentHitEntityEvent, arg1: CustomComponentParameters) => void;onMineBlock
Section titled “onMineBlock”optional
onMineBlock?: (arg0: ItemComponentMineBlockEvent, arg1: CustomComponentParameters) => void;optional
onUse?: (arg0: ItemComponentUseEvent, arg1: CustomComponentParameters) => void;onUseOn
Section titled “onUseOn”optional
onUseOn?: (arg0: ItemComponentUseOnEvent, arg1: CustomComponentParameters) => void;