# Food Component API

## Setup

{% tabs %}
{% tab title="Gradle" %}

```gradle
repositories {
    mavenCentral()
}

dependencies {
    modImplementation 'dev.creoii.creoapi:creo-food-component-api:<VERSION>'
}
```

{% endtab %}

{% tab title="Kotlin" %}

```gradle
repositories {
    mavenCentral()
}

dependencies {
    modImplementation("dev.creoii.creoapi:creo-food-component-api:<VERSION>")
}
```

{% endtab %}
{% endtabs %}

## CreoFoodComponent

An extension of **FoodComponent** that provides even more customizability for food.

```java
// How fast it takes to eat the food item.
private final int eatSpeed;

// Provides a durability bar which decreases each time you eat the food item.
private final int eatDurability;

// Whether the food item can be eaten while sprinting.
private final boolean sprintEdible;

// Whether the food heals health or hunger.
private final boolean healsHealth;
```
