类 AimAssistPresetSettings实验性

用于 AimAssistRegistry.addPreset 创建 AimAssistPreset 的设置。

必须启用的实验功能:

  • 摄像机瞄准辅助

Settings used with AimAssistRegistry.addPreset for creation of the AimAssistPreset.

Required Experiments:

  • Camera Aim Assist

构造函数

  • 实验性

    参数

    • identifier: string

    返回 AimAssistPresetSettings

    构造函数,接受一个与创建的 AimAssistPreset 关联的唯一 ID。必须包含命名空间。

    Constructor that takes a unique Id to associate with the created AimAssistPreset. Must have a namespace.

属性

defaultItemSettings?: string

可选。默认的瞄准辅助类别 ID,用于未通过 setItemSettings 提供的物品。

Optional. Default aim-assist category Id used for items not provided to setItemSettings.

无法在只读模式下修改此属性,详见 WorldBeforeEvents

handSettings?: string

可选。用于空手的瞄准辅助类别 ID。

Optional. Aim-assist category Id used for an empty hand.

无法在只读模式下修改此属性,详见 WorldBeforeEvents

identifier: string

用于注册预设的唯一 ID。必须包含命名空间。

The unique Id used to register the preset with. Must have a namespace.

方法

  • 实验性

    返回 string[]

    包含方块/实体 ID 的数组。

    The array of block/entity Ids.

    获取从瞄准辅助目标中排除的方块/实体 ID 列表。

    Gets the list of block/entity Ids to exclude from aim assist targeting.

  • 实验性

    返回 Record<string, string>

    一个将物品 ID 映射到瞄准辅助类别 ID 的记录。

    The record mapping item Ids to aim-assist category Ids.

    获取每个物品的瞄准辅助类别 ID。

    Gets the per-item aim-assist category Ids.

  • 实验性

    返回 string[]

    包含物品 ID 的数组。

    The array of item Ids.

    获取在持有时将通过瞄准辅助瞄准液体方块的物品 ID 列表。

    Gets the list of item Ids that will target liquid blocks with aim-assist when being held.

  • 实验性

    参数

    • 可选targets: string[]

      一个包含方块/实体 ID 的数组。

      An array of block/entity Ids.

    返回 void

    设置从瞄准辅助目标中排除的方块/实体 ID 列表。

    Sets the list of block/entity Ids to exclude from aim assist targeting.

  • 实验性

    参数

    • itemSettings: Record<string, string>

      一个将物品 ID 映射到瞄准辅助类别 ID 的记录。 类别 ID 必须包含命名空间。

      A record mapping item Ids to aim-assist category Ids. Category Ids must have a namespace.

    返回 void

    设置每个物品的瞄准辅助类别 ID。

    Sets the per-item aim-assist category Ids.

  • 实验性

    参数

    • 可选items: string[]

      一个包含物品 ID 的数组。

      An array of item Ids.

    返回 void

    设置在持有时将通过瞄准辅助瞄准液体方块的物品 ID 列表。

    Sets the list of item Ids that will target liquid blocks with aim-assist when being held.