> 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="/files/8f26WfEy0qYOkPDBuqmt" 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="/files/kl5SfRJdZqfI4GntFj46" alt=""><figcaption><p>In-game demonstration</p></figcaption></figure>
