Food Component API

Extensions to the vanilla food component system.

Setup

repositories {
    mavenCentral()
}

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

CreoFoodComponent

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

// 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;

Last updated