> For the complete documentation index, see [llms.txt](https://wiki.modernmodpacks.site/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.modernmodpacks.site/wiki/hellish-mods/digitality/resource-packs/models.md).

# Models

Since there are multiple different minecraft model types, `VirtualResourcePack` class has a couple of different methods for each model type.

## Item models

```java
resources.itemModel("<item name (diamond/iron_ingot/etc.)>", "<layer1 texture name>", "<layer2 texture name (optional)>", etc...);
```

{% code title="Example" %}

```java
// This code generates the "minecraft:item/diamond" model json, that looks something like this:
// {"parent": "minecraft:item/generated", "textures": {"layer0": "minecraft:item/iron_ingot", "layer1": "minecraft:item/stick"}}
VirtualResourcePack resources = new VirtualResourcePack("minecraft");
resources.itemModel("diamond", "iron_ingot", "stick");
```

{% endcode %}

<figure><img src="https://3462309945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff9DP8gpELIkQ3U8skuPM%2Fuploads%2FT4JQvu2h5OnZmlk6MU3v%2Fimage.png?alt=media&amp;token=b36b526e-a4eb-4cbd-888d-d8231135469c" alt=""><figcaption><p>In-game demonstration</p></figcaption></figure>

## Block models

### One side block model

```java
resources.blockAllModel("<block name (without the mod id)>", "<resource name (without the mod id)");
```

```java
// This code overrides the "minecraft:block/gold_block" model, setting it to the "minecraft:block/emerald_block" texture on all sides
VirtualResourcePack resources = new VirtualResourcePack("minecraft");
resources.blockAllModel("gold_block", "emerald_block");
```

<figure><img src="https://3462309945-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff9DP8gpELIkQ3U8skuPM%2Fuploads%2Fvl72gYqz8R0ujLSQCdiN%2F2023-02-09_20.06.02.png?alt=media&amp;token=7456ea69-8a13-4703-afc4-690cf55aa1bc" alt=""><figcaption><p>In-game demonstration</p></figcaption></figure>
