aboutsummaryrefslogtreecommitdiff
path: root/azalea-entity/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-entity/src')
-rw-r--r--azalea-entity/src/lib.rs13
1 files changed, 12 insertions, 1 deletions
diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs
index 506f5780..0e0178b5 100644
--- a/azalea-entity/src/lib.rs
+++ b/azalea-entity/src/lib.rs
@@ -4,7 +4,18 @@ use azalea_core::EntityPos;
pub struct Entity {
/// The incrementing numerical id of the entity.
pub id: u32,
- pub pos: EntityPos,
+ pos: EntityPos,
+}
+
+impl Entity {
+ pub fn pos(&self) -> &EntityPos {
+ &self.pos
+ }
+
+ pub fn set_pos(&mut self, pos: EntityPos) {
+ // TODO: check if it moved to another chunk
+ self.pos = pos;
+ }
}
// #[cfg(test)]