aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/examples')
-rw-r--r--azalea/examples/steal.rs2
-rw-r--r--azalea/examples/testbot.rs2
-rw-r--r--azalea/examples/todo/craft_dig_straight_down.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/azalea/examples/steal.rs b/azalea/examples/steal.rs
index 408d7b9b..c6ab4639 100644
--- a/azalea/examples/steal.rs
+++ b/azalea/examples/steal.rs
@@ -45,7 +45,7 @@ async fn handle(mut bot: Client, event: Event, state: State) -> anyhow::Result<(
return Ok(());
};
// bot.goto(BlockPosGoal(chest_block));
- let Some(chest) = bot.open_container(chest_block).await else {
+ let Some(chest) = bot.open_container_at(chest_block).await else {
println!("Couldn't open chest");
return Ok(());
};
diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs
index 7e7b2ca0..c9e64ef9 100644
--- a/azalea/examples/testbot.rs
+++ b/azalea/examples/testbot.rs
@@ -216,7 +216,7 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result<
return Ok(());
};
bot.look_at(target_pos.center());
- let container = bot.open_container(target_pos).await;
+ let container = bot.open_container_at(target_pos).await;
println!("container: {container:?}");
if let Some(container) = container {
if let Some(contents) = container.contents() {
diff --git a/azalea/examples/todo/craft_dig_straight_down.rs b/azalea/examples/todo/craft_dig_straight_down.rs
index 6672eaa4..7b75d2db 100644
--- a/azalea/examples/todo/craft_dig_straight_down.rs
+++ b/azalea/examples/todo/craft_dig_straight_down.rs
@@ -38,7 +38,7 @@ async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> {
bot.goto(pathfinder::Goals::NearXZ(5, azalea::BlockXZ(0, 0)))
.await;
let chest = bot
- .open_container(&bot.world().find_block(azalea::Block::Chest))
+ .open_container_at(&bot.world().find_block(azalea::Block::Chest))
.await
.unwrap();
bot.take_amount_from_container(&chest, 5, |i| i.id == "#minecraft:planks")