get Container
fun <T> getContainer(holder: PersistentDataHolder, key: NamespacedKey, block: (PersistentDataContainer) -> T): T?
Reads the nested container at key and maps it via block, or null if absent.
fun <T> getContainer(item: ItemStack, key: NamespacedKey, block: (PersistentDataContainer) -> T): T?
Reads the nested container at key on an item and maps it via block, or null if absent.