aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src
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
parent1089aa7961bd9af67c94dec9c5dbc6bd9f275225 (diff)
downloadazalea-drasl-37c6618c16319a7f40fd2e165190407472598e84.tar.xz
Fix everything so azalea-buf works
Diffstat (limited to 'azalea-world/src')
-rw-r--r--azalea-world/src/chunk.rs2
-rw-r--r--azalea-world/src/lib.rs30
-rw-r--r--azalea-world/src/palette.rs2
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;