aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src/lib.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-09-27 18:41:36 -1030
committermat <git@matdoes.dev>2025-09-27 20:26:41 -0845
commit74dcb7b37d953ec4d45dd6aac4c8e598c87def7d (patch)
tree22e6ab1849ee01d40f3d484ea0c8db52aa6649b5 /azalea-physics/src/lib.rs
parent63bef6486dc1f3c9ef4b4f0d71e139d7035b6432 (diff)
downloadazalea-drasl-74dcb7b37d953ec4d45dd6aac4c8e598c87def7d.tar.xz
allow picking other bots in hit results
Diffstat (limited to 'azalea-physics/src/lib.rs')
-rw-r--r--azalea-physics/src/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs
index fb62b48b..19b58e5c 100644
--- a/azalea-physics/src/lib.rs
+++ b/azalea-physics/src/lib.rs
@@ -22,12 +22,12 @@ use azalea_entity::{
};
use azalea_registry::{Block, EntityKind};
use azalea_world::{Instance, InstanceContainer, InstanceName};
-use bevy_app::{App, Plugin};
+use bevy_app::{App, Plugin, Update};
use bevy_ecs::prelude::*;
use clip::box_traverse_blocks;
use collision::{BLOCK_SHAPE, BlockWithShape, VoxelShape, move_colliding};
-use crate::collision::MoveCtx;
+use crate::collision::{MoveCtx, entity_collisions::update_last_bounding_box};
/// A Bevy [`SystemSet`] for running physics that makes entities do things.
#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
@@ -49,6 +49,11 @@ impl Plugin for PhysicsPlugin {
.chain()
.in_set(PhysicsSet)
.after(azalea_entity::update_in_loaded_chunk),
+ )
+ // we want this to happen after packets are handled but before physics
+ .add_systems(
+ Update,
+ update_last_bounding_box.after(azalea_entity::update_bounding_box),
);
}
}