Welcome! This pack is provided to you as a tool.
It will allow you to create weapons with their own models and you can require certain enchantments and item types for your weapons to spawn. It will also allow them to glow using what's called 'emissive' texturing and lastly, you will be able to animate them. To do these things you will first need to install Optifine. All these extra features are optional, so if you just want to have a texture that does nothing extra, i will show you how to do that as well.
I will explain each item seen below by order that you see and tell you how to edit it for different purposes.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
First up is the .json file

This file is your item's model, it tells the game how big or small and in what position the item should be in your hand, in the hotbar, item frames or any other place it might appear in the game. All you need to edit for now, is the name that appears at the top.

Change "sword_template" to whatever name you want your texture to have. Also change the name of the .json file itself to the name you chose.
In fact,
anywhere in this pack that you see the words 'sword template', youll be changing it to your own name. This way when you want to make more than one item, each item will have its own set of files and function independently. There is really no limit to the amount of weapons you can have in your pack.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Next is the .png file

This is set up to be animated by default as an example. If you want to change that, just crop it down to one frame that is 64x64. If you do want it animated, you can either leave it with two frames as it is, or add more frames in the same direction going down. Either way you will need the file we talk about next to make it function.
Whether or not you choose to make it animate, this is your texture file and you'll have to edit it using a program that can save.png files and create transparency in the background. I recommend using GIMP. Its a free program that has a lot of similar tools as photoshop but is still very easy for anyone to learn.
Use the red and green lines in the example provided to determine where the swords hilt should be positioned so that it appears in your hand in-game.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Next is the .mcmeta file.

This file allows your texture to animate and determines how fast it should cycle through each frame. Change the number inside to speed it up or slow it down. If you dont want your texture to animate, dont include this file.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Next is the .properties file.

This file will explain to the game how your texture will be spawned in.

The second line in this file will tell the game what items you can rename to get this texture. You can keep it as every variant of the sword in the game, or backspace and enter only one. You can also put items not included in this example, such as axes, pickaxes or hoes.
The third line is telling the game which .png file to use for a texture.
The fourth line is completely optional, you can edit it or remove it. It tells the game which enchantment is required for the items texture to change. You can have more than one enchant required on your item.
The fifth line tells the game what specific name you need to use on your item to retexture it.
The sixth line tell the game which model to use.
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Now Lastly,

You will notice that the last four files in the pack have an _e at the end of them. These are optional as well and can be removed if you want. They allow your item to glow in the dark. This is called emissive texturing. The files are all set up the same way as the normal ones, but they tell the game which texture to use as an overlay on your first one, the overlay will glow in the dark. Just like with the first four files, change the name sword_template everywhere you see it; whether it be the file name or the contents of the file, to your weapons name.
This may seem like a lot of files and editing for one texture, but remember that most of this is optional. For a basic functioning item, you really only need the .properties file, the .json file and a single frame texture. I hope you found this tutorial and the template helpful. The community is huge, and this is just the basics of what you can do with CIT and Optifine.
If you have advanced questions, let me know. Enjoy, cheers!
imgur.com/uTKCt9b
I can get the texture pack to work, I do have optifine on and I am in the right version but when I try loading even the base texturepack, the one with the red and yellow lines it doesnt work so mayb if u know a solution for it could u help me ou?
However I keep having an issue. Whenever I rename an item in the png and properties files the texture will not come through. If I just leave everything the same but change the sword texture ( not the name ) it will work. How do I fix this?