style: set group_imports rustfmt option
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use super::{Client, Container, ContainerRef, ItemStack, Vec3};
|
||||
use azalea::{
|
||||
BlockPos,
|
||||
inventory::{Inventory, Menu, Player, SlotList},
|
||||
@@ -8,6 +7,8 @@ use azalea::{
|
||||
use log::error;
|
||||
use mlua::{Lua, Result, UserDataRef, Value};
|
||||
|
||||
use super::{Client, Container, ContainerRef, ItemStack, Vec3};
|
||||
|
||||
pub fn container(_lua: &Lua, client: &Client) -> Result<Option<ContainerRef>> {
|
||||
Ok(client.get_open_container().map(ContainerRef))
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use super::{Client, Vec3};
|
||||
use azalea::{
|
||||
BlockPos, BotClientExt,
|
||||
protocol::packets::game::{ServerboundUseItem, s_interact::InteractionHand},
|
||||
@@ -7,6 +6,8 @@ use azalea::{
|
||||
use log::error;
|
||||
use mlua::{Lua, Result, UserDataRef};
|
||||
|
||||
use super::{Client, Vec3};
|
||||
|
||||
pub fn attack(_lua: &Lua, client: &mut Client, entity_id: i32) -> Result<()> {
|
||||
client.attack(MinecraftEntityId(entity_id));
|
||||
Ok(())
|
||||
|
||||
@@ -6,15 +6,17 @@ mod movement;
|
||||
mod state;
|
||||
mod world;
|
||||
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use azalea::{Client as AzaleaClient, world::MinecraftEntityId};
|
||||
use mlua::{Lua, Result, UserData, UserDataFields, UserDataMethods};
|
||||
|
||||
use super::{
|
||||
container::{Container, ContainerRef, item_stack::ItemStack},
|
||||
direction::Direction,
|
||||
player::Player,
|
||||
vec3::Vec3,
|
||||
};
|
||||
use azalea::{Client as AzaleaClient, world::MinecraftEntityId};
|
||||
use mlua::{Lua, Result, UserData, UserDataFields, UserDataMethods};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
pub struct Client(pub Option<AzaleaClient>);
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use super::{Client, Direction, Vec3};
|
||||
use azalea::{
|
||||
BlockPos, BotClientExt, SprintDirection, WalkDirection,
|
||||
entity::Position,
|
||||
@@ -13,6 +12,8 @@ use azalea::{
|
||||
use log::error;
|
||||
use mlua::{FromLua, Lua, Result, Table, UserDataRef, Value};
|
||||
|
||||
use super::{Client, Direction, Vec3};
|
||||
|
||||
pub fn direction(_lua: &Lua, client: &Client) -> Result<Direction> {
|
||||
let direction = client.direction();
|
||||
Ok(Direction {
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
use crate::hacks::anti_knockback::AntiKnockback;
|
||||
|
||||
use super::Client;
|
||||
use azalea::{
|
||||
ClientInformation,
|
||||
entity::metadata::{AirSupply, Score},
|
||||
@@ -9,6 +6,9 @@ use azalea::{
|
||||
};
|
||||
use mlua::{Error, Lua, Result, Table, UserDataRef};
|
||||
|
||||
use super::Client;
|
||||
use crate::hacks::anti_knockback::AntiKnockback;
|
||||
|
||||
pub fn air_supply(_lua: &Lua, client: &Client) -> Result<i32> {
|
||||
Ok(client.component::<AirSupply>().0)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use super::{Client, Direction, Vec3};
|
||||
use azalea::{
|
||||
BlockPos,
|
||||
blocks::{BlockState, BlockStates},
|
||||
@@ -11,6 +10,8 @@ use azalea::{
|
||||
};
|
||||
use mlua::{Function, Lua, Result, Table, UserDataRef};
|
||||
|
||||
use super::{Client, Direction, Vec3};
|
||||
|
||||
pub fn blocks(
|
||||
_lua: &Lua,
|
||||
client: &Client,
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
mod queries;
|
||||
pub mod find;
|
||||
|
||||
use super::{Client, Direction, Vec3};
|
||||
use azalea::{BlockPos, auto_tool::AutoToolClientExt, blocks::BlockState, world::InstanceName};
|
||||
use mlua::{Lua, Result, Table};
|
||||
|
||||
use super::{Client, Direction, Vec3};
|
||||
|
||||
pub fn best_tool_for_block(lua: &Lua, client: &Client, block_state: u16) -> Result<Table> {
|
||||
let result = client.best_tool_in_hotbar_for_block(BlockState { id: block_state });
|
||||
let table = lua.create_table()?;
|
||||
|
||||
Reference in New Issue
Block a user