# Resource Packs

### File Structure

* **Blocks**: `assets/minecraft/models/block` - This directory contains JSON files defining the appearances of blocks placed in the world.
* **Items**: `assets/minecraft/models/item` - This directory is for JSON files that determine how items (without a block form) appear in the game, such as in inventories or when held.

### Block Bench

An easy-to-use 3D modeling application where you can model, texture, and animate 3D block-based models with an intuitive interface.

**Exports**: BlockBench can export models as a single JSON file, which includes not just the model's geometry but also its texture mapping and, importantly, display settings for how the model should appear when held or in inventory.

**Texture Mapping:**

1. To define the texture mapping of a model, double-click the created texture.

<figure><img src="https://2253352022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtJsOP5TXEcIzibyhUIdN%2Fuploads%2FuxsONm2PLoW7Ho0cx9aA%2FScreenshot%202024-03-17%20at%202.33.10%E2%80%AFPM.png?alt=media&#x26;token=613a55c4-1801-4308-8834-98bd761c5f19" alt="" width="364"><figcaption><p>For block models, make sure you set the "Use for particles" option as well.</p></figcaption></figure>

2. From here, you can define the `name` of your texture, whether it's a `block` or `item` texture, and the `namespace` that you store your custom textures.

<figure><img src="https://2253352022-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtJsOP5TXEcIzibyhUIdN%2Fuploads%2F4WTxVbFeX15CGbPQVaPv%2FScreenshot%202024-03-17%20at%202.35.09%E2%80%AFPM.png?alt=media&#x26;token=edf55c60-b638-491e-b916-fbc4f8245dae" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
If you are making a custom model with your texture, you can customize the `name` and `namespace` for organization purposes.

However, if you are creating the texture just to replace an existing Minecraft texture, the `name` must correspond to an existing texture and the `namespace` must be `minecraft`.
{% endhint %}

### **Handling Block and Item Models**

* **Blocks with Item Forms**: When creating a custom block that also has an item form (e.g., a custom ore), you typically place your model in the `models/block` directory. Minecraft automatically uses this model for the item representation, leveraging the `display` settings within the JSON file to adjust its appearance in the inventory, hand, etc.
* **Items Without Block Forms**: For items that don't have a corresponding block in the game (e.g., tools or food), their models go directly into `models/item`. These models define how the item appears in various contexts without needing to be placed as a block.


---

# 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://resource.colingrimes.me/resource-packs.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.
