# 2: Creating the Food SlimefunItem

The SlimefunItem is the backbone to the item registered within Slimefun and is also the object that triggers the effects when the food is eaten.

1. Navigate to the `Foods.java` class.
2. Scroll down to the bottom, after the last-registered food but before the setup() method.
3. Create a new Food object as a constant (public static final)
   1. The group should always be `FOODS`
   2. The ItemStack should point to the stack you made in step 1
   3. `RecipeTypes.BAKING` is for food made in the 3x3 oven. `RecipeTypes.FINISHING` is for foods made in the Finishing Counter.
   4. The methods `RecipeTypes#createFoodFinishingRecipe()` and `RecipeTypes#createFoodBakingRecipe()` act as both recipe registration in the two custom machines as well as returning the `ItemStack[]` that is required for Slimefun's guide display.
   5. The final parameter is a `Consumer<Player>` object, which may be new to some. It basically allows you to create a series of actions that will happen to the player who eats the food. You are NOT limited to the `simplePlayerEffect` method, if you want to make a Consumer that makes a player teleport somewhere, you can!
   6. Always use the builder method `.buildRegister(Cultivation.getInstance())` when finished.
4. For your recipe, you have access to every item within the addon.
   1. If you want a Produce item, like Kale, for example, you access it via `CultivationStacks.KALE`
   2. If you want a By-Product item, like Boiled Kale, for example, you access it via `Products.KALE.getBoiledItem()`
   3. If you want an Ingredient Item (this is an item made by crafting previously) for example Mayonnaise, use `Ingredients.MAYONNAISE.getItem()`
   4. If you want a vanilla Minecraft item, use `new ItemStack(Material.CARROT)`


---

# 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.sefiraat.dev/cultivation/developers/adding-food-items-via-pr/2-creating-the-food-slimefunitem.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.
