EntityTameMountComponent Class
Caution
This class is still in pre-release. Its signature may change or it may be removed in future releases.
Extends
Contains options for taming a rideable entity based on the entity that mounts it.
Properties
isTamed
read-only isTamed: boolean;
Returns true if the entity is tamed.
Type: boolean
Warning
This property can throw errors when used.
isTamedToPlayer
read-only isTamedToPlayer: boolean;
Returns true if the entity is tamed by a player.
Type: boolean
Warning
This property can throw errors when used.
tamedToPlayer
read-only tamedToPlayer?: Player;
Returns the player that has tamed the entity, or 'undefined' if entity is not tamed by a player.
Type: Player
Warning
This property can throw errors when used.
tamedToPlayerId
read-only tamedToPlayerId?: string;
Returns the id of player that has tamed the entity, or 'undefined' if entity is not tamed.
Type: string
Warning
This property can throw errors when used.
Methods
tame
tame(showParticles: boolean): void
Sets this rideable entity as tamed.
Parameters
showParticles: boolean
Whether to show effect particles when this entity is tamed.
Important
This function can't be called in read-only mode.
Warning
This function can throw errors.
tameToPlayer
tameToPlayer(showParticles: boolean, player: Player): boolean
Sets this rideable entity as tamed by the given player.
Parameters
showParticles: boolean
Whether to show effect particles when this entity is tamed.
player: Player
The player that this entity should be tamed by.
Returns boolean - Returns true if the entity was tamed.
Important
This function can't be called in read-only mode.
Warning
This function can throw errors.
Constants
componentId
static read-only componentId = "minecraft:tamemount";
Type: string
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for