For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/SoundDefinitionRegistry.md.

Class: SoundDefinitionRegistry experimental

sound

Beta

提供对当前世界加载的音效定义的只读访问。

Provides read-only access to the sound definitions loaded for the current world.

Methods

getDefinitions()

getDefinitions(filter?): SoundDefinition[]

Beta

Parameters

filter?

SoundDefinitionFilter

应用于每个定义的可选筛选条件。省略时返回所有定义。

Optional filter applied to each definition. When omitted, every definition is returned.

Returns

SoundDefinition[]

所有符合筛选条件的音效定义,或未提供筛选条件时的所有音效定义。

All sound definitions matching the filter, or every sound definition when no filter is supplied.

Remarks

返回注册表中的音效定义,可选择通过筛选条件缩小范围。

Returns the sound definitions in the registry, optionally narrowed by a filter.

Throws

如果 filter.minDuration 大于 filter.maxDuration 将抛出错误。

An error will be thrown if filter.minDuration is greater than filter.maxDuration.

InvalidArgumentError

同领域相关