@minecraft/server
    Preparing search index...

    Class ItemComponentHitEntityEventBeta

    Contains information regarding when an item is used to hit an entity.

    Index

    Properties

    attackingEntity: Entity

    The attacking entity.

    hadEffect: boolean

    Whether the hit landed or had any effect.

    hitEntity: Entity

    The entity being hit.

    itemStack?: ItemStack

    The item stack used to hit the entity.