aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2022-11-15 14:52:26 -0600
committerGitHub <noreply@github.com>2022-11-15 14:52:26 -0600
commit0d004b72ac22641978c6ef93ca8641eb621e2f48 (patch)
tree61eca3b0bd0339b36b947afd76724b2b6447572c /azalea/examples
parentb9da6f74756abb8daf7253765fdc5f5521381090 (diff)
downloadazalea-drasl-0d004b72ac22641978c6ef93ca8641eb621e2f48.tar.xz
Rename "dimension" to "world" (#39)
* rename "dimension" to "world" * Update mod.rs
Diffstat (limited to 'azalea/examples')
-rwxr-xr-xazalea/examples/potatobot/main.rs2
-rwxr-xr-xazalea/examples/pvp.rs5
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() {