Damage
endstone.damage
¶
Classes relating to damage types and sources applicable to mobs (living entities).
Classes:
| Name | Description |
|---|---|
DamageSource |
Represents a source of damage. |
DamageSource
¶
Represents a source of damage.
Attributes:
| Name | Type | Description |
|---|---|---|
actor |
Actor | None
|
The actor that caused the damage to occur. |
damaging_actor |
Actor | None
|
The actor that directly caused the damage. |
is_indirect |
bool
|
Whether this damage is indirect. |
type |
str
|
The damage type. |
actor
property
¶
actor: Actor | None
The actor that caused the damage to occur.
Not to be confused with damaging_actor, the returned actor is the actor to which the damage is
ultimately attributed if the receiver is killed. If, for example, the receiver was damaged by a projectile, the
shooter/thrower would be returned.
damaging_actor
property
¶
damaging_actor: Actor | None
The actor that directly caused the damage.
Not to be confused with actor, the returned actor is the actor that actually inflicted the
damage. If, for example, the receiver was damaged by a projectile, the projectile would be returned.