Skip to content

@minecraft/server


@minecraft/server / FeedItem

Class: FeedItem ​

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

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

Properties ​

healAmount ​

readonly healAmount: number

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

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

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

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'.


resultItem? ​

readonly optional resultItem?: string

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

Remarks ​

Type ID of the resulting item after feeding has occurred. This will usually be empty but is used for scenarios such as feeding a Nautilus with a bucket of fish, where the result item will be an empty bucket.

Methods ​

getEffects() ​

getEffects(): FeedItemEffect[]

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

Returns ​

FeedItemEffect[]

Remarks ​

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