User Tools

Site Tools


mtr_extra:resourcepack:make:texture

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
mtr_extra:resourcepack:make:texture [2025/07/01 09:35] – initial commit Navimtr_extra:resourcepack:make:texture [2025/11/28 15:40] (current) – Small grammar fixes Navi
Line 1: Line 1:
-====== How to add signs, sounds, etc. to your resource pack ======+====== How to add custom train retextures for MTR ======
  
-This guide will tell you how to add signs, sounds, etc. to your resource pack.+This guide will tell you how to retexture existing trains for MTR mod.
  
-<WRAP center round important 90%>+<WRAP round center important 70%>
  
 **MTR4 format** is used in this tutorial. **MTR4 format** is used in this tutorial.
Line 9: Line 9:
 </WRAP> </WRAP>
  
-===== Adding a sign =====+===== Before we get started ===== 
 + 
 +Minecraft Transit Railway mod utilises **Blockbench models (BBMODEL)** for all train models. One single PNG file is used as the UV for each model. By specifying another file in ''mtr_custom_resources.json'', you can create a train retexture without modifying the texture from the main mod. 
 + 
 +===== Dependencies ===== 
 + 
 +  - [[https://www.blockbench.net/|Blockbench]]. You will need this to view the models and check the UV position. 
 +  - A [[wp>Raster_graphics_editor|Raster graphics editor]] that supports transparency. You will need this to edit the textures. You can use editors such as Paint.NET and Photoshop. Microsoft Paint for Windows 10 or below does NOT support transparency. 
 +  - A text editor. Using Notepad is sufficient, but you can use applications designed for coding, such as VS Code. 
 + 
 +===== Editing a texture ===== 
 + 
 +  * Go [[https://github.com/Minecraft-Transit-Railway/Minecraft-Transit-Railway/tree/master/fabric/src/main/resources/assets/mtr/models/vehicle|here]] to grab the model of the train and [[https://github.com/Minecraft-Transit-Railway/Minecraft-Transit-Railway/tree/master/fabric/src/main/resources/assets/mtr/textures/vehicle|here]] to get the textures. Make sure that you choose the model and the texture of the same name. 
 + 
 +<WRAP center round info 90%> 
 + 
 +Some train textures may share the same model (such as Class 802 and all LRVs). 
 + 
 +</WRAP> 
 + 
 +  * Open Blockbench, and apply the texture you've downloaded by dragging it to the Textures area on the bottom left. A dialogue will show, asking you if you want to import the texture / replace the file. Click either of them. 
 +  * {{ :mtr_extra:resourcepack:make:bb_load_images.png?200 }} 
 +  * Now you can select a cube to find its UV position and start retexturing. By clicking the eye icon to the right of each cube/group, you can hide/unhide cubes. 
 +  * {{ :mtr_extra:resourcepack:make:bb_ui.png?200 }} 
 + 
 +===== Adding a texture =====
  
   * Go to your //.minecraft// folder. {{:mtr_extra:resourcepack:minecraft_folder.png?200&nolink}}   * Go to your //.minecraft// folder. {{:mtr_extra:resourcepack:minecraft_folder.png?200&nolink}}
Line 16: Line 41:
  
   * Create a folder with a name that you want (for example: My custom signs) {{:mtr_extra:resourcepack:screenshot_2023-05-16_211341.png?200&nolink}}   * Create a folder with a name that you want (for example: My custom signs) {{:mtr_extra:resourcepack:screenshot_2023-05-16_211341.png?200&nolink}}
-  * Create a new folder inside of the existing folder called ''assets''+  * Create a new folder inside the existing folder called ''assets''
-  * Upload pack.png to your folderthis image will show in the resourcepack selection screen and should be 128x128.+  * Upload pack.png to your folderthis image will show in the resourcepack selection screen and should be 128x128.
   * Download this template pack.mcmeta and put it into your resourcepack folder:   * Download this template pack.mcmeta and put it into your resourcepack folder:
  
Line 53: Line 78:
 </code> </code>
  
-==== Adding your icon to the pack ====+==== Adding your custom texture ====
  
-  * Create a folder under ''mtr'' with a name that you want (for example: ''custom_signs'').+  * Create a folder under ''mtr'' with a name that you want (for example: ''custom_trains''). Now drop your custom texture there.
  
 <WRAP center round important 90%> <WRAP center round important 90%>
Line 63: Line 88:
 </WRAP> </WRAP>
  
-  * Add in the custom icon that you wanted to use.+  * Add in the custom icon that you want to use.
  
 <WRAP center round info 90%> <WRAP center round info 90%>
Line 73: Line 98:
 ==== Registering the sign data ==== ==== Registering the sign data ====
  
-=== Compulsory components ===+  * Return to the ''mtr_custom_resources.json''. Inside the square brackets of ''"vehicles"'', find the vehicle properties that you want to apply your custom textures to. [[mtr_extra:resourcepack:make:core_mod_custom_resources|A full reference is available here.]]  
 +  * Replace the ''id'' with an ID that you like. Only a-z, 0-9, -, _ and ! are accepted. 
 +  * Replace all values in ''textureResource'' under ''models'' with the path to the train texture. DO NOT do this to any of the door overlay models.
  
-  * Return to the ''mtr_custom_resources.json''. Inside the square brackets of ''"signs"'', add the following code.+<WRAP center round tip 90%>
  
-<code json mtr_custom_resources.json> +If you want to have a train without the door overlaysimply remove the models with door overlay properties and models defined.
-+
- "id": "my_custom_sign", +
- "textureResource": "mtr:custom_signs/custom_icon.png", +
- "customText": "你好|Hello", +
- "small": false, +
- "flipCustomText": false +
-+
-</code>+
  
-  * Replace the ''id'' to an ID that you like. Only a-z, 0-9, -, _ and ! are accepted. +</WRAP>
-  * Replace the ''textureResource'' with the path to the icon. +
- +
-=== Optional components === +
- +
-  * Replace the ''customText'' with any text that you want to render. Use a vertical bar (|) to separate between two languages. +
-  * Set ''small'' to ''true'' if you want the icon to be rendered with a small padding around. +
-  * Set ''flipCustomText'' to ''true'' if you want the text to be rendered to the right.+
  
   * Save the JSON file.   * Save the JSON file.
Line 108: Line 120:
   * Open Minecraft, and go to {{:mtr_extra:resourcepack:make:options.png?100}} > {{:mtr_extra:resourcepack:make:rp.png?160}} from either the Game Menu or the title page.   * Open Minecraft, and go to {{:mtr_extra:resourcepack:make:options.png?100}} > {{:mtr_extra:resourcepack:make:rp.png?160}} from either the Game Menu or the title page.
   * Apply the resource pack, and press {{:mtr_extra:resourcepack:make:done.png?160}}.   * Apply the resource pack, and press {{:mtr_extra:resourcepack:make:done.png?160}}.
-  * Your sign should now show in the game. +  * Your custom train should now show in the game.
- +
-{{:mtr_extra:resourcepack:make:2025-07-01_10.29.41.png?400}} +
- +
-==== TODO ==== +
- +
-  - How to add custom objects +
-  - How to add custom rails +
-  - How to add custom lifts+
  
  
mtr_extra/resourcepack/make/texture.1751362549.txt.gz · Last modified: 2025/07/01 09:35 by Navi