aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src/lib.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2023-07-14 22:20:40 -0500
committerGitHub <noreply@github.com>2023-07-14 22:20:40 -0500
commit7405427199e5a994d4a6a706f84434a69cb7a7d9 (patch)
treeca537e5d761bc053187d952fced0915c850b92aa /azalea-physics/src/lib.rs
parentd1afd02aa84e7b4450c1607277f078eb2a0f1bf3 (diff)
downloadazalea-drasl-7405427199e5a994d4a6a706f84434a69cb7a7d9.tar.xz
Mining (#95)
* more mining stuff * initialize azalea-tags crate * more mining stuff 2 * mining in ecs * well technically mining works but no codegen for how long it takes to mine each block yet * rename downloads to __cache__ it was bothering me since it's not *just* downloads * codegen block behavior * fix not sending packet to finish breaking block * mining animation 🎉 * clippy * cleanup, move Client::mine into a client extension * add azalea/src/mining.rs --------- Co-authored-by: mat <git@matdoes.dev>
Diffstat (limited to 'azalea-physics/src/lib.rs')
-rw-r--r--azalea-physics/src/lib.rs23
1 files changed, 10 insertions, 13 deletions
diff --git a/azalea-physics/src/lib.rs b/azalea-physics/src/lib.rs
index 0d9f3be4..6b451dd6 100644
--- a/azalea-physics/src/lib.rs
+++ b/azalea-physics/src/lib.rs
@@ -6,13 +6,12 @@ pub mod collision;
use azalea_block::{Block, BlockState};
use azalea_core::{BlockPos, Vec3};
-use azalea_world::{
- entity::{
- clamp_look_direction, metadata::Sprinting, move_relative, Attributes, Jumping, Local,
- LookDirection, Physics, Position, WorldName,
- },
- Instance, InstanceContainer,
+use azalea_entity::update_bounding_box;
+use azalea_entity::{
+ clamp_look_direction, metadata::Sprinting, move_relative, Attributes, Jumping, Local,
+ LookDirection, Physics, Position,
};
+use azalea_world::{Instance, InstanceContainer, InstanceName};
use bevy_app::{App, FixedUpdate, Plugin, Update};
use bevy_ecs::{
entity::Entity,
@@ -35,7 +34,7 @@ impl Plugin for PhysicsPlugin {
.add_systems(
Update,
force_jump_listener
- .before(azalea_world::entity::update_bounding_box)
+ .before(update_bounding_box)
.after(clamp_look_direction),
)
.add_systems(FixedUpdate, (ai_step, travel).chain().in_set(PhysicsSet));
@@ -51,7 +50,7 @@ fn travel(
&mut LookDirection,
&mut Position,
&Attributes,
- &WorldName,
+ &InstanceName,
),
With<Local>,
>,
@@ -176,7 +175,7 @@ pub fn force_jump_listener(
&Position,
&LookDirection,
&Sprinting,
- &WorldName,
+ &InstanceName,
)>,
instance_container: Res<InstanceContainer>,
mut events: EventReader<ForceJumpEvent>,
@@ -327,10 +326,8 @@ mod tests {
use super::*;
use azalea_core::{ChunkPos, ResourceLocation};
- use azalea_world::{
- entity::{EntityBundle, EntityPlugin, MinecraftEntityId},
- Chunk, PartialInstance,
- };
+ use azalea_entity::{EntityBundle, EntityPlugin};
+ use azalea_world::{Chunk, MinecraftEntityId, PartialInstance};
use bevy_app::App;
use bevy_time::fixed_timestep::FixedTime;
use uuid::Uuid;