BlockRecordPlayerComponent Class
Caution
This class is still in pre-release. Its signature may change or it may be removed in future releases.
Extends
Represents a block that can play a record.
Methods
clearRecord
clearRecord(): void
Clears the currently playing record of this record-playing block.
Important
This function can't be called in read-only mode.
Warning
This function can throw errors.
isPlaying
isPlaying(): boolean
Returns true if the record-playing block is currently playing a record.
Returns boolean
Warning
This function can throw errors.
setRecord
setRecord(recordItemType: ItemType | string): void
Sets and plays a record based on an item type.
Parameters
- recordItemType: ItemType | string
Important
This function can't be called in read-only mode.
Warning
This function can throw errors.
Constants
componentId
static read-only componentId = "minecraft:recordPlayer";
Type: string
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for