Add shulker box block entity id if missing

This commit is contained in:
Nassim Jahnke 2024-07-17 18:47:14 +02:00
parent a45985ed58
commit cc87c02020
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F

View File

@ -1480,7 +1480,10 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
data.set(StructuredDataKey.BASE_COLOR, baseColorIntTag.asInt());
}
updateItemList(connection, data, tag, "Items", StructuredDataKey.CONTAINER1_20_5, true);
if (tag.contains("Items")) {
updateItemList(connection, data, tag, "Items", StructuredDataKey.CONTAINER1_20_5, true);
addBlockEntityId(tag, "shulker_box"); // Won't happen to the others and doesn't actually have to be correct otherwise
}
}
final Tag skullOwnerTag = tag.remove("SkullOwner");