mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
upgrade deps and slightly improve docs
This commit is contained in:
parent
5c7332b469
commit
aa2039c868
4 changed files with 416 additions and 219 deletions
623
Cargo.lock
generated
623
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -688,7 +688,11 @@ impl Client {
|
|||
/// receives the login packet, its true position may be set ticks
|
||||
/// later.
|
||||
pub fn position(&self) -> Vec3 {
|
||||
Vec3::from(&self.component::<Position>())
|
||||
Vec3::from(
|
||||
&self
|
||||
.get_component::<Position>()
|
||||
.expect("the client's position hasn't been initialized yet"),
|
||||
)
|
||||
}
|
||||
|
||||
/// Get the position of this client's eyes.
|
||||
|
|
|
@ -60,6 +60,7 @@ use crate::{
|
|||
/// Note: Events are sent before they're processed, so for example game ticks
|
||||
/// happen at the beginning of a tick before anything has happened.
|
||||
#[derive(Debug, Clone)]
|
||||
#[non_exhaustive]
|
||||
pub enum Event {
|
||||
/// Happens right after the bot switches into the Game state, but before
|
||||
/// it's actually spawned. This can be useful for setting the client
|
||||
|
@ -72,8 +73,8 @@ pub enum Event {
|
|||
/// Fired when we receive a login packet, which is after [`Event::Init`] but
|
||||
/// before [`Event::Spawn`]. You usually want [`Event::Spawn`] instead.
|
||||
///
|
||||
/// Your position will be [`Vec3::ZERO`] immediately after you receive this
|
||||
/// packet, but it'll be ready by the time you get [`Event::Spawn`].
|
||||
/// Your position may be [`Vec3::ZERO`] immediately after you receive this
|
||||
/// event, but it'll be ready by the time you get [`Event::Spawn`].
|
||||
///
|
||||
/// [`Vec3::ZERO`]: azalea_core::position::Vec3::ZERO
|
||||
Login,
|
||||
|
|
|
@ -539,6 +539,7 @@ impl Default for SwarmBuilder<NoState, NoSwarmState, (), ()> {
|
|||
|
||||
/// An event about something that doesn't have to do with a single bot.
|
||||
#[derive(Clone, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum SwarmEvent {
|
||||
/// All the bots in the swarm have successfully joined the server.
|
||||
Login,
|
||||
|
|
Loading…
Add table
Reference in a new issue