aboutsummaryrefslogtreecommitdiff
path: root/azalea/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/src')
-rw-r--r--azalea/src/bot.rs14
-rw-r--r--azalea/src/lib.rs6
-rw-r--r--azalea/src/prelude.rs1
3 files changed, 19 insertions, 2 deletions
diff --git a/azalea/src/bot.rs b/azalea/src/bot.rs
new file mode 100644
index 00000000..6746e09e
--- /dev/null
+++ b/azalea/src/bot.rs
@@ -0,0 +1,14 @@
+pub struct BotState {
+ jumping_once: bool,
+}
+
+pub trait BotTrait {
+ fn jump(&mut self);
+}
+
+impl BotTrait for azalea_client::Client {
+ fn jump(&mut self) {
+ let mut physics_state = self.physics_state.lock().unwrap();
+ physics_state.jumping_once = true;
+ }
+}
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs
index 144caa55..fe8a3740 100644
--- a/azalea/src/lib.rs
+++ b/azalea/src/lib.rs
@@ -1,2 +1,4 @@
-//! This is currently an advertisement crate for
-//! [Azalea](https://github.com/mat-1/azalea). More stuff will be here soon!
+mod bot;
+pub mod prelude;
+
+pub use azalea_client::Client;
diff --git a/azalea/src/prelude.rs b/azalea/src/prelude.rs
new file mode 100644
index 00000000..7b3345b0
--- /dev/null
+++ b/azalea/src/prelude.rs
@@ -0,0 +1 @@
+pub use crate::bot::BotTrait;