mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
Create azalea-entity
This commit is contained in:
parent
fcdb6d31ee
commit
f993e79a7e
8 changed files with 37 additions and 11 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
@ -106,6 +106,7 @@ dependencies = [
|
|||
"azalea-auth",
|
||||
"azalea-core",
|
||||
"azalea-crypto",
|
||||
"azalea-entity",
|
||||
"azalea-protocol",
|
||||
"azalea-world",
|
||||
"tokio",
|
||||
|
@ -132,6 +133,13 @@ dependencies = [
|
|||
"sha-1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "azalea-entity"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"azalea-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "azalea-language"
|
||||
version = "0.1.0"
|
||||
|
|
|
@ -12,6 +12,7 @@ members = [
|
|||
"azalea-world",
|
||||
"azalea-language",
|
||||
"azalea-block",
|
||||
"azalea-entity",
|
||||
]
|
||||
|
||||
[profile.release]
|
||||
|
|
|
@ -9,6 +9,7 @@ version = "0.1.0"
|
|||
azalea-auth = {path = "../azalea-auth"}
|
||||
azalea-core = {path = "../azalea-core"}
|
||||
azalea-crypto = {path = "../azalea-crypto"}
|
||||
azalea-entity = {path = "../azalea-entity"}
|
||||
azalea-protocol = {path = "../azalea-protocol"}
|
||||
azalea-world = {path = "../azalea-world"}
|
||||
tokio = {version = "1.18.0", features = ["sync"]}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
use azalea_core::EntityPos;
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct Entity {
|
||||
/// The incremental numerical id of the entity.
|
||||
pub id: u32,
|
||||
pub pos: EntityPos,
|
||||
}
|
|
@ -1,12 +1,10 @@
|
|||
//! Significantly abstract azalea-protocol so it's actually useable for bots.
|
||||
|
||||
mod connect;
|
||||
mod entity;
|
||||
pub mod ping;
|
||||
mod player;
|
||||
|
||||
pub use connect::{Account, Client, Event};
|
||||
pub use entity::Entity;
|
||||
pub use player::Player;
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use crate::Entity;
|
||||
use azalea_entity::Entity;
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct Player {
|
||||
|
|
9
azalea-entity/Cargo.toml
Normal file
9
azalea-entity/Cargo.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
[package]
|
||||
edition = "2021"
|
||||
name = "azalea-entity"
|
||||
version = "0.1.0"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
azalea-core = {path = "../azalea-core"}
|
17
azalea-entity/src/lib.rs
Normal file
17
azalea-entity/src/lib.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
use azalea_core::EntityPos;
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct Entity {
|
||||
/// The incrementing numerical id of the entity.
|
||||
pub id: u32,
|
||||
pub pos: EntityPos,
|
||||
}
|
||||
|
||||
// #[cfg(test)]
|
||||
// mod tests {
|
||||
// #[test]
|
||||
// fn it_works() {
|
||||
// let result = 2 + 2;
|
||||
// assert_eq!(result, 4);
|
||||
// }
|
||||
// }
|
Loading…
Add table
Reference in a new issue