Class: AimAssistRegistry
Beta
用于管理世界瞄准辅助设置的 API 容器。
A container for APIs related to the world's aim-assist settings.
Properties
DefaultCategoryId
readonlystaticDefaultCategoryId:"minecraft:default"='minecraft:default'
Beta
Remarks
未另行指定时使用的默认瞄准辅助分类 ID。
The default aim-assist category Id that is used when not otherwise specified.
DefaultPresetId
readonlystaticDefaultPresetId:"minecraft:aim_assist_default"='minecraft:aim_assist_default'
Beta
Remarks
未另行指定时使用的默认瞄准辅助预设 ID。
The default aim-assist preset Id that is used when not otherwise specified.
Methods
addCategory()
addCategory(
category):AimAssistCategory
World Mutation Beta
Parameters
category
用于创建新分类的分类设置。
The category settings used to create the new category.
Returns
创建的分类句柄。
The created category handle.
Remarks
向注册表添加一个瞄准辅助分类。
Adds an aim-assist category to the registry.
Throws
This function can throw errors.
Error
addPreset()
addPreset(
preset):AimAssistPreset
World Mutation Beta
Parameters
preset
用于创建新预设的预设设置。
The preset settings used to create the new preset.
Returns
创建的预设句柄。
The created preset handle.
Remarks
向注册表添加一个瞄准辅助预设。
Adds an aim-assist preset to the registry.
Throws
This function can throw errors.
Error
getCategories()
getCategories():
AimAssistCategory[]
Beta
Returns
所有可用分类对象的数组。
An array of all available category objects.
Remarks
获取注册表中所有可用的分类。
Gets all available categories in the registry.
getCategory()
getCategory(
categoryId):AimAssistCategory|undefined
World Mutation Beta
Parameters
categoryId
string
Returns
AimAssistCategory | undefined
如果存在则返回分类对象,否则返回 undefined。
The category object if it exists, otherwise returns undefined.
Remarks
获取与提供的 ID 关联的分类。
Gets the category associated with the provided Id.
getPreset()
getPreset(
presetId):AimAssistPreset|undefined
World Mutation Beta
Parameters
presetId
string
要检索的预设的 ID。必须具有命名空间。
The Id of the preset to retrieve. Must have a namespace.
Returns
AimAssistPreset | undefined
如果存在则返回预设对象,否则返回 undefined。
The preset object if it exists, otherwise returns undefined.
Remarks
获取与提供的 ID 关联的预设。
Gets the preset associated with the provided Id.
getPresets()
getPresets():
AimAssistPreset[]
Beta
Returns
所有可用预设对象的数组。
An array of all available preset objects.
Remarks
获取注册表中所有可用的预设。
Gets all available presets in the registry.
