pub enum DamageKind {
Generic,
Magic,
Wither,
Fire,
Drown,
Freeze,
Fall,
LightningBolt,
Explosion,
}Expand description
The damage type of a Verb::DamagePlayers effect (DSL v0.6). A
curated subset of the vanilla 1.21.11 damage-type registry: every variant
respects the keepInventory death flow (a gamerule, so all deaths do) and does
not bypass a totem of undying — the totem-bypassing out_of_world /
generic_kill types are deliberately excluded, so a scripted consequence can
never silently void a player’s held totem. Modelled as an enum (not a free
string) so an unknown type is a schema rejection (DW0100) and needs no separate
registry / diagnostic. generic is the default: command damage that respects
totems + absorption but ignores armor, so a scripted hit lands regardless of gear.
Variants§
Generic
minecraft:generic — armor-ignoring command damage (default).
Magic
minecraft:magic — magical damage.
Wither
minecraft:wither — the wither/withering effect’s damage type.
Fire
minecraft:on_fire — burning damage.
Drown
minecraft:drown — drowning damage.
Freeze
minecraft:freeze — powder-snow freezing damage.
Fall
minecraft:fall — fall damage.
LightningBolt
minecraft:lightning_bolt — a lightning strike’s damage type.
Explosion
minecraft:explosion — a (non-player) explosion’s damage type.
Implementations§
Trait Implementations§
Source§impl Clone for DamageKind
impl Clone for DamageKind
impl Copy for DamageKind
Source§impl Debug for DamageKind
impl Debug for DamageKind
Source§impl<'de> Deserialize<'de> for DamageKind
impl<'de> Deserialize<'de> for DamageKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for DamageKind
Source§impl JsonSchema for DamageKind
impl JsonSchema for DamageKind
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more