Skip to main content

Class: EntityTameMountComponent

Contains options for taming a rideable entity based on the entity that mounts it.

Extends

Constructors

new EntityTameMountComponent()

private new EntityTameMountComponent(): EntityTameMountComponent

Returns

EntityTameMountComponent

Overrides

EntityComponent . constructor

Properties

entity

Beta

readonly entity: Entity

Remarks

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

Inherited from

EntityComponent . entity


isTamed

Beta

readonly isTamed: boolean

Throws

This property can throw when used.


isTamedToPlayer

Beta

readonly isTamedToPlayer: boolean

Throws

This property can throw when used.


tamedToPlayer?

Beta

optional readonly tamedToPlayer: Player

Throws

This property can throw when used.


tamedToPlayerId?

Beta

optional readonly tamedToPlayerId: string

Throws

This property can throw when used.


typeId

readonly typeId: string

Remarks

Identifier of the component.

Inherited from

EntityComponent . typeId


componentId

static readonly componentId: "minecraft:tamemount" = 'minecraft:tamemount'

Methods

isValid()

isValid(): boolean

Returns

boolean

Whether the component is valid.

Inherited from

EntityComponent . isValid

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.


tame()

tame(showParticles): void

Parameters

ParameterTypeDescription
showParticlesbooleanWhether to show effect particles when this entity is tamed.

Returns

void

Remarks

Sets this rideable entity as tamed.

This function can't be called in read-only mode.

Throws

This function can throw errors.


tameToPlayer()

Beta

tameToPlayer(showParticles, player): boolean

Parameters

ParameterType
showParticlesboolean
playerPlayer

Returns

boolean

Remarks

This function can't be called in read-only mode.

Throws

This function can throw errors.