diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-09 13:29:59 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-09 13:29:59 -0600 |
| commit | 26d619c9a329087a23d6577ee74bd764f50cd773 (patch) | |
| tree | 8020fe902257764a23a445c6ed9987ea4848189d /azalea/src/pathfinder | |
| parent | 84cd261118c9d1e3145d4d1751c0d22098cd8cd8 (diff) | |
| download | azalea-drasl-26d619c9a329087a23d6577ee74bd764f50cd773.tar.xz | |
Enchantments (#286)
* start implementing enchants
* store parsed registries
* more work on enchants
* implement deserializer for some entity effects
* mostly working definitions for enchants
* fix tests
* detect equipment changes
* fix errors
* update changelog
* fix some imports
* remove outdated todo
* add basic test for enchants applying attributes
* use git simdnbt
Diffstat (limited to 'azalea/src/pathfinder')
| -rw-r--r-- | azalea/src/pathfinder/mod.rs | 4 | ||||
| -rw-r--r-- | azalea/src/pathfinder/simulation.rs | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs index 7f0bd841..81b2b845 100644 --- a/azalea/src/pathfinder/mod.rs +++ b/azalea/src/pathfinder/mod.rs @@ -35,7 +35,7 @@ use astar::{Edge, PathfinderTimeout}; use azalea_block::{BlockState, BlockTrait}; use azalea_client::{ StartSprintEvent, StartWalkEvent, - inventory::{Inventory, InventorySystems}, + inventory::InventorySystems, local_player::InstanceHolder, mining::{Mining, MiningSystems, StartMiningBlockEvent}, movement::MoveEventsSystems, @@ -44,7 +44,7 @@ use azalea_core::{ position::{BlockPos, Vec3}, tick::GameTick, }; -use azalea_entity::{LocalEntity, Physics, Position, metadata::Player}; +use azalea_entity::{LocalEntity, Physics, Position, inventory::Inventory, metadata::Player}; use azalea_physics::{PhysicsSystems, get_block_pos_below_that_affects_movement}; use azalea_world::{InstanceContainer, InstanceName}; use bevy_app::{PreUpdate, Update}; diff --git a/azalea/src/pathfinder/simulation.rs b/azalea/src/pathfinder/simulation.rs index 3b8a46cc..df049b3e 100644 --- a/azalea/src/pathfinder/simulation.rs +++ b/azalea/src/pathfinder/simulation.rs @@ -3,12 +3,13 @@ use std::sync::Arc; use azalea_client::{ - PhysicsState, interact::BlockStatePredictionHandler, inventory::Inventory, - local_player::LocalGameMode, mining::MineBundle, + PhysicsState, interact::BlockStatePredictionHandler, local_player::LocalGameMode, + mining::MineBundle, }; use azalea_core::{game_type::GameMode, identifier::Identifier, position::Vec3, tick::GameTick}; use azalea_entity::{ - Attributes, LookDirection, Physics, Position, default_attributes, dimensions::EntityDimensions, + Attributes, LookDirection, Physics, Position, dimensions::EntityDimensions, + inventory::Inventory, }; use azalea_registry::EntityKind; use azalea_world::{ChunkStorage, Instance, InstanceContainer, MinecraftEntityId, PartialInstance}; @@ -36,7 +37,7 @@ impl SimulatedPlayerBundle { physics: Physics::new(&dimensions, position), physics_state: PhysicsState::default(), look_direction: LookDirection::default(), - attributes: default_attributes(EntityKind::Player), + attributes: Attributes::new(EntityKind::Player), inventory: Inventory::default(), } } |
