3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-27 08:30:09 +01:00

Don't add block entity tag if the id is missing

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-09-26 12:16:06 +02:00
Ursprung 6bae039d52
Commit 619eecacf8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -488,8 +488,12 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
if (blockEntityTag != null) { if (blockEntityTag != null) {
final CompoundTag clonedTag = blockEntityTag.copy(); final CompoundTag clonedTag = blockEntityTag.copy();
updateBlockEntityTag(connection, data, clonedTag); updateBlockEntityTag(connection, data, clonedTag);
// Not always needed, e.g. shields that had the base color in a block entity tag before
if (blockEntityTag.contains("id")) {
item.dataContainer().set(StructuredDataKey.BLOCK_ENTITY_DATA, clonedTag); item.dataContainer().set(StructuredDataKey.BLOCK_ENTITY_DATA, clonedTag);
} }
}
final CompoundTag debugProperty = tag.getCompoundTag("DebugProperty"); final CompoundTag debugProperty = tag.getCompoundTag("DebugProperty");
if (debugProperty != null) { if (debugProperty != null) {