diff options
| author | mat <github@matdoes.dev> | 2022-10-02 15:02:27 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-10-02 15:02:27 -0500 |
| commit | e0bcab53b8a3721a008e47062c6b5972fa64b8ad (patch) | |
| tree | 69255e7c92b3b97656c3d3fc1a0cded505508b2d /azalea/src | |
| parent | 06068377bd17f95bdafe86ff14bab1d0d852aa53 (diff) | |
| download | azalea-drasl-e0bcab53b8a3721a008e47062c6b5972fa64b8ad.tar.xz | |
start adding stuff to azalea crate
Diffstat (limited to 'azalea/src')
| -rw-r--r-- | azalea/src/bot.rs | 14 | ||||
| -rw-r--r-- | azalea/src/lib.rs | 6 | ||||
| -rw-r--r-- | azalea/src/prelude.rs | 1 |
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; |
