Minecraft Blogs / Tutorial

How to Use Anvils to Change Item Textures! Uses Optifine! (JAVA ONLY)

  • 9,605 views, 12 today
  • 19
  • 16
  • 9
K_I_W_I's Avatar K_I_W_I
Level 47 : Master Pokemon
36
This is a tutorial showing the use of anvil renaming to change an item's texture and/or model in a resource pack.

This is useful when wanting multiple of the same items to have different textures. It is also a great way to have custom items in survival worlds and SMP's. Because this method uses a resource pack, you do not have to use commands to create the items you want, (no using custom item data), it is a simple, no cheating way to get custom items in-game.

(You can download the resource pack I use in this tutorial here: Anvil Resource Pack Template)

Doesn't that sound great!?!

Let's get into it!!!

First things first, you are going to need to find out how to make a resource pack, I am not going to explain that here so before reading on please check out this MinecraftWiki on creating resource packs:

https://minecraft.fandom.com/wiki/Tutorials/Creating_a_resource_pack

All caught up? Great!

First things first, go to your .minecraft folder and select resource packs.

Create a new folder naming it whatever you please.

In that folder start creating a normal resource pack by adding an assets folder. Don't forget the pack.mcmeta file.

First Step
First Step

Enter assets and create a minecraft folder.

Second Step
Second Step

This is where things differ from a normal resource pack so pay attention!

Make a new folder in the minecraft folder labeled: optifine (Remember; DO NOT use capitals when naming files)

Third Step
Third Step

In optifine, add a new folder labeled cit. (This is Optifines feature called Custom Item Textures. It is the feature we will be using to make this pack work).

Fourth Step
Fourth Step

In this folder, create a final folder named whatever object you are going to be replacing. Ex: diamond, carved_pumpkin. Don't forget to use underscores instead of spaces. DISCLAIMER: This ONLY works for ITEMS not for armor, blocks, or entities. Exception: Carved pumpkins, because they technically count as an item. In this tutorial, I am going to name the folder "hat" because I am making a custom Kiwi Bird hat. Although since I'm replacing a carved pumpkin I should name it: carved_pumpkin.

After creating your texture/model in whatever software you might want to use, I would recommend BlockBench, save your model as a .json file in this folder. Also, save the texture of the item in this same folder.

Fifth Step
Fifth Step


Now you have your model/texture implemented in your texture pack. All that's left is making it work!

Add a text document (you can do this by right-clicking, then click New, then click Text Document). Edit this using a text editor, (NOT MICROSOFT WORD), my recommendation is Notepad ++. You can name this whatever you want since you will be changing it later.

This next part is very important and crucial that you get it right.

Copy and paste this into that text document that you created.
type=item
matchItems=minecraft:
texture=
model=
nbt.display.Name=ipattern:

After doing so, you will need to input your model and texture information into this outline to make Optifine read it and use the right files.

Going line by line, start with matchItems, type the item you are going to be replacing, in my case, it will be carved_pumpkin.

Example 1
type=item
matchItems=minecraft:carved_pumpkin
texture=
model=
nbt.display.Name=ipattern:

Next, on the texture line, type the name of your texture file, in my case, it will be texture.png. (DO NOT forget to add .png after the name of it will not work).

Example 2
type=item
matchItems=minecraft:carved_pumpkin
texture=texture.png
model=
nbt.display.Name=ipattern:

The next line is model, type the name of your model, in my case, it will be kiwi_bird.json. (DO NOT forget to add .json or the file will not work).

Example 3
type=item
matchItems=minecraft:carved_pumpkin
texture=texture.png
model=kiwi_bird.json
nbt.display.Name=ipattern:

The final line is what I like to call the fun line, despite its scary name, it's actually the easiest line to do! After ipattern: type the name you want the item to be called. This is the same name that will be used when you put the base item (like a diamond) into the anvil to change the texture. In my case I want the name to be Kiwi Pet. In this line, you do not have to worry about spaces or uppercases, make it however you want!

Example 4
type=item
matchItems=minecraft:carved_pumpkin
texture=texture.png
model=kiwi_bird.json
nbt.display.Name=ipattern:Kiwi Pet

This is IMPORTANT!

Now using the text editor of your choice go to file and click on save-as, save it as a .properties file. You can name this file whatever you want as long as there are no spaces or uppercases. Save it into the folder you made in Step 5. In my example, I named it kiwi.properties. Once saved, the file should not be able to be opened, you now know that it worked!

Seventh Step

You can now close all your files and load up your game! Make sure you remember to actually load your resource pack!

If done correctly you should be able to put the item into an anvil and name it the name you have set (mine is Kiwi Pet) and the result should be a named and remodeled item!

My Texture Pack!

As always, send a comment if you are having any troubles and I will try to help!

You can download this texture pack to help you along here: Anvil Resource Pack Template

Troubleshooting:

-Make sure there are no spaces or uppercases in your file names.

-Double-check that your files are correctly typed.

Please consider donating to my Paypal: https://paypal.me/FNEmpty?locale.x=en_US to help fund these cool ideas!
CreditArtsByKev for teaching me how to change a models item data and use BlockBench
Tags

Create an account or sign in to comment.

1
06/18/2023 8:25 am
Level 10 : Journeyman Miner
ariexists
ariexists's Avatar
I am oh so very confused. I have followed the tutorial step by step, I've made sure there are no typos and still it shows up as a cube with a missing texture. Have you any idea what I may have done wrong?
1
07/04/2023 11:08 pm
Level 47 : Master Pokemon
K_I_W_I
K_I_W_I's Avatar
Since I made this a couple of years ago I have not checked if it still works with 1.20.1, if you are having troubles with texture make sure the texture is in the same folder as the .json file.
1
12/17/2021 5:18 pm
Level 1 : New Miner
The_Wanderer224
The_Wanderer224's Avatar
So, I made my pack and am using Optifine. The pack is working in the sense that the game registers the model change, but the texture is completely black. I regularly use shaders and a couple of resource packs, but even with all of that disabled it's still black. Any idea how to fix this?
1
11/15/2021 1:26 am
Level 1 : New Miner
MinecraftGaming256
MinecraftGaming256's Avatar
Usefull For Datapacks
1
11/16/2021 8:12 pm
Level 1 : New Miner
MinecraftGaming256
MinecraftGaming256's Avatar
Did I Did Something Wrong I Tested It A Error Textured Boxed Apeared:( When I Renamed
1
11/16/2021 8:17 pm
Level 1 : New Miner
MinecraftGaming256
MinecraftGaming256's Avatar
Oh Sorry I Was Too Excited I Forgot That It Uses Optifine And I Boosted My Fps 10x So I Disable Custom Item Textures
1
11/09/2021 5:46 am
Level 25 : Expert Crafter
Bekas_
Bekas_'s Avatar
i am doing a totem pack but i cant change its picture into model. Do i really need a model for it?
1
11/10/2021 4:10 pmhistory
Level 47 : Master Pokemon
K_I_W_I
K_I_W_I's Avatar
No, to change a totem's texture all you need to do is upload the texture as you do in a resource/texture pack, this blog is only for replacing models when you rename the item in an anvil.
1
08/31/2021 9:32 pm
Level 47 : Master Pokemon
K_I_W_I
K_I_W_I's Avatar
Fixed the Google Drive Link not working.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome