The BlockInstrumentComponent class in @minecraft/server.
Class in @minecraft/server
Extends BlockComponent
import { BlockInstrumentComponent } from '@minecraft/server';Constructor
Section titled “Constructor”protected constructor();Properties
Section titled “Properties”componentId
Section titled “componentId”static read-only
static readonly componentId = 'minecraft:instrument_sound';Methods
Section titled “Methods”getInstrumentName
Section titled “getInstrumentName”getInstrumentName(face: Direction): string;Parameters
faceDirection
Returns
stringTypes
playInstrumentSound
Section titled “playInstrumentSound”playInstrumentSound(face: Direction, soundOptions?: WorldSoundOptions): void;Parameters
faceDirectionsoundOptionsoptionalWorldSoundOptions
Inherited
Section titled “Inherited”From BlockComponent: block