diff options
| author | mat <github@matdoes.dev> | 2022-06-19 22:01:54 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-06-19 22:01:54 -0500 |
| commit | c9a070f711a6fdaf505f522cb8809749c9190e38 (patch) | |
| tree | c64f5d6aaa4f489538d2e81814b31b5abca71a9e /bot/src | |
| parent | d674633e856f0ac1683172ad5655ff7026c6eae6 (diff) | |
| download | azalea-drasl-c9a070f711a6fdaf505f522cb8809749c9190e38.tar.xz | |
Fix some clippy warnings
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" { |
