aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-09-30 12:38:09 -0500
committermat <git@matdoes.dev>2023-09-30 12:38:09 -0500
commit3f62ff11134f66f197b76ccbbcb6d667436914df (patch)
tree2da6dff2f09eb3e90133e26999d44682ecf2262d /azalea/examples
parent4b9499a123d3d0160f76e74278210efbc53dd3bc (diff)
downloadazalea-drasl-3f62ff11134f66f197b76ccbbcb6d667436914df.tar.xz
remove BlockPosGoal::from and Goal::goal_node
Diffstat (limited to 'azalea/examples')
-rw-r--r--azalea/examples/steal.rs2
-rw-r--r--azalea/examples/testbot.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/azalea/examples/steal.rs b/azalea/examples/steal.rs
index ce5b7d21..408d7b9b 100644
--- a/azalea/examples/steal.rs
+++ b/azalea/examples/steal.rs
@@ -44,7 +44,7 @@ async fn handle(mut bot: Client, event: Event, state: State) -> anyhow::Result<(
bot.chat("No chest found");
return Ok(());
};
- // bot.goto(BlockPosGoal::from(chest_block));
+ // bot.goto(BlockPosGoal(chest_block));
let Some(chest) = bot.open_container(chest_block).await else {
println!("Couldn't open chest");
return Ok(());
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);
}