aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/s_set_command_block.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/s_set_command_block.rs
parentd5fa5e32b37754b3b5c136e58821e48cd3b7c2ff (diff)
downloadazalea-drasl-b21ac946cafaacc9ee2478ea48ed9e72554f79ed.tar.xz
Merge AzaleaRead and AzaleaWrite (#305)
Diffstat (limited to 'azalea-protocol/src/packets/game/s_set_command_block.rs')
-rw-r--r--azalea-protocol/src/packets/game/s_set_command_block.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/azalea-protocol/src/packets/game/s_set_command_block.rs b/azalea-protocol/src/packets/game/s_set_command_block.rs
index 17701171..771e8476 100644
--- a/azalea-protocol/src/packets/game/s_set_command_block.rs
+++ b/azalea-protocol/src/packets/game/s_set_command_block.rs
@@ -1,11 +1,9 @@
use std::io::{self, Cursor, Write};
-use azalea_buf::{AzBuf, AzaleaRead, BufReadError};
+use azalea_buf::{AzBuf, BufReadError};
use azalea_core::{bitset::FixedBitSet, position::BlockPos};
use azalea_protocol_macros::ServerboundGamePacket;
-use crate::packets::AzaleaWrite;
-
#[derive(Clone, Debug, PartialEq, ServerboundGamePacket)]
pub struct ServerboundSetCommandBlock {
pub pos: BlockPos,
@@ -24,7 +22,7 @@ pub enum Mode {
Redstone = 2,
}
-impl AzaleaRead for ServerboundSetCommandBlock {
+impl AzBuf for ServerboundSetCommandBlock {
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
let pos = BlockPos::azalea_read(buf)?;
let command = String::azalea_read(buf)?;
@@ -40,9 +38,6 @@ impl AzaleaRead for ServerboundSetCommandBlock {
automatic: set.index(2),
})
}
-}
-
-impl AzaleaWrite for ServerboundSetCommandBlock {
fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> {
self.pos.azalea_write(buf)?;
self.command.azalea_write(buf)?;