User Tools

Site Tools


mtr_extra:making_a_resourcepack

Making a Resource Pack

This guide will tell you how to set up your file structure to make a resource pack.

Requirements: Windows 10 21H1 or later.

It is recommended to watch Jonathan's tutorial video for this topic: https://www.youtube.com/watch?v=QH1O-y6kPSk

Guide

Folder structure

  1. Go to your .minecraft folder.
  2. Then find the resourcepacks folder
  3. Create a folder with a name that you want (for example: My custom M-Train)
  4. Create a new folder inside of the existing folder called assets.
  5. Upload a pack.png to your folder, this image will show in the resourcepack selection screen and should be 128×128.
  6. Download this template pack.mcmeta and put it into your resourcepack folder:
pack.mcmeta
{
    "pack": {
        "description": "put your pack description here",
        "pack_format": 9,
    }
}

The pack format is what version of Minecraft the pack is for. If you are only adding MTR models or textures, this is not important.
However, if you feel the need to add a number, it is recommended to use 8 or 9, as they correspond to versions 1.18 and 1.19 respectively.
If a pack tells you it's “not compatible”, just remember that the only thing that changes that is this number, so it really doesn't say much.

  • Create a new folder named MTR in the assets folder.
  • Create a text file inside the folder named mtr_custom_resources.json

JSON files

To format your JSON file, simply copy, paste & edit some of the values. The main code is here:

If you have just one train:

mtr_custom_resources.json
{
	"custom_trains": {
		"{Base_Train_Name_here}": {
			"name": "My Custom Train Name",
			"color": "#66CCFF",
			"base_train_type": "sp1900",
			"texture_id": "mtr:{FOLDERNAME}/{TEXTURENAME}.png"
 
		}
	}
}

If you have more than one (you cannot simply duplicate the piece above, as this messes with the json format):

mtr_custom_resources.json
{
	"custom_trains": {
		"{Base_Train_Name_here}": {
			"name": "Another train name here",
			"color": "66CCFF",
			"base_train_type": "sp1900",
			"texture_id": "mtr:{FOLDERNAME}/{TEXTURENAME}.png"
 
		},
 
		"{Base_Train_Name_here}": {
			"name": "Another train name here",
			"color": "66CCFF",
			"base_train_type": "sp1900",
			"texture_id": "mtr:{FOLDERNAME}/{TEXTURENAME}.png"
 
		}
	}
}

Make sure to never include uppercase letters in your filenames or the ids inside the resourcepack. Using them usually causes minecraft to ignore it and revert to the default texture.

JSON explanation:

  • “name”: The name that MTR shows in the train picker.
  • “color”: The color that MTR shows in the train picker.
  • “base_train_type”: The type of the retextured train.
  • “texture_id”: The custom texture that will display when train has been spawned.

What it should look like:

Train textures

  1. Download an image editing software of your choice, that supports transparency. Recommended are Paint 3D and GIMP, as they are both free and relatively easy to use. Do not use MS Paint, because it does not support transparency and will cause all transparent parts of your texture to turn white
  2. Open your image editing software, find the texture you want to edit, then open it and start making your edits
  3. When you're done, export the texture file as a PNG to your resourcepack, and put it in the appropriate folder (re-read the section above on making a resourcepack if you're unsure of how and where)
  4. Follow all the correct steps to create the resourcepack, as seen above
  5. Make sure you use the correct base train type. These types can for now be found on the github itself, as the model files have the same names, but in the future, there will be a page for it on this very wiki.
  6. All that is left is to put it in your resourcepacks folder and start your MTR installation!

You can also use blockbench to retexture trains! To do so however, you must first also download the train bbmodel file from the following link:
https://github.com/Minecraft-Transit-Railway/Minecraft-Transit-Railway/tree/master/fabric/src/main/resources/assets/mtr/models/vehicle

And you are done with the basics!

The example resource pack can be downloaded below:

Sound files

  • Download Audacity, its optional, but it makes it easier if you want to record a sound yourself.
  • Record any sound file, or perhaps download one from an external source. Make sure its in .ogg format and the filename doesnt contain any uppercase letters.

Do you want the sound to play in the player's ears or from the source that plays the sound? Make sure your sound file is stereo (player's ear) or mono (source). This can be changed in Audacity.

  • Go back to the mtr folder inside your resourcepack and create a new folder within that called sounds, then paste in the sound file.
mtr_extra/making_a_resourcepack.txt · Last modified: 2024/09/24 18:38 by szandorthe13th