aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src/lib.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-02-24 21:03:02 -0600
committermat <git@matdoes.dev>2024-02-24 21:03:02 -0600
commit13426b035e43c4435854f175155439ab28a18544 (patch)
tree20b6c64ccf6947320f926bb3bc0951971d5c4c22 /azalea-entity/src/lib.rs
parentc38957374c288eb41b7dbd905071a469c7bbb2b1 (diff)
downloadazalea-drasl-13426b035e43c4435854f175155439ab28a18544.tar.xz
add Display for Vec3, add SimulationSet, and add EntityChunkPos component
Diffstat (limited to 'azalea-entity/src/lib.rs')
-rw-r--r--azalea-entity/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs
index e08284a9..1b643e4a 100644
--- a/azalea-entity/src/lib.rs
+++ b/azalea-entity/src/lib.rs
@@ -23,6 +23,7 @@ use bevy_ecs::{bundle::Bundle, component::Component};
pub use data::*;
use derive_more::{Deref, DerefMut};
pub use dimensions::EntityDimensions;
+use plugin::indexing::EntityChunkPos;
use std::{
fmt::Debug,
hash::{Hash, Hasher},
@@ -347,6 +348,9 @@ pub struct EntityBundle {
pub world_name: InstanceName,
pub position: Position,
pub last_sent_position: LastSentPosition,
+
+ pub chunk_pos: EntityChunkPos,
+
pub physics: Physics,
pub direction: LookDirection,
pub eye_height: EyeHeight,
@@ -375,6 +379,7 @@ impl EntityBundle {
uuid: EntityUuid(uuid),
world_name: InstanceName(world_name),
position: Position(pos),
+ chunk_pos: EntityChunkPos(ChunkPos::from(&pos)),
last_sent_position: LastSentPosition(pos),
physics: Physics::new(dimensions, &pos),
eye_height: EyeHeight(eye_height),