diff options
Diffstat (limited to 'azalea-protocol')
| -rwxr-xr-x | azalea-protocol/src/packets/game/clientbound_sound_packet.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_sound_packet.rs b/azalea-protocol/src/packets/game/clientbound_sound_packet.rs index 39dd39c8..2b071f2e 100755 --- a/azalea-protocol/src/packets/game/clientbound_sound_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_sound_packet.rs @@ -1,10 +1,10 @@ use azalea_buf::McBuf; +use azalea_core::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; -use azalea_registry::OptionalRegistry; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] pub struct ClientboundSoundPacket { - pub sound: OptionalRegistry<azalea_registry::SoundEvent>, + pub sound: azalea_registry::CustomRegistry<azalea_registry::SoundEvent, CustomSoundEvent>, pub source: SoundSource, pub x: i32, pub y: i32, @@ -14,6 +14,12 @@ pub struct ClientboundSoundPacket { pub seed: u64, } +#[derive(McBuf, Clone, Debug)] +pub struct CustomSoundEvent { + pub location: ResourceLocation, + pub range: Option<f32>, +} + #[derive(McBuf, Clone, Copy, Debug)] pub enum SoundSource { Master = 0, |
