diff options
| author | mat <git@matdoes.dev> | 2024-05-22 10:13:22 +0000 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-05-22 10:14:35 +0000 |
| commit | 729d211406c096488a5f7f3df5120393990ac282 (patch) | |
| tree | 9f507f4adb40d14c505764f8436b290b59591b2a | |
| parent | 892869ad1249e238eb9228d57bd9884793a9fe75 (diff) | |
| download | azalea-drasl-729d211406c096488a5f7f3df5120393990ac282.tar.xz | |
read Tool blocks as HolderSet
fixes an error with viaversion servers
| -rwxr-xr-x | azalea-chat/src/component.rs | 1 | ||||
| -rw-r--r-- | azalea-client/src/packet_handling/configuration.rs | 1 | ||||
| -rw-r--r-- | azalea-client/src/packet_handling/game.rs | 1 | ||||
| -rw-r--r-- | azalea-inventory/src/components.rs | 2 |
4 files changed, 4 insertions, 1 deletions
diff --git a/azalea-chat/src/component.rs b/azalea-chat/src/component.rs index 94d653e8..508ffc8f 100755 --- a/azalea-chat/src/component.rs +++ b/azalea-chat/src/component.rs @@ -468,6 +468,7 @@ impl simdnbt::FromNbtTag for FormattedText { } #[cfg(feature = "azalea-buf")] +#[cfg(feature = "simdnbt")] impl McBufReadable for FormattedText { fn read_from(buf: &mut std::io::Cursor<&[u8]>) -> Result<Self, BufReadError> { let nbt = simdnbt::borrow::read_optional_tag(buf)?; diff --git a/azalea-client/src/packet_handling/configuration.rs b/azalea-client/src/packet_handling/configuration.rs index add36c6e..1be34a12 100644 --- a/azalea-client/src/packet_handling/configuration.rs +++ b/azalea-client/src/packet_handling/configuration.rs @@ -49,6 +49,7 @@ pub fn send_packet_events( Ok(packet) => packet, Err(err) => { error!("failed to read packet: {:?}", err); + debug!("packet bytes: {:?}", raw_packet); continue; } }; diff --git a/azalea-client/src/packet_handling/game.rs b/azalea-client/src/packet_handling/game.rs index dd2695dc..daa420c3 100644 --- a/azalea-client/src/packet_handling/game.rs +++ b/azalea-client/src/packet_handling/game.rs @@ -164,6 +164,7 @@ pub fn send_packet_events( Ok(packet) => packet, Err(err) => { error!("failed to read packet: {:?}", err); + debug!("packet bytes: {:?}", raw_packet); continue; } }; diff --git a/azalea-inventory/src/components.rs b/azalea-inventory/src/components.rs index 6f9ea527..948bb96d 100644 --- a/azalea-inventory/src/components.rs +++ b/azalea-inventory/src/components.rs @@ -359,7 +359,7 @@ impl DataComponent for FireResistant {} #[derive(Clone, PartialEq, McBuf)] pub struct ToolRule { - pub blocks: Vec<Block>, + pub blocks: HolderSet<Block, ResourceLocation>, pub speed: Option<f32>, pub correct_for_drops: Option<bool>, } |
