use packet_macros::{GamePacket, McBuf}; #[derive(Clone, Debug, McBuf, GamePacket)] pub struct ClientboundSoundPacket { #[var] /// TODO: use the sound registry instead of just being a u32 pub sound: u32, pub source: SoundSource, pub x: i32, pub y: i32, pub z: i32, pub volume: f32, pub pitch: f32, } #[derive(Clone, Debug, Copy, McBuf)] pub enum SoundSource { Master = 0, Music = 1, Records = 2, Weather = 3, Blocks = 4, Hostile = 5, Neutral = 6, Players = 7, Ambient = 8, Voice = 9, }