feat: switch to luajit for more features

This commit is contained in:
2025-02-23 02:49:35 -05:00
parent b1dbfa6110
commit 168ac1bb46
10 changed files with 48 additions and 65 deletions

View File

@@ -58,7 +58,7 @@ impl UserData for Client {
fn add_methods<M: UserDataMethods<Self>>(m: &mut M) {
m.add_async_method("attack", interaction::attack);
m.add_async_method("goto", movement::goto);
m.add_async_method("go_to", movement::go_to);
m.add_async_method("look_at", movement::look_at);
m.add_async_method("mine", interaction::mine);
m.add_async_method("open_container_at", container::open_container_at);

View File

@@ -22,7 +22,7 @@ pub fn eye_position(_lua: &Lua, client: &Client) -> Result<Vec3> {
Ok(Vec3::from(client.eye_position()))
}
pub async fn goto(
pub async fn go_to(
lua: Lua,
client: UserDataRef<Client>,
(data, metadata): (Value, Option<Table>),
@@ -89,7 +89,7 @@ pub async fn goto(
&client,
without_mining,
YGoal {
y: data.as_integer().ok_or(error)?,
y: data.as_table().ok_or(error)?.get("y")?,
},
),
_ => {