类 EntityUnderwaterMovementComponent实验性

Defines the general movement speed underwater of this entity.

层级 (查看层级一览)

属性

currentValue: number

此实例中该属性的当前值。

Current value of this attribute for this instance.

使用时可能会抛出异常。

This property can throw when used.

defaultValue: number

返回该属性定义的默认值。

Returns the default defined value for this attribute.

使用时可能会抛出异常。

This property can throw when used.

effectiveMax: number

返回在任何其他环境组件或因素影响下,该属性的有效最大值。

Returns the effective max of this attribute given any other ambient components or factors.

使用时可能会抛出异常。

This property can throw when used.

effectiveMin: number

返回在任何其他环境组件或因素影响下,该属性的有效最小值。

Returns the effective min of this attribute given any other ambient components or factors.

使用时可能会抛出异常。

This property can throw when used.

entity: Entity

拥有此组件的实体。若该实体已被移除,则为 undefined。

The entity that owns this component. The entity will be undefined if it has been removed.

使用时可能会抛出异常。

This property can throw when used.

InvalidEntityError

isValid: boolean

返回组件是否有效。若组件的拥有者有效,并且组件需要的任何 额外验证也通过,则该组件被认为是有效的。

Returns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.

typeId: string

组件的标识符。 Identifier of the component.

componentId: "minecraft:underwater_movement" = 'minecraft:underwater_movement'

方法

  • 实验性

    返回 void

    将该属性的当前值重置为定义的默认值。

    Resets the current value of this attribute to the defined default value.

    无法在只读模式下调用此函数,详见 WorldBeforeEvents

    此函数可能会抛出错误。

    This function can throw errors.

  • 实验性

    返回 void

    将该属性的当前值重置为定义的最大值。

    Resets the current value of this attribute to the maximum defined value.

    无法在只读模式下调用此函数,详见 WorldBeforeEvents

    此函数可能会抛出错误。

    This function can throw errors.

  • 实验性

    返回 void

    将该属性的当前值重置为定义的最小值。

    Resets the current value of this attribute to the minimum defined value.

    无法在只读模式下调用此函数,详见 WorldBeforeEvents

    此函数可能会抛出错误。

    This function can throw errors.

  • 实验性

    参数

    • value: number

    返回 boolean

    设置该属性的当前值。提供的值将被限制在该属性的范围内。

    Sets the current value of this attribute. The provided value will be clamped to the range of this attribute.

    无法在只读模式下调用此函数,详见 WorldBeforeEvents

    此函数可能会抛出错误。

    This function can throw errors.