diff options
| author | mat <git@matdoes.dev> | 2023-09-30 12:38:09 -0500 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-09-30 12:38:09 -0500 |
| commit | 3f62ff11134f66f197b76ccbbcb6d667436914df (patch) | |
| tree | 2da6dff2f09eb3e90133e26999d44682ecf2262d /azalea/examples/testbot.rs | |
| parent | 4b9499a123d3d0160f76e74278210efbc53dd3bc (diff) | |
| download | azalea-drasl-3f62ff11134f66f197b76ccbbcb6d667436914df.tar.xz | |
remove BlockPosGoal::from and Goal::goal_node
Diffstat (limited to 'azalea/examples/testbot.rs')
| -rw-r--r-- | azalea/examples/testbot.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs index a0f60fbc..73870b59 100644 --- a/azalea/examples/testbot.rs +++ b/azalea/examples/testbot.rs @@ -127,10 +127,10 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result< let entity_pos = bot.entity_component::<Position>(entity); let target_pos: BlockPos = entity_pos.into(); println!("going to {target_pos:?}"); - bot.goto(BlockPosGoal::from(target_pos)); + bot.goto(BlockPosGoal(target_pos)); } "worldborder" => { - bot.goto(BlockPosGoal::from(BlockPos::new(30_000_000, 70, 0))); + bot.goto(BlockPosGoal(BlockPos::new(30_000_000, 70, 0))); } "look" => { let Some(entity) = entity else { @@ -176,7 +176,7 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result< ); if let Some(target_pos) = target_pos { // +1 to stand on top of the block - bot.goto(BlockPosGoal::from(target_pos.up(1))); + bot.goto(BlockPosGoal(target_pos.up(1))); } else { bot.chat("no diamond block found"); } @@ -205,7 +205,7 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result< bot.chat("no lever found"); return Ok(()); }; - bot.goto(BlockPosGoal::from(target_pos)); + bot.goto(BlockPosGoal(target_pos)); bot.look_at(target_pos.center()); bot.block_interact(target_pos); } |
