chunkedge_protocol/packets/play/
update_mob_effect_s2c.rs

1use bitfield_struct::bitfield;
2use chunkedge_binary::{Decode, Encode, VarInt};
3
4use crate::Packet;
5#[derive(Clone, Debug, Encode, Decode, Packet)]
6pub struct UpdateMobEffectS2c {
7    pub entity_id: VarInt,
8    pub effect_id: VarInt, // TODO: effect ID registry.
9    pub amplifier: VarInt,
10    pub duration: VarInt,
11    pub flags: Flags,
12}
13
14#[bitfield(u8)]
15#[derive(PartialEq, Eq, Encode, Decode)]
16pub struct Flags {
17    pub is_ambient: bool,
18    pub show_particles: bool,
19    pub show_icon: bool,
20    pub blend: bool,
21    #[bits(4)]
22    _pad: u8,
23}