> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/api/net/minecraft/network/protocol/game/clientbounddamageeventpacket.md).

# ClientboundDamageEventPacket

An entity took damage; drives the hurt effect and camera shake.

### Extends

* [`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md)

### Properties

#### entity

> `readonly` **entity**: [`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)

The entity, or null when it is not loaded.

***

#### entityId

> `readonly` **entityId**: `number`

The damaged entity.

***

#### id

> `readonly` **id**: `string`

The protocol id, e.g. "minecraft:swing". Stable across versions, unlike class names.

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`id`](/newgen/api/net/minecraft/network/protocol/packet.md#id)

***

#### name

> `readonly` **name**: `string`

The class name, e.g. "ServerboundSwingPacket".

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`name`](/newgen/api/net/minecraft/network/protocol/packet.md#name)

***

#### serverbound

> `readonly` **serverbound**: `boolean`

True for packets the client sends, false for ones it receives.

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`serverbound`](/newgen/api/net/minecraft/network/protocol/packet.md#serverbound)

***

#### sourceCause

> `readonly` **sourceCause**: [`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)

The responsible entity, or null.

***

#### sourceCauseId

> `readonly` **sourceCauseId**: `number`

The id of the entity responsible, e.g. the shooter; -1 for none.

***

#### sourceDirect

> `readonly` **sourceDirect**: [`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)

The entity that dealt the damage directly, or null.

***

#### sourceDirectId

> `readonly` **sourceDirectId**: `number`

The id of the entity that dealt the damage directly, e.g. the arrow; -1 for none.

***

#### sourcePosition

> `readonly` **sourcePosition**: [`Vec3`](/newgen/api/net/minecraft/world/phys/vec3.md)

Where the damage came from, or null.

***

#### sourceType

> `readonly` **sourceType**: `string`

The damage type id, e.g. "minecraft:player\_attack".

**See**

[Damage type ids](https://minecraft.wiki/w/Damage_type#List_of_damage_types)
