> For the complete documentation index, see [llms.txt](https://docs.sefiraat.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sefiraat.dev/cultivation/developers/adding-food-items-via-pr/2-creating-the-food-slimefunitem.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sefiraat.dev/cultivation/developers/adding-food-items-via-pr/2-creating-the-food-slimefunitem.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
