diff options
| author | mat <git@matdoes.dev> | 2023-12-17 15:59:20 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-12-17 15:59:23 -0600 |
| commit | 64527657d3426b88ee346752a9be57da6bb58ddc (patch) | |
| tree | 4a4b04d4ca522ecc85cc48ecbe95d139a62ea07f | |
| parent | 7aca36805a9a6e8ab4e11ad0234a55dcf5dff311 (diff) | |
| download | azalea-drasl-64527657d3426b88ee346752a9be57da6bb58ddc.tar.xz | |
fix tests
this was already fixed in pathfinder-extras but it's probably gonna be a while before that's merged
| -rw-r--r-- | azalea/src/pathfinder/simulation.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/azalea/src/pathfinder/simulation.rs b/azalea/src/pathfinder/simulation.rs index b41d895a..ab3b340e 100644 --- a/azalea/src/pathfinder/simulation.rs +++ b/azalea/src/pathfinder/simulation.rs @@ -9,7 +9,7 @@ use azalea_core::{position::Vec3, resource_location::ResourceLocation, tick::Gam use azalea_entity::{ attributes::AttributeInstance, Attributes, EntityDimensions, Physics, Position, }; -use azalea_world::{ChunkStorage, Instance, InstanceContainer, MinecraftEntityId}; +use azalea_world::{ChunkStorage, Instance, InstanceContainer, MinecraftEntityId, PartialInstance}; use bevy_app::App; use bevy_ecs::prelude::*; use parking_lot::RwLock; @@ -69,6 +69,10 @@ impl Simulation { super::PathfinderPlugin, crate::BotPlugin, azalea_client::task_pool::TaskPoolPlugin::default(), + // for mining + azalea_client::inventory::InventoryPlugin, + azalea_client::mining::MinePlugin, + azalea_client::interact::InteractPlugin, )) .insert_resource(InstanceContainer { instances: [(instance_name.clone(), Arc::downgrade(&instance.clone()))] @@ -92,6 +96,12 @@ impl Simulation { azalea_registry::EntityKind::Player, instance_name, ), + azalea_client::InstanceHolder { + // partial_instance is never actually used by the pathfinder so + partial_instance: Arc::new(RwLock::new(PartialInstance::default())), + instance: instance.clone(), + }, + InventoryComponent::default(), )); entity.insert(player); |
