diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_20_5to1_20_3/rewriter/BlockItemPacketRewriter1_20_5.java b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_20_5to1_20_3/rewriter/BlockItemPacketRewriter1_20_5.java index 3d0c5a64..16f764e7 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/v1_20_5to1_20_3/rewriter/BlockItemPacketRewriter1_20_5.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/v1_20_5to1_20_3/rewriter/BlockItemPacketRewriter1_20_5.java @@ -381,10 +381,11 @@ public final class BlockItemPacketRewriter1_20_5 extends BackwardsStructuredItem if (customData != null) { // We later don't know which tags are custom data and which are not because the VV conversion // keeps converted data, so we backup the original custom data and restore it later + if (oldItem.tag() == null) { + oldItem.setTag(new CompoundTag()); + } oldItem.tag().put(nbtTagName(), customData.copy()); - } - - if (oldItem.tag() != null && oldItem.tag().isEmpty()) { + } else if (oldItem.tag() != null && oldItem.tag().isEmpty()) { // Improve item equality checks by removing empty tags oldItem.setTag(null); }