mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
ClientboundUpdateMobEffectPacket
This commit is contained in:
parent
41f61bf9c1
commit
a0b3b793f9
3 changed files with 21 additions and 0 deletions
|
@ -600,6 +600,9 @@ impl Client {
|
|||
GamePacket::ClientboundSetEquipmentPacket(p) => {
|
||||
println!("Got set equipment packet {:?}", p);
|
||||
}
|
||||
GamePacket::ClientboundUpdateMobEffectPacket(p) => {
|
||||
println!("Got update mob effect packet {:?}", p);
|
||||
}
|
||||
_ => panic!("Unexpected packet {:?}", packet),
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
use azalea_buf::McBuf;
|
||||
use packet_macros::GamePacket;
|
||||
|
||||
#[derive(Clone, Debug, McBuf, GamePacket)]
|
||||
pub struct ClientboundUpdateMobEffectPacket {
|
||||
#[var]
|
||||
pub entity_id: u32,
|
||||
// TODO: have an enum for this
|
||||
#[var]
|
||||
pub effect: u32,
|
||||
pub effect_amplifier: u8,
|
||||
#[var]
|
||||
pub effect_duration_ticks: u32,
|
||||
pub flags: u8,
|
||||
pub factor_data: Option<azalea_nbt::Tag>,
|
||||
}
|
|
@ -46,6 +46,7 @@ pub mod clientbound_system_chat_packet;
|
|||
pub mod clientbound_teleport_entity_packet;
|
||||
pub mod clientbound_update_advancements_packet;
|
||||
pub mod clientbound_update_attributes_packet;
|
||||
pub mod clientbound_update_mob_effect_packet;
|
||||
pub mod clientbound_update_recipes_packet;
|
||||
pub mod clientbound_update_tags_packet;
|
||||
pub mod clientbound_update_view_distance_packet;
|
||||
|
@ -124,6 +125,7 @@ declare_state_packets!(
|
|||
0x63: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket,
|
||||
0x64: clientbound_update_advancements_packet::ClientboundUpdateAdvancementsPacket,
|
||||
0x65: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket,
|
||||
0x66: clientbound_update_mob_effect_packet::ClientboundUpdateMobEffectPacket,
|
||||
0x67: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket,
|
||||
0x68: clientbound_update_tags_packet::ClientboundUpdateTagsPacket,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue