aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/pathfinder/simulation.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-06-02 03:14:08 -0430
committermat <git@matdoes.dev>2025-06-02 03:14:08 -0430
commit0569862a1b1f46f1854f4eafd1569359397f2515 (patch)
tree01f20f6b078db41d34f08d7f52000f9fb46f7c45 /azalea/src/pathfinder/simulation.rs
parentd7cd30505954d841f05d85a4cfd74412739778dd (diff)
downloadazalea-drasl-0569862a1b1f46f1854f4eafd1569359397f2515.tar.xz
fix issues related to pathfinder mining
Diffstat (limited to 'azalea/src/pathfinder/simulation.rs')
-rw-r--r--azalea/src/pathfinder/simulation.rs18
1 files changed, 14 insertions, 4 deletions
diff --git a/azalea/src/pathfinder/simulation.rs b/azalea/src/pathfinder/simulation.rs
index 5a68bf88..337efda7 100644
--- a/azalea/src/pathfinder/simulation.rs
+++ b/azalea/src/pathfinder/simulation.rs
@@ -2,8 +2,13 @@
use std::sync::Arc;
-use azalea_client::{PhysicsState, inventory::Inventory, packet::game::SendPacketEvent};
-use azalea_core::{position::Vec3, resource_location::ResourceLocation, tick::GameTick};
+use azalea_client::{
+ PhysicsState, interact::CurrentSequenceNumber, inventory::Inventory,
+ local_player::LocalGameMode, mining::MineBundle, packet::game::SendPacketEvent,
+};
+use azalea_core::{
+ game_type::GameMode, position::Vec3, resource_location::ResourceLocation, tick::GameTick,
+};
use azalea_entity::{
Attributes, EntityDimensions, LookDirection, Physics, Position, attributes::AttributeInstance,
};
@@ -87,7 +92,7 @@ fn create_simulation_instance(chunks: ChunkStorage) -> (App, Arc<RwLock<Instance
fn create_simulation_player_complete_bundle(
instance: Arc<RwLock<Instance>>,
player: &SimulatedPlayerBundle,
-) -> impl Bundle + use<> {
+) -> impl Bundle {
let instance_name = simulation_instance_name();
(
@@ -100,12 +105,17 @@ fn create_simulation_player_complete_bundle(
azalea_registry::EntityKind::Player,
instance_name,
),
- azalea_client::InstanceHolder {
+ azalea_client::local_player::InstanceHolder {
// partial_instance is never actually used by the pathfinder so
partial_instance: Arc::new(RwLock::new(PartialInstance::default())),
instance: instance.clone(),
},
Inventory::default(),
+ LocalGameMode::from(GameMode::Survival),
+ MineBundle::default(),
+ CurrentSequenceNumber::default(),
+ azalea_client::local_player::PermissionLevel::default(),
+ azalea_client::local_player::PlayerAbilities::default(),
)
}