diff options
| author | mat <github@matdoes.dev> | 2022-11-27 17:51:50 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-11-27 17:51:50 -0600 |
| commit | 36a11220106c052864235eebf144d4f15531dcb3 (patch) | |
| tree | f0898f3974ec0b56fe5953c8b79fd22cedc67ffe /azalea/examples/craft_dig_straight_down.rs | |
| parent | 1a2178959d94232e96346a64785e8d8a639ab2b1 (diff) | |
| download | azalea-drasl-36a11220106c052864235eebf144d4f15531dcb3.tar.xz | |
fix some docs/examples
Diffstat (limited to 'azalea/examples/craft_dig_straight_down.rs')
| -rwxr-xr-x | azalea/examples/craft_dig_straight_down.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea/examples/craft_dig_straight_down.rs b/azalea/examples/craft_dig_straight_down.rs index 3e6d9e31..864b9809 100755 --- a/azalea/examples/craft_dig_straight_down.rs +++ b/azalea/examples/craft_dig_straight_down.rs @@ -27,7 +27,7 @@ async fn main() { async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> { match event { Event::Chat(m) => { - if m.username() == Some(bot.game_profile.name) { + if m.username() == Some(bot.profile.name) { return Ok(()); }; if m.content() == "go" { @@ -42,7 +42,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_one_block(|b| b.id == "minecraft:chest")) + .open_container(&bot.world().find_one_block(|b| b.id == "minecraft:chest")) .await .unwrap(); bot.take_amount(&chest, 5, |i| i.id == "#minecraft:planks") @@ -65,7 +65,7 @@ async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> { bot.hold(&pickaxe); loop { - if let Err(e) = bot.dig(bot.entity.feet_pos().down(1)).await { + if let Err(e) = bot.dig(bot.entity().feet_pos().down(1)).await { println!("{:?}", e); break; } |
