1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 06:16:04 +00:00

fix ordering for handle_attack_queued

This commit is contained in:
mat 2025-04-04 13:48:48 -08:45
parent efc28db6cf
commit adf8a604c4
3 changed files with 5 additions and 3 deletions

View file

@ -33,7 +33,9 @@ impl Plugin for AttackPlugin {
(
increment_ticks_since_last_attack,
update_attack_strength_scale.after(PhysicsSet),
handle_attack_queued.before(super::tick_end::game_tick_packet),
handle_attack_queued
.before(super::tick_end::game_tick_packet)
.after(super::movement::send_sprinting_if_needed),
)
.chain(),
);

View file

@ -287,7 +287,7 @@ pub fn send_player_input_packet(
}
}
fn send_sprinting_if_needed(
pub fn send_sprinting_if_needed(
mut query: Query<(Entity, &MinecraftEntityId, &Sprinting, &mut PhysicsState)>,
mut commands: Commands,
) {

View file

@ -77,7 +77,7 @@ pub fn register(commands: &mut CommandDispatcher<Mutex<CommandSource>>) {
commands.register(literal("down").executes(|ctx: &Ctx| {
let source = ctx.source.clone();
tokio::spawn(async move {
let mut bot = source.lock().bot.clone();
let bot = source.lock().bot.clone();
let position = BlockPos::from(bot.position());
source.lock().reply("mining...");
bot.mine(position.down(1)).await;