diff --git a/pumpkin-protocol/src/client/play/c_worldevent.rs b/pumpkin-protocol/src/client/play/c_worldevent.rs new file mode 100644 index 000000000..71bf5f02e --- /dev/null +++ b/pumpkin-protocol/src/client/play/c_worldevent.rs @@ -0,0 +1,22 @@ +use pumpkin_macros::packet; +use serde::Serialize; + +use crate::position::WorldPosition; + +#[derive(Serialize)] +#[packet(0x28)] +pub struct CWorldEvent { + event: i32, + location: WorldPosition, + data: i32, + disable_relative_volume: bool, +} + +impl CWorldEvent { + pub fn new(event: i32, + location: WorldPosition, + data: i32, + disable_relative_volume: bool) -> Self { + Self { event, location, data, disable_relative_volume } + } +} \ No newline at end of file diff --git a/pumpkin-protocol/src/client/play/mod.rs b/pumpkin-protocol/src/client/play/mod.rs index 376d329e1..71504c280 100644 --- a/pumpkin-protocol/src/client/play/mod.rs +++ b/pumpkin-protocol/src/client/play/mod.rs @@ -8,6 +8,7 @@ mod c_entity_animation; mod c_entity_metadata; mod c_entity_velocity; mod c_game_event; +mod c_worldevent; mod c_head_rot; mod c_hurt_animation; mod c_login; @@ -30,6 +31,7 @@ mod c_update_entity_pos; mod c_update_entity_rot; mod player_action; +pub use c_worldevent::*; pub use c_actionbar::*; pub use c_block_update::*; pub use c_center_chunk::*;