aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src/plugin/mod.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-12-12 09:05:17 -0300
committermat <git@matdoes.dev>2025-12-12 09:05:17 -0300
commitb6e2e14e67c71a7b8473ea56e3caaf33fd50905d (patch)
tree7c83461a78d086920cebb2002ae8429f752d5a60 /azalea-entity/src/plugin/mod.rs
parentca70e5e321a3c174c53d0650feed84db471ac30d (diff)
downloadazalea-drasl-b6e2e14e67c71a7b8473ea56e3caaf33fd50905d.tar.xz
move update_fluid_on_eyes from Update to GameTick
Diffstat (limited to 'azalea-entity/src/plugin/mod.rs')
-rw-r--r--azalea-entity/src/plugin/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/azalea-entity/src/plugin/mod.rs b/azalea-entity/src/plugin/mod.rs
index 4ff6f4cd..7296f2ff 100644
--- a/azalea-entity/src/plugin/mod.rs
+++ b/azalea-entity/src/plugin/mod.rs
@@ -5,7 +5,7 @@ use std::collections::HashSet;
use azalea_block::{BlockState, BlockTrait, fluid_state::FluidKind, properties};
use azalea_core::{
- position::{BlockPos, ChunkPos, Vec3},
+ position::{BlockPos, ChunkPos},
tick::GameTick,
};
use azalea_registry::{builtin::BlockKind, tags};
@@ -60,12 +60,12 @@ impl Plugin for EntityPlugin {
add_dead,
clamp_look_direction,
update_on_climbable,
- (update_dimensions, update_bounding_box, update_fluid_on_eyes).chain(),
+ (update_dimensions, update_bounding_box).chain(),
update_crouching,
),
),
)
- .add_systems(GameTick, update_in_loaded_chunk)
+ .add_systems(GameTick, (update_in_loaded_chunk, update_fluid_on_eyes))
.init_resource::<EntityUuidIndex>();
}
}
@@ -109,7 +109,7 @@ pub fn update_fluid_on_eyes(
};
let adjusted_eye_y = position.y + (dimensions.eye_height as f64) - 0.1111111119389534;
- let eye_block_pos = BlockPos::from(Vec3::new(position.x, adjusted_eye_y, position.z));
+ let eye_block_pos = BlockPos::from(position.with_y(adjusted_eye_y));
let fluid_at_eye = instance
.read()
.get_fluid_state(eye_block_pos)