> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Entity Events

> Trigger actions when players interact with entities.

Capture interactions between players and other entities.

## Event Library

<CardGroup cols={2}>
  <Card title="Player Kill Entity" icon="skull" href="#player-kill-entity-event">
    Triggers when a player kills a mob.
  </Card>

  <Card title="Entity Damage" icon="user-injured" href="#entity-damage-by-player-event">
    Triggers when a player damages a mob.
  </Card>

  <Card title="Breed Entity" icon="heart" href="#entity-breed-event">
    Triggers when animals breed.
  </Card>

  <Card title="Tame Entity" icon="bone" href="#entity-tame-event">
    Triggers when an animal is tamed.
  </Card>

  <Card title="Dye Sheep" icon="paintbrush" href="#sheep-dye-wool-event">
    Triggers when a player dyes a sheep.
  </Card>

  <Card title="Barter" icon="coins" href="#piglin-barter-event">
    Triggers when trading with Piglins.
  </Card>
</CardGroup>

## Configuration

### `player_kill_entity_event`

Triggers when a player deals the killing blow to an entity.

<ResponseField name="type" type="EntityType">
  Type of entity killed (e.g. `ZOMBIE`, `PLAYER`).
</ResponseField>

### `entity_damage_by_player_event`

Triggers when a player damages an entity.

<ResponseField name="type" type="EntityType">
  Type of entity damaged.
</ResponseField>

<ResponseField name="minDamage" type="Double">
  Minimum damage amount.
</ResponseField>

### `entity_breed_event`

Triggers when two animals breed.

<ResponseField name="parentType" type="EntityType">
  Type of the parents (e.g. `COW`).
</ResponseField>

### `piglin_barter_event`

Triggers when a player throws gold at a Piglin.

<ResponseField name="input" type="Material" default="GOLD_INGOT">
  Item given to the Piglin.
</ResponseField>

## Examples

<CodeGroup>
  ```yaml Zombie Hunter theme={null}
  player_kill_entity_event:
    type: ZOMBIE
    actions:
      - experience_action:
          amount: 10
  ```

  ```yaml Sheep Colorist theme={null}
  sheep_dye_wool_event:
    actions:
      - message_action:
          message: "<rainbow>Colorful sheep!"
  ```
</CodeGroup>
