How to make a texture for an item or block in a Minecraft mod
A texture is a 16x16 PNG in assets/<modid>/textures/item or textures/block (textures/items and textures/blocks on 1.12.2) that a model points to. Linen’s texture maker draws one from its own hand-made templates (tools, gems, ingots, ores, planks…) in a colour it picks from the name (ruby_sword gives a red sword), as a start to refine in your editor.
Works on Minecraft 1.20.1 to 26.3 on NeoForge; Minecraft 1.16.5 to 26.3 on Fabric; Minecraft 1.16.5 to 1.20.1 on Forge; Minecraft 1.12.2 on Forge. Each example was compiled against its loader and version before it shipped in Linen.
- Pick the name: it decides the shape and colour (ruby_pickaxe, steel_ingot, amber_ore).
- Linen writes the PNG where the model looks for it.
- Open it in an image editor and refine it.
What you can change
Section titled “What you can change”The example uses these values. Change them in the code.
| Setting | In the example | What it does |
|---|---|---|
| kind | item |
An item texture or a block texture. |
For each loader and version
Section titled “For each loader and version”The example mod is examplemod in the package com.example.examplemod. Use your own mod id and package.
Fabric 1.16.5 to 26.3, NeoForge 1.20.1 to 26.3, Forge 1.16.5 to 1.20.1
Section titled “Fabric 1.16.5 to 26.3, NeoForge 1.20.1 to 26.3, Forge 1.16.5 to 1.20.1”Uses:
textures/itemtextures/block
Forge 1.12.2
Section titled “Forge 1.12.2”Uses:
textures/itemstextures/blocks
1.12.2 keeps item textures in textures/items and block textures in textures/blocks (plural).
Sources
Section titled “Sources”- https://docs.fabricmc.net/1.21.1/develop/items/first-item
- https://docs.neoforged.net/docs/1.21.1/resources/client/textures
Related how-tos
Section titled “Related how-tos”In Linen
Section titled “In Linen”Linen’s How-tos library has this page too, with the example for your own mod’s loader and Minecraft version. Hover a name in your code and Linen points to the how-tos that explain it. Both are free. Download Linen.