Documentation

FoodSource extends Consumable

Interface implemented by objects that can be consumed by players, giving them food and saturation.

Table of Contents

getAdditionalEffects()  : array<string|int, EffectInstance>
getFoodRestore()  : int
getSaturationRestore()  : float
onConsume()  : void
Called when this Consumable is consumed by mob, after standard resulting effects have been applied.
requiresHunger()  : bool
Returns whether a Human eating this FoodSource must have a non-full hunger bar.

Methods

getFoodRestore()

public getFoodRestore() : int
Return values
int

getSaturationRestore()

public getSaturationRestore() : float
Return values
float

onConsume()

Called when this Consumable is consumed by mob, after standard resulting effects have been applied.

public onConsume(Living $consumer) : void
Parameters
$consumer : Living
Return values
void

requiresHunger()

Returns whether a Human eating this FoodSource must have a non-full hunger bar.

public requiresHunger() : bool
Return values
bool

Search results