Skip to main content

Class: FeedItem

As part of the Healable component, represents a specific item that can be fed to an entity to cause health effects.

Constructors

new FeedItem()

private new FeedItem(): FeedItem

Returns

FeedItem

Properties

healAmount

readonly healAmount: number

Remarks

The amount of health this entity gains when fed this item. This number is an integer starting at 0. Sample values can go as high as 40.


item

readonly item: string

Remarks

Identifier of type of item that can be fed. If a namespace is not specified, 'minecraft:' is assumed. Example values include 'wheat' or 'golden_apple'.

Methods

getEffects()

getEffects(): FeedItemEffect[]

Returns

FeedItemEffect[]

Remarks

As part of the Healable component, an optional collection of side effects that can occur from being fed an item.