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/11 23:12] (current) – Changed the title 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 center round important 90%>
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 to [[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]] for 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 Bloackbench, and apply the texture you've downloaded by dragging to the Textures area on the bottom left. A dialogue show 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 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 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.]] 
- +
-  * Return to the ''mtr_custom_resources.json''. Inside the square brackets of ''"signs"'', add the following code. +
- +
-<code json mtr_custom_resources.json> +
-+
- "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.   * Replace the ''id'' to an ID that you like. Only a-z, 0-9, -, _ and ! are accepted.
-  * Replace the ''textureResource'' with the path to the icon.+  * 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.
  
-=== Optional components ===+<WRAP center round tip 90%>
  
-  * Replace the ''customText'' with any text that you want to render. Use vertical bar (|) to separate between two languages. +If you want to have train without the door overlay, simply remove the models with door overlay properties and models defined
-  * 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.+</WRAP>
  
   * 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