# Example

## Creating a simple furniture

### Configuration file

The first step is to create a configuration file in your **namespace** folder.\
In this example I called it `furniture_example.yml`.

{% code title="furniture\_example.yml" %}

```yaml
info:
  namespace: myitems
items:
  lamp:
    display_name: "Lamp"
    permission: myitems.decorative.lamp
    lore:
    - lore-decorative-item
    resource:
      material: PAPER
      generate: false
      model_path: lamp
    behaviours:
      furniture:
        light_level: 13
```

{% endcode %}

As you can see I created the item with some special properties.

`behaviours` attribute has a special sub-attribute called `furniture`, this attribute tells ItemsAdder that this item is a placeable furniture model.

Let's add some more settings to it:

{% code title="furniture\_example.yml" %}

```yaml
  lamp:
    display_name: "Lamp"
    permission: myitems.decorative.lamp
    lore:
    - lore-decorative-item
    resource:
      material: PAPER
      generate: false
      model_path: lamp
    behaviours:
      furniture:
        light_level: 13
        solid: true
        placeable_on:
          floor: true
          ceiling: false
          walls: false
        hitbox:
          height: 1
        sound:
          place:
            name: block.metal.fall
          break:
            name: block.metal.break
```

{% endcode %}

I added some properties, in this case I specified where the furniture can be placed (only on the `floor`), the `hitbox` size and `place`/`break` sounds.

{% hint style="info" %}
By default the hitbox is 1x1x1, so it's not really needed to specify these options.

Specify them only if the model is bigger than 1x1x1.

For example if you have a furniture which is 1x2x1 you can set it like that:

```yaml
hitbox:
  height: 2
  length: 1
  width: 1
```

{% endhint %}

{% code title="furniture\_example.yml" %}

```yaml
info:
  namespace: myitems
items:
  lamp:
    display_name: "Lamp"
    permission: myitems.decorative.lamp
    lore:
    - lore-decorative-item
    resource:
      material: PAPER
      generate: false
      model_path: lamp
    behaviours:
      furniture:
        light_level: 13
        solid: true
        placeable_on:
          floor: true
          ceiling: false
          walls: false
        hitbox:
          height: 1
        sound:
          place:
            name: block.metal.fall
          break:
            name: block.metal.break
```

{% endcode %}

### Model file

Now open **BlockBench** and create a *"Java Block/Item"*.

![](/files/yyfC1xRMCFuusjt3Eocs)

Now create your model, in this example I'm modelling an ugly minimal modern lamp.

![](/files/X5C4bpQT4v8EEE70y4eV)

{% hint style="warning" %}
Important: make sure the north is opposite of where you want the model to face.

Or add the property to the YML configuration `opposite_direction: true`
{% endhint %}

Edit how the model is shown on player hand:

![](/files/UXI1SJpU99DvQx0uUfLX)

![](/files/YhhlKlwzAElN3R3QWH2n)

### Configure the in-game view

#### Using `armor_stand`

You have to select the **head icon** and then **small armorstand:**

![](/files/AqhlfxLoRHW0T4s5XXM4)

Then you have to shift your model down until it matches the armorstand base:

![](/files/B7nF0WToXtDqEcTfL8Dx)

#### Using `item_display`

Select *Frame* and *Invisible Top*.\
Adjust the model Z *Translation* (the blue arrow) until it matches the bottom of the white block perfectly.

<figure><img src="/files/7DehlHXNtlYSZq3UWNa4" alt=""><figcaption></figcaption></figure>

#### Using `item_frame`

Same thing of `item_display`.

### Export the model

Now let's save the model file into the correct folder, in this case I set this property in the yml configuration file: `model_path: lamp`, so you have to save the .json file inside this path: `contents/myitems/models/lamp.json`.

To achieve this, click on "File" followed by "Export Model" and finally "Export Block/Item Model". In the new window, head over to the path you want to save your model under, give it the right name and confirm the changes.

### Saving changes

Now run `/iazip` (and follow the [hosting tutorial](/plugin-usage/plugin-configuration/resourcepack-hosting.md) if needed).

To obtain the item use this command: `/iaget myitems:lamp`.

![](/files/zLb0j70wCsRKtlvVtRa8)

![](/files/Okw5qjvK4X7Bnk9mni6c)


---

# 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://itemsadder.devs.beer/adding-content/furnitures/example.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.
