diff options
| author | mat <git@matdoes.dev> | 2024-02-22 22:41:54 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-02-22 22:41:54 -0600 |
| commit | 038807e607c55757b3d9a9d51f0b9e65a781772b (patch) | |
| tree | f162c7397e7ff17f2c7cb1f3fde7178dea60b645 /azalea | |
| parent | 69f7eebcb300bbefdc8b10c191a09db250bde630 (diff) | |
| download | azalea-drasl-038807e607c55757b3d9a9d51f0b9e65a781772b.tar.xz | |
fix for hypixel limbo
Diffstat (limited to 'azalea')
| -rw-r--r-- | azalea/benches/pathfinder.rs | 3 | ||||
| -rw-r--r-- | azalea/examples/testbot/commands.rs | 1 | ||||
| -rw-r--r-- | azalea/examples/testbot/main.rs | 6 | ||||
| -rw-r--r-- | azalea/src/pathfinder/world.rs | 4 |
4 files changed, 5 insertions, 9 deletions
diff --git a/azalea/benches/pathfinder.rs b/azalea/benches/pathfinder.rs index 842c6b5e..4e42c63a 100644 --- a/azalea/benches/pathfinder.rs +++ b/azalea/benches/pathfinder.rs @@ -16,6 +16,7 @@ use criterion::{criterion_group, criterion_main, Bencher, Criterion}; use parking_lot::RwLock; use rand::{rngs::StdRng, Rng, SeedableRng}; +#[allow(dead_code)] fn generate_bedrock_world( partial_chunks: &mut PartialChunkStorage, size: u32, @@ -87,7 +88,7 @@ fn generate_mining_world( } } - let mut rng = StdRng::seed_from_u64(0); + // let mut rng = StdRng::seed_from_u64(0); for chunk_x in -size..size { for chunk_z in -size..size { diff --git a/azalea/examples/testbot/commands.rs b/azalea/examples/testbot/commands.rs index db606aa6..9cdb3cb7 100644 --- a/azalea/examples/testbot/commands.rs +++ b/azalea/examples/testbot/commands.rs @@ -4,7 +4,6 @@ pub mod movement; use azalea::brigadier::prelude::*; use azalea::chat::ChatPacket; -use azalea::ecs::prelude::Entity; use azalea::ecs::prelude::*; use azalea::entity::metadata::Player; use azalea::Client; diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs index c3bc93f7..43e6b179 100644 --- a/azalea/examples/testbot/main.rs +++ b/azalea/examples/testbot/main.rs @@ -15,7 +15,7 @@ mod commands; pub mod killaura; use azalea::pathfinder::PathfinderDebugParticles; -use azalea::{Account, ClientInformation}; +use azalea::ClientInformation; use azalea::brigadier::command_dispatcher::CommandDispatcher; use azalea::ecs::prelude::*; @@ -136,7 +136,7 @@ async fn handle(bot: Client, event: azalea::Event, state: State) -> anyhow::Resu let command = if chat.is_whisper() { Some(content) } else { - content.strip_prefix("!").map(|s| s.to_owned()) + content.strip_prefix('!').map(|s| s.to_owned()) }; if let Some(command) = command { match state.commands.execute( @@ -163,7 +163,7 @@ async fn handle(bot: Client, event: azalea::Event, state: State) -> anyhow::Resu azalea::Event::Tick => { killaura::tick(bot.clone(), state.clone())?; - let task = state.task.lock().clone(); + let task = *state.task.lock(); match task { BotTask::None => {} } diff --git a/azalea/src/pathfinder/world.rs b/azalea/src/pathfinder/world.rs index d3c94a52..2d859026 100644 --- a/azalea/src/pathfinder/world.rs +++ b/azalea/src/pathfinder/world.rs @@ -489,13 +489,9 @@ pub fn is_block_state_solid(block: BlockState) -> bool { #[cfg(test)] mod tests { - use std::sync::Arc; use super::*; - use azalea_block::BlockState; - use azalea_core::position::ChunkPos; use azalea_world::{Chunk, ChunkStorage, PartialInstance}; - use parking_lot::RwLock; #[test] fn test_is_passable() { |
