aboutsummaryrefslogtreecommitdiff
path: root/azalea-inventory/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-12-05 06:30:47 +0000
committermat <git@matdoes.dev>2024-12-05 06:30:47 +0000
commit39f4d68e1ff1f0fa0d45663335d83299d5d37790 (patch)
treeac61d7bf437a1874c91d5c794b732dc599f86259 /azalea-inventory/src
parent6379035b852f1b619565d27f5cee3b93042c2312 (diff)
downloadazalea-drasl-39f4d68e1ff1f0fa0d45663335d83299d5d37790.tar.xz
fix container_set_content, player_position, and recipe_book_remove packets
Diffstat (limited to 'azalea-inventory/src')
-rw-r--r--azalea-inventory/src/slot.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-inventory/src/slot.rs b/azalea-inventory/src/slot.rs
index 757dc92d..568ca441 100644
--- a/azalea-inventory/src/slot.rs
+++ b/azalea-inventory/src/slot.rs
@@ -161,7 +161,7 @@ impl AzaleaRead for ItemStack {
impl AzaleaWrite for ItemStack {
fn azalea_write(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
match self {
- ItemStack::Empty => 0.azalea_write_var(buf)?,
+ ItemStack::Empty => 0_i32.azalea_write_var(buf)?,
ItemStack::Present(i) => {
i.count.azalea_write_var(buf)?;
i.kind.azalea_write(buf)?;
@@ -262,8 +262,8 @@ impl AzaleaWrite for DataComponentPatch {
}
}
- components_with_data_count.azalea_write(buf)?;
- components_without_data_count.azalea_write(buf)?;
+ components_with_data_count.azalea_write_var(buf)?;
+ components_without_data_count.azalea_write_var(buf)?;
for (kind, component) in &self.components {
if let Some(component) = component {