tutorial:armor_trim
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:armor_trim [2024/07/03 06:33] – solidblock | tutorial:armor_trim [2024/08/26 01:26] (current) – solidblock | ||
---|---|---|---|
Line 5: | Line 5: | ||
If you, and lets be real that's most of you, are just here to copy and paste, don't worry all important things are in big nice code blocks and the GitHub repo is at the end of this page. :) | If you, and lets be real that's most of you, are just here to copy and paste, don't worry all important things are in big nice code blocks and the GitHub repo is at the end of this page. :) | ||
- | ===== Registering | + | ===== Register |
- | In theory we don't need to add a new item since this is more data packed than it is modded, but if you would do this using only a data pack we would be missing the nice tooltip in the description of the Armor Trim item. | + | In theory we don't need to add a new item since this is more data packed than it is modded, but if you would do this using only a data pack we would be missing the nice tooltip in the description of the armor trim item. |
+ | |||
+ | To register this item we need to register it as a new '' | ||
- | To register this item we need to register it as a new ''< | ||
< | < | ||
public final class TutorialItems { | public final class TutorialItems { | ||
// adding a new SmithingTemplateItem named " | // adding a new SmithingTemplateItem named " | ||
- | public static final class_1792 TUTORIAL_ARMOR_TRIM = register(class_8052.method_48418(new class_2960(" | + | public static final class_1792 TUTORIAL_ARMOR_TRIM = register(" |
} | } | ||
</ | </ | ||
+ | |||
and in the '' | and in the '' | ||
< | < | ||
Line 26: | Line 28: | ||
And then just normal item textures if you desire so, but **NO LANG**, that comes later. | And then just normal item textures if you desire so, but **NO LANG**, that comes later. | ||
- | ===== Making | + | |
+ | ===== Make it compatible with smithing table compatible ===== | ||
To make it work with the smithing table, which is the goal, we need to create three files. | To make it work with the smithing table, which is the goal, we need to create three files. | ||
- | ==== Defining | + | ==== Define |
- | First we need to create a armor trim info file. This file is named '' | + | First we need to create a armor trim info file. This file is named '' |
Into this file we need to put these three things: | Into this file we need to put these three things: | ||
Line 37: | Line 40: | ||
And this is what that looks like in the json file: | And this is what that looks like in the json file: | ||
- | <code JavaScript> | + | <file JavaScript |
{ | { | ||
" | " | ||
Line 45: | Line 48: | ||
" | " | ||
} | } | ||
- | </code> | + | </file> |
- | ==== Smithing | + | ==== Add smithing |
The second file we need, is the smithing trim recipe. | The second file we need, is the smithing trim recipe. | ||
- | The file can be named whatever, but it's recommended to name it something related like '' | + | The file can be named whatever, but it's recommended to name it something related like '' |
- | <code JavaScript> | + | <file JavaScript |
{ | { | ||
" | " | ||
Line 64: | Line 67: | ||
} | } | ||
} | } | ||
- | </code> | + | </file> |
Take note that only the last parameter ever changes and the first three stay the same. | Take note that only the last parameter ever changes and the first three stay the same. | ||
- | ==== Adding | + | ==== Add it to tags ==== |
- | The third file is technically optional, but we will still make it, because it's needed for the [[tag]] search in the creative inventory and maybe something else (idk, haven' | + | The third file is technically optional, but we will still make it, because it's needed for the [[tags|tag]] search in the creative inventory and maybe something else. It is named '' |
Inside the file is: | Inside the file is: | ||
- | <code JavaScript> | + | <file JavaScript |
{ | { | ||
" | " | ||
Line 78: | Line 81: | ||
] | ] | ||
} | } | ||
- | </code> | + | </file> |
Now if we would theoretically test this, it would work but we would be greeted by the beautiful missing texture texture. So we need to: | Now if we would theoretically test this, it would work but we would be greeted by the beautiful missing texture texture. So we need to: | ||
Line 85: | Line 88: | ||
Lets begin with making the trim textures first and then do the lang. | Lets begin with making the trim textures first and then do the lang. | ||
- | ==== Trim textures ==== | + | ==== Add textures ==== |
The first file we need just points to the different texture locations and that's pretty much it. | The first file we need just points to the different texture locations and that's pretty much it. | ||
- | The file is named '' | + | The file is named '' |
- | <code JavaScript> | + | <file JavaScript |
{ | { | ||
" | " | ||
Line 151: | Line 154: | ||
] | ] | ||
} | } | ||
- | </code> | + | </file> |
Now, the file has a lot inside but the only change is this tiny part: | Now, the file has a lot inside but the only change is this tiny part: | ||
Line 170: | Line 173: | ||
In the '' | In the '' | ||
- | <code JavaScript> | + | <file JavaScript |
{ | { | ||
" | " | ||
} | } | ||
- | </code> | + | </file> |
But with this final step, we are done. Have fun with your new armor trims. | But with this final step, we are done. Have fun with your new armor trims. | ||
If you have any more questions you can ask them on the Farbic discord and ping me @herrchaos or just look at the source code of this tutorial at: [[https:// | If you have any more questions you can ask them on the Farbic discord and ping me @herrchaos or just look at the source code of this tutorial at: [[https:// |
tutorial/armor_trim.1719988380.txt.gz · Last modified: 2024/07/03 06:33 by solidblock