EntityAgeableComponent Class
Caution
This class is still in pre-release. Its signature may change or it may be removed in future releases.
Extends
Adds a timer for the entity to grow up. It can be accelerated by giving the entity the items it likes as defined by feedItems.
Properties
duration
read-only duration: number;
Amount of time before the entity grows up, -1 for always a baby.
Type: number
Warning
This property can throw errors when used.
growUp
read-only growUp: Trigger;
Event that runs when this entity grows up.
Type: Trigger
Warning
This property can throw errors when used.
transformToItem
read-only transformToItem: string;
The feed item used will transform into this item upon successful interaction.
Type: string
Warning
This property can throw errors when used.
Methods
getDropItems
getDropItems(): string[]
List of items that the entity drops when it grows up.
Returns string[]
Warning
This function can throw errors.
getFeedItems
getFeedItems(): EntityDefinitionFeedItem[]
List of items that can be fed to the entity. Includes 'item' for the item name and 'growth' to define how much time it grows up by.
Returns EntityDefinitionFeedItem[]
Warning
This function can throw errors.
Constants
componentId
static read-only componentId = "minecraft:ageable";
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