Resource pack

Resource pack

The resource pack system is an API replacement for texture packs and a way for players to further customize their Minecraft experience.[1][2] Resource packs allow players to customize textures, music, sounds,[3] language files, end credits, splashes[4], and fonts[5] without any code modification.[5][6] If the resource pack system supports modification and addition of code in future updates as mentioned by Mojang, every mod/plugin will be its own resource pack, with vanilla incorporated as a resource pack by itself; users will be able to apply multiple resource packs at once. However, for security reasons, there would be limits to what could be modified. Executing unstable code could corrupt a client copy of Minecraft. Contents [hide] 1 Texture Packs 2 Additional functionality 3 Designing a Resource Pack 3.1 pack.mcmeta 3.2 pack.png 3.3 assets 3.4 Adding Languages 3.5 Animation Properties 3.6 Texture Properties 3.7 Font Properties 4 Usage 5 Folder structure 6 Video 7 History 8 References [edit]Texture Packs

All texture pack functionality has been incorporated into resource packs as of 1.6. All prior texture packs must first be converted to be usable by the game. A tool called Minecraft Texture Ender is available from Mojang to automatically convert "unstitched" (1.5 compatible) texture packs to resource packs. "Stitched" packs, which are texture packs meant for versions prior to 1.5, must first be unstitched with Unstitcher. Converted packs function as texture packs when loaded in the game. [edit]Additional functionality

Resource packs include a new metadata format that allows plugin developers in addition to Mojang themselves to easily include whole new types of resources such as sounds, language files, music, etc. with minimal difficulty. The new format will also allow Minecraft to more easily detect out of date packs, while still being able to load them. Resource packs use the entire assets folder in the minecraft directory and "1.6.jar" (a new version format in the new launcher) for usage of additional resources, and include pack.mcmeta (used to describe the resource pack like pack.txt before 1.6.1), and pack.png (a picture for the resource pack, same as texture packs). [edit]Designing a Resource Pack

To make a Resource pack, first go to the minecraft folder. On Windows, it will be called .minecraft and it will be in the AppData folder under your user name. On a Mac, it is called minecraft and you can find it by going to Finder, pressing Shift-Command-G and typing "~/Library/Application Support/minecraft" and pressing enter. Under Linux it is called .minecraft and is in your home directory (hidden by default). Once you've gotten to minecraft, open the resourcepacks folder. Create a new folder for your new resource pack, naming it whatever you want your resource pack to be called. [edit]pack.mcmeta Now the first thing you'll need is a pack.mcmeta 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. To create your pack.mcmeta file, open a text editor and paste in the following lines: {  "pack":{ "pack_format":1, "description":"My Resource Pack" } } You can leave the description as My Resource Pack 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: http://en.wikipedia.org/wiki/List_of_Unicode_characters Say you want to use the letter thorn: Þ You'd put that in as \u00DE. Just make sure you use a backslash and not a forward slash. Whether you change the description or not, you'll need to save your text file as pack.mcmeta. Make sure your text editor is actually saving it in plain text rather than something special like rich text format. [edit]pack.png If you want to make a new image to show in the resource pack selection screen, you can make a 128x128 pixel png and call it pack.png. It goes in the same place as pack.mcmeta [edit]assets Next you need to create a folder called assets and create a folder called minecraft inside it. This inner minecraft 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 use the default for any missing files. 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 minecraft folder inside assets, and create a folder called textures. Inside that, you'll need to make a blocks folder, and inside that you can put your purple brick image file, making sure to call it brick.png. 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 minecraft folder that contains resourcepacks. Now open up the assets folder (this is a different one from the one you made). You should see folders labeled icons, music, records and sounds. 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 minecraft folder that you recently created. Create a new icon 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. To find the files for fonts, languages, texts, and textures, it's a little bit more involved. Go back to the first minecraft folder that contains resourcepacks and this time, open up the versions 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 assets folder with yet another minecraft folder inside. Open them up and you'll see folders called font, lang, texts, and textures. Again, you'll find the default files inside and you can copy the ones you want to change and put them into the minecraft folder that's hidden in the depths of your new resourcepack 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. [edit]Adding Languages You can add new languages to Minecraft by resource pack. Assume that your language code (might be ISO 639) is 'LANG' and country/region code is 'COUNTRY' (might be ISO 3166-1), pack.mcmeta will be: {  "pack":{ "pack_format":1, "description":"Resource pack sample" },  "language":{ "LANG_COUNTRY":{ "name":"Language name", "region":"Country/region name", "bidirectional":false }  } } Then, put LANG_COUNTRY.lang file to assets/minecraft/lang folder. Choose your resource pack, open the language selection screen, your new language will be there. Please note that pack.mcmeta goes in assets/minecraft, not in assets/minecraft/lang. Also note that the above pack.mcmeta is the same file as the pack.mcmeta file that gives the metadata for your resource pack. If you already have a pack.mcmeta 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 texture pack for versions 1.6.4 to 1.6, you need to combine them manually because multiple resource packs could not be selected before 1.7. [edit]Animation Properties {   "animation":{ "width":1, "height":7, "frametime":1, "frames":[{ "index":0, "time": 0 },        1,2,3,4,5,6,4,2]   } } width and height are the number of frames in the horizontal and vertical directions, respectively. frametime is the default delay to use between frames. frames is a list of frames, in the order they are to play in. index and time 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 this, though it will make each frame last only one frame: { "animation": {} } Saved as the file you want animated (like stone).png.mcmeta. It then needs to be placed in the same folder as your texture (stone).png is located in. [edit]Texture Properties {   "texture":{ "blur":false, "clamp":true } } This optional section can be added to your texture .png.mcmeta to add special properties to its textures. blur will allow the texture to blur when viewed close-up, and clamp will prevent the texture from repeating in situations where it otherwise might (this can most easily be seen when setting clamp to false in shadow.png.mcmeta - multiple shadows will appear under some mobs.) [edit]Font Properties {   "font":{ "characters":{ "default":{ "width":16.0, "spacing":1.5, "left":0.0 },        "0":{            "width":16.0, "spacing":1.5, "left":0.0 },        "46":{            "width":16.0, "spacing":1.5, "left":0.0 },        "255":{            "width":16.0, "spacing":1.5, "left":0.0 }     }   } } 0 is the first character and 255 is the last.

This function would be great for adventure maps where you'd want to change the music of a certain disc, or if you'd want to change the end credits to something more user-friendly. Or it could be useful to a server that wants specific textures on the server. You could even change the name of the item itself in Survival maps. And of course, changing the textures of things like texture packs have done. Keep in mind that you can also change the words of the Death Messages, Title-Screen options and some other things. [edit]Folder structure By clonearmy52