Tutorials/Creating a resource pack

Time Required
This tutorial should take around 1 to 1.5 hours to complete.

Required Tools
You will need the following programs to follow along with this tutorial:

A text editor
Any text editor should work but the suggested is a text editor using some sort of programming IDE. Notepad++ is an excellent, and FREE, text editor with syntax highlighting for lots of programming languages. You can download Notepad++ from here:

An image editing program
MS Paint will work for modifying most textures, but will not work for saving out textures that have transparency (like the chicken’s). GIMP (GNU Image Manipulation Program) is a free image editing program that will allow you to save out transparent images. You can download GIMP from here:

Getting Started
We are going to start off small and teach you how to make a resource pack. Resource packs can modify textures, models, animations, music sounds, user interfaces, and languages. This tutorial will be focusing specifically on modifying textures.

Creating a resource pack
Start off by navigating to our  folder. To find the folder, you must first locate the Minecraft folder. Once you are in the resource pack folder, create a new folder and name it: “Tutorial_Resource_Pack”. Then, open that folder.

The first thing we need to do is create a  file. This lets Minecraft know that the folder is a resource pack and it also allows you to customize the description that appears when you're selecting which resource pack to use in the game.

Creating an MCMETA file
To create an MCMETA file, right click in the 'Tutorial_Resource_Pack' folder and create a new text document. Name this file “pack.mcmeta”.

Note
Make sure the file extension is  and not   when you rename it. You may be warned that changing a file name extension could make the file unusable. This is okay!

If you can’t see file extensions, you can turn them on by going to the View menu of the file explorer and checking the check box for file name extensions.



Open  in a text editor of your choice and copy or type the following for 1.11 and 1.12:

{   "pack": { "pack_format": 3, "description": "Tutorial Resource Pack" } }
 * pack.mcmeta

requires  in versions before 1.9, and   as of 1.9 and 1.10.

You can leave the description or you can change it to something more exciting. If you decide you need something with fancy characters, you can look up the code for it here. Say you want to use the letter thorn: Þ. You'd put that in as. Just make sure you use a backslash and not a forward slash.

Note
This file is in the MCMETA data format, which is a modified JSON format! We won’t go into specifics about the format now, but be aware about how things are laid out. '''Be very careful not to forget quotation marks, colons, and curly or square brackets. Missing one of these can lead to your resource pack not working correctly!'''

Testing our Pack
Now we are ready to test it out in game! Launch Minecraft and open the options, then click on Resource Packs. Your game should look something like this if you used the above code:



Troubleshooting
If you don’t see your pack in game, make sure your pack.mcmeta is correct. Look for any missing curly braces { }, commas, colons :, quotation marks “”, or square brackets [ ]. Remember for each open brace, quotation, or square bracket, you must have a closing brace, quotation, or square bracket.

pack.png
If you want to make a new image to show in the resource pack selection screen, you can make a 128×128 pixel .png file and call it. It goes in the same place as

Assets
Next you need to create a folder called  and create a folder called   inside it. This inner  is where you'll put all of the custom files you'll create to make your resource pack unique.

Now you're ready to find the files that you want to customize. You don't need to put in anything that isn't changing from the default because Minecraft will automatically filter the packs in order that they were selected, and usually the next one down is default. So say you want everything to be the same, except that you want to make your brick texture purple instead of red. You'll need to create a new image file with purple bricks, but it needs to have the same name and file path as the original. So for the bricks, you'll need to go into the  folder inside assets, and create a folder called. Inside that, you'll need to make a  folder, and inside that you can put your purple brick image file, making sure to call it  .(needs lowercase for all things in 1.11)

You might be wondering how to figure out what the names are and what the file structure is, and how to find the original files themselves if you only want to make a slight change rather than starting from scratch. For that you have to look in one of two places, depending on the type of file that you're changing.

If you want to make custom icons, music, records, or sounds, go back to the first  folder that contains. Now open up the  folder (this is a different one from the one you made). You should see folders labeled,  ,   and. Inside, you'll find the original files for each category. If you want to update an icon, just copy the one you want and then go back to the  folder that you recently created. Create a new  folder inside, and paste your icon file into it. Now you can open that file and modify it however you like, and it will still have the correct name and file path.

For version 1.8+, you will need to use the following directory structure for sounds. The  directory must be created in the   directory, and the   and   directories must be created in the   directory. Inside the  directory you will want to create   and   directories. There are additional directories that you can create as appropriate for additional sound types, but these should get you well on your way. By creating your ogg Vorbis files, renaming them to match existing sound file names, and placing them in the proper directories, you can replace default sounds with your own creations.

To find the files for fonts, languages, texts, and textures, it's a little bit more involved. Go back to the first. folder that contains  and this time, open up the   folder. Inside you should see a folder that corresponds to the current version (i.e. 1.7.2). Open that to find the 1.7.2.jar file and open that jar file using whatever unzipping program you have. Inside the new folder that it creates, you'll see a whole slew of class files, but somewhere in there you'll find yet another  folder with yet another   folder inside. Open them up and you'll see folders called,  ,  , and. Again, you'll find the default files inside and you can copy the ones you want to change and put them into the  folder that's hidden in the depths of your new   folder.

