Skip to main content

Callback.PlayerEatFunction

Function used in the "LocalPlayerEat" and "ServerPlayerEat" callback.

Callable

  • PlayerEatFunction(playerUid: number, food: number, ratio: number): void

  • You can use Entity.getCarriedItem to get info about food item.


    Parameters

    • playerUid: number

      player entity UID

    • food: number

      food amount produced by eaten food

    • ratio: number

      saturation ratio produced by food

    Returns void