diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-06-25 05:09:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-25 05:09:26 +0000 |
| commit | 7d3e57763e32ac9cf94180b1c714704cfbc3034d (patch) | |
| tree | 2dcfe72bf09a42f6614f9dc988dc0254162ea0bf /examples/craft_dig_straight_down.rs | |
| parent | 69c47eda4c496b13dadd80976bffd2fab7ea5894 (diff) | |
| parent | ca7067e173129f3044ebc8c77634f06da29a086e (diff) | |
| download | azalea-drasl-7d3e57763e32ac9cf94180b1c714704cfbc3034d.tar.xz | |
Merge pull request #10 from mat-1/azalea-entity
azalea-entity
Diffstat (limited to 'examples/craft_dig_straight_down.rs')
| -rw-r--r-- | examples/craft_dig_straight_down.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/craft_dig_straight_down.rs b/examples/craft_dig_straight_down.rs index 1d1a89f6..54bf0015 100644 --- a/examples/craft_dig_straight_down.rs +++ b/examples/craft_dig_straight_down.rs @@ -8,12 +8,12 @@ bot.join("localhost".try_into().unwrap()).await.unwrap(); loop { match bot.next().await { Event::Message(m) { - if m.username == bot.username { return }; + if m.username == bot.player.username { return }; if m.message = "go" { bot.goto_goal( pathfinder::Goals::NearXZ(5, azalea::BlockXZ(0, 0)) ).await; - let chest = bot.open_chest(&bot.world.find_one_block(|b| b.id == "minecraft:chest")).await.unwrap(); + let chest = bot.open_container(&bot.world.find_one_block(|b| b.id == "minecraft:chest")).await.unwrap(); bot.take_amount(&chest, 5, |i| i.id == "#minecraft:planks").await; // when rust adds async drop this won't be necessary chest.close().await; @@ -25,7 +25,7 @@ loop { bot.hold(&pickaxe); loop { - if let Err(e) = bot.dig(bot.feet_coords().down(1)).await { + if let Err(e) = bot.dig(bot.entity.feet_pos().down(1)).await { println!("{:?}", e); break; } |
