diff options
| author | mat <git@matdoes.dev> | 2025-06-17 09:30:09 +1200 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-16 21:31:04 +0000 |
| commit | fd9bf168716f195e7e6225b93dfb099aa01b1fde (patch) | |
| tree | e617f464e2df32cbc8678b56c5c1df8cae1c4dcb /azalea/src | |
| parent | 713dae7110ad4119469323b87fd95a7f2a544ed0 (diff) | |
| download | azalea-drasl-fd9bf168716f195e7e6225b93dfb099aa01b1fde.tar.xz | |
implement EntityHitResult
Diffstat (limited to 'azalea/src')
| -rw-r--r-- | azalea/src/pathfinder/goals.rs | 2 | ||||
| -rw-r--r-- | azalea/src/pathfinder/simulation.rs | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/azalea/src/pathfinder/goals.rs b/azalea/src/pathfinder/goals.rs index 95786561..7a830973 100644 --- a/azalea/src/pathfinder/goals.rs +++ b/azalea/src/pathfinder/goals.rs @@ -237,7 +237,7 @@ impl Goal for ReachBlockPosGoal { let eye_position = n.center_bottom().up(1.62); let look_direction = crate::direction_looking_at(eye_position, self.pos.center()); - let block_hit_result = azalea_client::interact::pick_block( + let block_hit_result = azalea_client::interact::pick::pick_block( look_direction, eye_position, &self.chunk_storage, diff --git a/azalea/src/pathfinder/simulation.rs b/azalea/src/pathfinder/simulation.rs index 5c548aa2..7f93a671 100644 --- a/azalea/src/pathfinder/simulation.rs +++ b/azalea/src/pathfinder/simulation.rs @@ -10,7 +10,7 @@ use azalea_core::{ game_type::GameMode, position::Vec3, resource_location::ResourceLocation, tick::GameTick, }; use azalea_entity::{ - Attributes, EntityDimensions, LookDirection, Physics, Position, attributes::AttributeInstance, + Attributes, EntityDimensions, LookDirection, Physics, Position, default_attributes, }; use azalea_registry::EntityKind; use azalea_world::{ChunkStorage, Instance, InstanceContainer, MinecraftEntityId, PartialInstance}; @@ -38,11 +38,7 @@ impl SimulatedPlayerBundle { physics: Physics::new(dimensions, position), physics_state: PhysicsState::default(), look_direction: LookDirection::default(), - attributes: Attributes { - speed: AttributeInstance::new(0.1), - attack_speed: AttributeInstance::new(4.0), - water_movement_efficiency: AttributeInstance::new(0.0), - }, + attributes: default_attributes(EntityKind::Player), inventory: Inventory::default(), } } |
