3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-24 23:30:15 +01:00

Use correct tag name for 1.21->1.21.2 item name fix (#4214)

Dieser Commit ist enthalten in:
EnZaXD 2024-10-29 14:55:28 +01:00 committet von GitHub
Ursprung a0c0b7eff2
Commit f5033342c9
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -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);