[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / editions/java/javaSounds

# editions/java/javaSounds

## Interfaces

### JavaPlayedSound

Defined in: [packages/prismarine/src/editions/java/javaSounds.ts:20](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/editions/java/javaSounds.ts#L20)

A sound as a Java client is sent it.

#### Properties

##### id

> `readonly` **id**: `string`

Defined in: [packages/prismarine/src/editions/java/javaSounds.ts:22](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/editions/java/javaSounds.ts#L22)

The sound event, such as `minecraft:entity.zombie.hurt`.

##### pitch

> `readonly` **pitch**: `number`

Defined in: [packages/prismarine/src/editions/java/javaSounds.ts:26](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/editions/java/javaSounds.ts#L26)

##### source

> `readonly` **source**: `"ambient"` \| `"block"` \| `"player"` \| `"music"` \| `"weather"` \| `"hostile"` \| `"master"` \| `"neutral"` \| `"record"` \| `"ui"` \| `"voice"`

Defined in: [packages/prismarine/src/editions/java/javaSounds.ts:24](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/editions/java/javaSounds.ts#L24)

The category whose volume setting it plays at.

##### volume

> `readonly` **volume**: `number`

Defined in: [packages/prismarine/src/editions/java/javaSounds.ts:25](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/editions/java/javaSounds.ts#L25)

***

### JavaSoundTranslations

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

What the resolver needs of the client's translations.

#### Properties

##### blockOf

> `readonly` **blockOf**: (`runtimeId`) => `string` \| `undefined`

Defined in: [packages/prismarine/src/editions/java/javaSounds.ts:34](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/editions/java/javaSounds.ts#L34)

The Java block a Bedrock runtime id shows as, such as `minecraft:stone`, or undefined.

###### Parameters

###### runtimeId

`number`

###### Returns

`string` \| `undefined`

##### entityTypeOf

> `readonly` **entityTypeOf**: (`bedrockType`) => `string` \| `undefined`

Defined in: [packages/prismarine/src/editions/java/javaSounds.ts:32](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/editions/java/javaSounds.ts#L32)

The Java entity type a Bedrock one shows as, such as `minecraft:zombie`, or undefined.

###### Parameters

###### bedrockType

`string`

###### Returns

`string` \| `undefined`

## Functions

### javaSoundOf()

> **javaSoundOf**(`sound`, `translations`, `random?`): [`JavaPlayedSound`](#javaplayedsound) \| `undefined`

Defined in: [packages/prismarine/src/editions/java/javaSounds.ts:182](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/editions/java/javaSounds.ts#L182)

The sound a Java client is sent for one the world makes.

#### Parameters

##### sound

[`ShownSound`](https://jsprismarine.dev/api/@jsprismarine/prismarine/player/presenter/SessionPresenter/index.md#shownsound)

The sound.

##### translations

[`JavaSoundTranslations`](#javasoundtranslations)

How the client's edition shows Bedrock's entity types and blocks.

##### random?

() => `number`

A float from 0 up to 1, which picks the pitch of a sound whose pitch varies.

#### Returns

[`JavaPlayedSound`](#javaplayedsound) \| `undefined`

The sound, or undefined when Java has none for it.
