Add Clientbound World Event
This commit is contained in:
1 parent
49dfc18818
commit
ace7a77046
2 files changed
+24
No files matched your search
@@ -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_metadata;
|
||||||
mod c_entity_velocity;
|
mod c_entity_velocity;
|
||||||
mod c_game_event;
|
mod c_game_event;
|
||||||
|
mod c_worldevent;
|
||||||
mod c_head_rot;
|
mod c_head_rot;
|
||||||
mod c_hurt_animation;
|
mod c_hurt_animation;
|
||||||
mod c_login;
|
mod c_login;
|
||||||
@@ -30,6 +31,7 @@ mod c_update_entity_pos;
|
|||||||
mod c_update_entity_rot;
|
mod c_update_entity_rot;
|
||||||
mod player_action;
|
mod player_action;
|
||||||
|
|
||||||
|
pub use c_worldevent::*;
|
||||||
pub use c_actionbar::*;
|
pub use c_actionbar::*;
|
||||||
pub use c_block_update::*;
|
pub use c_block_update::*;
|
||||||
pub use c_center_chunk::*;
|
pub use c_center_chunk::*;
|
||||||
|
|||||||
Reference in new issue
Block a user