From f5033342c9b4f8f39efc7aec845ef01d19546500 Mon Sep 17 00:00:00 2001 From: EnZaXD Date: Tue, 29 Oct 2024 14:55:28 +0100 Subject: [PATCH] Use correct tag name for 1.21->1.21.2 item name fix (#4214) --- .../v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java b/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java index 8e90a472f..c029a0946 100644 --- a/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java +++ b/common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java @@ -429,7 +429,7 @@ public final class BlockItemPacketRewriter1_21_2 extends StructuredItemRewriter< name.put("extra", new ListTag<>(Collections.singletonList(itemName))); data.set(StructuredDataKey.CUSTOM_NAME, name); - saveTag(createCustomTag(item), new ByteTag(true), nbtTagName("custom_name")); + saveTag(createCustomTag(item), new ByteTag(true), "remove_custom_name"); } } return item; @@ -446,7 +446,7 @@ public final class BlockItemPacketRewriter1_21_2 extends StructuredItemRewriter< final StructuredDataContainer dataContainer = item.dataContainer(); final CompoundTag customData = dataContainer.get(StructuredDataKey.CUSTOM_DATA); - if (customData != null && customData.remove(nbtTagName("custom_name")) != null) { + if (customData != null && customData.remove(nbtTagName("remove_custom_name")) != null) { dataContainer.remove(StructuredDataKey.CUSTOM_NAME); if (customData.isEmpty()) { dataContainer.remove(StructuredDataKey.CUSTOM_DATA);