pub use yog_body::*;
use yog_event::client;
use yog_event::entity::VANILLA_SIZE;
use crate::call;
pub fn track(uuid: &str, on: bool) {
call(&client::BodyTrack {
uuid: uuid.to_owned(),
on,
});
}
pub fn entity_data(uuid: &str, key: &str) -> Option<Vec<u8>> {
call(&client::EntityData {
uuid: uuid.to_owned(),
key: key.to_owned(),
})
.flatten()
.map(|v| v.bytes)
}
pub fn set_dimensions(uuid: &str, size: Option<(f32, f32, f32)>) {
let [width, height, eye] = size.map_or(VANILLA_SIZE, |(w, h, e)| [w, h, e]);
call(&client::SetDimensions {
uuid: uuid.to_owned(),
width,
height,
eye,
});
}
pub fn track_type(entity_type: &str, on: bool) {
call(&client::BodyTrackType {
entity_type: entity_type.to_owned(),
on,
});
}