Files
Pumpkin/pumpkin/src/plugin/api/events/entity/entity_combust.rs
2026-08-04 14:57:33 +02:00

24 lines
547 B
Rust

use pumpkin_macros::{Event, cancellable};
/// An event that occurs when an entity catches fire.
#[cancellable]
#[derive(Event, Clone)]
pub struct EntityCombustEvent {
/// The ID of the entity that caught fire.
pub entity_id: i32,
/// The duration in seconds the entity will burn.
pub duration_secs: f32,
}
impl EntityCombustEvent {
#[must_use]
pub const fn new(entity_id: i32, duration_secs: f32) -> Self {
Self {
entity_id,
duration_secs,
cancelled: false,
}
}
}