getNbtString

abstract fun getNbtString(itemStack: ItemStack, key: String): String

Deprecated

Now only uses the nbt in the custom data components (item stacks now use data components, and nbt should not be avoided)

Get the NBT string from the item stack with the given key

Return

the NBT string

Parameters

itemStack

the item stack

key

the key