mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-24 19:15:32 +01:00
Use correct tag name for 1.21->1.21.2 item name fix (#4214)
This commit is contained in:
parent
a0c0b7eff2
commit
f5033342c9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user