aboutsummaryrefslogtreecommitdiff
path: root/azalea-buf/src
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2023-07-14 22:20:40 -0500
committerGitHub <noreply@github.com>2023-07-14 22:20:40 -0500
commit7405427199e5a994d4a6a706f84434a69cb7a7d9 (patch)
treeca537e5d761bc053187d952fced0915c850b92aa /azalea-buf/src
parentd1afd02aa84e7b4450c1607277f078eb2a0f1bf3 (diff)
downloadazalea-drasl-7405427199e5a994d4a6a706f84434a69cb7a7d9.tar.xz
Mining (#95)
* more mining stuff * initialize azalea-tags crate * more mining stuff 2 * mining in ecs * well technically mining works but no codegen for how long it takes to mine each block yet * rename downloads to __cache__ it was bothering me since it's not *just* downloads * codegen block behavior * fix not sending packet to finish breaking block * mining animation 🎉 * clippy * cleanup, move Client::mine into a client extension * add azalea/src/mining.rs --------- Co-authored-by: mat <git@matdoes.dev>
Diffstat (limited to 'azalea-buf/src')
-rwxr-xr-xazalea-buf/src/read.rs15
1 files changed, 4 insertions, 11 deletions
diff --git a/azalea-buf/src/read.rs b/azalea-buf/src/read.rs
index 00693384..7c996f20 100755
--- a/azalea-buf/src/read.rs
+++ b/azalea-buf/src/read.rs
@@ -96,17 +96,10 @@ fn read_utf_with_len(buf: &mut Cursor<&[u8]>, max_length: u32) -> Result<String,
/// number of bytes read
// pub async fn read_varint_async(
// reader: &mut (dyn AsyncRead + Unpin + Send),
-// ) -> Result<i32, BufReadError> {
-// let mut buffer = [0];
-// let mut ans = 0;
-// for i in 0..5 {
-// reader.read_exact(&mut buffer).await?;
-// ans |= ((buffer[0] & 0b0111_1111) as i32) << (7 * i);
-// if buffer[0] & 0b1000_0000 == 0 {
-// break;
-// }
-// }
-// Ok(ans)
+// ) -> Result<i32, BufReadError> { let mut buffer = [0]; let mut ans = 0; for i
+// in 0..5 { reader.read_exact(&mut buffer).await?; ans |= ((buffer[0] &
+// 0b0111_1111) as i32) << (7 * i); if buffer[0] & 0b1000_0000 == 0 { break; }
+// } Ok(ans)
// }
pub trait McBufReadable