Skip to content

@minecraft/server


@minecraft/server / FeedItemEffect

Class: FeedItemEffect ​

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

Represents an effect that is applied as a result of a food item being fed to an entity.

Properties ​

amplifier ​

readonly amplifier: number

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

Remarks ​

Gets an amplifier that may have been applied to this effect. Valid values are integers starting at 0 and up - but usually ranging between 0 and 4.


chance ​

readonly chance: number

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

Remarks ​

Chance that this effect is applied as a result of the entity being fed this item. Valid values range between 0 and 1.


duration ​

readonly duration: number

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

Remarks ​

Gets the duration, in ticks, of this effect.


name ​

readonly name: string

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

Remarks ​

Gets the identifier of the effect to apply. Example values include 'fire_resistance' or 'regeneration'.