aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src/lib.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-23 19:17:04 -0500
committermat <github@matdoes.dev>2022-06-23 19:17:04 -0500
commit37c6618c16319a7f40fd2e165190407472598e84 (patch)
tree6d712df8893041f0e49cfa6ca7adc9a411d39b84 /azalea-world/src/lib.rs
parent1089aa7961bd9af67c94dec9c5dbc6bd9f275225 (diff)
downloadazalea-drasl-37c6618c16319a7f40fd2e165190407472598e84.tar.xz
Fix everything so azalea-buf works
Diffstat (limited to 'azalea-world/src/lib.rs')
-rw-r--r--azalea-world/src/lib.rs30
1 files changed, 15 insertions, 15 deletions
diff --git a/azalea-world/src/lib.rs b/azalea-world/src/lib.rs
index 6e922bb9..cbc5c633 100644
--- a/azalea-world/src/lib.rs
+++ b/azalea-world/src/lib.rs
@@ -72,21 +72,21 @@ impl World {
Ok(())
}
- pub fn move_entity_with_delta(&mut self, entity_id: u32, delta: PositionDelta) -> Result<(), String> {
- let entity = self
- .entity_storage
- .get_mut_by_id(entity_id)
- .ok_or_else(|| "Moving entity that doesn't exist".to_string())?;
- let old_chunk = ChunkPos::from(entity.pos());
- let new_chunk = ChunkPos::from(&new_pos);
- // this is fine because we update the chunk below
- entity.unsafe_move(new_pos);
- if old_chunk != new_chunk {
- self.entity_storage
- .update_entity_chunk(entity_id, &old_chunk, &new_chunk);
- }
- Ok(())
- }
+ // pub fn move_entity_with_delta(&mut self, entity_id: u32, delta: PositionDelta) -> Result<(), String> {
+ // let entity = self
+ // .entity_storage
+ // .get_mut_by_id(entity_id)
+ // .ok_or_else(|| "Moving entity that doesn't exist".to_string())?;
+ // let old_chunk = ChunkPos::from(entity.pos());
+ // let new_chunk = ChunkPos::from(&new_pos);
+ // // this is fine because we update the chunk below
+ // entity.unsafe_move(new_pos);
+ // if old_chunk != new_chunk {
+ // self.entity_storage
+ // .update_entity_chunk(entity_id, &old_chunk, &new_chunk);
+ // }
+ // Ok(())
+ // }
pub fn add_entity(&mut self, entity: Entity) {
self.entity_storage.insert(entity);