> 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/textures.md).

# Textures

To create a new texture, call your virtual resource pack's `texture` method.

```java
resources.texture("<type (item/block/etc)>", <Path/File object pointing to your original texture file>, "<internal resource name (optional)>");
```

{% code title="Example" %}

```java
// This code registers the "test.png" file in the game's instance directory as "minecraft:item/diamond", overriding the original texture
VirtualResourcePack resources = new VirtualResourcePack("minecraft");
resources.texture("item", FMLPaths.GAMEDIR.get().resolve("test.png"), "diamond");
```

{% endcode %}

**Note**: The `texture.png.mcmeta` file will be added automatically.
