Skip to content

@minecraft/server


@minecraft/server / EntityAgeableComponent

Class: EntityAgeableComponent ​

Defined in: @minecraft/server/index.d.ts:9672

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.

Extends ​

Properties ​

duration ​

readonly duration: number

Defined in: @minecraft/server/index.d.ts:9681

Remarks ​

Amount of time before the entity grows up, -1 for always a baby.

Throws ​

This property can throw when used.


entity ​

readonly entity: Entity

Defined in: @minecraft/server/index.d.ts:9981

Remarks ​

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

Throws ​

This property can throw when used.

InvalidEntityError

Inherited from ​

EntityComponent.entity


growUp ​

readonly growUp: Trigger

Defined in: @minecraft/server/index.d.ts:9688

Remarks ​

Event that runs when this entity grows up.

Throws ​

This property can throw when used.


isValid ​

readonly isValid: boolean

Defined in: @minecraft/server/index.d.ts:6234

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 ​

EntityComponent.isValid


transformToItem ​

readonly transformToItem: string

Defined in: @minecraft/server/index.d.ts:9696

Remarks ​

The feed item used will transform into this item upon successful interaction.

Throws ​

This property can throw when used.


typeId ​

readonly typeId: string

Defined in: @minecraft/server/index.d.ts:6240

Remarks ​

Identifier of the component.

Inherited from ​

EntityComponent.typeId


componentId ​

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

Defined in: @minecraft/server/index.d.ts:9697

Methods ​

getDropItems() ​

getDropItems(): string[]

Defined in: @minecraft/server/index.d.ts:9704

Returns ​

string[]

Remarks ​

List of items that the entity drops when it grows up.

Throws ​

This function can throw errors.


getFeedItems() ​

getFeedItems(): EntityDefinitionFeedItem[]

Defined in: @minecraft/server/index.d.ts:9713

Returns ​

EntityDefinitionFeedItem[]

Remarks ​

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.

Throws ​

This function can throw errors.