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
Returns the “default value” for a type. Read more
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]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 !=
.