feat(client): pass entity direction in find_entities

This commit is contained in:
2025-02-22 14:24:02 -05:00
parent 550aee5578
commit 3a93bb9e33
3 changed files with 20 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
use azalea::entity::LookDirection;
use mlua::{FromLua, IntoLua, Lua, Result, Value};
#[derive(Clone)]
@@ -6,6 +7,15 @@ pub struct Direction {
pub y: f32,
}
impl From<&LookDirection> for Direction {
fn from(d: &LookDirection) -> Self {
Self {
x: d.x_rot,
y: d.y_rot,
}
}
}
impl IntoLua for Direction {
fn into_lua(self, lua: &Lua) -> Result<Value> {
let table = lua.create_table()?;