Tutorials/Creating resource pack add-ons

From Minecraft Wiki
Jump to: navigation, search

Summary[edit | edit source]

This tutorial is intended for beginners! If you are looking for specific component details, check the Entity Component Reference Guide. The topics that this tutorial will cover are:

  • How to create a Resource pack
  • How to change textures for:
    • Entities
    • Blocks
    • Items

Time Required[edit | edit source]

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

Required Tools[edit | edit source]

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

A text editor[edit | edit source]

Any text editor should work but I would suggest 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: https://notepad-plus-plus.org/

An image editing program[edit | edit source]

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: https://www.gimp.org/

Getting Started[edit | edit source]

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

Creating a resource pack[edit | edit source]

Start off by navigating to our resource_packs folder. Your file path should look something like this:

C:\Users\user_name\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\resource_packs

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 pack_manifest.json file. This file is going to contain data about our resource pack such as the name of our pack, the description of our resource pack that shows up in game, and a universally unique identifier (UUID).

A quick note about UUIDS[edit | edit source]

A UUID is an identifier that we will use to differentiate between our various add-ons. For this reason, UUIDs must be unique! If you don’t change the UUID from pack to pack, your pack may not show up in game! Thankfully UUIDs are easy to generate! An online generator can be found here: https://www.uuidgenerator.net/version4 . Refresh the page when you need a new one.

Creating a JSON file[edit | edit source]

To create a JSON file, right click in the Tutorial_Resource_Pack folder and go to New->Text Document. Name this file “pack_manifest.json”.

Note[edit | edit source]

Make sure the file extension is .json and not .txt 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 in the file explorer and checking the check box for file name extensions.

FileExtensions.png


pack_manifest.json[edit | edit source]

Open pack_manifest.json in a text editor of your choice and copy or type the following:

pack_manifest.json
{
  "header": {
    "pack_id": "bc2a0bc9-e3a2-4702-9319-d4d3231dfdbc",
    "name": "Tutorial Texture Pack",
    "packs_version": "0.0.1",
    "description": "Tutorial Texture Pack",
    "modules": [
      {
        "description": "Tutorial Texture Pack",
        "version": "0.0.1",
        "uuid": "891f5751-bb0e-47c6-91f0-fdc4e76949ef",
        "type": "resources"
      }
    ]
  }
}

Alternatively, you can copy the included file called “Resource_pack_manifest.json” into your Tutorial_Resource_Pack folder and rename it to “pack_manifest.json”.

Make sure that the pack_id and the uuid in the modules section are two different UUIDs, as mentioned above, you can generate UUIDs online here: https://www.uuidgenerator.net/version4 . The “name” and first “description” field can be filled in with whatever text you’d like to display in game.

Note[edit | edit source]

This file is in the JSON data 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[edit | edit source]

Now we are ready to test it out in game! Launch Minecraft and create a new world. On the left side of the screen scroll down and click on Resource Packs. On the right side of the screen scroll until you see “Tutorial Texture Pack”. Your game should look something like this if you used the above code:

Testingourpack.png



Troubleshooting[edit | edit source]

If you don’t see your pack in game, make sure your pack_manifest.json 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.

Creating an Icon[edit | edit source]

As you may have noticed, our pack does not have an icon! If you do not specify an icon, a pink and black checkerboard texture will show up next to your pack.

In the image editor of your choice, create a new image with a size of 64 by 64 pixels.

To do this with MS paint:

CreatingAnIcon.png
  1. Click resize
  2. Change from percentage to pixels in the resize dialog that pops up
  3. Uncheck maintain aspect ratio
  4. Type in 64 in both horizontal and vertical text entry boxes
  5. Click ok


Once you have the correct canvas size, draw whatever you want your icon to be. For this tutorial, we’ve created a crudely drawn smiley face:

Crudelydrawnsmileyface.png


Save your icon with the name “pack_icon” and make sure that it is saved as a .png. Save it into the same folder that we put our packs_manifest.json file. For reference, our folder should look like this now:

Pack Icon.png



Now if we launch the game and go to the resource packs section of create world it should look something like this:

Resourcepackssection.png



Click on the tutorial resource pack to add it to the world you are making!

Modifying an Entity’s texture[edit | edit source]

Now that we have our resource pack set up, let’s modify the creeper’s texture!

However, before we can do some painting, we need to set up the folder structure that Minecraft expects resource packs to be in. To do this, do the following:

  1. Create a folder named “textures” in our tutorial_resource_pack folder
  2. Inside “textures”, create a folder called “entity”
  3. Inside “entity”, create a folder called “creeper”
  4. Copy the creeper texture from the Vanilla Minecraft resource pack into our newly created creeper folder. The texture can be found here: \Vanilla_Resource_Pack\textures\entity\creeper

Your folder should now look like:

CreeperFileFolder.png



Now that we have the normal creeper texture, open it up in the image editor of your choice. It should look something like this:

CreeperTexture1.png



You might notice your texture looking small, make sure to zoom in on the texture. In MS Paint you can control magnification in the bottom right hand corner of the window with the slider.

CreeperTexture2.png



A quick note on textures[edit | edit source]

