API reference / @jsprismarine/prismarine / editions/java/javaSounds
editions/java/javaSounds
Interfaces
JavaPlayedSound
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:20
A sound as a Java client is sent it.
Properties
id
readonlyid:string
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:22
The sound event, such as minecraft:entity.zombie.hurt.
pitch
readonlypitch:number
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:26
source
readonlysource:"ambient"|"block"|"player"|"music"|"weather"|"hostile"|"master"|"neutral"|"record"|"ui"|"voice"
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:24
The category whose volume setting it plays at.
volume
readonlyvolume:number
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:25
JavaSoundTranslations
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:30
What the resolver needs of the client's translations.
Properties
blockOf
readonlyblockOf: (runtimeId) =>string|undefined
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:34
The Java block a Bedrock runtime id shows as, such as minecraft:stone, or undefined.
Parameters
runtimeId
number
Returns
string | undefined
entityTypeOf
readonlyentityTypeOf: (bedrockType) =>string|undefined
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:32
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|undefined
Defined in: packages/prismarine/src/editions/java/javaSounds.ts:182
The sound a Java client is sent for one the world makes.
Parameters
sound
The sound.
translations
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 | undefined
The sound, or undefined when Java has none for it.