feat(client): pass entity direction in find_entities
This commit is contained in:
@@ -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()?;
|
||||
|
Reference in New Issue
Block a user