If you’ve never seen a texture before, the above image might surprise you. The best way to think about it is like wrapping a gift with wrapping paper, but instead our wrapping paper is our texture. Here is how the creeper’s texture is laid out:

TextureMapKey.png TextureLayoutMap.png


Areas with matching colors face the same direction (i.e. Red areas are always the front of a cube).


How this looks in game:

Howthislooksingame.jpg



Note[edit | edit source]

Not every texture is laid out in the same way, you will need to experiment and find out how each entity’s texture is laid out. Advanced users can look at the mobs.json file in the model folder to find where the textures UV’s are for each body part.

Now it’s time to be creative! Edit the creeper however you want. I’m just going to add a headband for sake of simplicity.

Creeperheadband.png


Once you are happy with your texture, save out the file as a .png and make sure that the file name is “creeper”. The game will only look for files with the correct name. When in doubt, check the Vanilla Minecraft Resource Pack to see file names.

A note on texture file formats[edit | edit source]

Minecraft supports .pngs, .tgas and .jpgs. However, it will first try to load the png version, then the tga, then the jpg. This means if you have 2 creeper textures, one as a png, and one as a tga, the game will see the png one first and load that as your creeper’s texture.

Testing our Resource Pack[edit | edit source]

  • Launch the game
  • Create a new world
  • Set world to creative
  • Click on Resource Packs
  • Find “Tutorial Resource Pack” in the list on the right and click it
  • Click play
  • Spawn a creeper using the creeper egg from the creative inventory

Results[edit | edit source]

CreeperFinishedHeadband.jpg


If you decide you want to make some changes to your texture, just save and quit the level, close the game, edit your texture, relaunch the game, and follow the steps above to create a new world and attach your resource pack to it again. Note that if you launch the last world, you will not see the changes. This is because when you create a world with an add-on attached, it copies your add-ons into the world file. This means you will have 2 different versions of your pack. As you continue to work on the one in the resource_packs folder, the one attached to your world will become out of date.

Alternatively, you can work directly on the pack attached to the world to avoid having to create a world every time. You can find the pack inside of the resource_packs folder in the world’s folder. However, if you then want to add this add-on to another world, you will need to manually copy it back into the com.mojang/resource_packs folder.

Challenge[edit | edit source]

Using what you know now, create a new texture for pigs and for chickens.

  • HINT: Chickens don’t have a folder for their textures like creepers, their texture just goes in the textures/entity folder.
  • HINT 2: Chickens have transparency, so remember to use an image editing program that can save transparency

Block Textures[edit | edit source]

Now that we’ve gone through the process for an entity, changing textures for a block should seem straightforward. Let’s create a new texture for our stone block.

To create a new stone texture:

  • In your textures folder create a new folder called “blocks”.
  • Copy the stone texture from the Vanilla Minecraft Resource Pack into our new blocks folder
    • It can be found here: /Vanilla_Resource_Pack/textures/blocks/stone.png
  • Open stone texture in an image editing software and make edits
  • Test in game

Here is my new stone texture:

TinyStoneTexture.png


and how it looks in game:

NewStoneTexture.jpg



Challenge 2[edit | edit source]

Congratulations! Now that you can create your own block textures, try making a new texture for the furnace.

HINT: furnaces use different textures for front, side, top, and front when turned on, make sure to edit all of them.

Item Textures – Challenge 3[edit | edit source]

Creating a new item texture is like making a new block texture. Follow the same steps as above but make sure to make a folder called “items” in your textures folder and place your item textures there. Remember, you can always look at the Vanilla Minecraft resource pack as an example (/Vanilla_Resource_Pack/textures/items).

Environment Textures[edit | edit source]

You can also change the textures for clouds, the moon, the rain, the snow, the sun, and the cracking animation that plays when you break blocks. These textures should be put into a folder called “environment” in the textures folder.

Trouble shooting textures[edit | edit source]

If your texture is not showing up in game, check the following things:

  • Make sure it has the same name as the asset you are trying to replace
    • IE. Creeper texture should be called “creeper”, stone texture is called “stone”
  • Make sure the texture is in the correct folder!

Congratulations[edit | edit source]

You’ve completed this tutorial and should now know how to create your own resource pack add-ons!

Exporting and Sharing[edit | edit source]

Now that you’ve created a resource pack, you probably want to share it with friends! To do this, perform the following:

  • Navigate into your resource pack folder
    • %userprofile%\AppData\Local\Packages\Microsoft.MinecraftUWP_8wekyb3d8bbwe\LocalState\games\com.mojang\resource_packs\tutorial_resource_pack
  • Select all of the files and folders
  • Right click on the highlighted files and select send to -> compressed zip folder
  • Name the file tutorial_resource_pack.mcpack
    • Make sure to change the file extension to .mcpack
    • when the popup asks you if you are sure you want to change the file extension. Hit Yes

You can now give your friends that .mcpack file! When they open it, Minecraft will launch if it isn’t running yet, and then it will import your resource pack for them to use!


Note[edit | edit source]

You can test to see if this work by deleting your copy in your resource_packs folder (make a backup first!), then opening your mcpack to import it. If it doesn’t work, make sure you selected the contents of your resource_pack and not the folder itself when making the .mcpack zip.