# Model Crafting

Craftable models allow players to craft custom items (like chairs, decorations, or other models) using crafting recipes defined in the plugin configuration.

### Example: Crafting a "Chair"

Here’s an example of a chair recipe configuration in **model.yml**

```yaml
recipe:
  # Layout for crafting. If you want no item in that slot, use a space ` `, e.g. `W W`
  layout:
    - 'W W'
    - 'WWW'
    - 'P P'
  # Define each material used in the layout. Material names are 1 capital letter (e.g., `W`, `P`).
  materials:
    W:
      type: WHITE_WOOL
    P:
      type: OAK_PLANKS
```

### How It Works

1. **Layout**:
   * Represents the pattern of materials in the crafting table (3x3 grid).
   * Use a single capital letter (e.g., `W`, `P`) to represent each material for slots that are occupied.
   * Use a space ( ) for empty slots. Example layout for the "chair":

     ```yaml
     W   W
     W W W
     P   P
     ```
2. **Materials**:
   * Define each material used in the layout.
   * Each material:
     * Has a **capital letter** key (e.g., `W` for wool, `P` for planks).
     * Specifies a **Minecraft material type** (e.g., `WHITE_WOOL`, `OAK_PLANKS`).

### Crafting the Chair

Using the example above:

* Place **WHITE\_WOOL** in slots where `W` appears.
* Place **OAK\_PLANKS** in slots where `P` appears.
* Leave the empty slots blank.
* When the correct layout is placed in a crafting table, the player will craft the custom "chair" model.

### Customizing Recipes

You can create recipes for any custom model by following these steps:

1. Define a crafting **layout** under `recipe.layout`.
2. Use meaningful and unique capital letters to represent materials.
3. Specify the **Minecraft material type** for each material key under `recipe.materials`.

### Notes

* Ensure material names are **unique, single capital letters**.
* Double-check Minecraft material names for correct spelling (`WHITE_WOOL`, `OAK_PLANKS`, etc.).
* Adjust the layout and materials to fit your custom model's design.


---

# 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://models.advancedplugins.net/models-and-guides/model-crafting.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.
