mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
read Tool blocks as HolderSet
fixes an error with viaversion servers
This commit is contained in:
parent
892869ad12
commit
729d211406
4 changed files with 4 additions and 1 deletions
|
@ -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)?;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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>,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue