aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/c_section_blocks_update.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2026-01-13 10:51:45 -0600
committerGitHub <noreply@github.com>2026-01-13 10:51:45 -0600
commitb21ac946cafaacc9ee2478ea48ed9e72554f79ed (patch)
tree4d05744b9801e94f5da6563d8fabddfb20d1c7b7 /azalea-protocol/src/packets/game/c_section_blocks_update.rs
parentd5fa5e32b37754b3b5c136e58821e48cd3b7c2ff (diff)
downloadazalea-drasl-b21ac946cafaacc9ee2478ea48ed9e72554f79ed.tar.xz
Merge AzaleaRead and AzaleaWrite (#305)
Diffstat (limited to 'azalea-protocol/src/packets/game/c_section_blocks_update.rs')
-rw-r--r--azalea-protocol/src/packets/game/c_section_blocks_update.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/azalea-protocol/src/packets/game/c_section_blocks_update.rs b/azalea-protocol/src/packets/game/c_section_blocks_update.rs
index 070d2a9e..8803e34a 100644
--- a/azalea-protocol/src/packets/game/c_section_blocks_update.rs
+++ b/azalea-protocol/src/packets/game/c_section_blocks_update.rs
@@ -1,7 +1,7 @@
use std::io::{self, Cursor, Write};
use azalea_block::BlockState;
-use azalea_buf::{AzBuf, AzaleaRead, AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError};
+use azalea_buf::{AzBuf, AzBufVar, BufReadError};
use azalea_core::position::{ChunkSectionBlockPos, ChunkSectionPos};
use azalea_protocol_macros::ClientboundGamePacket;
@@ -17,7 +17,7 @@ pub struct BlockStateWithPosition {
pub state: BlockState,
}
-impl AzaleaRead for BlockStateWithPosition {
+impl AzBuf for BlockStateWithPosition {
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
let data = u64::azalea_read_var(buf)?;
let position_part = data & 4095;
@@ -31,9 +31,6 @@ impl AzaleaRead for BlockStateWithPosition {
};
Ok(BlockStateWithPosition { pos, state })
}
-}
-
-impl AzaleaWrite for BlockStateWithPosition {
fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> {
let data = ((self.state.id() as u64) << 12)
| ((u64::from(self.pos.x) << 8) | (u64::from(self.pos.z) << 4) | u64::from(self.pos.y));