diff options
Diffstat (limited to 'bot/src')
| -rw-r--r-- | bot/src/main.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bot/src/main.rs b/bot/src/main.rs index e8ff5f95..f0f915f9 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -1,4 +1,5 @@ use azalea_client::{Account, Event}; +use azalea_core::BlockPos; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { @@ -20,9 +21,11 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { // TODO: have a "loaded" or "ready" event that fires when all chunks are loaded Event::Login => {} Event::Chat(_p) => { - let state = client.state.lock().unwrap(); - let world = state.world.as_ref().unwrap(); - println!("{:#?}", world); + let world = client.world(); + world.get_block_state(&BlockPos::new(0, 0, 0)).unwrap(); + // let world = state.world.as_ref().unwrap(); + // world. + // println!("{:#?}", world); // world.get_block_state(state.player.entity.pos); // println!("{}", p.message.to_ansi(None)); // if p.message.to_ansi(None) == "<py5> ok" { |
