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:36] – [Register the item] solidblock | tutorial:armor_trim [2024/08/26 01:26] (current) – solidblock | ||
---|---|---|---|
Line 8: | Line 8: | ||
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(" |
} | } | ||
</ | </ | ||
Line 32: | Line 32: | ||
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. | ||
==== Define the armor trim ==== | ==== Define the armor trim ==== | ||
- | 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 40: | 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 48: | Line 48: | ||
" | " | ||
} | } | ||
- | </code> | + | </file> |
==== Add smithing recipe ==== | ==== Add smithing recipe ==== | ||
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 67: | 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. | ||
==== Add it to tags ==== | ==== Add it to tags ==== | ||
- | 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 (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 81: | 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 91: | Line 91: | ||
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 154: | 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 173: | 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.1719988594.txt.gz · Last modified: 2024/07/03 06:36 by solidblock