diff options
Diffstat (limited to 'azalea/examples')
| -rwxr-xr-x | azalea/examples/potatobot/main.rs | 2 | ||||
| -rwxr-xr-x | azalea/examples/pvp.rs | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/azalea/examples/potatobot/main.rs b/azalea/examples/potatobot/main.rs index 66ddfcc0..e585c41d 100755 --- a/azalea/examples/potatobot/main.rs +++ b/azalea/examples/potatobot/main.rs @@ -49,7 +49,7 @@ async fn deposit(bot: &mut Client, state: State) -> anyhow::Result<()> { bot.goto(Vec3::new(0, 70, 0)).await?; let chest = bot - .open_container(&bot.dimension.block_at(BlockPos::new(0, 70, 0))) + .open_container(&bot.world.block_at(BlockPos::new(0, 70, 0))) .await .unwrap(); diff --git a/azalea/examples/pvp.rs b/azalea/examples/pvp.rs index 435c335c..87d83c6d 100755 --- a/azalea/examples/pvp.rs +++ b/azalea/examples/pvp.rs @@ -36,10 +36,7 @@ async fn swarm_handle(swarm: Swarm, event: Event, state: State) { match event { Event::Tick => { // choose an arbitrary player within render distance to target - if let Some(target) = swarm - .dimension - .find_one_entity(|e| e.id == "minecraft:player") - { + if let Some(target) = swarm.world.find_one_entity(|e| e.id == "minecraft:player") { for bot in swarm { bot.tick_goto_goal(pathfinder::Goals::Reach(target.bounding_box)); // if target.bounding_box.distance(bot.eyes) < bot.reach_distance() { |
