diff options
Diffstat (limited to 'azalea-block/src')
| -rw-r--r-- | azalea-block/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea-block/src/lib.rs b/azalea-block/src/lib.rs index cc7ddf73..685aed92 100644 --- a/azalea-block/src/lib.rs +++ b/azalea-block/src/lib.rs @@ -5,7 +5,7 @@ use azalea_buf::{BufReadError, McBufReadable, McBufVarReadable, McBufVarWritable pub use behavior::BlockBehavior; pub use blocks::*; use std::{ - io::{Read, Write}, + io::{Cursor, Write}, mem, }; @@ -39,7 +39,7 @@ impl TryFrom<u32> for BlockState { } impl McBufReadable for BlockState { - fn read_from(buf: &mut impl Read) -> Result<Self, BufReadError> { + fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { let state_id = u32::var_read_from(buf)?; Self::try_from(state_id).map_err(|_| BufReadError::UnexpectedEnumVariant { id: state_id as i32, |
