mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
i still haven't actually tested any of this yet lol but in theory it should all work i'll probably either actually test az-client and fix all the remaining issues or update the azalea crate next ok also one thing that i'm not particularly happy with is how the packet handlers are doing ugly queries like ```rs let local_player = ecs .query::<&LocalPlayer>() .get_mut(ecs, player_entity) .unwrap(); ``` i think the right way to solve it would be by putting every packet handler in its own system but i haven't come up with a way to make that not be really annoying yet
13 lines
314 B
Rust
Executable file
13 lines
314 B
Rust
Executable file
use azalea_buf::McBuf;
|
|
use azalea_core::Vec3;
|
|
use azalea_protocol_macros::ClientboundGamePacket;
|
|
|
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
|
pub struct ClientboundTeleportEntityPacket {
|
|
#[var]
|
|
pub id: u32,
|
|
pub position: Vec3,
|
|
pub y_rot: i8,
|
|
pub x_rot: i8,
|
|
pub on_ground: bool,
|
|
}
|