Class: EntityMovementComponent
entity componentBeta
Defines the general movement speed of this entity.
Extends
Properties
currentValue
readonlycurrentValue:number
Beta
Remarks
此实例当前属性的值。
Current value of this attribute for this instance.
Throws
This property can throw when used.
Inherited from
EntityAttributeComponent.currentValue
defaultValue
readonlydefaultValue:number
Beta
Remarks
返回此属性的默认定义值。
Returns the default defined value for this attribute.
Throws
This property can throw when used.
Inherited from
EntityAttributeComponent.defaultValue
effectiveMax
readonlyeffectiveMax:number
Beta
Remarks
返回给定任何其他环境组件或因素后此属性的有效最大值。
Returns the effective max of this attribute given any other ambient components or factors.
Throws
This property can throw when used.
Inherited from
EntityAttributeComponent.effectiveMax
effectiveMin
readonlyeffectiveMin:number
Beta
Remarks
返回给定任何其他环境组件或因素后此属性的有效最小值。
Returns the effective min of this attribute given any other ambient components or factors.
Throws
This property can throw when used.
Inherited from
EntityAttributeComponent.effectiveMin
entity
readonlyentity:Entity
Beta
Remarks
拥有此组件的实体。如果实体已被移除,则实体将为 undefined。
The entity that owns this component. The entity will be undefined if it has been removed.
Throws
This property can throw when used.
Inherited from
EntityAttributeComponent.entity
isValid
readonlyisValid:boolean
Beta
Remarks
返回该组件是否有效。如果组件的拥有者有效,并且满足组件所需的任何额外验证,则该组件被视为有效。
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.
Inherited from
EntityAttributeComponent.isValid
typeId
readonlytypeId:string
Beta
Remarks
组件的标识符。
Identifier of the component.
Inherited from
EntityAttributeComponent.typeId
componentId
readonlystaticcomponentId:"minecraft:movement"='minecraft:movement'
Beta
Methods
resetToDefaultValue()
resetToDefaultValue():
void
World Mutation Beta
Returns
void
Remarks
将此属性的当前值重置为定义的默认值。
Resets the current value of this attribute to the defined default value.
Throws
This function can throw errors.
Inherited from
EntityAttributeComponent.resetToDefaultValue
resetToMaxValue()
resetToMaxValue():
void
World Mutation Beta
Returns
void
Remarks
将此属性的当前值重置为定义的最大值。
Resets the current value of this attribute to the maximum defined value.
Throws
This function can throw errors.
Inherited from
EntityAttributeComponent.resetToMaxValue
resetToMinValue()
resetToMinValue():
void
World Mutation Beta
Returns
void
Remarks
将此属性的当前值重置为定义的最小值。
Resets the current value of this attribute to the minimum defined value.
Throws
This function can throw errors.
Inherited from
EntityAttributeComponent.resetToMinValue
setCurrentValue()
setCurrentValue(
value):boolean
World Mutation Beta
Parameters
value
number
Returns
boolean
Remarks
设置此属性的当前值。
Sets the current value of this attribute.
Throws
如果值超出范围,将抛出 ArgumentOutOfBounds Error。
If the value is out of bounds, an ArgumentOutOfBounds Error is thrown.
Inherited from
EntityAttributeComponent.setCurrentValue
