getMaxAmount

abstract fun getMaxAmount(stack: ItemStack): Long(source)

Returns the maximum amount for the given stack (which may not necessarily be the same as the stack returned by getItemStack.