mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
level event packet
This commit is contained in:
parent
ffba101854
commit
ff79c1838a
3 changed files with 16 additions and 2 deletions
|
@ -313,9 +313,11 @@ impl Client {
|
||||||
GamePacket::ClientboundSoundPacket(p) => {
|
GamePacket::ClientboundSoundPacket(p) => {
|
||||||
println!("Got sound packet {:?}", p);
|
println!("Got sound packet {:?}", p);
|
||||||
}
|
}
|
||||||
|
GamePacket::ClientboundLevelEventPacket(p) => {
|
||||||
|
println!("Got level event packet {:?}", p);
|
||||||
|
}
|
||||||
_ => panic!("Unexpected packet {:?}", packet),
|
_ => panic!("Unexpected packet {:?}", packet),
|
||||||
}
|
}
|
||||||
println!();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn next(&mut self) -> Option<Event> {
|
pub async fn next(&mut self) -> Option<Event> {
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
use azalea_core::BlockPos;
|
||||||
|
use packet_macros::GamePacket;
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, GamePacket)]
|
||||||
|
pub struct ClientboundLevelEventPacket {
|
||||||
|
pub type_: i32,
|
||||||
|
pub pos: BlockPos,
|
||||||
|
pub data: i32,
|
||||||
|
pub global_event: bool,
|
||||||
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
|
pub mod clientbound_level_event_packet;
|
||||||
pub mod clientbound_add_entity_packet;
|
pub mod clientbound_add_entity_packet;
|
||||||
pub mod clientbound_add_mob_packet;
|
pub mod clientbound_add_mob_packet;
|
||||||
pub mod clientbound_add_player_packet;
|
pub mod clientbound_add_player_packet;
|
||||||
|
@ -63,6 +64,7 @@ declare_state_packets!(
|
||||||
0x20: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket,
|
0x20: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket,
|
||||||
0x21: clientbound_keep_alive_packet::ClientboundKeepAlivePacket,
|
0x21: clientbound_keep_alive_packet::ClientboundKeepAlivePacket,
|
||||||
0x22: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket,
|
0x22: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket,
|
||||||
|
0x23: clientbound_level_event_packet::ClientboundLevelEventPacket,
|
||||||
0x25: clientbound_light_update_packet::ClientboundLightUpdatePacket,
|
0x25: clientbound_light_update_packet::ClientboundLightUpdatePacket,
|
||||||
0x26: clientbound_login_packet::ClientboundLoginPacket,
|
0x26: clientbound_login_packet::ClientboundLoginPacket,
|
||||||
0x29: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket,
|
0x29: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket,
|
||||||
|
@ -91,4 +93,4 @@ declare_state_packets!(
|
||||||
0x66: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket,
|
0x66: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket,
|
||||||
0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket,
|
0x67: clientbound_update_tags_packet::ClientboundUpdateTagsPacket,
|
||||||
}
|
}
|
||||||
);
|
);
|
Loading…
Add table
Reference in a new issue