aboutsummaryrefslogtreecommitdiff
path: root/azalea
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2022-10-23 19:00:24 -0500
committerGitHub <noreply@github.com>2022-10-23 19:00:24 -0500
commit65da123631b0a2dc078786f60fa6b213e8b430ee (patch)
tree8854f29c4240d36bec1710ebc2293a488c495d3d /azalea
parent587001724acf8a7c6de30927da31c1f5fd7fdb09 (diff)
downloadazalea-drasl-65da123631b0a2dc078786f60fa6b213e8b430ee.tar.xz
Add Client::set_client_information (#33)
* start adding options * add default options * send options packet by default * mention set_options in Client::join doc * make TranslatableComponent::read return TextComponent * change set_options to set_client_information * clean up some code * Add `Initialize` event * fix some clippy warnings * change `Client::options` to `client_information`
Diffstat (limited to 'azalea')
-rw-r--r--azalea/examples/craft_dig_straight_down.rs4
-rw-r--r--azalea/examples/echo.rs4
-rw-r--r--azalea/examples/potatobot/main.rs2
-rw-r--r--azalea/src/lib.rs2
-rw-r--r--azalea/src/prelude.rs2
5 files changed, 6 insertions, 8 deletions
diff --git a/azalea/examples/craft_dig_straight_down.rs b/azalea/examples/craft_dig_straight_down.rs
index 9e675f28..82960a9c 100644
--- a/azalea/examples/craft_dig_straight_down.rs
+++ b/azalea/examples/craft_dig_straight_down.rs
@@ -1,5 +1,5 @@
-use azalea::{pathfinder, Account};
-use azalea::{Bot, Client, Event};
+use azalea::pathfinder;
+use azalea::prelude::*;
use parking_lot::Mutex;
use std::sync::Arc;
diff --git a/azalea/examples/echo.rs b/azalea/examples/echo.rs
index 07dd50c1..8c11d6e7 100644
--- a/azalea/examples/echo.rs
+++ b/azalea/examples/echo.rs
@@ -1,8 +1,6 @@
//! A simple bot that repeats chat messages sent by other players.
-use azalea::{Account, Client, Event};
-use parking_lot::Mutex;
-use std::sync::Arc;
+use azalea::prelude::*;
#[tokio::main]
async fn main() {
diff --git a/azalea/examples/potatobot/main.rs b/azalea/examples/potatobot/main.rs
index 1aa28ecc..54c84570 100644
--- a/azalea/examples/potatobot/main.rs
+++ b/azalea/examples/potatobot/main.rs
@@ -1,7 +1,7 @@
mod autoeat;
use azalea::prelude::*;
-use azalea::{pathfinder, Account, BlockPos, Client, Event, ItemKind, MoveDirection, Plugin, Vec3};
+use azalea::{pathfinder, BlockPos, ItemKind, Vec3};
#[derive(Default, Clone)]
struct State {}
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs
index 013e2dd3..a7d0791a 100644
--- a/azalea/src/lib.rs
+++ b/azalea/src/lib.rs
@@ -129,7 +129,7 @@ pub enum Error {
/// it gets disconnected from the server.
///
/// # Examples
-///
+///
/// ```rust,no_run
/// let error = azalea::start(azalea::Options {
/// account,
diff --git a/azalea/src/prelude.rs b/azalea/src/prelude.rs
index 0ffb60b8..c09d85e2 100644
--- a/azalea/src/prelude.rs
+++ b/azalea/src/prelude.rs
@@ -1,4 +1,4 @@
-//! The Azalea prelude.
+//! The Azalea prelude. Things that are necessary for a bare-bones bot are re-exported here.
pub use crate::bot::BotTrait;
pub use azalea_client::{Account, Client, Event};