From 371132dd19abdd47a6ce338b5d713015307899ae Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Tue, 5 Mar 2024 16:04:48 +0200 Subject: [PATCH 1/2] fix: wrong FluidFilterSlotUpdateMessage side --- CHANGELOG.md | 3 +++ .../com/refinedmods/refinedstorage/network/NetworkHandler.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0677c8390b..67d3998c5d 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fixed placing fluids in the pattern grid disconnecting the client. + ## [1.13.0-beta.2] - 2024-02-16 ### Fixed diff --git a/src/main/java/com/refinedmods/refinedstorage/network/NetworkHandler.java b/src/main/java/com/refinedmods/refinedstorage/network/NetworkHandler.java index 0209776715..929e43ea3f 100644 --- a/src/main/java/com/refinedmods/refinedstorage/network/NetworkHandler.java +++ b/src/main/java/com/refinedmods/refinedstorage/network/NetworkHandler.java @@ -55,7 +55,7 @@ public void register(IPayloadRegistrar registrar) { registrar.play( FluidFilterSlotUpdateMessage.ID, FluidFilterSlotUpdateMessage::decode, - handler -> handler.server(FluidFilterSlotUpdateMessage::handle) + handler -> handler.client(FluidFilterSlotUpdateMessage::handle) ); registrar.play( BlockEntitySynchronizationParameterMessage.ID, From dc277e224a784bf6056f702a589e29275dab2c39 Mon Sep 17 00:00:00 2001 From: Matyrobbrt Date: Tue, 5 Mar 2024 16:05:53 +0200 Subject: [PATCH 2/2] fix: items deserializing with an empty NBT tag --- CHANGELOG.md | 1 + .../java/com/refinedmods/refinedstorage/util/StackUtils.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d3998c5d..688f813390 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Fixed +- Fixed items in disks deserializing with an empty NBT tag. - Fixed placing fluids in the pattern grid disconnecting the client. ## [1.13.0-beta.2] - 2024-02-16 diff --git a/src/main/java/com/refinedmods/refinedstorage/util/StackUtils.java b/src/main/java/com/refinedmods/refinedstorage/util/StackUtils.java index 864924419e..393f5dfacf 100644 --- a/src/main/java/com/refinedmods/refinedstorage/util/StackUtils.java +++ b/src/main/java/com/refinedmods/refinedstorage/util/StackUtils.java @@ -338,7 +338,7 @@ public static ItemStack deserializeStackFromNbt(CompoundTag tag) { return AttachmentInternals.reconstructItemStack( BuiltInRegistries.ITEM.get(new ResourceLocation(tag.getString(NBT_ITEM_ID))), tag.getInt(NBT_ITEM_QUANTITY), - tag.getCompound(NBT_ITEM_NBT) + tag.contains(NBT_ITEM_NBT) ? tag.getCompound(NBT_ITEM_NBT) : null ); } }