# Backpack

Creating a backpack starts to become a bit more tedious and more so when it comes to first-person backpacks.

This is how a normal backpack is created:

* cosmetic file:

{% code lineNumbers="true" %}

```yaml
  creeper_backpack:
    permission: 'cosmetics.creeper_backpack'
    item:
      display: '&bCreeper backpack'
      material: LEATHER_HORSE_ARMOR
      lore:
        - ''
        - '&aSupport the creepers!'
      unbreakable: true
      glow: false
      hide-attributes: true
      modeldata: 10003 #model data from the backpack that everyone will see.
    colored: true
    type: BAG
    distance: 100 #distance to where the players can see the backpack.
```

{% endcode %}

* BlockBench file:\\

<figure><img src="https://3124236703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3eNqMn4ZoNz5GrU7rqCt%2Fuploads%2Fgit-blob-595aef296255df8ac219f9a99c83bbb8ea4d30c9%2Fimage.png?alt=media" alt=""><figcaption><p>Edit mode - Check Position</p></figcaption></figure>

<figure><img src="https://3124236703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3eNqMn4ZoNz5GrU7rqCt%2Fuploads%2Fgit-blob-e9205b39f43c7a761d83566a8fe28444411c5de4%2Fimage.png?alt=media" alt=""><figcaption><p>Display mode - Check Y Position</p></figcaption></figure>

This is how a first person backpack is created:

* cosmetic file:

```yaml
  creeper_backpack:
    permission: 'cosmetics.creeper_backpack'
    item:
      display: '&bCreeper backpack'
      material: LEATHER_HORSE_ARMOR
      lore:
        - ''
        - '&aSupport the creepers!'
      unbreakable: true
      glow: false
      hide-attributes: true
      modeldata: 10003 #model data from the backpack that everyone will see.
      for-me: 10031 #If this path is set, this item or modeldata will be displayed for the player who is using it, while the others will see the one that is already set. Remember, this path can use either number(modeldata) or id(itemsadder)
    colored: true
    type: BAG
    distance: 100 #distance to where the players can see the backpack.
    height: 3 #This is the height at which the backpack item will be set for the player himself.
```

* BlockBench file:

<figure><img src="https://3124236703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3eNqMn4ZoNz5GrU7rqCt%2Fuploads%2Fgit-blob-ae645c852289ce9b03cdd6da0e8034a67575011d%2Fimage.png?alt=media" alt=""><figcaption><p>Edit Mode - Check Position</p></figcaption></figure>

<figure><img src="https://3124236703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3eNqMn4ZoNz5GrU7rqCt%2Fuploads%2Fgit-blob-c7888610bc89adf80202ba7ba9bf0275d80cb41b%2Fimage.png?alt=media" alt=""><figcaption><p>Display Mode - Position</p></figcaption></figure>

Finally, it remains to show the last option for the backpack:

```yaml
    space: 30 #if the player's yaw exceeds this number the backpack disappears and if not it will not be visible again (only affects the client and not others) If you don't want the backpack to disappear when its yaw changes, delete this path or leave it at 0.
```

<figure><img src="https://3124236703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3eNqMn4ZoNz5GrU7rqCt%2Fuploads%2Fgit-blob-d33e4d0c9224b095fd24f98e6c9024e2528d3c63%2Fimage.png?alt=media" alt=""><figcaption><p>Here it still does not exceed the space it was given.</p></figcaption></figure>

<figure><img src="https://3124236703-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3eNqMn4ZoNz5GrU7rqCt%2Fuploads%2Fgit-blob-fea13ee86c8cc26f9621f81874dcb9e342aba99f%2Fimage.png?alt=media" alt=""><figcaption><p>Here the space has already passed, so only the backpack will be invisible to the player who is wearing it, once he/she looks up again and does not exceed the number, it will be returned.</p></figcaption></figure>
