diff options
| author | mat <github@matdoes.dev> | 2022-05-08 23:45:15 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-08 23:45:15 -0500 |
| commit | 345cecf7afa84df2d5ecf075ecfb499e3fd10a55 (patch) | |
| tree | 4657aebf820aab0e934cc501fcbb822d5ef2c84f /bot/src | |
| parent | 122693a654b0c851bbb9e134c539961419175bef (diff) | |
| download | azalea-drasl-345cecf7afa84df2d5ecf075ecfb499e3fd10a55.tar.xz | |
add more stuff
Diffstat (limited to 'bot/src')
| -rw-r--r-- | bot/src/main.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/bot/src/main.rs b/bot/src/main.rs index 075bfa44..2686636b 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -1,5 +1,5 @@ use azalea_client::{Account, Event}; -use azalea_core::ChunkPos; +use azalea_core::{BlockPos, ChunkPos}; #[tokio::main] async fn main() { @@ -19,18 +19,19 @@ async fn main() { while let Some(e) = client.next().await { match e { // TODO: have a "loaded" or "ready" event that fires when all chunks are loaded - Event::Login => { - // let state = client.state.lock().await; - // let world = state.world.as_ref().unwrap(); - // let c = world[&ChunkPos::new(-1, -4)] - // .as_ref() - // .unwrap() - // .lock() - // .unwrap(); - // println!("{:?}", c); - } + Event::Login => {} Event::Chat(p) => { println!("{}", p.message.to_ansi(None)); + if p.message.to_ansi(None) == "<py5> ok" { + let state = client.state.lock().await; + let world = state.world.as_ref().unwrap(); + // let c = world[&BlockPos::new(5, 78, -2)] + // .as_ref() + // .unwrap() + // .lock() + // .unwrap(); + // println!("{:?}", c); + } } } } |
