For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/ItemComponentBeforeDurabilityDamageEvent.md.

Class: ItemComponentBeforeDurabilityDamageEvent

event damage component

Beta

包含物品因击中实体而受损前的相关信息。

Contains information regarding an item before it is damaged from hitting an entity.

Properties

attackingEntity

readonly attackingEntity: Entity

Beta

Remarks

发起攻击的实体。

The attacking entity.


durabilityDamage

durabilityDamage: number

Beta

Remarks

事件发生时对物品耐久度造成的损耗。

The damage applied to the item's durability when the event occurs.


hitEntity

readonly hitEntity: Entity

Beta

Remarks

被击中的实体。

The entity being hit.


itemStack?

optional itemStack?: ItemStack

Beta

Remarks

用于击中实体的物品堆。

The item stack used to hit the entity.

同领域相关