From 7b89b9b58d243ddc273f63da0f04bca3eb6b55b8 Mon Sep 17 00:00:00 2001 From: Raycoms Date: Fri, 27 Sep 2024 15:17:11 +0200 Subject: [PATCH] hotfix #700 --- .../structurize/network/messages/RemoveBlockMessage.java | 2 +- .../structurize/network/messages/ReplaceBlockMessage.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ldtteam/structurize/network/messages/RemoveBlockMessage.java b/src/main/java/com/ldtteam/structurize/network/messages/RemoveBlockMessage.java index 5653969e2..f8d6383e2 100644 --- a/src/main/java/com/ldtteam/structurize/network/messages/RemoveBlockMessage.java +++ b/src/main/java/com/ldtteam/structurize/network/messages/RemoveBlockMessage.java @@ -88,7 +88,7 @@ protected void toBytes(final RegistryFriendlyByteBuf buf) buf.writeInt(blocks.size()); for (final ItemStack block : blocks) { - ItemStack.STREAM_CODEC.encode(buf, block); + ItemStack.OPTIONAL_STREAM_CODEC.encode(buf, block); } } diff --git a/src/main/java/com/ldtteam/structurize/network/messages/ReplaceBlockMessage.java b/src/main/java/com/ldtteam/structurize/network/messages/ReplaceBlockMessage.java index e89ce700c..c3e056a90 100644 --- a/src/main/java/com/ldtteam/structurize/network/messages/ReplaceBlockMessage.java +++ b/src/main/java/com/ldtteam/structurize/network/messages/ReplaceBlockMessage.java @@ -78,8 +78,8 @@ protected void toBytes(final RegistryFriendlyByteBuf buf) { buf.writeBlockPos(from); buf.writeBlockPos(to); - ItemStack.STREAM_CODEC.encode(buf, blockTo); - ItemStack.STREAM_CODEC.encode(buf, blockFrom); + ItemStack.OPTIONAL_STREAM_CODEC.encode(buf, blockTo); + ItemStack.OPTIONAL_STREAM_CODEC.encode(buf, blockFrom); buf.writeInt(pct); }