From 7405427199e5a994d4a6a706f84434a69cb7a7d9 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Fri, 14 Jul 2023 22:20:40 -0500 Subject: Mining (#95) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 --- azalea-buf/src/read.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'azalea-buf/src') 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 Result { -// 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 { 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 -- cgit v1.2.3