aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-06-15 14:37:20 -0500
committermat <git@matdoes.dev>2023-06-15 14:37:20 -0500
commitfe687f9bdbdf3e0214ac4ac6da47a181e4dc23dd (patch)
tree9217e8041abd048689fcd897ce3ff0925bd929cd /azalea-protocol
parent804a9fd80084ead45c5b1b72fdb7c16e2f7ab712 (diff)
downloadazalea-drasl-fe687f9bdbdf3e0214ac4ac6da47a181e4dc23dd.tar.xz
fix clientboundsoundpacket
closes #89
Diffstat (limited to 'azalea-protocol')
-rwxr-xr-xazalea-protocol/src/packets/game/clientbound_sound_packet.rs10
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,