Add Clientbound World Event
This commit is contained in:
parent
49dfc18818
commit
ace7a77046
22
pumpkin-protocol/src/client/play/c_worldevent.rs
Normal file
22
pumpkin-protocol/src/client/play/c_worldevent.rs
Normal file
@ -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 }
|
||||
}
|
||||
}
|
||||
@ -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::*;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user