diff options
Diffstat (limited to 'azalea-protocol/src/mc_buf')
| -rwxr-xr-x | azalea-protocol/src/mc_buf/read.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/azalea-protocol/src/mc_buf/read.rs b/azalea-protocol/src/mc_buf/read.rs index a0e3e79f..b345aac9 100755 --- a/azalea-protocol/src/mc_buf/read.rs +++ b/azalea-protocol/src/mc_buf/read.rs @@ -350,6 +350,17 @@ impl McBufReadable for u16 { } } +// i16 +#[async_trait] +impl McBufReadable for i16 { + async fn read_into<R>(buf: &mut R) -> Result<Self, String> + where + R: AsyncRead + std::marker::Unpin + std::marker::Send, + { + buf.read_short().await + } +} + // u16 varint #[async_trait] impl McBufVarintReadable for u16 { |
