# 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;
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.creoii.dev/creo-api/packages/food-component-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
