diff options
Diffstat (limited to 'azalea-world/src')
| -rw-r--r-- | azalea-world/src/chunk.rs | 2 | ||||
| -rw-r--r-- | azalea-world/src/lib.rs | 30 | ||||
| -rw-r--r-- | azalea-world/src/palette.rs | 2 |
3 files changed, 17 insertions, 17 deletions
diff --git a/azalea-world/src/chunk.rs b/azalea-world/src/chunk.rs index 77fa8786..27ef1ca7 100644 --- a/azalea-world/src/chunk.rs +++ b/azalea-world/src/chunk.rs @@ -2,8 +2,8 @@ use crate::palette::PalettedContainer; use crate::palette::PalettedContainerType; use crate::World; use azalea_block::BlockState; +use azalea_buf::{McBufReadable, McBufWritable}; use azalea_core::{BlockPos, ChunkBlockPos, ChunkPos, ChunkSectionBlockPos}; -use azalea_protocol::mc_buf::{McBufReadable, McBufWritable}; use std::fmt::Debug; use std::{ io::{Read, Write}, 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); diff --git a/azalea-world/src/palette.rs b/azalea-world/src/palette.rs index be6f022c..4779dc4b 100644 --- a/azalea-world/src/palette.rs +++ b/azalea-world/src/palette.rs @@ -1,4 +1,4 @@ -use azalea_protocol::mc_buf::{McBufReadable, McBufVarReadable, McBufWritable, Readable, Writable}; +use azalea_buf::{McBufReadable, McBufVarReadable, McBufWritable, Readable, Writable}; use std::io::{Read, Write}; use crate::BitStorage; |
