1#![doc = include_str!("../README.md")]
2#![feature(type_changing_struct_update)]
3
4#[cfg(doc)]
5pub mod _docs;
6pub mod accept_resource_packs;
7pub mod auto_reconnect;
8pub mod auto_respawn;
9pub mod auto_tool;
10pub mod bot;
11mod builder;
12mod client_impl;
13pub mod container;
14mod entity_ref;
15pub mod events;
16mod join_opts;
17pub mod nearest_entity;
18pub mod pathfinder;
19pub mod prelude;
20pub mod swarm;
21pub mod tick_broadcast;
22
23use std::ops::Deref;
24
25pub use azalea_auth as auth;
26pub use azalea_block as block;
27#[doc(hidden)]
28#[deprecated = "moved to `azalea::block`"]
29pub mod blocks {
30 pub type BlockStates = azalea_block::BlockStates;
31 pub type BlockState = azalea_block::BlockState;
32 pub trait BlockTrait: azalea_block::BlockTrait {}
33 }
37
38pub use azalea_brigadier as brigadier;
39pub use azalea_buf as buf;
40pub use azalea_chat::FormattedText;
41pub use azalea_client::*;
42pub use azalea_core as core;
43pub use azalea_core::position::{BlockPos, Vec3};
45pub use azalea_entity as entity;
46pub use azalea_physics as physics;
47pub use azalea_protocol as protocol;
48pub use azalea_registry as registry;
49#[doc(hidden)]
50#[deprecated(note = "renamed to `Identifier`.")]
51pub type ResourceLocation = azalea_registry::identifier::Identifier;
52
53pub mod chat {
56 pub use azalea_chat::*;
57 #[deprecated = "moved to `azalea::client_chat`."]
58 pub type ChatPacket = azalea_client::client_chat::ChatPacket;
59}
60
61pub use azalea_registry::identifier::Identifier;
62pub use azalea_world as world;
63pub use bevy_app as app;
64pub use bevy_ecs as ecs;
65use bevy_ecs::{component::Component, resource::Resource};
66pub use builder::ClientBuilder;
67use futures::future::BoxFuture;
68pub use join_opts::JoinOpts;
69
70pub use crate::{
71 client_impl::{Client, StartClientOpts, error},
72 entity_ref::EntityRef,
73 events::Event,
74};
75
76pub type Result<T> = error::AzaleaResult<T>;
80
81pub type BoxHandleFn<S, R> = Box<dyn Fn(Client, Event, S) -> BoxFuture<'static, R> + Send>;
82pub type HandleFn<S, Fut> = fn(Client, Event, S) -> Fut;
83
84#[derive(Clone, Component, Default)]
92pub struct NoState;
93
94#[derive(Resource)]
115pub struct TokioRuntimeHandle(pub tokio::runtime::Handle);
116impl Deref for TokioRuntimeHandle {
117 type Target = tokio::runtime::Handle;
118 fn deref(&self) -> &Self::Target {
119 &self.0
120 }
121}