Skip to main content

yog_event/
world.rs

1//! What happens to the world.
2
3use yog_data::Schema;
4
5mod actions;
6pub mod generation;
7pub mod loot;
8
9/// Fired when an explosion occurs in a world.
10///
11/// - `Pre`  — fires before block destruction; return `false` to cancel
12///   (blocks and entities are unaffected).
13/// - `Post` — fires after the explosion has taken effect.
14#[derive(Debug, Clone, Schema)]
15pub struct Explosion {
16    pub dimension: String,
17    pub x: f64,
18    pub y: f64,
19    pub z: f64,
20    pub power: f32,
21    /// UUID of the entity that caused the explosion, or empty string if none.
22    pub cause_uuid: String,
23}
24
25pub use actions::*;