[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / crafting/javaItemId

# crafting/javaItemId

## Functions

### javaItemIdOf()

> **javaItemIdOf**(`identifier`, `meta?`): `string` \| `undefined`

Defined in: [packages/prismarine/src/crafting/javaItemId.ts:14](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/crafting/javaItemId.ts#L14)

Resolves a Bedrock item identifier and legacy data value to the Java item a recipe names.

`data` on a uniquely named Bedrock item is its legacy wire value, not a selector: birch planks
remain birch planks even when the stack's metadata is zero. Only an identifier several Java
items share needs the value to pick one of them. An identifier outside the `minecraft`
namespace is custom content and is its own Java identifier.

#### Parameters

##### identifier

`string`

##### meta?

`number` = `0`

#### Returns

`string` \| `undefined`

The Java identifier, or undefined for a vanilla item, or a variant of one, that no
  Java item matches.

***

### javaItemIdsOf()

> **javaItemIdsOf**(`identifier`): readonly `string`[]

Defined in: [packages/prismarine/src/crafting/javaItemId.ts:30](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/crafting/javaItemId.ts#L30)

Every Java item a Bedrock identifier stands for whatever its data value, which is what a
recipe ingredient that names no data value accepts.

#### Parameters

##### identifier

`string`

#### Returns

readonly `string`[]
