# My First Sword

{% hint style="danger" %}
**Resourcepack hosting**

Remember to **decide** a [**resourcepack hosting**](https://itemsadder.devs.beer/plugin-usage/plugin-configuration/resourcepack-hosting) method **before** you **start**.\
I **advise** you to use **self-host** which is **easier** and **faster**, but you can also use **Dropbox** and similar
{% endhint %}

## Creating the swords file config

{% hint style="warning" %}
This is an example sword (remember to change `my_items` namespace to the one you want).
{% endhint %}

For example I created a **file** which will contain all my **custom swords**:\
`contents/my_items/configs/myswords.yml`

In this file (`myswords.yml`) I start creating a simple sword called `mysword`

{% code title="contents/my\_items/configs/myswords.yml" %}

```yaml
info:
  namespace: my_items
items:
  mysword:
    display_name: My Sword
    permission: myitems.mysword
    durability:
      max_custom_durability: 1324
  
```

{% endcode %}

## Item texture

### Creating the texture file

Now the fun part, let's set the sword texture.\
To do that you have to put your sword `.png` texture file inside the correct folder.

In this case your **namespace** is `my_items` so you have to put it here:

`contents/my_items/textures/item/mysword.png`

![](https://708574821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M28TcKgSDvuFN510qye-887967055%2Fuploads%2Fgit-blob-005b1bdb7b4d70f31fc5de879bdd0a50e38610c7%2Fimage_\(14\).png?alt=media)

### Applying the texture file to your item

Now open `myswords.yml` file again and add the `resource` part as I did.\
As you can see I set `generate: true` and I set the textures for the item.\
This tells the plugin to generate the 3D model automatically using your texture.

{% code title="contents/my\_items/configs/myswords.yml" %}

```yaml
info:
  namespace: myitems
items:
  mysword:
    name: My Sword
    permission: myitems.mysword
    resource:
      material: DIAMOND_SWORD
      generate: true
      texture: item/example_item.png
    durability:
      max_custom_durability: 1324
```

{% endcode %}

## Final part

Now you just need to tell the plugin to load your just added item.\
To do that you have to:

* join the server
* make sure you accepted the resourcepacks
* use the command `/iazip`
* (if you're using **external-host** (**DropBox**) scroll down and follow the instructions)
* get the item using `/iaget mysword`

![](https://708574821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M28TcKgSDvuFN510qye-887967055%2Fuploads%2Fgit-blob-6d1e43a1dd14f56f5cc5774bfa3ee3fbdeb07c4e%2Fimmagine.png?alt=media)

![](https://708574821-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M28TcKgSDvuFN510qye-887967055%2Fuploads%2Fgit-blob-5c9891aeb9a03c7fd087c6175bfcd2e1844e0d55%2Fimmagine.png?alt=media)

## Resourcepack Hosting Tutorials

{% content-ref url="../plugin-configuration/resourcepack-hosting" %}
[resourcepack-hosting](https://itemsadder.devs.beer/plugin-usage/plugin-configuration/resourcepack-hosting)
{% endcontent-ref %}
