# Using Custom Model Data to Create New Item into the Game

{% hint style="warning" %}
This page considers a big part of an another guide: [Simplexity-Development](https://github.com/Simplexity-Development/Custom_Model_Data_Guide)
{% endhint %}

{% hint style="warning" %}
Example item's texture that used in the stages is copyrighted to: [ItemRebound](https://www.planetminecraft.com/member/betaklerik/)
{% endhint %}

1. To create a new item, you first need to select an original item. Original item is item that you are going to use for basement.&#x20;

{% hint style="info" %}
For example: If you are going to add a new eatable item into the game, your original item could be apple, cooked\_beef, beef... I want to use the apple, because I'm going to create Green Apple.
{% endhint %}

2. Take the original item .json file and put it into your resource pack. This must go into the vanilla namespace. For example, I want to use apple for original model:

```
..\assets\minecraft\models\item\apple.json
```

3. Then, create a new folder for your own assets within the assets directory. For example, I want to use "custompack" name for namespace:

```
..\assets\custompack\
```

4. Within this folder, create the initial folders **models**, and **textures**, and an **item** folder within both of those:

<figure><img src="https://246798814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwR9pvuRzydGAktPtqlap%2Fuploads%2FbLg8hIz8dCpUzszXdnJe%2Fassets.png?alt=media&#x26;token=d996e7d0-e47d-41f4-bb1f-1028baf158b8" alt=""><figcaption><p>Create models &#x26; textures files inside of "Your Namespace"</p></figcaption></figure>

<div><figure><img src="https://246798814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwR9pvuRzydGAktPtqlap%2Fuploads%2FudKtT5yiM5rfsVyQt1RB%2Fmodelsitem.png?alt=media&#x26;token=8bd544a8-7240-495c-81de-8f3b145aa0a4" alt=""><figcaption><p>Create item file inside of models</p></figcaption></figure> <figure><img src="https://246798814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwR9pvuRzydGAktPtqlap%2Fuploads%2Fxv8ZRhDW0YMVJWvTzfgx%2Ftexturesitem.png?alt=media&#x26;token=14d28ca8-ebca-4274-8955-3badb4bc9fd1" alt=""><figcaption><p>Create item file inside of textures</p></figcaption></figure></div>

5. Open the original item .json file you're basing off of and add the following code at below and change it for your item:

<pre><code>{"parent":"minecraft:item/generated","textures":{"layer0":"<a data-footnote-ref href="#user-content-fn-1">minecraft</a>:<a data-footnote-ref href="#user-content-fn-2">item/</a><a data-footnote-ref href="#user-content-fn-3">apple</a>"},
"overrides" : [
{ "predicate": { "custom_model_data": <a data-footnote-ref href="#user-content-fn-4">10000</a> }, "model": "<a data-footnote-ref href="#user-content-fn-5">custompack</a>:<a data-footnote-ref href="#user-content-fn-6">item/</a><a data-footnote-ref href="#user-content-fn-7">green_apple</a>" }
]
}
</code></pre>

{% hint style="success" %}
You should change the code's custom model data value & model path, namespace, item name for you declared them like.
{% endhint %}

6. This code tells the game which model file to look for. The model file should be in the **../assets/\<your namespace>/models/\<your item path>** folder.

{% hint style="danger" %}
You should also name your custom model data with an unique prefix number that makes sense to you to avoid **conflicts** with other custom model data packs.
{% endhint %}

7. Then, create a model file in the folder that you declared path in previous stages:

<figure><img src="https://246798814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwR9pvuRzydGAktPtqlap%2Fuploads%2FcmSQ7dGWOhDMCE2sjRw2%2Fjson.png?alt=media&#x26;token=2ae227b2-6625-484d-865c-8a2602a61516" alt=""><figcaption><p>Create .json file for Your Model</p></figcaption></figure>

8. Inside of this .json file add the code at below, you are telling the game which texture file(s) to look for:

```
{
  "parent": "minecraft:item/generated",
  "textures": {
    "layer0": "custompack:item/green_apple"
  }
}
```

9. So, you must be have the texture in path where you declared in:

<figure><img src="https://246798814-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwR9pvuRzydGAktPtqlap%2Fuploads%2FQaIIEU5AkW5rjo1L4kJi%2Ftexture.png?alt=media&#x26;token=d3cfee0f-d5e2-4a0e-bf42-93038740566b" alt=""><figcaption><p>Texture .png file in the path</p></figcaption></figure>

{% hint style="danger" %}
Texture images have to be in limits by Minecraft.
{% endhint %}

10. After, go to the game and execute those commands by ordered:

```
/pack load
/pack update
```

[^1]: Minecraft Namespace

[^2]: Path of Original Item

[^3]: Original Item .json Name

[^4]: Your Custom Model Data Code

[^5]: Your Namespace

[^6]: Your Item Path

[^7]: Your Model .json Name


---

# 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://chatillon7.gitbook.io/srp-resource-pack-wiki-non-official/resource-pack-usage/using-custom-model-data-to-create-new-item-into-the-game.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.
