Class: EntityTameMountComponent
entity componentBeta
包含基于骑乘者来驯服可骑乘实体的选项。
Contains options for taming a rideable entity based on the entity that mounts it.
Extends
Properties
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
isTamed
readonlyisTamed:boolean
Beta
Remarks
如果实体已被驯服,则返回 true。
Returns true if the entity is tamed.
Throws
This property can throw when used.
isTamedToPlayer
readonlyisTamedToPlayer:boolean
Beta
Remarks
如果实体已被玩家驯服,则返回 true。
Returns true if the entity is tamed by a player.
Throws
This property can throw when used.
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
tamedToPlayer?
readonlyoptionaltamedToPlayer?:Player
Beta
Remarks
返回已驯服此实体的玩家,如果实体未被玩家驯服,则返回 undefined。
Returns the player that has tamed the entity, or 'undefined' if entity is not tamed by a player.
Throws
This property can throw when used.
tamedToPlayerId?
readonlyoptionaltamedToPlayerId?:string
Beta
Remarks
返回已驯服此实体的玩家的 ID,如果实体未被驯服,则返回 undefined。
Returns the id of player that has tamed the entity, or 'undefined' if entity is not tamed.
Throws
This property can throw when used.
typeId
readonlytypeId:string
Beta
Remarks
组件的标识符。
Identifier of the component.
Inherited from
componentId
readonlystaticcomponentId:"minecraft:tamemount"='minecraft:tamemount'
Beta
Methods
tame()
tame(
showParticles):void
World Mutation Beta
Parameters
showParticles
boolean
此实体被驯服时是否显示效果粒子。
Whether to show effect particles when this entity is tamed.
Returns
void
Remarks
将此可骑乘实体设置为已驯服。
Sets this rideable entity as tamed.
Throws
This function can throw errors.
tameToPlayer()
tameToPlayer(
showParticles,player):boolean
World Mutation Beta
Parameters
showParticles
boolean
此实体被驯服时是否显示效果粒子。
Whether to show effect particles when this entity is tamed.
player
应驯服此实体的玩家。
The player that this entity should be tamed by.
Returns
boolean
如果实体被驯服,则返回 true。
Returns true if the entity was tamed.
Remarks
将此可骑乘实体设置为已被给定玩家驯服。
Sets this rideable entity as tamed by the given player.
Throws
This function can throw errors.