If that's too confusing, it might be helpful to look at a video tutorial or two. You can also look into downloading a default resource pack that you can just copy and modify, deleting the branches of folders that you don't need. That might be simpler, depending on what you're doing. The folder structure is visible here on the wiki: Resource pack.

Replacing Minecraft Models
Sometimes you may want to change one of Minecraft's models, quick and easy. Here is a way to do it. This uses another block's model to make your own.

You are not allowed to

 * Do anything that violates Mojang's terms of use for Minecraft.
 * Release Minecraft versions or modifications that allow you to play without having bought Minecraft from Mojang.
 * Release the decompiled source code of Minecraft in any way.

Requirements

 * A 3D Modelling Editor (I use opls Model Creator because it is easy(ish) to use and can export to .json format)


 * Create a resourcepack with the name "Blocks" and with all the folders you need:

Replacing a Block
Because the ladder in Minecraft isn't 3D, you can replace it with your own model. First to get all the ladder's files into this resourcepack:

file-roller ~/.minecraft/versions/1.9/1.9.jar

1. Go into the "assets/minecraft/blockstates" file, then extract ladder.json to Blocks/assets/minecraft/blockstates/

2. Extract assets/minecraft/models/block/ladder.json to Blocks/assets/minecraft/block/

3. Extract assets/minecraft/models/item/ladder.json to Blocks/assets/minecraft/item/

4. Lastly, extract assets/minecraft/textures/blocks/ladder.png Blocks/assets/minecraft/textures/blocks/ladder.png

Now you can either edit the ladder.png and change it there, or you can edit it in Model Creator.

Modelling the Ladder
First to open Model Creator

cd ~/Model\ Creator/ java -jar Model\ Creator.jar

Next, to load the ladder model, press Ctrl-O

In the "File Name" box, write ".minecraft/resourcepacks/Blocks/assets/minecraft/models/block/ladder.json".

You then should be facing a ladder which is on the south side of the box.

1. Press R to create a new block.

2. Resize the model to as small as one of the rungs of the ladder. Then, on the top bar, go to "View - Dialog - Texture Manager"

3. Rename the first box to "texture" and the second to "blocks/ladder" and the last, double click on the "C" and write in the box, ".minecraft/resourcepacks/Blocks/assets/minecraft/textures/blocks/ladder.png"

4. In the next row, write in the first box "particle", then follow the second and the last steps above.

Now we have created the particle when broken and the texture.

To assign a texture to a block, select all its faces and press T to toggle face visibility, then go to "View - Dialog - UV Editor".

Put on the texture. This part is a little bit hard to document, so try to do it yourself.

Finishing off
When you have completed the 3D model of the ladder and saved it, turn Minecraft on.

In Minecraft, go to "Options - Resourcepacks" and enable the resourcepack.

Place the ladder on a wall, and you should see it's replaced model.

Adding Languages
You can add new languages to Minecraft by resource pack. Assume your language code is 'LANG' (might be ISO 639) and country/region code is 'COUNTRY' (might be ISO 3166-1),  will look like: {   "pack":{ "pack_format":3, "description":" Resource pack sample " },     "language":{ " LANG_COUNTRY ":{ "name":" Language name ", "region":" Country/region name ", "bidirectional":false }     }   }

Then, put  in. In game, choose your resource pack, open the Language selection screen, and your new language will be there. Please note that  goes in , not in. Also note that the above  is the same file as the   file that gives the metadata for your resource pack. If you already have a  file, you must update it with the information for your new language.

NOTE: As of 1.7, you can choose multiple resource packs at once. If you want to use new language and resource pack for versions 1.6.4 to 1.7, you need to combine them manually because multiple resource packs could not be selected before 1.7.

Animation Properties
{    "animation":{ "width":1, "height":7, "interpolate": true, "frametime":1, "frames":[{ "index":0, "time": 0 },         1,2,3,4,5,6,4,2]    } }

and  are the size (as a ratio) of a single frame. ( / ) determines whether or not Minecraft should generate more frames in between two frames. is the default delay to use between frames, with each increment being 50 milliseconds. is a list of frames indexes (with the first frame being 0), in the order they are to play in. and  can be used together to specify a frame that should take a different amount of time than the default.

NOTE: All you really need to make a texture animated is the following code, though it will make each frame last only one frame:

{  "animation": {} }

Save the file as the same name as the texture you want animated (like if you wanted to animate, you would save it as  ). It then needs to be placed in the same folder as your texture (maybe ) is located in.

Texture Properties
{    "texture":{ "blur":false, "clamp":true } }

This optional section can be added to your  to add special properties to its textures. will allow the texture to blur when viewed close-up, and  will prevent the texture from repeating in situations where it otherwise might (this can most easily be seen when setting   to   in   - multiple shadows will appear under some mobs.)

Fonts
Character sizes in fonts are determined by the last line of pixels that contains pixels which contain a non-zero alpha. This allows additional padding to be added around characters by adding a color with an alpha level of 1, which Minecraft will consider as part of the character.

Packaging Resource Packs with your Maps
For using in single-player worlds, you can package your resource pack as a ZIP file named "resources.zip" inside your world directory. This will then automatically be used when playing the single-player world.

Server Resource Packs
When complete, if administering a server, you may set it as a default resource pack on a multi-player server.