# 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.
