Skip to content

Commit f503334

Browse files
Use correct tag name for 1.21->1.21.2 item name fix (ViaVersion#4214)
1 parent a0c0b7e commit f503334

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/src/main/java/com/viaversion/viaversion/protocols/v1_21to1_21_2/rewriter/BlockItemPacketRewriter1_21_2.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ public Item handleItemToClient(final UserConnection connection, final Item item)
429429
name.put("extra", new ListTag<>(Collections.singletonList(itemName)));
430430

431431
data.set(StructuredDataKey.CUSTOM_NAME, name);
432-
saveTag(createCustomTag(item), new ByteTag(true), nbtTagName("custom_name"));
432+
saveTag(createCustomTag(item), new ByteTag(true), "remove_custom_name");
433433
}
434434
}
435435
return item;
@@ -446,7 +446,7 @@ public Item handleItemToServer(final UserConnection connection, final Item item)
446446

447447
final StructuredDataContainer dataContainer = item.dataContainer();
448448
final CompoundTag customData = dataContainer.get(StructuredDataKey.CUSTOM_DATA);
449-
if (customData != null && customData.remove(nbtTagName("custom_name")) != null) {
449+
if (customData != null && customData.remove(nbtTagName("remove_custom_name")) != null) {
450450
dataContainer.remove(StructuredDataKey.CUSTOM_NAME);
451451
if (customData.isEmpty()) {
452452
dataContainer.remove(StructuredDataKey.CUSTOM_DATA);

0 commit comments

Comments
 (0)