Struct minecraft_json::minecraft::data::conditions::DamageSource[][src]

pub struct DamageSource {
    pub bypasses_armor: Option<bool>,
    pub bypasses_invulnerability: Option<bool>,
    pub bypasses_magic: Option<bool>,
    pub direct_entity: Option<Box<Entity>>,
    pub is_explosion: Option<bool>,
    pub is_fire: Option<bool>,
    pub is_magic: Option<bool>,
    pub is_projectile: Option<bool>,
    pub is_lightning: Option<bool>,
    pub source_entity: Option<Box<Entity>>,
}
Expand description

Properties of damage source.

Fields

bypasses_armor: Option<bool>

Checks if the damage bypassed the armor of the player (suffocation damage predominantly).

bypasses_invulnerability: Option<bool>

Checks if the damage bypassed the invulnerability status of the player (void or /kill damage).

bypasses_magic: Option<bool>

Checks if the damage was caused by starvation.

direct_entity: Option<Box<Entity>>

The entity that was the direct cause of the damage.

is_explosion: Option<bool>

Checks if the damage originated from an explosion.

is_fire: Option<bool>

Checks if the damage originated from fire.

is_magic: Option<bool>

Checks if the damage originated from magic.

is_projectile: Option<bool>

Checks if the damage originated from a projectile.

is_lightning: Option<bool>

Checks if the damage originated from lightning.

source_entity: Option<Box<Entity>>

Checks the entity that was the source of the damage (for example: The skeleton that shot the arrow).

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.