diff options
| author | mat <git@matdoes.dev> | 2025-10-13 08:18:13 -1245 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-10-13 08:18:13 -1245 |
| commit | 8ee1e0e6f8ab7d6111e9ac32307ca46097a84bca (patch) | |
| tree | e75d6f574f0d810bf1c9d6727d052a169b091115 | |
| parent | 907e166f4617eb9ec5ecc776018dd98f3d802b0e (diff) | |
| download | azalea-drasl-8ee1e0e6f8ab7d6111e9ac32307ca46097a84bca.tar.xz | |
fix broken tests
| -rw-r--r-- | azalea/examples/steal.rs | 2 | ||||
| -rw-r--r-- | azalea/src/container.rs | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/azalea/examples/steal.rs b/azalea/examples/steal.rs index 87a1561b..71db1c68 100644 --- a/azalea/examples/steal.rs +++ b/azalea/examples/steal.rs @@ -68,7 +68,7 @@ async fn steal(bot: Client, state: State) -> anyhow::Result<()> { bot.goto(RadiusGoal::new(chest_block.center(), 3.)).await; - let Some(chest) = bot.open_container_at(chest_block).await else { + let Some(chest) = bot.open_container_at(chest_block, None).await else { println!("Couldn't open chest at {chest_block:?}"); continue; }; diff --git a/azalea/src/container.rs b/azalea/src/container.rs index 2394551b..57d0b369 100644 --- a/azalea/src/container.rs +++ b/azalea/src/container.rs @@ -47,7 +47,7 @@ pub trait ContainerClientExt { /// bot.chat("no chest found"); /// return; /// }; - /// let container = bot.open_container_at(target_pos).await; + /// let container = bot.open_container_at(target_pos, None).await; /// # } /// ``` fn open_container_at( @@ -134,10 +134,10 @@ impl ContainerClientExt for Client { } elapsed_ticks += 1; - if let Some(timeout_ticks) = timeout_ticks { - if elapsed_ticks >= timeout_ticks { - return None; - } + if let Some(timeout_ticks) = timeout_ticks + && elapsed_ticks >= timeout_ticks + { + return None; } } |
